[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/build/routes/connectors-home/ -> content.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/i18n
  32  var require_i18n = __commonJS({
  33    "package-external:@wordpress/i18n"(exports, module) {
  34      module.exports = window.wp.i18n;
  35    }
  36  });
  37  
  38  // package-external:@wordpress/element
  39  var require_element = __commonJS({
  40    "package-external:@wordpress/element"(exports, module) {
  41      module.exports = window.wp.element;
  42    }
  43  });
  44  
  45  // vendor-external:react
  46  var require_react = __commonJS({
  47    "vendor-external:react"(exports, module) {
  48      module.exports = window.React;
  49    }
  50  });
  51  
  52  // vendor-external:react/jsx-runtime
  53  var require_jsx_runtime = __commonJS({
  54    "vendor-external:react/jsx-runtime"(exports, module) {
  55      module.exports = window.ReactJSXRuntime;
  56    }
  57  });
  58  
  59  // vendor-external:react-dom
  60  var require_react_dom = __commonJS({
  61    "vendor-external:react-dom"(exports, module) {
  62      module.exports = window.ReactDOM;
  63    }
  64  });
  65  
  66  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  67  var require_use_sync_external_store_shim_development = __commonJS({
  68    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  69      "use strict";
  70      (function() {
  71        function is(x, y) {
  72          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  73        }
  74        function useSyncExternalStore$2(subscribe, getSnapshot) {
  75          didWarnOld18Alpha || void 0 === React52.startTransition || (didWarnOld18Alpha = true, console.error(
  76            "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."
  77          ));
  78          var value = getSnapshot();
  79          if (!didWarnUncachedGetSnapshot) {
  80            var cachedValue = getSnapshot();
  81            objectIs(value, cachedValue) || (console.error(
  82              "The result of getSnapshot should be cached to avoid an infinite loop"
  83            ), didWarnUncachedGetSnapshot = true);
  84          }
  85          cachedValue = useState14({
  86            inst: { value, getSnapshot }
  87          });
  88          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  89          useLayoutEffect3(
  90            function() {
  91              inst.value = value;
  92              inst.getSnapshot = getSnapshot;
  93              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
  94            },
  95            [subscribe, value, getSnapshot]
  96          );
  97          useEffect15(
  98            function() {
  99              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 100              return subscribe(function() {
 101                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 102              });
 103            },
 104            [subscribe]
 105          );
 106          useDebugValue2(value);
 107          return value;
 108        }
 109        function checkIfSnapshotChanged(inst) {
 110          var latestGetSnapshot = inst.getSnapshot;
 111          inst = inst.value;
 112          try {
 113            var nextValue = latestGetSnapshot();
 114            return !objectIs(inst, nextValue);
 115          } catch (error2) {
 116            return true;
 117          }
 118        }
 119        function useSyncExternalStore$1(subscribe, getSnapshot) {
 120          return getSnapshot();
 121        }
 122        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 123        var React52 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState14 = React52.useState, useEffect15 = React52.useEffect, useLayoutEffect3 = React52.useLayoutEffect, useDebugValue2 = React52.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 124        exports.useSyncExternalStore = void 0 !== React52.useSyncExternalStore ? React52.useSyncExternalStore : shim;
 125        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 126      })();
 127    }
 128  });
 129  
 130  // node_modules/use-sync-external-store/shim/index.js
 131  var require_shim = __commonJS({
 132    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 133      "use strict";
 134      if (false) {
 135        module.exports = null;
 136      } else {
 137        module.exports = require_use_sync_external_store_shim_development();
 138      }
 139    }
 140  });
 141  
 142  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 143  var require_with_selector_development = __commonJS({
 144    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 145      "use strict";
 146      (function() {
 147        function is(x, y) {
 148          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 149        }
 150        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 151        var React52 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef21 = React52.useRef, useEffect15 = React52.useEffect, useMemo17 = React52.useMemo, useDebugValue2 = React52.useDebugValue;
 152        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 153          var instRef = useRef21(null);
 154          if (null === instRef.current) {
 155            var inst = { hasValue: false, value: null };
 156            instRef.current = inst;
 157          } else inst = instRef.current;
 158          instRef = useMemo17(
 159            function() {
 160              function memoizedSelector(nextSnapshot) {
 161                if (!hasMemo) {
 162                  hasMemo = true;
 163                  memoizedSnapshot = nextSnapshot;
 164                  nextSnapshot = selector(nextSnapshot);
 165                  if (void 0 !== isEqual && inst.hasValue) {
 166                    var currentSelection = inst.value;
 167                    if (isEqual(currentSelection, nextSnapshot))
 168                      return memoizedSelection = currentSelection;
 169                  }
 170                  return memoizedSelection = nextSnapshot;
 171                }
 172                currentSelection = memoizedSelection;
 173                if (objectIs(memoizedSnapshot, nextSnapshot))
 174                  return currentSelection;
 175                var nextSelection = selector(nextSnapshot);
 176                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 177                  return memoizedSnapshot = nextSnapshot, currentSelection;
 178                memoizedSnapshot = nextSnapshot;
 179                return memoizedSelection = nextSelection;
 180              }
 181              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 182              return [
 183                function() {
 184                  return memoizedSelector(getSnapshot());
 185                },
 186                null === maybeGetServerSnapshot ? void 0 : function() {
 187                  return memoizedSelector(maybeGetServerSnapshot());
 188                }
 189              ];
 190            },
 191            [getSnapshot, getServerSnapshot, selector, isEqual]
 192          );
 193          var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 194          useEffect15(
 195            function() {
 196              inst.hasValue = true;
 197              inst.value = value;
 198            },
 199            [value]
 200          );
 201          useDebugValue2(value);
 202          return value;
 203        };
 204        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 205      })();
 206    }
 207  });
 208  
 209  // node_modules/use-sync-external-store/shim/with-selector.js
 210  var require_with_selector = __commonJS({
 211    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 212      "use strict";
 213      if (false) {
 214        module.exports = null;
 215      } else {
 216        module.exports = require_with_selector_development();
 217      }
 218    }
 219  });
 220  
 221  // package-external:@wordpress/theme
 222  var require_theme = __commonJS({
 223    "package-external:@wordpress/theme"(exports, module) {
 224      module.exports = window.wp.theme;
 225    }
 226  });
 227  
 228  // package-external:@wordpress/private-apis
 229  var require_private_apis = __commonJS({
 230    "package-external:@wordpress/private-apis"(exports, module) {
 231      module.exports = window.wp.privateApis;
 232    }
 233  });
 234  
 235  // package-external:@wordpress/primitives
 236  var require_primitives = __commonJS({
 237    "package-external:@wordpress/primitives"(exports, module) {
 238      module.exports = window.wp.primitives;
 239    }
 240  });
 241  
 242  // package-external:@wordpress/components
 243  var require_components = __commonJS({
 244    "package-external:@wordpress/components"(exports, module) {
 245      module.exports = window.wp.components;
 246    }
 247  });
 248  
 249  // package-external:@wordpress/data
 250  var require_data = __commonJS({
 251    "package-external:@wordpress/data"(exports, module) {
 252      module.exports = window.wp.data;
 253    }
 254  });
 255  
 256  // package-external:@wordpress/core-data
 257  var require_core_data = __commonJS({
 258    "package-external:@wordpress/core-data"(exports, module) {
 259      module.exports = window.wp.coreData;
 260    }
 261  });
 262  
 263  // package-external:@wordpress/notices
 264  var require_notices = __commonJS({
 265    "package-external:@wordpress/notices"(exports, module) {
 266      module.exports = window.wp.notices;
 267    }
 268  });
 269  
 270  // package-external:@wordpress/url
 271  var require_url = __commonJS({
 272    "package-external:@wordpress/url"(exports, module) {
 273      module.exports = window.wp.url;
 274    }
 275  });
 276  
 277  // node_modules/clsx/dist/clsx.mjs
 278  function r(e) {
 279    var t, f, n = "";
 280    if ("string" == typeof e || "number" == typeof e) n += e;
 281    else if ("object" == typeof e) if (Array.isArray(e)) {
 282      var o = e.length;
 283      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 284    } else for (f in e) e[f] && (n && (n += " "), n += f);
 285    return n;
 286  }
 287  function clsx() {
 288    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 289    return n;
 290  }
 291  var clsx_default = clsx;
 292  
 293  // packages/ui/build-module/badge/badge.mjs
 294  var import_element11 = __toESM(require_element(), 1);
 295  
 296  // node_modules/@base-ui/utils/createLogOnce.mjs
 297  var loggedMessages;
 298  if (true) {
 299    loggedMessages = /* @__PURE__ */ new Set();
 300  }
 301  function createLogOnce(severity, prefix) {
 302    return function logOnce(...messages) {
 303      if (true) {
 304        const message = messages.join(" ");
 305        const output = prefix ? `$prefix}: $message}` : message;
 306        const key = `$severity}:$output}`;
 307        if (!loggedMessages.has(key)) {
 308          loggedMessages.add(key);
 309          if (severity === "warn") {
 310            console.warn(output);
 311          } else {
 312            console.error(output);
 313          }
 314        }
 315      }
 316    };
 317  }
 318  
 319  // node_modules/@base-ui/utils/error.mjs
 320  var error = createLogOnce("error", "Base UI");
 321  
 322  // node_modules/@base-ui/utils/safeReact.mjs
 323  var React = __toESM(require_react(), 1);
 324  var SafeReact = {
 325    ...React
 326  };
 327  
 328  // node_modules/@base-ui/utils/useRefWithInit.mjs
 329  var React2 = __toESM(require_react(), 1);
 330  var UNINITIALIZED = {};
 331  function useRefWithInit(init, initArg) {
 332    const ref = React2.useRef(UNINITIALIZED);
 333    if (ref.current === UNINITIALIZED) {
 334      ref.current = init(initArg);
 335    }
 336    return ref;
 337  }
 338  
 339  // node_modules/@base-ui/utils/useStableCallback.mjs
 340  var useInsertionEffect = SafeReact.useInsertionEffect;
 341  var useSafeInsertionEffect = (
 342    // React 17 doesn't have useInsertionEffect.
 343    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 344    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 345  );
 346  function useStableCallback(callback) {
 347    const stable = useRefWithInit(createStableCallback).current;
 348    stable.next = callback;
 349    useSafeInsertionEffect(stable.effect);
 350    return stable.trampoline;
 351  }
 352  function createStableCallback() {
 353    const stable = {
 354      next: void 0,
 355      callback: assertNotCalled,
 356      trampoline: (...args) => stable.callback?.(...args),
 357      effect: () => {
 358        stable.callback = stable.next;
 359      }
 360    };
 361    return stable;
 362  }
 363  function assertNotCalled() {
 364    if (true) {
 365      throw (
 366        /* minify-error-disabled */
 367        new Error("Base UI: Cannot call an event handler while rendering.")
 368      );
 369    }
 370  }
 371  
 372  // node_modules/@base-ui/utils/warn.mjs
 373  var warn = createLogOnce("warn", "Base UI");
 374  
 375  // node_modules/@base-ui/utils/empty.mjs
 376  function NOOP() {
 377  }
 378  var EMPTY_ARRAY = Object.freeze([]);
 379  var EMPTY_OBJECT = Object.freeze({});
 380  
 381  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 382  var React3 = __toESM(require_react(), 1);
 383  var noop = () => {
 384  };
 385  var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
 386  
 387  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 388  var React6 = __toESM(require_react(), 1);
 389  
 390  // node_modules/@base-ui/utils/useMergedRefs.mjs
 391  function useMergedRefs(a, b, c, d) {
 392    const forkRef = useRefWithInit(createForkRef).current;
 393    if (didChange(forkRef, a, b, c, d)) {
 394      update(forkRef, [a, b, c, d]);
 395    }
 396    return forkRef.callback;
 397  }
 398  function useMergedRefsN(refs) {
 399    const forkRef = useRefWithInit(createForkRef).current;
 400    if (didChangeN(forkRef, refs)) {
 401      update(forkRef, refs);
 402    }
 403    return forkRef.callback;
 404  }
 405  function createForkRef() {
 406    return {
 407      callback: null,
 408      cleanup: null,
 409      refs: []
 410    };
 411  }
 412  function didChange(forkRef, a, b, c, d) {
 413    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 414  }
 415  function didChangeN(forkRef, newRefs) {
 416    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 417  }
 418  function update(forkRef, refs) {
 419    forkRef.refs = refs;
 420    if (refs.every((ref) => ref == null)) {
 421      forkRef.callback = null;
 422      return;
 423    }
 424    forkRef.callback = (instance) => {
 425      if (forkRef.cleanup) {
 426        forkRef.cleanup();
 427        forkRef.cleanup = null;
 428      }
 429      if (instance != null) {
 430        const cleanupCallbacks = Array(refs.length).fill(null);
 431        for (let i = 0; i < refs.length; i += 1) {
 432          const ref = refs[i];
 433          if (ref == null) {
 434            continue;
 435          }
 436          switch (typeof ref) {
 437            case "function": {
 438              const refCleanup = ref(instance);
 439              if (typeof refCleanup === "function") {
 440                cleanupCallbacks[i] = refCleanup;
 441              }
 442              break;
 443            }
 444            case "object": {
 445              ref.current = instance;
 446              break;
 447            }
 448            default:
 449          }
 450        }
 451        forkRef.cleanup = () => {
 452          for (let i = 0; i < refs.length; i += 1) {
 453            const ref = refs[i];
 454            if (ref == null) {
 455              continue;
 456            }
 457            switch (typeof ref) {
 458              case "function": {
 459                const cleanupCallback = cleanupCallbacks[i];
 460                if (typeof cleanupCallback === "function") {
 461                  cleanupCallback();
 462                } else {
 463                  void ref(null);
 464                }
 465                break;
 466              }
 467              case "object": {
 468                ref.current = null;
 469                break;
 470              }
 471              default:
 472            }
 473          }
 474        };
 475      }
 476    };
 477  }
 478  
 479  // node_modules/@base-ui/utils/getReactElementRef.mjs
 480  var React5 = __toESM(require_react(), 1);
 481  
 482  // node_modules/@base-ui/utils/reactVersion.mjs
 483  var React4 = __toESM(require_react(), 1);
 484  var majorVersion = parseInt(React4.version, 10);
 485  function isReactVersionAtLeast(reactVersionToCheck) {
 486    return majorVersion >= reactVersionToCheck;
 487  }
 488  
 489  // node_modules/@base-ui/utils/getReactElementRef.mjs
 490  function getReactElementRef(element) {
 491    if (!/* @__PURE__ */ React5.isValidElement(element)) {
 492      return null;
 493    }
 494    const reactElement = element;
 495    const propsWithRef = reactElement.props;
 496    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 497  }
 498  
 499  // node_modules/@base-ui/utils/mergeObjects.mjs
 500  function mergeObjects(a, b) {
 501    if (a && !b) {
 502      return a;
 503    }
 504    if (!a && b) {
 505      return b;
 506    }
 507    if (a || b) {
 508      return {
 509        ...a,
 510        ...b
 511      };
 512    }
 513    return void 0;
 514  }
 515  
 516  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 517  function getStateAttributesProps(state, customMapping) {
 518    const props = {};
 519    for (const key in state) {
 520      const value = state[key];
 521      if (customMapping?.hasOwnProperty(key)) {
 522        const customProps = customMapping[key](value);
 523        if (customProps != null) {
 524          Object.assign(props, customProps);
 525        }
 526        continue;
 527      }
 528      if (value === true) {
 529        props[`data-$key.toLowerCase()}`] = "";
 530      } else if (value) {
 531        props[`data-$key.toLowerCase()}`] = value.toString();
 532      }
 533    }
 534    return props;
 535  }
 536  
 537  // node_modules/@base-ui/react/utils/resolveClassName.mjs
 538  function resolveClassName(className, state) {
 539    return typeof className === "function" ? className(state) : className;
 540  }
 541  
 542  // node_modules/@base-ui/react/utils/resolveStyle.mjs
 543  function resolveStyle(style, state) {
 544    return typeof style === "function" ? style(state) : style;
 545  }
 546  
 547  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 548  var EMPTY_PROPS = {};
 549  function mergeProps(a, b, c, d, e) {
 550    if (!c && !d && !e && !a) {
 551      return createInitialMergedProps(b);
 552    }
 553    let merged = createInitialMergedProps(a);
 554    if (b) {
 555      merged = mergeInto(merged, b);
 556    }
 557    if (c) {
 558      merged = mergeInto(merged, c);
 559    }
 560    if (d) {
 561      merged = mergeInto(merged, d);
 562    }
 563    if (e) {
 564      merged = mergeInto(merged, e);
 565    }
 566    return merged;
 567  }
 568  function mergePropsN(props) {
 569    if (props.length === 0) {
 570      return EMPTY_PROPS;
 571    }
 572    if (props.length === 1) {
 573      return createInitialMergedProps(props[0]);
 574    }
 575    let merged = createInitialMergedProps(props[0]);
 576    for (let i = 1; i < props.length; i += 1) {
 577      merged = mergeInto(merged, props[i]);
 578    }
 579    return merged;
 580  }
 581  function createInitialMergedProps(inputProps) {
 582    if (isPropsGetter(inputProps)) {
 583      return {
 584        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 585      };
 586    }
 587    return copyInitialProps(inputProps);
 588  }
 589  function mergeInto(merged, inputProps) {
 590    if (isPropsGetter(inputProps)) {
 591      return resolvePropsGetter(inputProps, merged);
 592    }
 593    return mutablyMergeInto(merged, inputProps);
 594  }
 595  function copyInitialProps(inputProps) {
 596    const copiedProps = {
 597      ...inputProps
 598    };
 599    for (const propName in copiedProps) {
 600      const propValue = copiedProps[propName];
 601      if (isEventHandler(propName, propValue)) {
 602        copiedProps[propName] = wrapEventHandler(propValue);
 603      }
 604    }
 605    return copiedProps;
 606  }
 607  function mutablyMergeInto(mergedProps, externalProps) {
 608    if (!externalProps) {
 609      return mergedProps;
 610    }
 611    for (const propName in externalProps) {
 612      const externalPropValue = externalProps[propName];
 613      switch (propName) {
 614        case "style": {
 615          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 616          break;
 617        }
 618        case "className": {
 619          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 620          break;
 621        }
 622        default: {
 623          if (isEventHandler(propName, externalPropValue)) {
 624            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 625          } else {
 626            mergedProps[propName] = externalPropValue;
 627          }
 628        }
 629      }
 630    }
 631    return mergedProps;
 632  }
 633  function isEventHandler(key, value) {
 634    const code0 = key.charCodeAt(0);
 635    const code1 = key.charCodeAt(1);
 636    const code2 = key.charCodeAt(2);
 637    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 638  }
 639  function isPropsGetter(inputProps) {
 640    return typeof inputProps === "function";
 641  }
 642  function resolvePropsGetter(inputProps, previousProps) {
 643    if (isPropsGetter(inputProps)) {
 644      return inputProps(previousProps);
 645    }
 646    return inputProps ?? EMPTY_PROPS;
 647  }
 648  function mergeEventHandlers(ourHandler, theirHandler) {
 649    if (!theirHandler) {
 650      return ourHandler;
 651    }
 652    if (!ourHandler) {
 653      return wrapEventHandler(theirHandler);
 654    }
 655    return (...args) => {
 656      const event = args[0];
 657      if (isSyntheticEvent(event)) {
 658        const baseUIEvent = event;
 659        makeEventPreventable(baseUIEvent);
 660        const result2 = theirHandler(...args);
 661        if (!baseUIEvent.baseUIHandlerPrevented) {
 662          ourHandler?.(...args);
 663        }
 664        return result2;
 665      }
 666      const result = theirHandler(...args);
 667      ourHandler?.(...args);
 668      return result;
 669    };
 670  }
 671  function wrapEventHandler(handler) {
 672    if (!handler) {
 673      return handler;
 674    }
 675    return (...args) => {
 676      const event = args[0];
 677      if (isSyntheticEvent(event)) {
 678        makeEventPreventable(event);
 679      }
 680      return handler(...args);
 681    };
 682  }
 683  function makeEventPreventable(event) {
 684    event.preventBaseUIHandler = () => {
 685      event.baseUIHandlerPrevented = true;
 686    };
 687    return event;
 688  }
 689  function mergeClassNames(ourClassName, theirClassName) {
 690    if (theirClassName) {
 691      if (ourClassName) {
 692        return theirClassName + " " + ourClassName;
 693      }
 694      return theirClassName;
 695    }
 696    return ourClassName;
 697  }
 698  function isSyntheticEvent(event) {
 699    return event != null && typeof event === "object" && "nativeEvent" in event;
 700  }
 701  
 702  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 703  var import_react = __toESM(require_react(), 1);
 704  function useRenderElement(element, componentProps, params = {}) {
 705    let renderProp = componentProps.render;
 706    if (params.enabled !== false) {
 707      renderProp = unwrapLazyRenderProp(renderProp);
 708    }
 709    const outProps = useRenderElementProps(componentProps, params, renderProp);
 710    if (params.enabled === false) {
 711      return null;
 712    }
 713    const state = params.state ?? EMPTY_OBJECT;
 714    return evaluateRenderProp(element, renderProp, outProps, state);
 715  }
 716  function useRenderElementProps(componentProps, params, renderProp) {
 717    const {
 718      className: classNameProp,
 719      style: styleProp
 720    } = componentProps;
 721    const {
 722      state = EMPTY_OBJECT,
 723      ref,
 724      props,
 725      stateAttributesMapping,
 726      enabled = true
 727    } = params;
 728    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 729    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 730    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
 731    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 732    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 733    if (typeof document !== "undefined") {
 734      if (!enabled) {
 735        void useMergedRefs(null, null);
 736      } else if (Array.isArray(ref)) {
 737        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 738      } else {
 739        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 740      }
 741    }
 742    if (!enabled) {
 743      return EMPTY_OBJECT;
 744    }
 745    if (className !== void 0) {
 746      outProps.className = mergeClassNames(outProps.className, className);
 747    }
 748    if (style !== void 0) {
 749      outProps.style = mergeObjects(outProps.style, style);
 750    }
 751    return outProps;
 752  }
 753  function resolveRenderFunctionProps(props) {
 754    if (Array.isArray(props)) {
 755      return mergePropsN(props);
 756    }
 757    return mergeProps(void 0, props);
 758  }
 759  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 760  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 761  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 762  function unwrapLazyRenderProp(render) {
 763    if (render?.$$typeof !== REACT_LAZY_TYPE) {
 764      return render;
 765    }
 766    const unwrapped = React6.Children.toArray(render)[0];
 767    return /* @__PURE__ */ React6.isValidElement(unwrapped) ? unwrapped : render;
 768  }
 769  function evaluateRenderProp(element, render, props, state) {
 770    if (render) {
 771      if (typeof render === "function") {
 772        if (true) {
 773          warnIfRenderPropLooksLikeComponent(render);
 774        }
 775        return render(props, state);
 776      }
 777      const mergedProps = mergeProps(props, render.props);
 778      mergedProps.ref = props.ref;
 779      if (true) {
 780        if (!/* @__PURE__ */ React6.isValidElement(render)) {
 781          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"));
 782        }
 783      }
 784      return /* @__PURE__ */ React6.cloneElement(render, mergedProps);
 785    }
 786    if (element) {
 787      if (typeof element === "string") {
 788        return renderTag(element, props);
 789      }
 790    }
 791    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 792  }
 793  function warnIfRenderPropLooksLikeComponent(renderFn) {
 794    const functionName = renderFn.name;
 795    if (functionName.length === 0) {
 796      return;
 797    }
 798    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 799      return;
 800    }
 801    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 802      return;
 803    }
 804    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");
 805  }
 806  function renderTag(Tag, props) {
 807    if (Tag === "button") {
 808      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 809        type: "button",
 810        ...props,
 811        key: props.key
 812      });
 813    }
 814    if (Tag === "img") {
 815      return /* @__PURE__ */ (0, import_react.createElement)("img", {
 816        alt: "",
 817        ...props,
 818        key: props.key
 819      });
 820    }
 821    return /* @__PURE__ */ React6.createElement(Tag, props);
 822  }
 823  
 824  // node_modules/@base-ui/utils/useId.mjs
 825  var React7 = __toESM(require_react(), 1);
 826  var globalId = 0;
 827  function useGlobalId(idOverride, prefix = "mui") {
 828    const [defaultId, setDefaultId] = React7.useState(idOverride);
 829    const id = idOverride || defaultId;
 830    React7.useEffect(() => {
 831      if (defaultId == null) {
 832        globalId += 1;
 833        setDefaultId(`$prefix}-$globalId}`);
 834      }
 835    }, [defaultId, prefix]);
 836    return id;
 837  }
 838  var maybeReactUseId = SafeReact.useId;
 839  function useId(idOverride, prefix) {
 840    if (maybeReactUseId !== void 0) {
 841      const reactId = maybeReactUseId();
 842      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
 843    }
 844    return useGlobalId(idOverride, prefix);
 845  }
 846  
 847  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
 848  function useBaseUiId(idOverride) {
 849    return useId(idOverride, "base-ui");
 850  }
 851  
 852  // node_modules/@base-ui/react/internals/reason-parts.mjs
 853  var reason_parts_exports = {};
 854  __export(reason_parts_exports, {
 855    cancelOpen: () => cancelOpen,
 856    chipRemovePress: () => chipRemovePress,
 857    clearPress: () => clearPress,
 858    closePress: () => closePress,
 859    closeWatcher: () => closeWatcher,
 860    decrementPress: () => decrementPress,
 861    disabled: () => disabled,
 862    drag: () => drag,
 863    escapeKey: () => escapeKey,
 864    focusOut: () => focusOut,
 865    imperativeAction: () => imperativeAction,
 866    incrementPress: () => incrementPress,
 867    initial: () => initial,
 868    inputBlur: () => inputBlur,
 869    inputChange: () => inputChange,
 870    inputClear: () => inputClear,
 871    inputPaste: () => inputPaste,
 872    inputPress: () => inputPress,
 873    itemPress: () => itemPress,
 874    keyboard: () => keyboard,
 875    linkPress: () => linkPress,
 876    listNavigation: () => listNavigation,
 877    missing: () => missing,
 878    none: () => none,
 879    outsidePress: () => outsidePress,
 880    pointer: () => pointer,
 881    scrub: () => scrub,
 882    siblingOpen: () => siblingOpen,
 883    swipe: () => swipe,
 884    trackPress: () => trackPress,
 885    triggerFocus: () => triggerFocus,
 886    triggerHover: () => triggerHover,
 887    triggerPress: () => triggerPress,
 888    wheel: () => wheel,
 889    windowResize: () => windowResize
 890  });
 891  var none = "none";
 892  var triggerPress = "trigger-press";
 893  var triggerHover = "trigger-hover";
 894  var triggerFocus = "trigger-focus";
 895  var outsidePress = "outside-press";
 896  var itemPress = "item-press";
 897  var closePress = "close-press";
 898  var linkPress = "link-press";
 899  var clearPress = "clear-press";
 900  var chipRemovePress = "chip-remove-press";
 901  var trackPress = "track-press";
 902  var incrementPress = "increment-press";
 903  var decrementPress = "decrement-press";
 904  var inputChange = "input-change";
 905  var inputClear = "input-clear";
 906  var inputBlur = "input-blur";
 907  var inputPaste = "input-paste";
 908  var inputPress = "input-press";
 909  var focusOut = "focus-out";
 910  var escapeKey = "escape-key";
 911  var closeWatcher = "close-watcher";
 912  var listNavigation = "list-navigation";
 913  var keyboard = "keyboard";
 914  var pointer = "pointer";
 915  var drag = "drag";
 916  var wheel = "wheel";
 917  var scrub = "scrub";
 918  var cancelOpen = "cancel-open";
 919  var siblingOpen = "sibling-open";
 920  var disabled = "disabled";
 921  var missing = "missing";
 922  var initial = "initial";
 923  var imperativeAction = "imperative-action";
 924  var swipe = "swipe";
 925  var windowResize = "window-resize";
 926  
 927  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
 928  function createChangeEventDetails(reason, event, trigger, customProperties) {
 929    let canceled = false;
 930    let allowPropagation = false;
 931    const custom = customProperties ?? EMPTY_OBJECT;
 932    const details = {
 933      reason,
 934      event: event ?? new Event("base-ui"),
 935      cancel() {
 936        canceled = true;
 937      },
 938      allowPropagation() {
 939        allowPropagation = true;
 940      },
 941      get isCanceled() {
 942        return canceled;
 943      },
 944      get isPropagationAllowed() {
 945        return allowPropagation;
 946      },
 947      trigger,
 948      ...custom
 949    };
 950    return details;
 951  }
 952  
 953  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
 954  var React9 = __toESM(require_react(), 1);
 955  
 956  // node_modules/@base-ui/utils/useOnMount.mjs
 957  var React8 = __toESM(require_react(), 1);
 958  function useOnMount(fn) {
 959    React8.useEffect(fn, EMPTY_ARRAY);
 960  }
 961  
 962  // node_modules/@base-ui/utils/useAnimationFrame.mjs
 963  var EMPTY = null;
 964  var LAST_RAF = globalThis.requestAnimationFrame;
 965  var Scheduler = class {
 966    /* This implementation uses an array as a backing data-structure for frame callbacks.
 967     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
 968     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
 969     * be much more efficient if there is a call pattern that alterns as
 970     * "request-cancel-request-cancel-…".
 971     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
 972     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
 973    callbacks = [];
 974    callbacksCount = 0;
 975    nextId = 1;
 976    startId = 1;
 977    isScheduled = false;
 978    tick = (timestamp) => {
 979      this.isScheduled = false;
 980      const currentCallbacks = this.callbacks;
 981      const currentCallbacksCount = this.callbacksCount;
 982      this.callbacks = [];
 983      this.callbacksCount = 0;
 984      this.startId = this.nextId;
 985      if (currentCallbacksCount > 0) {
 986        for (let i = 0; i < currentCallbacks.length; i += 1) {
 987          currentCallbacks[i]?.(timestamp);
 988        }
 989      }
 990    };
 991    request(fn) {
 992      const id = this.nextId;
 993      this.nextId += 1;
 994      this.callbacks.push(fn);
 995      this.callbacksCount += 1;
 996      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
 997      if (!this.isScheduled || didRAFChange) {
 998        requestAnimationFrame(this.tick);
 999        this.isScheduled = true;
1000      }
1001      return id;
1002    }
1003    cancel(id) {
1004      const index2 = id - this.startId;
1005      if (index2 < 0 || index2 >= this.callbacks.length) {
1006        return;
1007      }
1008      if (this.callbacks[index2] === null) {
1009        return;
1010      }
1011      this.callbacks[index2] = null;
1012      this.callbacksCount -= 1;
1013    }
1014  };
1015  var scheduler = new Scheduler();
1016  var AnimationFrame = class _AnimationFrame {
1017    static create() {
1018      return new _AnimationFrame();
1019    }
1020    static request(fn) {
1021      return scheduler.request(fn);
1022    }
1023    static cancel(id) {
1024      return scheduler.cancel(id);
1025    }
1026    currentId = EMPTY;
1027    /**
1028     * Executes `fn` after `delay`, clearing any previously scheduled call.
1029     */
1030    request(fn) {
1031      this.cancel();
1032      this.currentId = scheduler.request(() => {
1033        this.currentId = EMPTY;
1034        fn();
1035      });
1036    }
1037    cancel = () => {
1038      if (this.currentId !== EMPTY) {
1039        scheduler.cancel(this.currentId);
1040        this.currentId = EMPTY;
1041      }
1042    };
1043    disposeEffect = () => {
1044      return this.cancel;
1045    };
1046  };
1047  function useAnimationFrame() {
1048    const timeout = useRefWithInit(AnimationFrame.create).current;
1049    useOnMount(timeout.disposeEffect);
1050    return timeout;
1051  }
1052  
1053  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1054  function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1055    const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0);
1056    const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen);
1057    if (open2 && !mounted) {
1058      setMounted(true);
1059      setTransitionStatus("starting");
1060    }
1061    if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) {
1062      setTransitionStatus("ending");
1063    }
1064    if (!open2 && !mounted && transitionStatus === "ending") {
1065      setTransitionStatus(void 0);
1066    }
1067    useIsoLayoutEffect(() => {
1068      if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
1069        const frame = AnimationFrame.request(() => {
1070          setTransitionStatus("ending");
1071        });
1072        return () => {
1073          AnimationFrame.cancel(frame);
1074        };
1075      }
1076      return void 0;
1077    }, [open2, mounted, transitionStatus, deferEndingState]);
1078    useIsoLayoutEffect(() => {
1079      if (!open2 || enableIdleState) {
1080        return void 0;
1081      }
1082      const frame = AnimationFrame.request(() => {
1083        setTransitionStatus(void 0);
1084      });
1085      return () => {
1086        AnimationFrame.cancel(frame);
1087      };
1088    }, [enableIdleState, open2]);
1089    useIsoLayoutEffect(() => {
1090      if (!open2 || !enableIdleState) {
1091        return void 0;
1092      }
1093      if (open2 && mounted && transitionStatus !== "idle") {
1094        setTransitionStatus("starting");
1095      }
1096      const frame = AnimationFrame.request(() => {
1097        setTransitionStatus("idle");
1098      });
1099      return () => {
1100        AnimationFrame.cancel(frame);
1101      };
1102    }, [enableIdleState, open2, mounted, transitionStatus]);
1103    return {
1104      mounted,
1105      setMounted,
1106      transitionStatus
1107    };
1108  }
1109  
1110  // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1111  var startingStyle = "data-starting-style";
1112  var endingStyle = "data-ending-style";
1113  
1114  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1115  var STARTING_HOOK = {
1116    [startingStyle]: ""
1117  };
1118  var ENDING_HOOK = {
1119    [endingStyle]: ""
1120  };
1121  var transitionStatusMapping = {
1122    transitionStatus(value) {
1123      if (value === "starting") {
1124        return STARTING_HOOK;
1125      }
1126      if (value === "ending") {
1127        return ENDING_HOOK;
1128      }
1129      return null;
1130    }
1131  };
1132  
1133  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1134  var React12 = __toESM(require_react(), 1);
1135  
1136  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1137  function hasWindow() {
1138    return typeof window !== "undefined";
1139  }
1140  function getNodeName(node) {
1141    if (isNode(node)) {
1142      return (node.nodeName || "").toLowerCase();
1143    }
1144    return "#document";
1145  }
1146  function getWindow(node) {
1147    var _node$ownerDocument;
1148    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1149  }
1150  function getDocumentElement(node) {
1151    var _ref;
1152    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1153  }
1154  function isNode(value) {
1155    if (!hasWindow()) {
1156      return false;
1157    }
1158    return value instanceof Node || value instanceof getWindow(value).Node;
1159  }
1160  function isElement(value) {
1161    if (!hasWindow()) {
1162      return false;
1163    }
1164    return value instanceof Element || value instanceof getWindow(value).Element;
1165  }
1166  function isHTMLElement(value) {
1167    if (!hasWindow()) {
1168      return false;
1169    }
1170    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1171  }
1172  function isShadowRoot(value) {
1173    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1174      return false;
1175    }
1176    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1177  }
1178  function isOverflowElement(element) {
1179    const {
1180      overflow,
1181      overflowX,
1182      overflowY,
1183      display
1184    } = getComputedStyle2(element);
1185    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1186  }
1187  function isTableElement(element) {
1188    return /^(table|td|th)$/.test(getNodeName(element));
1189  }
1190  function isTopLayer(element) {
1191    try {
1192      if (element.matches(":popover-open")) {
1193        return true;
1194      }
1195    } catch (_e) {
1196    }
1197    try {
1198      return element.matches(":modal");
1199    } catch (_e) {
1200      return false;
1201    }
1202  }
1203  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1204  var containRe = /paint|layout|strict|content/;
1205  var isNotNone = (value) => !!value && value !== "none";
1206  var isWebKitValue;
1207  function isContainingBlock(elementOrCss) {
1208    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1209    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 || "");
1210  }
1211  function getContainingBlock(element) {
1212    let currentNode = getParentNode(element);
1213    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1214      if (isContainingBlock(currentNode)) {
1215        return currentNode;
1216      } else if (isTopLayer(currentNode)) {
1217        return null;
1218      }
1219      currentNode = getParentNode(currentNode);
1220    }
1221    return null;
1222  }
1223  function isWebKit() {
1224    if (isWebKitValue == null) {
1225      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1226    }
1227    return isWebKitValue;
1228  }
1229  function isLastTraversableNode(node) {
1230    return /^(html|body|#document)$/.test(getNodeName(node));
1231  }
1232  function getComputedStyle2(element) {
1233    return getWindow(element).getComputedStyle(element);
1234  }
1235  function getNodeScroll(element) {
1236    if (isElement(element)) {
1237      return {
1238        scrollLeft: element.scrollLeft,
1239        scrollTop: element.scrollTop
1240      };
1241    }
1242    return {
1243      scrollLeft: element.scrollX,
1244      scrollTop: element.scrollY
1245    };
1246  }
1247  function getParentNode(node) {
1248    if (getNodeName(node) === "html") {
1249      return node;
1250    }
1251    const result = (
1252      // Step into the shadow DOM of the parent of a slotted node.
1253      node.assignedSlot || // DOM Element detected.
1254      node.parentNode || // ShadowRoot detected.
1255      isShadowRoot(node) && node.host || // Fallback.
1256      getDocumentElement(node)
1257    );
1258    return isShadowRoot(result) ? result.host : result;
1259  }
1260  function getNearestOverflowAncestor(node) {
1261    const parentNode = getParentNode(node);
1262    if (isLastTraversableNode(parentNode)) {
1263      return (node.ownerDocument || node).body;
1264    }
1265    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1266      return parentNode;
1267    }
1268    return getNearestOverflowAncestor(parentNode);
1269  }
1270  function getOverflowAncestors(node, list, traverseIframes) {
1271    var _node$ownerDocument2;
1272    if (list === void 0) {
1273      list = [];
1274    }
1275    if (traverseIframes === void 0) {
1276      traverseIframes = true;
1277    }
1278    const scrollableAncestor = getNearestOverflowAncestor(node);
1279    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1280    const win = getWindow(scrollableAncestor);
1281    if (isBody) {
1282      const frameElement = getFrameElement(win);
1283      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1284    } else {
1285      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1286    }
1287  }
1288  function getFrameElement(win) {
1289    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1290  }
1291  
1292  // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1293  var React10 = __toESM(require_react(), 1);
1294  var CompositeRootContext = /* @__PURE__ */ React10.createContext(void 0);
1295  if (true) CompositeRootContext.displayName = "CompositeRootContext";
1296  function useCompositeRootContext(optional = false) {
1297    const context = React10.useContext(CompositeRootContext);
1298    if (context === void 0 && !optional) {
1299      throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1300    }
1301    return context;
1302  }
1303  
1304  // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
1305  var React11 = __toESM(require_react(), 1);
1306  function useFocusableWhenDisabled(parameters) {
1307    const {
1308      focusableWhenDisabled,
1309      disabled: disabled2,
1310      composite = false,
1311      tabIndex: tabIndexProp = 0,
1312      isNativeButton
1313    } = parameters;
1314    const isFocusableComposite = composite && focusableWhenDisabled !== false;
1315    const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1316    const props = React11.useMemo(() => {
1317      const additionalProps = {
1318        // allow Tabbing away from focusableWhenDisabled elements
1319        onKeyDown(event) {
1320          if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
1321            event.preventDefault();
1322          }
1323        }
1324      };
1325      if (!composite) {
1326        additionalProps.tabIndex = tabIndexProp;
1327        if (!isNativeButton && disabled2) {
1328          additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
1329        }
1330      }
1331      if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
1332        additionalProps["aria-disabled"] = disabled2;
1333      }
1334      if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
1335        additionalProps.disabled = disabled2;
1336      }
1337      return additionalProps;
1338    }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
1339    return {
1340      props
1341    };
1342  }
1343  
1344  // node_modules/@base-ui/utils/owner.mjs
1345  function ownerDocument(node) {
1346    return node?.ownerDocument || document;
1347  }
1348  
1349  // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
1350  function dispatchClickWithModifiers(target, sourceEvent, {
1351    detail = 0
1352  } = {}) {
1353    target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
1354      bubbles: true,
1355      cancelable: true,
1356      composed: true,
1357      detail,
1358      shiftKey: sourceEvent.shiftKey,
1359      ctrlKey: sourceEvent.ctrlKey,
1360      altKey: sourceEvent.altKey,
1361      metaKey: sourceEvent.metaKey
1362    }));
1363  }
1364  
1365  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1366  function useButton(parameters = {}) {
1367    const {
1368      disabled: disabled2 = false,
1369      focusableWhenDisabled,
1370      tabIndex = 0,
1371      native: isNativeButton = true,
1372      composite: compositeProp
1373    } = parameters;
1374    const elementRef = React12.useRef(null);
1375    const compositeRootContext = useCompositeRootContext(true);
1376    const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1377    const {
1378      props: focusableWhenDisabledProps
1379    } = useFocusableWhenDisabled({
1380      focusableWhenDisabled,
1381      disabled: disabled2,
1382      composite: isCompositeItem,
1383      tabIndex,
1384      isNativeButton
1385    });
1386    if (true) {
1387      React12.useEffect(() => {
1388        if (!elementRef.current) {
1389          return;
1390        }
1391        const isButtonTag = isButtonElement(elementRef.current);
1392        if (isNativeButton) {
1393          if (!isButtonTag) {
1394            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1395            const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
1396            error(`$message}$ownerStackMessage}`);
1397          }
1398        } else if (isButtonTag) {
1399          const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1400          const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
1401          error(`$message}$ownerStackMessage}`);
1402        }
1403      }, [isNativeButton]);
1404    }
1405    const updateDisabled = React12.useCallback(() => {
1406      const element = elementRef.current;
1407      if (!isButtonElement(element)) {
1408        return;
1409      }
1410      if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
1411        element.disabled = false;
1412      }
1413    }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1414    useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1415    const getButtonProps = React12.useCallback((externalProps = {}) => {
1416      const {
1417        onClick: externalOnClick,
1418        onMouseDown: externalOnMouseDown,
1419        onKeyUp: externalOnKeyUp,
1420        onKeyDown: externalOnKeyDown,
1421        onPointerDown: externalOnPointerDown,
1422        ...otherExternalProps
1423      } = externalProps;
1424      return mergeProps({
1425        onClick(event) {
1426          if (disabled2) {
1427            event.preventDefault();
1428            return;
1429          }
1430          externalOnClick?.(event);
1431        },
1432        onMouseDown(event) {
1433          if (!disabled2) {
1434            externalOnMouseDown?.(event);
1435          }
1436        },
1437        onKeyDown(event) {
1438          if (disabled2) {
1439            return;
1440          }
1441          makeEventPreventable(event);
1442          externalOnKeyDown?.(event);
1443          if (event.baseUIHandlerPrevented) {
1444            return;
1445          }
1446          const isCurrentTarget = event.target === event.currentTarget;
1447          const currentTarget = event.currentTarget;
1448          const isButton = isButtonElement(currentTarget);
1449          const isLink = !isNativeButton && isValidLinkElement(currentTarget);
1450          const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
1451          const isEnterKey = event.key === "Enter";
1452          const isSpaceKey = event.key === " ";
1453          const role = currentTarget.getAttribute("role");
1454          const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
1455          if (isCurrentTarget && isCompositeItem && isSpaceKey) {
1456            if (event.defaultPrevented && isTextNavigationRole) {
1457              return;
1458            }
1459            event.preventDefault();
1460            if (!isNativeButton || isButton) {
1461              event.preventBaseUIHandler();
1462              dispatchClickWithModifiers(currentTarget, event);
1463            }
1464            return;
1465          }
1466          if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
1467            if (isCurrentTarget && isLink && isSpaceKey) {
1468              event.preventDefault();
1469            }
1470            return;
1471          }
1472          if (event.defaultPrevented) {
1473            return;
1474          }
1475          event.preventDefault();
1476          if (isEnterKey) {
1477            event.preventBaseUIHandler();
1478            dispatchClickWithModifiers(currentTarget, event);
1479          }
1480        },
1481        onKeyUp(event) {
1482          if (disabled2) {
1483            return;
1484          }
1485          makeEventPreventable(event);
1486          externalOnKeyUp?.(event);
1487          if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
1488            event.preventDefault();
1489            return;
1490          }
1491          if (event.baseUIHandlerPrevented) {
1492            return;
1493          }
1494          if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
1495            event.preventBaseUIHandler();
1496            dispatchClickWithModifiers(event.currentTarget, event);
1497          }
1498        },
1499        onPointerDown(event) {
1500          if (disabled2) {
1501            event.preventDefault();
1502            return;
1503          }
1504          externalOnPointerDown?.(event);
1505        }
1506      }, isNativeButton ? {
1507        type: "button"
1508      } : {
1509        role: "button"
1510      }, focusableWhenDisabledProps, otherExternalProps);
1511    }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
1512    const buttonRef = useStableCallback((element) => {
1513      elementRef.current = element;
1514      updateDisabled();
1515    });
1516    return {
1517      getButtonProps,
1518      buttonRef
1519    };
1520  }
1521  function isButtonElement(elem) {
1522    return isHTMLElement(elem) && elem.tagName === "BUTTON";
1523  }
1524  function isValidLinkElement(elem) {
1525    return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
1526  }
1527  
1528  // node_modules/@base-ui/utils/addEventListener.mjs
1529  function addEventListener(target, type, listener, options) {
1530    target.addEventListener(type, listener, options);
1531    return () => {
1532      target.removeEventListener(type, listener, options);
1533    };
1534  }
1535  
1536  // node_modules/@base-ui/utils/useValueAsRef.mjs
1537  function useValueAsRef(value) {
1538    const latest = useRefWithInit(createLatestRef, value).current;
1539    latest.next = value;
1540    useIsoLayoutEffect(latest.effect);
1541    return latest;
1542  }
1543  function createLatestRef(value) {
1544    const latest = {
1545      current: value,
1546      next: value,
1547      effect: () => {
1548        latest.current = latest.next;
1549      }
1550    };
1551    return latest;
1552  }
1553  
1554  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1555  var React13 = __toESM(require_react(), 1);
1556  
1557  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1558  var ReactDOM = __toESM(require_react_dom(), 1);
1559  
1560  // node_modules/@base-ui/react/utils/resolveRef.mjs
1561  function resolveRef(maybeRef) {
1562    if (maybeRef == null) {
1563      return maybeRef;
1564    }
1565    return "current" in maybeRef ? maybeRef.current : maybeRef;
1566  }
1567  
1568  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1569  var pendingCallbacks = null;
1570  function flushBeforePaint(fn) {
1571    if (!pendingCallbacks) {
1572      const callbacks = [];
1573      pendingCallbacks = callbacks;
1574      queueMicrotask(() => {
1575        pendingCallbacks = null;
1576        ReactDOM.flushSync(() => {
1577          for (const callback of callbacks) {
1578            callback();
1579          }
1580        });
1581      });
1582    }
1583    pendingCallbacks.push(fn);
1584  }
1585  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1586    const frame = useAnimationFrame();
1587    return useStableCallback((fnToExecute, signal = null) => {
1588      frame.cancel();
1589      const element = resolveRef(elementOrRef);
1590      if (element == null) {
1591        return;
1592      }
1593      const resolvedElement = element;
1594      const done = () => {
1595        if (!batch) {
1596          ReactDOM.flushSync(fnToExecute);
1597          return;
1598        }
1599        flushBeforePaint(() => {
1600          if (!signal?.aborted) {
1601            fnToExecute();
1602          }
1603        });
1604      };
1605      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1606        fnToExecute();
1607        return;
1608      }
1609      function exec() {
1610        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1611          if (!signal?.aborted) {
1612            done();
1613          }
1614        }, () => {
1615          if (signal?.aborted) {
1616            return;
1617          }
1618          const currentAnimations = resolvedElement.getAnimations();
1619          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1620            exec();
1621            return;
1622          }
1623          done();
1624        });
1625      }
1626      if (waitForStartingStyleRemoved) {
1627        const startingStyleAttribute = startingStyle;
1628        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1629          frame.request(exec);
1630          return;
1631        }
1632        const attributeObserver = new MutationObserver(() => {
1633          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1634            attributeObserver.disconnect();
1635            exec();
1636          }
1637        });
1638        attributeObserver.observe(resolvedElement, {
1639          attributes: true,
1640          attributeFilter: [startingStyleAttribute]
1641        });
1642        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1643          once: true
1644        });
1645        return;
1646      }
1647      frame.request(exec);
1648    });
1649  }
1650  
1651  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1652  function useOpenChangeComplete(parameters) {
1653    const {
1654      enabled = true,
1655      open: open2,
1656      ref,
1657      batch = false,
1658      onComplete: onCompleteParam
1659    } = parameters;
1660    const onComplete = useStableCallback(onCompleteParam);
1661    const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
1662    React13.useEffect(() => {
1663      if (!enabled) {
1664        return void 0;
1665      }
1666      const abortController = new AbortController();
1667      runOnceAnimationsFinish(onComplete, abortController.signal);
1668      return () => {
1669        abortController.abort();
1670      };
1671    }, [enabled, open2, onComplete, runOnceAnimationsFinish]);
1672  }
1673  
1674  // node_modules/@base-ui/utils/platform/parts.mjs
1675  var parts_exports = {};
1676  __export(parts_exports, {
1677    engine: () => engine_exports,
1678    env: () => env_exports,
1679    mediaQuery: () => media_query_exports,
1680    os: () => os_exports,
1681    screenReader: () => screen_reader_exports
1682  });
1683  
1684  // node_modules/@base-ui/utils/platform/os.mjs
1685  var os_exports = {};
1686  __export(os_exports, {
1687    android: () => android,
1688    apple: () => apple,
1689    ios: () => ios,
1690    linux: () => linux,
1691    mac: () => mac,
1692    windows: () => windows
1693  });
1694  
1695  // node_modules/@base-ui/utils/platform/shared.mjs
1696  function readRawData() {
1697    if (typeof navigator === "undefined") {
1698      return {
1699        userAgent: "",
1700        platform: "",
1701        maxTouchPoints: 0
1702      };
1703    }
1704    if (true) {
1705      const uaData = navigator.userAgentData;
1706      if (uaData && Array.isArray(uaData.brands)) {
1707        return {
1708          userAgent: uaData.brands.map(({
1709            brand,
1710            version: version2
1711          }) => `$brand}/$version2}`).join(" "),
1712          platform: uaData.platform ?? navigator.platform ?? "",
1713          maxTouchPoints: navigator.maxTouchPoints ?? 0
1714        };
1715      }
1716    }
1717    return {
1718      userAgent: navigator.userAgent,
1719      platform: navigator.platform ?? "",
1720      maxTouchPoints: navigator.maxTouchPoints ?? 0
1721    };
1722  }
1723  var {
1724    userAgent,
1725    platform,
1726    maxTouchPoints
1727  } = readRawData();
1728  var lowerUserAgent = userAgent.toLowerCase();
1729  var lowerPlatform = platform.toLowerCase();
1730  
1731  // node_modules/@base-ui/utils/platform/os.mjs
1732  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1733  var ANDROID_STRING = "android";
1734  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1735  var mac = !ios && lowerPlatform.startsWith("mac");
1736  var windows = lowerPlatform.startsWith("win");
1737  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1738  var apple = mac || ios;
1739  
1740  // node_modules/@base-ui/utils/platform/engine.mjs
1741  var engine_exports = {};
1742  __export(engine_exports, {
1743    blink: () => blink,
1744    gecko: () => gecko,
1745    webkit: () => webkit
1746  });
1747  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1748  var gecko = !webkit && lowerUserAgent.includes("firefox");
1749  var blink = !webkit && lowerUserAgent.includes("chrom");
1750  
1751  // node_modules/@base-ui/utils/platform/screen-reader.mjs
1752  var screen_reader_exports = {};
1753  __export(screen_reader_exports, {
1754    voiceOver: () => voiceOver
1755  });
1756  var voiceOver = apple;
1757  
1758  // node_modules/@base-ui/utils/platform/env.mjs
1759  var env_exports = {};
1760  __export(env_exports, {
1761    jsdom: () => jsdom
1762  });
1763  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1764  
1765  // node_modules/@base-ui/utils/platform/media-query.mjs
1766  var media_query_exports = {};
1767  __export(media_query_exports, {
1768    iOS: () => iOS
1769  });
1770  var iOS = "@supports (-webkit-touch-callout: none)";
1771  
1772  // node_modules/@base-ui/utils/useTimeout.mjs
1773  var EMPTY2 = 0;
1774  var Timeout = class _Timeout {
1775    static create() {
1776      return new _Timeout();
1777    }
1778    currentId = EMPTY2;
1779    /**
1780     * Executes `fn` after `delay`, clearing any previously scheduled call.
1781     */
1782    start(delay, fn) {
1783      this.clear();
1784      this.currentId = setTimeout(() => {
1785        this.currentId = EMPTY2;
1786        fn();
1787      }, delay);
1788    }
1789    isStarted() {
1790      return this.currentId !== EMPTY2;
1791    }
1792    clear = () => {
1793      if (this.currentId !== EMPTY2) {
1794        clearTimeout(this.currentId);
1795        this.currentId = EMPTY2;
1796      }
1797    };
1798    disposeEffect = () => {
1799      return this.clear;
1800    };
1801  };
1802  function useTimeout() {
1803    const timeout = useRefWithInit(Timeout.create).current;
1804    useOnMount(timeout.disposeEffect);
1805    return timeout;
1806  }
1807  
1808  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1809  var React14 = __toESM(require_react(), 1);
1810  
1811  // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1812  function isReactEvent(event) {
1813    return "nativeEvent" in event;
1814  }
1815  function isVirtualClick(event) {
1816    if (event.pointerType === "" && event.isTrusted) {
1817      return true;
1818    }
1819    if (parts_exports.os.android && event.pointerType) {
1820      return event.type === "click" && event.buttons === 1;
1821    }
1822    return event.detail === 0 && !event.pointerType;
1823  }
1824  function isMouseLikePointerType(pointerType, strict) {
1825    const values = ["mouse", "pen"];
1826    if (!strict) {
1827      values.push("", void 0);
1828    }
1829    return values.includes(pointerType);
1830  }
1831  function isClickLikeEvent(event) {
1832    const type = event.type;
1833    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1834  }
1835  
1836  // node_modules/@base-ui/utils/shadowDom.mjs
1837  function activeElement(doc) {
1838    let element = doc.activeElement;
1839    while (element?.shadowRoot?.activeElement != null) {
1840      element = element.shadowRoot.activeElement;
1841    }
1842    return element;
1843  }
1844  function contains(parent, child) {
1845    if (!parent || !child) {
1846      return false;
1847    }
1848    const rootNode = child.getRootNode?.();
1849    if (parent.contains(child)) {
1850      return true;
1851    }
1852    if (rootNode && isShadowRoot(rootNode)) {
1853      let next = child;
1854      while (next) {
1855        if (parent === next) {
1856          return true;
1857        }
1858        next = next.parentNode || next.host;
1859      }
1860    }
1861    return false;
1862  }
1863  function getTarget(event) {
1864    if ("composedPath" in event) {
1865      return event.composedPath()[0] ?? event.target;
1866    }
1867    return event.target;
1868  }
1869  
1870  // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1871  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1872  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1873  
1874  // node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
1875  var open = "data-open";
1876  var closed = "data-closed";
1877  var anchorHidden = "data-anchor-hidden";
1878  
1879  // node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
1880  var CommonTriggerDataAttributes_exports = {};
1881  __export(CommonTriggerDataAttributes_exports, {
1882    popupOpen: () => popupOpen,
1883    pressed: () => pressed
1884  });
1885  var popupOpen = "data-popup-open";
1886  var pressed = "data-pressed";
1887  
1888  // node_modules/@base-ui/react/utils/popupStateMapping.mjs
1889  var TRIGGER_HOOK = {
1890    [popupOpen]: ""
1891  };
1892  var PRESSABLE_TRIGGER_HOOK = {
1893    [popupOpen]: "",
1894    [pressed]: ""
1895  };
1896  var POPUP_OPEN_HOOK = {
1897    [open]: ""
1898  };
1899  var POPUP_CLOSED_HOOK = {
1900    [closed]: ""
1901  };
1902  var ANCHOR_HIDDEN_HOOK = {
1903    [anchorHidden]: ""
1904  };
1905  var triggerOpenStateMapping = {
1906    open(value) {
1907      if (value) {
1908        return TRIGGER_HOOK;
1909      }
1910      return null;
1911    }
1912  };
1913  var popupStateMapping = {
1914    open(value) {
1915      if (value) {
1916        return POPUP_OPEN_HOOK;
1917      }
1918      return POPUP_CLOSED_HOOK;
1919    },
1920    anchorHidden(value) {
1921      if (value) {
1922        return ANCHOR_HIDDEN_HOOK;
1923      }
1924      return null;
1925    }
1926  };
1927  var popupTransitionStateMapping = {
1928    ...popupStateMapping,
1929    ...transitionStatusMapping
1930  };
1931  
1932  // node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
1933  var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
1934  var triggerDisabled = "data-trigger-disabled";
1935  
1936  // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1937  function isTargetInsideEnabledTrigger(target, triggerElements) {
1938    if (!isElement(target)) {
1939      return false;
1940    }
1941    const targetElement = target;
1942    if (triggerElements.hasElement(targetElement)) {
1943      return !targetElement.hasAttribute(triggerDisabled);
1944    }
1945    for (const [, trigger] of triggerElements.entries()) {
1946      if (contains(trigger, targetElement)) {
1947        return !trigger.hasAttribute(triggerDisabled);
1948      }
1949    }
1950    return false;
1951  }
1952  function isEventTargetWithin(event, node) {
1953    if (node == null) {
1954      return false;
1955    }
1956    if ("composedPath" in event) {
1957      return event.composedPath().includes(node);
1958    }
1959    const eventAgain = event;
1960    return eventAgain.target != null && node.contains(eventAgain.target);
1961  }
1962  function isRootElement(element) {
1963    return element.matches("html,body");
1964  }
1965  function isTypeableElement(element) {
1966    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1967  }
1968  function isInteractiveElement(element) {
1969    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1970  }
1971  function matchesFocusVisible(element) {
1972    if (!element || parts_exports.env.jsdom) {
1973      return true;
1974    }
1975    try {
1976      return element.matches(":focus-visible");
1977    } catch (_e) {
1978      return true;
1979    }
1980  }
1981  
1982  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1983  function resolveValue(value, pointerType) {
1984    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1985      return 0;
1986    }
1987    if (typeof value === "function") {
1988      return value();
1989    }
1990    return value;
1991  }
1992  function getDelay(value, prop, pointerType) {
1993    const result = resolveValue(value, pointerType);
1994    if (typeof result === "number") {
1995      return result;
1996    }
1997    return result?.[prop];
1998  }
1999  function getRestMs(value) {
2000    if (typeof value === "function") {
2001      return value();
2002    }
2003    return value;
2004  }
2005  function isClickLikeOpenEvent(openEventType, interactedInside) {
2006    return interactedInside || openEventType === "click" || openEventType === "mousedown";
2007  }
2008  function isHoverOpenEvent(openEventType) {
2009    return openEventType?.includes("mouse") && openEventType !== "mousedown";
2010  }
2011  
2012  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
2013  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
2014  var FloatingDelayGroupContext = /* @__PURE__ */ React14.createContext({
2015    hasProvider: false,
2016    timeoutMs: 0,
2017    delayRef: {
2018      current: 0
2019    },
2020    initialDelayRef: {
2021      current: 0
2022    },
2023    timeout: new Timeout(),
2024    currentIdRef: {
2025      current: null
2026    },
2027    currentContextRef: {
2028      current: null
2029    }
2030  });
2031  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
2032  function resetDelayRef(delayRef, initialDelayRef) {
2033    delayRef.current = initialDelayRef.current;
2034  }
2035  function FloatingDelayGroup(props) {
2036    const {
2037      children,
2038      delay,
2039      timeoutMs = 0
2040    } = props;
2041    const delayRef = React14.useRef(delay);
2042    const initialDelayRef = React14.useRef(delay);
2043    const currentIdRef = React14.useRef(null);
2044    const currentContextRef = React14.useRef(null);
2045    const timeout = useTimeout();
2046    useIsoLayoutEffect(() => {
2047      initialDelayRef.current = delay;
2048      if (!currentIdRef.current) {
2049        delayRef.current = delay;
2050        return;
2051      }
2052      delayRef.current = {
2053        open: getDelay(delayRef.current, "open"),
2054        close: getDelay(delay, "close")
2055      };
2056    }, [delay, currentIdRef, delayRef, initialDelayRef]);
2057    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
2058      value: React14.useMemo(() => ({
2059        hasProvider: true,
2060        delayRef,
2061        initialDelayRef,
2062        currentIdRef,
2063        timeoutMs,
2064        currentContextRef,
2065        timeout
2066      }), [timeoutMs, timeout]),
2067      children
2068    });
2069  }
2070  function useDelayGroup(context, options = {
2071    open: false
2072  }) {
2073    const {
2074      open: open2
2075    } = options;
2076    const store2 = "rootStore" in context ? context.rootStore : context;
2077    const floatingId = store2.useState("floatingId");
2078    const groupContext = React14.useContext(FloatingDelayGroupContext);
2079    const {
2080      currentIdRef,
2081      delayRef,
2082      timeoutMs,
2083      initialDelayRef,
2084      currentContextRef,
2085      hasProvider,
2086      timeout
2087    } = groupContext;
2088    const [isInstantPhase, setIsInstantPhase] = React14.useState(false);
2089    const openRef = React14.useRef(open2);
2090    useIsoLayoutEffect(() => {
2091      openRef.current = open2;
2092    }, [open2]);
2093    useIsoLayoutEffect(() => {
2094      function unset() {
2095        currentContextRef.current?.setIsInstantPhase(false);
2096        currentIdRef.current = null;
2097        currentContextRef.current = null;
2098        delayRef.current = initialDelayRef.current;
2099        timeout.clear();
2100      }
2101      if (!currentIdRef.current) {
2102        return void 0;
2103      }
2104      if (!open2 && currentIdRef.current === floatingId) {
2105        setIsInstantPhase(false);
2106        if (timeoutMs) {
2107          const closingId = floatingId;
2108          timeout.start(timeoutMs, () => {
2109            if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2110              return;
2111            }
2112            unset();
2113          });
2114          return () => {
2115            if (openRef.current || currentIdRef.current !== closingId) {
2116              timeout.clear();
2117            }
2118          };
2119        }
2120        unset();
2121      }
2122      return void 0;
2123    }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
2124    useIsoLayoutEffect(() => {
2125      if (!open2) {
2126        return;
2127      }
2128      const prevContext = currentContextRef.current;
2129      const prevId = currentIdRef.current;
2130      timeout.clear();
2131      currentContextRef.current = {
2132        onOpenChange: store2.setOpen,
2133        setIsInstantPhase
2134      };
2135      currentIdRef.current = floatingId;
2136      delayRef.current = {
2137        open: 0,
2138        close: getDelay(initialDelayRef.current, "close")
2139      };
2140      if (prevId !== null && prevId !== floatingId) {
2141        setIsInstantPhase(true);
2142        prevContext?.setIsInstantPhase(true);
2143        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2144      } else {
2145        setIsInstantPhase(false);
2146        prevContext?.setIsInstantPhase(false);
2147      }
2148    }, [open2, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2149    useIsoLayoutEffect(() => {
2150      return () => {
2151        if (currentIdRef.current === floatingId) {
2152          currentContextRef.current = null;
2153          if (!openRef.current) {
2154            return;
2155          }
2156          currentIdRef.current = null;
2157          resetDelayRef(delayRef, initialDelayRef);
2158          timeout.clear();
2159        }
2160      };
2161    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2162    return React14.useMemo(() => ({
2163      activeIdRef: currentIdRef,
2164      hasProvider,
2165      delayRef,
2166      isInstantPhase
2167    }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
2168  }
2169  
2170  // node_modules/@base-ui/utils/mergeCleanups.mjs
2171  function mergeCleanups(...cleanups) {
2172    return () => {
2173      for (let i = 0; i < cleanups.length; i += 1) {
2174        const cleanup = cleanups[i];
2175        if (cleanup) {
2176          cleanup();
2177        }
2178      }
2179    };
2180  }
2181  
2182  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2183  var React15 = __toESM(require_react(), 1);
2184  
2185  // node_modules/@base-ui/utils/visuallyHidden.mjs
2186  var visuallyHiddenBase = {
2187    clipPath: "inset(50%)",
2188    overflow: "hidden",
2189    whiteSpace: "nowrap",
2190    border: 0,
2191    padding: 0,
2192    width: 1,
2193    height: 1,
2194    margin: -1
2195  };
2196  var visuallyHidden = {
2197    ...visuallyHiddenBase,
2198    position: "fixed",
2199    top: 0,
2200    left: 0
2201  };
2202  var visuallyHiddenInput = {
2203    ...visuallyHiddenBase,
2204    position: "absolute"
2205  };
2206  
2207  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2208  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2209  var FocusGuard = /* @__PURE__ */ React15.forwardRef(function FocusGuard2(props, ref) {
2210    const [role, setRole] = React15.useState();
2211    useIsoLayoutEffect(() => {
2212      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2213        setRole("button");
2214      }
2215    }, []);
2216    const restProps = {
2217      tabIndex: 0,
2218      // Role is only for VoiceOver
2219      role
2220    };
2221    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2222      ...props,
2223      ref,
2224      style: visuallyHidden,
2225      "aria-hidden": role ? void 0 : true,
2226      ...restProps,
2227      "data-base-ui-focus-guard": ""
2228    });
2229  });
2230  if (true) FocusGuard.displayName = "FocusGuard";
2231  
2232  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2233  var min = Math.min;
2234  var max = Math.max;
2235  var round = Math.round;
2236  var floor = Math.floor;
2237  var createCoords = (v) => ({
2238    x: v,
2239    y: v
2240  });
2241  var oppositeSideMap = {
2242    left: "right",
2243    right: "left",
2244    bottom: "top",
2245    top: "bottom"
2246  };
2247  function clamp(start, value, end) {
2248    return max(start, min(value, end));
2249  }
2250  function evaluate(value, param) {
2251    return typeof value === "function" ? value(param) : value;
2252  }
2253  function getSide(placement) {
2254    return placement.split("-")[0];
2255  }
2256  function getAlignment(placement) {
2257    return placement.split("-")[1];
2258  }
2259  function getOppositeAxis(axis) {
2260    return axis === "x" ? "y" : "x";
2261  }
2262  function getAxisLength(axis) {
2263    return axis === "y" ? "height" : "width";
2264  }
2265  function getSideAxis(placement) {
2266    const firstChar = placement[0];
2267    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2268  }
2269  function getAlignmentAxis(placement) {
2270    return getOppositeAxis(getSideAxis(placement));
2271  }
2272  function getAlignmentSides(placement, rects, rtl) {
2273    if (rtl === void 0) {
2274      rtl = false;
2275    }
2276    const alignment = getAlignment(placement);
2277    const alignmentAxis = getAlignmentAxis(placement);
2278    const length = getAxisLength(alignmentAxis);
2279    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2280    if (rects.reference[length] > rects.floating[length]) {
2281      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2282    }
2283    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2284  }
2285  function getExpandedPlacements(placement) {
2286    const oppositePlacement = getOppositePlacement(placement);
2287    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2288  }
2289  function getOppositeAlignmentPlacement(placement) {
2290    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2291  }
2292  var lrPlacement = ["left", "right"];
2293  var rlPlacement = ["right", "left"];
2294  var tbPlacement = ["top", "bottom"];
2295  var btPlacement = ["bottom", "top"];
2296  function getSideList(side, isStart, rtl) {
2297    switch (side) {
2298      case "top":
2299      case "bottom":
2300        if (rtl) return isStart ? rlPlacement : lrPlacement;
2301        return isStart ? lrPlacement : rlPlacement;
2302      case "left":
2303      case "right":
2304        return isStart ? tbPlacement : btPlacement;
2305      default:
2306        return [];
2307    }
2308  }
2309  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2310    const alignment = getAlignment(placement);
2311    let list = getSideList(getSide(placement), direction === "start", rtl);
2312    if (alignment) {
2313      list = list.map((side) => side + "-" + alignment);
2314      if (flipAlignment) {
2315        list = list.concat(list.map(getOppositeAlignmentPlacement));
2316      }
2317    }
2318    return list;
2319  }
2320  function getOppositePlacement(placement) {
2321    const side = getSide(placement);
2322    return oppositeSideMap[side] + placement.slice(side.length);
2323  }
2324  function expandPaddingObject(padding) {
2325    var _padding$top, _padding$right, _padding$bottom, _padding$left;
2326    return {
2327      top: (_padding$top = padding.top) != null ? _padding$top : 0,
2328      right: (_padding$right = padding.right) != null ? _padding$right : 0,
2329      bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2330      left: (_padding$left = padding.left) != null ? _padding$left : 0
2331    };
2332  }
2333  function getPaddingObject(padding) {
2334    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2335      top: padding,
2336      right: padding,
2337      bottom: padding,
2338      left: padding
2339    };
2340  }
2341  function rectToClientRect(rect) {
2342    const {
2343      x,
2344      y,
2345      width,
2346      height
2347    } = rect;
2348    return {
2349      width,
2350      height,
2351      top: y,
2352      left: x,
2353      right: x + width,
2354      bottom: y + height,
2355      x,
2356      y
2357    };
2358  }
2359  
2360  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2361  function isHiddenByStyles(styles) {
2362    return styles.visibility === "hidden" || styles.visibility === "collapse";
2363  }
2364  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2365    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2366      return false;
2367    }
2368    if (typeof element.checkVisibility === "function") {
2369      return element.checkVisibility();
2370    }
2371    return styles.display !== "none" && styles.display !== "contents";
2372  }
2373  
2374  // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2375  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2376  function getParentElement(element) {
2377    const assignedSlot = element.assignedSlot;
2378    if (assignedSlot) {
2379      return assignedSlot;
2380    }
2381    if (element.parentElement) {
2382      return element.parentElement;
2383    }
2384    const rootNode = element.getRootNode();
2385    return isShadowRoot(rootNode) ? rootNode.host : null;
2386  }
2387  function getDetailsSummary(details) {
2388    for (const child of Array.from(details.children)) {
2389      if (getNodeName(child) === "summary") {
2390        return child;
2391      }
2392    }
2393    return null;
2394  }
2395  function isWithinOpenDetailsSummary(element, details) {
2396    const summary = getDetailsSummary(details);
2397    return !!summary && (element === summary || contains(summary, element));
2398  }
2399  function isFocusableCandidate(element) {
2400    const nodeName = element ? getNodeName(element) : "";
2401    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");
2402  }
2403  function isFocusableElement(element) {
2404    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2405      return false;
2406    }
2407    for (let current = element; current; current = getParentElement(current)) {
2408      const isAncestor = current !== element;
2409      const isSlot = getNodeName(current) === "slot";
2410      if (current.hasAttribute("inert")) {
2411        return false;
2412      }
2413      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2414        return false;
2415      }
2416    }
2417    return true;
2418  }
2419  function isVisibleInTabbableTree(element, isAncestor) {
2420    const styles = getComputedStyle2(element);
2421    if (!isAncestor) {
2422      return isElementVisible(element, styles);
2423    }
2424    return styles.display !== "none";
2425  }
2426  function getTabIndex(element) {
2427    const tabIndex = element.tabIndex;
2428    if (tabIndex < 0) {
2429      const nodeName = getNodeName(element);
2430      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2431        return 0;
2432      }
2433    }
2434    return tabIndex;
2435  }
2436  function getNamedRadioInput(element) {
2437    if (getNodeName(element) !== "input") {
2438      return null;
2439    }
2440    const input = element;
2441    return input.type === "radio" && input.name !== "" ? input : null;
2442  }
2443  function isTabbableRadio(element, candidates) {
2444    const input = getNamedRadioInput(element);
2445    if (!input) {
2446      return true;
2447    }
2448    const checkedRadio = candidates.find((candidate) => {
2449      const radio = getNamedRadioInput(candidate);
2450      return radio?.name === input.name && radio.form === input.form && radio.checked;
2451    });
2452    if (checkedRadio) {
2453      return checkedRadio === input;
2454    }
2455    return candidates.find((candidate) => {
2456      const radio = getNamedRadioInput(candidate);
2457      return radio?.name === input.name && radio.form === input.form;
2458    }) === input;
2459  }
2460  function getComposedChildren(container) {
2461    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2462      const assignedElements = container.assignedElements({
2463        flatten: true
2464      });
2465      if (assignedElements.length > 0) {
2466        return assignedElements;
2467      }
2468    }
2469    if (isHTMLElement(container) && container.shadowRoot) {
2470      return Array.from(container.shadowRoot.children);
2471    }
2472    return Array.from(container.children);
2473  }
2474  function appendCandidates(container, list) {
2475    getComposedChildren(container).forEach((child) => {
2476      if (isFocusableCandidate(child)) {
2477        list.push(child);
2478      }
2479      appendCandidates(child, list);
2480    });
2481  }
2482  function appendMatchingElements(container, selector, list) {
2483    getComposedChildren(container).forEach((child) => {
2484      if (isHTMLElement(child) && child.matches(selector)) {
2485        list.push(child);
2486      }
2487      appendMatchingElements(child, selector, list);
2488    });
2489  }
2490  function focusable(container) {
2491    const candidates = [];
2492    appendCandidates(container, candidates);
2493    return candidates.filter(isFocusableElement);
2494  }
2495  function tabbable(container) {
2496    const candidates = focusable(container);
2497    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2498  }
2499  function getTabbableIn(container, dir) {
2500    const list = tabbable(container);
2501    const len = list.length;
2502    if (len === 0) {
2503      return void 0;
2504    }
2505    const active = activeElement(ownerDocument(container));
2506    const index2 = list.indexOf(active);
2507    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2508    return list[nextIndex];
2509  }
2510  function getNextTabbable(referenceElement) {
2511    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2512  }
2513  function getPreviousTabbable(referenceElement) {
2514    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2515  }
2516  function isOutsideEvent(event, container) {
2517    const containerElement = container || event.currentTarget;
2518    const relatedTarget = event.relatedTarget;
2519    return !relatedTarget || !contains(containerElement, relatedTarget);
2520  }
2521  function disableFocusInside(container) {
2522    const tabbableElements = tabbable(container);
2523    tabbableElements.forEach((element) => {
2524      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2525      element.setAttribute("tabindex", "-1");
2526    });
2527  }
2528  function enableFocusInside(container) {
2529    const elements = [];
2530    appendMatchingElements(container, "[data-tabindex]", elements);
2531    elements.forEach((element) => {
2532      const tabindex = element.dataset.tabindex;
2533      delete element.dataset.tabindex;
2534      if (tabindex) {
2535        element.setAttribute("tabindex", tabindex);
2536      } else {
2537        element.removeAttribute("tabindex");
2538      }
2539    });
2540  }
2541  
2542  // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2543  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2544    const directChildren = nodes.filter((node) => node.parentId === id);
2545    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2546  }
2547  
2548  // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2549  function createAttribute(name) {
2550    return `data-base-ui-$name}`;
2551  }
2552  
2553  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2554  var React16 = __toESM(require_react(), 1);
2555  var ReactDOM2 = __toESM(require_react_dom(), 1);
2556  
2557  // node_modules/@base-ui/react/internals/constants.mjs
2558  var DISABLED_TRANSITIONS_STYLE = {
2559    style: {
2560      transition: "none"
2561    }
2562  };
2563  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2564  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2565  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2566  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2567  var POPUP_COLLISION_AVOIDANCE = {
2568    fallbackAxisSide: "end"
2569  };
2570  var ownerVisuallyHidden = {
2571    clipPath: "inset(50%)",
2572    position: "fixed",
2573    top: 0,
2574    left: 0
2575  };
2576  
2577  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2578  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2579  var PortalContext = /* @__PURE__ */ React16.createContext(null);
2580  if (true) PortalContext.displayName = "PortalContext";
2581  var usePortalContext = () => React16.useContext(PortalContext);
2582  var attr = createAttribute("portal");
2583  function useFloatingPortalNode(props = {}) {
2584    const {
2585      ref,
2586      container: containerProp,
2587      componentProps = EMPTY_OBJECT,
2588      elementProps
2589    } = props;
2590    const uniqueId = useId();
2591    const portalContext = usePortalContext();
2592    const parentPortalNode = portalContext?.portalNode;
2593    const [containerElement, setContainerElement] = React16.useState(null);
2594    const [portalNode, setPortalNode] = React16.useState(null);
2595    const setPortalNodeRef = useStableCallback((node) => {
2596      if (node !== null) {
2597        setPortalNode(node);
2598      }
2599    });
2600    const containerRef = React16.useRef(null);
2601    useIsoLayoutEffect(() => {
2602      if (containerProp === null) {
2603        if (containerRef.current) {
2604          containerRef.current = null;
2605          setPortalNode(null);
2606          setContainerElement(null);
2607        }
2608        return;
2609      }
2610      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2611      if (resolvedContainer == null) {
2612        if (containerRef.current) {
2613          containerRef.current = null;
2614          setPortalNode(null);
2615          setContainerElement(null);
2616        }
2617        return;
2618      }
2619      if (containerRef.current !== resolvedContainer) {
2620        containerRef.current = resolvedContainer;
2621        setPortalNode(null);
2622        setContainerElement(resolvedContainer);
2623      }
2624    }, [containerProp, parentPortalNode]);
2625    const portalElement = useRenderElement("div", componentProps, {
2626      ref: [ref, setPortalNodeRef],
2627      props: [{
2628        id: uniqueId,
2629        [attr]: ""
2630      }, elementProps]
2631    });
2632    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2633    return {
2634      node: portalNode,
2635      // `id` and `render` props can override or remove the generated ID. Use the exact
2636      // rendered value so `aria-owns` never points at an ID absent from the DOM.
2637      nodeId: /* @__PURE__ */ React16.isValidElement(portalElement) ? portalElement.props.id : void 0,
2638      subtree: portalSubtree
2639    };
2640  }
2641  var FloatingPortal = /* @__PURE__ */ React16.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2642    const {
2643      render,
2644      className,
2645      style,
2646      children,
2647      container,
2648      portalOwnerRole,
2649      ...elementProps
2650    } = componentProps;
2651    const {
2652      node: portalNode,
2653      nodeId: portalNodeId,
2654      subtree: portalSubtree
2655    } = useFloatingPortalNode({
2656      container,
2657      ref: forwardedRef,
2658      componentProps,
2659      elementProps
2660    });
2661    const beforeOutsideRef = React16.useRef(null);
2662    const afterOutsideRef = React16.useRef(null);
2663    const beforeInsideRef = React16.useRef(null);
2664    const afterInsideRef = React16.useRef(null);
2665    const [focusManagerState, setFocusManagerState] = React16.useState(null);
2666    const focusInsideDisabledRef = React16.useRef(false);
2667    const modal = focusManagerState?.modal;
2668    const open2 = focusManagerState?.open;
2669    const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2670    React16.useEffect(() => {
2671      if (!portalNode || modal) {
2672        return void 0;
2673      }
2674      function onFocus(event) {
2675        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2676          if (event.type === "focusin") {
2677            if (focusInsideDisabledRef.current) {
2678              enableFocusInside(portalNode);
2679              focusInsideDisabledRef.current = false;
2680            }
2681          } else {
2682            disableFocusInside(portalNode);
2683            focusInsideDisabledRef.current = true;
2684          }
2685        }
2686      }
2687      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2688    }, [portalNode, modal]);
2689    useIsoLayoutEffect(() => {
2690      if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) {
2691        return;
2692      }
2693      enableFocusInside(portalNode);
2694      focusInsideDisabledRef.current = false;
2695    }, [open2, portalNode]);
2696    const portalContextValue = React16.useMemo(() => ({
2697      beforeOutsideRef,
2698      afterOutsideRef,
2699      beforeInsideRef,
2700      afterInsideRef,
2701      portalNode,
2702      setFocusManagerState
2703    }), [portalNode]);
2704    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React16.Fragment, {
2705      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2706        value: portalContextValue,
2707        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2708          "data-type": "outside",
2709          ref: beforeOutsideRef,
2710          onFocus: (event) => {
2711            if (isOutsideEvent(event, portalNode)) {
2712              beforeInsideRef.current?.focus();
2713            } else {
2714              const domReference = focusManagerState ? focusManagerState.domReference : null;
2715              const prevTabbable = getPreviousTabbable(domReference);
2716              prevTabbable?.focus();
2717            }
2718          }
2719        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2720          role: portalOwnerRole,
2721          "aria-owns": portalNodeId,
2722          style: ownerVisuallyHidden
2723        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2724          "data-type": "outside",
2725          ref: afterOutsideRef,
2726          onFocus: (event) => {
2727            if (isOutsideEvent(event, portalNode)) {
2728              afterInsideRef.current?.focus();
2729            } else {
2730              const domReference = focusManagerState ? focusManagerState.domReference : null;
2731              const nextTabbable = getNextTabbable(domReference);
2732              nextTabbable?.focus();
2733              if (focusManagerState?.closeOnFocusOut) {
2734                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2735              }
2736            }
2737          }
2738        })]
2739      })]
2740    });
2741  });
2742  if (true) FloatingPortal.displayName = "FloatingPortal";
2743  
2744  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2745  var React17 = __toESM(require_react(), 1);
2746  
2747  // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2748  function createEventEmitter() {
2749    const map = /* @__PURE__ */ new Map();
2750    return {
2751      emit(event, data) {
2752        map.get(event)?.forEach((listener) => listener(data));
2753      },
2754      on(event, listener) {
2755        if (!map.has(event)) {
2756          map.set(event, /* @__PURE__ */ new Set());
2757        }
2758        map.get(event).add(listener);
2759      },
2760      off(event, listener) {
2761        map.get(event)?.delete(listener);
2762      }
2763    };
2764  }
2765  
2766  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2767  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2768  var FloatingNodeContext = /* @__PURE__ */ React17.createContext(null);
2769  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2770  var FloatingTreeContext = /* @__PURE__ */ React17.createContext(null);
2771  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2772  var useFloatingParentNodeId = () => React17.useContext(FloatingNodeContext)?.id || null;
2773  var useFloatingTree = (externalTree) => {
2774    const contextTree = React17.useContext(FloatingTreeContext);
2775    return externalTree ?? contextTree;
2776  };
2777  
2778  // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2779  var React18 = __toESM(require_react(), 1);
2780  function createVirtualElement(domElement, data) {
2781    let offsetX = null;
2782    let offsetY = null;
2783    let isAutoUpdateEvent = false;
2784    return {
2785      contextElement: domElement || void 0,
2786      getBoundingClientRect() {
2787        const domRect = domElement?.getBoundingClientRect() || {
2788          width: 0,
2789          height: 0,
2790          x: 0,
2791          y: 0
2792        };
2793        const isXAxis = data.axis === "x" || data.axis === "both";
2794        const isYAxis = data.axis === "y" || data.axis === "both";
2795        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2796        let width = domRect.width;
2797        let height = domRect.height;
2798        let x = domRect.x;
2799        let y = domRect.y;
2800        if (offsetX == null && data.x && isXAxis) {
2801          offsetX = domRect.x - data.x;
2802        }
2803        if (offsetY == null && data.y && isYAxis) {
2804          offsetY = domRect.y - data.y;
2805        }
2806        x -= offsetX || 0;
2807        y -= offsetY || 0;
2808        width = 0;
2809        height = 0;
2810        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2811          width = data.axis === "y" ? domRect.width : 0;
2812          height = data.axis === "x" ? domRect.height : 0;
2813          x = isXAxis && data.x != null ? data.x : x;
2814          y = isYAxis && data.y != null ? data.y : y;
2815        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2816          height = data.axis === "x" ? domRect.height : height;
2817          width = data.axis === "y" ? domRect.width : width;
2818        }
2819        isAutoUpdateEvent = true;
2820        return {
2821          width,
2822          height,
2823          x,
2824          y,
2825          top: y,
2826          right: x + width,
2827          bottom: y + height,
2828          left: x
2829        };
2830      }
2831    };
2832  }
2833  function isMouseBasedEvent(event) {
2834    return event != null && event.clientX != null;
2835  }
2836  function useClientPoint(context, props = {}) {
2837    const {
2838      enabled = true,
2839      axis = "both"
2840    } = props;
2841    const store2 = "rootStore" in context ? context.rootStore : context;
2842    const open2 = store2.useState("open");
2843    const floating = store2.useState("floatingElement");
2844    const domReference = store2.useState("domReferenceElement");
2845    const dataRef = store2.context.dataRef;
2846    const initialRef = React18.useRef(false);
2847    const cleanupListenerRef = React18.useRef(null);
2848    const [pointerType, setPointerType] = React18.useState();
2849    const [reactive, setReactive] = React18.useState([]);
2850    const resetReference = useStableCallback((reference2) => {
2851      store2.set("positionReference", reference2);
2852    });
2853    const setReference = useStableCallback((newX, newY, referenceElement) => {
2854      if (initialRef.current) {
2855        return;
2856      }
2857      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2858        return;
2859      }
2860      store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2861        x: newX,
2862        y: newY,
2863        axis,
2864        dataRef,
2865        pointerType
2866      }));
2867    });
2868    const handleReferenceEnterOrMove = useStableCallback((event) => {
2869      if (!open2) {
2870        setReference(event.clientX, event.clientY, event.currentTarget);
2871      } else if (!cleanupListenerRef.current) {
2872        setReference(event.clientX, event.clientY, event.currentTarget);
2873        setReactive([]);
2874      }
2875    });
2876    const openCheck = isMouseLikePointerType(pointerType) ? floating : open2;
2877    React18.useEffect(() => {
2878      if (!enabled) {
2879        resetReference(domReference);
2880        return void 0;
2881      }
2882      if (!openCheck) {
2883        return void 0;
2884      }
2885      function cleanupListener() {
2886        cleanupListenerRef.current?.();
2887        cleanupListenerRef.current = null;
2888      }
2889      const win = getWindow(floating);
2890      function handleMouseMove(event) {
2891        const target = getTarget(event);
2892        if (!contains(floating, target)) {
2893          setReference(event.clientX, event.clientY);
2894        } else {
2895          cleanupListener();
2896        }
2897      }
2898      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2899        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2900      } else {
2901        resetReference(domReference);
2902      }
2903      return cleanupListener;
2904    }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
2905    React18.useEffect(() => () => {
2906      store2.set("positionReference", null);
2907    }, [store2]);
2908    React18.useEffect(() => {
2909      if (enabled && !floating) {
2910        initialRef.current = false;
2911      }
2912    }, [enabled, floating]);
2913    React18.useEffect(() => {
2914      if (!enabled && open2) {
2915        initialRef.current = true;
2916      }
2917    }, [enabled, open2]);
2918    const reference = React18.useMemo(() => {
2919      function setPointerTypeRef(event) {
2920        setPointerType(event.pointerType);
2921      }
2922      return {
2923        onPointerDown: setPointerTypeRef,
2924        onPointerEnter: setPointerTypeRef,
2925        onMouseMove: handleReferenceEnterOrMove,
2926        onMouseEnter: handleReferenceEnterOrMove
2927      };
2928    }, [handleReferenceEnterOrMove]);
2929    return React18.useMemo(() => enabled ? {
2930      reference,
2931      trigger: reference
2932    } : {}, [enabled, reference]);
2933  }
2934  
2935  // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2936  var React19 = __toESM(require_react(), 1);
2937  function alwaysFalse() {
2938    return false;
2939  }
2940  function normalizeProp(normalizable) {
2941    return {
2942      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2943      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2944    };
2945  }
2946  function useDismiss(context, props = {}) {
2947    const {
2948      enabled = true,
2949      escapeKey: escapeKey2 = true,
2950      outsidePress: outsidePressProp = true,
2951      outsidePressEvent = "sloppy",
2952      referencePress = alwaysFalse,
2953      bubbles,
2954      externalTree
2955    } = props;
2956    const store2 = "rootStore" in context ? context.rootStore : context;
2957    const open2 = store2.useState("open");
2958    const floatingElement = store2.useState("floatingElement");
2959    const {
2960      dataRef,
2961      events
2962    } = store2.context;
2963    const tree = useFloatingTree(externalTree);
2964    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2965    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2966    const outsidePressEnabled = outsidePress2 !== false;
2967    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2968    const {
2969      escapeKey: escapeKeyBubbles,
2970      outsidePress: outsidePressBubbles
2971    } = normalizeProp(bubbles);
2972    const pressStartedInsideRef = React19.useRef(false);
2973    const pressStartPreventedRef = React19.useRef(false);
2974    const suppressNextOutsideClickRef = React19.useRef(false);
2975    const sawPressWhileOpenRef = React19.useRef(false);
2976    const isComposingRef = React19.useRef(false);
2977    const currentPointerTypeRef = React19.useRef("");
2978    const touchStateRef = React19.useRef(null);
2979    const cancelDismissOnEndTimeout = useTimeout();
2980    const clearInsideReactTreeTimeout = useTimeout();
2981    const clearInsideReactTree = useStableCallback(() => {
2982      clearInsideReactTreeTimeout.clear();
2983      dataRef.current.insideReactTree = false;
2984    });
2985    const hasBlockingChild = useStableCallback((bubbleKey) => {
2986      const nodeId = dataRef.current.floatingContext?.nodeId;
2987      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2988      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2989    });
2990    const isEventWithinOwnElements = useStableCallback((event) => {
2991      return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
2992    });
2993    const closeOnReferencePress = useStableCallback((event) => {
2994      if (!referencePress()) {
2995        return;
2996      }
2997      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2998    });
2999    const closeOnEscapeKeyDown = useStableCallback((event) => {
3000      if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") {
3001        return;
3002      }
3003      if (isComposingRef.current) {
3004        return;
3005      }
3006      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
3007        return;
3008      }
3009      const native = isReactEvent(event) ? event.nativeEvent : event;
3010      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
3011      store2.setOpen(false, eventDetails);
3012      if (!eventDetails.isCanceled) {
3013        event.preventDefault();
3014      }
3015      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
3016        event.stopPropagation();
3017      }
3018    });
3019    const markInsideReactTree = useStableCallback(() => {
3020      dataRef.current.insideReactTree = true;
3021      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
3022    });
3023    const markPressStartedInsideReactTree = useStableCallback((event) => {
3024      if (!open2 || !enabled || event.button !== 0) {
3025        return;
3026      }
3027      const target = getTarget(event.nativeEvent);
3028      if (!contains(store2.select("floatingElement"), target)) {
3029        return;
3030      }
3031      if (!pressStartedInsideRef.current) {
3032        pressStartedInsideRef.current = true;
3033        pressStartPreventedRef.current = false;
3034      }
3035    });
3036    const markInsidePressStartPrevented = useStableCallback((event) => {
3037      if (!open2 || !enabled) {
3038        return;
3039      }
3040      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
3041        return;
3042      }
3043      if (pressStartedInsideRef.current) {
3044        pressStartPreventedRef.current = true;
3045      }
3046    });
3047    React19.useEffect(() => {
3048      function handleOpenChange(details) {
3049        if (!details.open) {
3050          sawPressWhileOpenRef.current = false;
3051        }
3052      }
3053      events.on("openchange", handleOpenChange);
3054      return () => {
3055        events.off("openchange", handleOpenChange);
3056      };
3057    }, [events]);
3058    React19.useEffect(() => {
3059      if (!open2 || !enabled) {
3060        if (!open2) {
3061          sawPressWhileOpenRef.current = false;
3062        }
3063        return clearInsideReactTree;
3064      }
3065      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
3066      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
3067      const compositionTimeout = new Timeout();
3068      const preventedPressSuppressionTimeout = new Timeout();
3069      const doc = ownerDocument(floatingElement);
3070      function handleCompositionStart() {
3071        compositionTimeout.clear();
3072        isComposingRef.current = true;
3073      }
3074      function handleCompositionEnd() {
3075        compositionTimeout.start(
3076          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
3077          // Only apply to WebKit for the test to remain 0ms.
3078          parts_exports.engine.webkit ? 5 : 0,
3079          () => {
3080            isComposingRef.current = false;
3081          }
3082        );
3083      }
3084      function suppressImmediateOutsideClickAfterPreventedStart() {
3085        suppressNextOutsideClickRef.current = true;
3086        preventedPressSuppressionTimeout.start(0, () => {
3087          suppressNextOutsideClickRef.current = false;
3088        });
3089      }
3090      function resetPressStartState() {
3091        pressStartedInsideRef.current = false;
3092        pressStartPreventedRef.current = false;
3093      }
3094      function getOutsidePressEvent() {
3095        const type = currentPointerTypeRef.current;
3096        const computedType = type === "pen" || !type ? "mouse" : type;
3097        const outsidePressEventValue = getOutsidePressEventProp();
3098        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
3099        if (typeof resolved === "string") {
3100          return resolved;
3101        }
3102        return resolved[computedType];
3103      }
3104      function shouldIgnoreEvent(event) {
3105        const computedOutsidePressEvent = getOutsidePressEvent();
3106        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
3107      }
3108      function isEventWithinFloatingTree(event) {
3109        const nodeId = dataRef.current.floatingContext?.nodeId;
3110        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
3111        return isEventWithinOwnElements(event) || targetIsInsideChildren;
3112      }
3113      function closeOnPressOutside(event) {
3114        if (shouldIgnoreEvent(event)) {
3115          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
3116            preventedPressSuppressionTimeout.clear();
3117            suppressNextOutsideClickRef.current = false;
3118          }
3119          clearInsideReactTree();
3120          return;
3121        }
3122        if (dataRef.current.insideReactTree) {
3123          clearInsideReactTree();
3124          return;
3125        }
3126        const target = getTarget(event);
3127        const inertSelector = `[$createAttribute("inert")}]`;
3128        const targetRoot = isElement(target) ? target.getRootNode() : null;
3129        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
3130        const triggers = store2.context.triggerElements;
3131        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3132          return;
3133        }
3134        let targetRootAncestor = isElement(target) ? target : null;
3135        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3136          const nextParent = getParentNode(targetRootAncestor);
3137          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3138            break;
3139          }
3140          targetRootAncestor = nextParent;
3141        }
3142        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3143        !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
3144        // element was injected after the floating element rendered.
3145        markers.every((marker) => !contains(targetRootAncestor, marker))) {
3146          return;
3147        }
3148        if (isHTMLElement(target) && !("touches" in event)) {
3149          const lastTraversableNode = isLastTraversableNode(target);
3150          const style = getComputedStyle2(target);
3151          const scrollRe = /auto|scroll/;
3152          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3153          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3154          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3155          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3156          const isRTL3 = style.direction === "rtl";
3157          const pressedVerticalScrollbar = canScrollY && (isRTL3 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3158          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3159          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3160            return;
3161          }
3162        }
3163        if (isEventWithinFloatingTree(event)) {
3164          return;
3165        }
3166        if (getOutsidePressEvent() === "intentional") {
3167          if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
3168            return;
3169          }
3170          if (suppressNextOutsideClickRef.current) {
3171            preventedPressSuppressionTimeout.clear();
3172            suppressNextOutsideClickRef.current = false;
3173            return;
3174          }
3175        }
3176        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3177          return;
3178        }
3179        if (hasBlockingChild("__outsidePressBubbles")) {
3180          return;
3181        }
3182        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3183        clearInsideReactTree();
3184      }
3185      function handlePointerDown(event) {
3186        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3187          return;
3188        }
3189        closeOnPressOutside(event);
3190      }
3191      function handleTouchStart(event) {
3192        if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3193          return;
3194        }
3195        const touch = event.touches[0];
3196        if (touch) {
3197          touchStateRef.current = {
3198            startTime: Date.now(),
3199            startX: touch.clientX,
3200            startY: touch.clientY,
3201            dismissOnTouchEnd: false,
3202            dismissOnMouseDown: true
3203          };
3204          cancelDismissOnEndTimeout.start(1e3, () => {
3205            if (touchStateRef.current) {
3206              touchStateRef.current.dismissOnTouchEnd = false;
3207              touchStateRef.current.dismissOnMouseDown = false;
3208            }
3209          });
3210        }
3211      }
3212      function addTargetEventListenerOnce(event, listener) {
3213        const target = getTarget(event);
3214        if (!target) {
3215          return;
3216        }
3217        const unsubscribe2 = addEventListener(target, event.type, () => {
3218          listener(event);
3219          unsubscribe2();
3220        });
3221      }
3222      function handleTouchStartCapture(event) {
3223        currentPointerTypeRef.current = "touch";
3224        addTargetEventListenerOnce(event, handleTouchStart);
3225      }
3226      function closeOnPressOutsideCapture(event) {
3227        cancelDismissOnEndTimeout.clear();
3228        if (event.type === "pointerdown") {
3229          if (event.button === 0) {
3230            sawPressWhileOpenRef.current = true;
3231          }
3232          currentPointerTypeRef.current = event.pointerType;
3233        }
3234        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3235          return;
3236        }
3237        addTargetEventListenerOnce(event, (targetEvent) => {
3238          if (targetEvent.type === "pointerdown") {
3239            handlePointerDown(targetEvent);
3240          } else {
3241            closeOnPressOutside(targetEvent);
3242          }
3243        });
3244      }
3245      function handlePressEndCapture(event) {
3246        if (event.type === "pointercancel") {
3247          sawPressWhileOpenRef.current = false;
3248        }
3249        if (!pressStartedInsideRef.current) {
3250          return;
3251        }
3252        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3253        resetPressStartState();
3254        if (getOutsidePressEvent() !== "intentional") {
3255          return;
3256        }
3257        if (event.type === "pointercancel") {
3258          if (pressStartedInsideDefaultPrevented) {
3259            suppressImmediateOutsideClickAfterPreventedStart();
3260          }
3261          return;
3262        }
3263        if (isEventWithinFloatingTree(event)) {
3264          return;
3265        }
3266        if (pressStartedInsideDefaultPrevented) {
3267          suppressImmediateOutsideClickAfterPreventedStart();
3268          return;
3269        }
3270        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3271          return;
3272        }
3273        preventedPressSuppressionTimeout.clear();
3274        suppressNextOutsideClickRef.current = true;
3275        clearInsideReactTree();
3276      }
3277      function handleTouchMove(event) {
3278        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3279          return;
3280        }
3281        const touch = event.touches[0];
3282        if (!touch) {
3283          return;
3284        }
3285        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3286        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3287        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3288        if (distance > 5) {
3289          touchStateRef.current.dismissOnTouchEnd = true;
3290        }
3291        if (distance > 10) {
3292          closeOnPressOutside(event);
3293          cancelDismissOnEndTimeout.clear();
3294          touchStateRef.current = null;
3295        }
3296      }
3297      function handleTouchMoveCapture(event) {
3298        addTargetEventListenerOnce(event, handleTouchMove);
3299      }
3300      function handleTouchEnd(event) {
3301        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3302          return;
3303        }
3304        if (touchStateRef.current.dismissOnTouchEnd) {
3305          closeOnPressOutside(event);
3306        }
3307        cancelDismissOnEndTimeout.clear();
3308        touchStateRef.current = null;
3309      }
3310      function handleTouchEndCapture(event) {
3311        addTargetEventListenerOnce(event, handleTouchEnd);
3312      }
3313      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, {
3314        capture: true,
3315        passive: true
3316      }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
3317        capture: true,
3318        passive: true
3319      }), addEventListener(doc, "touchend", handleTouchEndCapture, {
3320        capture: true,
3321        passive: true
3322      })));
3323      return () => {
3324        unsubscribe();
3325        compositionTimeout.clear();
3326        preventedPressSuppressionTimeout.clear();
3327        resetPressStartState();
3328        suppressNextOutsideClickRef.current = false;
3329        clearInsideReactTree();
3330      };
3331    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
3332    const reference = React19.useMemo(() => ({
3333      onKeyDown: closeOnEscapeKeyDown,
3334      onPointerDown: closeOnReferencePress,
3335      onClick: closeOnReferencePress
3336    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3337    const floating = React19.useMemo(() => ({
3338      onKeyDown: closeOnEscapeKeyDown,
3339      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3340      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3341      // See https://github.com/mui/base-ui/pull/3379
3342      onPointerDown: markInsidePressStartPrevented,
3343      onMouseDown: markInsidePressStartPrevented,
3344      onClickCapture: markInsideReactTree,
3345      onMouseDownCapture(event) {
3346        markInsideReactTree();
3347        markPressStartedInsideReactTree(event);
3348      },
3349      onPointerDownCapture(event) {
3350        markInsideReactTree();
3351        markPressStartedInsideReactTree(event);
3352      },
3353      onMouseUpCapture: markInsideReactTree,
3354      onTouchEndCapture: markInsideReactTree,
3355      onTouchMoveCapture: markInsideReactTree
3356    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3357    return React19.useMemo(() => enabled ? {
3358      reference,
3359      floating,
3360      trigger: reference
3361    } : {}, [enabled, reference, floating]);
3362  }
3363  
3364  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3365  var React27 = __toESM(require_react(), 1);
3366  
3367  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3368  function computeCoordsFromPlacement(_ref, placement, rtl) {
3369    let {
3370      reference,
3371      floating
3372    } = _ref;
3373    const sideAxis = getSideAxis(placement);
3374    const alignmentAxis = getAlignmentAxis(placement);
3375    const alignLength = getAxisLength(alignmentAxis);
3376    const side = getSide(placement);
3377    const isVertical = sideAxis === "y";
3378    const commonX = reference.x + reference.width / 2 - floating.width / 2;
3379    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3380    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3381    let coords;
3382    switch (side) {
3383      case "top":
3384        coords = {
3385          x: commonX,
3386          y: reference.y - floating.height
3387        };
3388        break;
3389      case "bottom":
3390        coords = {
3391          x: commonX,
3392          y: reference.y + reference.height
3393        };
3394        break;
3395      case "right":
3396        coords = {
3397          x: reference.x + reference.width,
3398          y: commonY
3399        };
3400        break;
3401      case "left":
3402        coords = {
3403          x: reference.x - floating.width,
3404          y: commonY
3405        };
3406        break;
3407      default:
3408        coords = {
3409          x: reference.x,
3410          y: reference.y
3411        };
3412    }
3413    const alignment = getAlignment(placement);
3414    if (alignment) {
3415      coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3416    }
3417    return coords;
3418  }
3419  async function detectOverflow(state, options) {
3420    var _await$platform$isEle;
3421    if (options === void 0) {
3422      options = {};
3423    }
3424    const {
3425      x,
3426      y,
3427      platform: platform3,
3428      rects,
3429      elements,
3430      strategy
3431    } = state;
3432    const {
3433      boundary = "clippingAncestors",
3434      rootBoundary = "viewport",
3435      elementContext = "floating",
3436      altBoundary = false,
3437      padding = 0
3438    } = evaluate(options, state);
3439    const paddingObject = getPaddingObject(padding);
3440    const altContext = elementContext === "floating" ? "reference" : "floating";
3441    const element = elements[altBoundary ? altContext : elementContext];
3442    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3443      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)),
3444      boundary,
3445      rootBoundary,
3446      strategy
3447    }));
3448    const rect = elementContext === "floating" ? {
3449      x,
3450      y,
3451      width: rects.floating.width,
3452      height: rects.floating.height
3453    } : rects.reference;
3454    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3455    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3456      x: 1,
3457      y: 1
3458    };
3459    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3460      elements,
3461      rect,
3462      offsetParent,
3463      strategy
3464    }) : rect);
3465    return {
3466      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3467      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3468      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3469      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3470    };
3471  }
3472  var MAX_RESET_COUNT = 50;
3473  var computePosition = async (reference, floating, config) => {
3474    const {
3475      placement = "bottom",
3476      strategy = "absolute",
3477      middleware = [],
3478      platform: platform3
3479    } = config;
3480    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3481      ...platform3,
3482      detectOverflow
3483    };
3484    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3485    let rects = await platform3.getElementRects({
3486      reference,
3487      floating,
3488      strategy
3489    });
3490    let {
3491      x,
3492      y
3493    } = computeCoordsFromPlacement(rects, placement, rtl);
3494    let statefulPlacement = placement;
3495    let resetCount = 0;
3496    const middlewareData = {};
3497    for (let i = 0; i < middleware.length; i++) {
3498      const currentMiddleware = middleware[i];
3499      if (!currentMiddleware) {
3500        continue;
3501      }
3502      const {
3503        name,
3504        fn
3505      } = currentMiddleware;
3506      const {
3507        x: nextX,
3508        y: nextY,
3509        data,
3510        reset
3511      } = await fn({
3512        x,
3513        y,
3514        initialPlacement: placement,
3515        placement: statefulPlacement,
3516        strategy,
3517        middlewareData,
3518        rects,
3519        platform: platformWithDetectOverflow,
3520        elements: {
3521          reference,
3522          floating
3523        }
3524      });
3525      x = nextX != null ? nextX : x;
3526      y = nextY != null ? nextY : y;
3527      middlewareData[name] = {
3528        ...middlewareData[name],
3529        ...data
3530      };
3531      if (reset && resetCount < MAX_RESET_COUNT) {
3532        resetCount++;
3533        if (typeof reset === "object") {
3534          if (reset.placement) {
3535            statefulPlacement = reset.placement;
3536          }
3537          if (reset.rects) {
3538            rects = reset.rects === true ? await platform3.getElementRects({
3539              reference,
3540              floating,
3541              strategy
3542            }) : reset.rects;
3543          }
3544          ({
3545            x,
3546            y
3547          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3548        }
3549        i = -1;
3550      }
3551    }
3552    return {
3553      x,
3554      y,
3555      placement: statefulPlacement,
3556      strategy,
3557      middlewareData
3558    };
3559  };
3560  var flip = function(options) {
3561    if (options === void 0) {
3562      options = {};
3563    }
3564    return {
3565      name: "flip",
3566      options,
3567      async fn(state) {
3568        var _middlewareData$arrow, _middlewareData$flip;
3569        const {
3570          placement,
3571          middlewareData,
3572          rects,
3573          initialPlacement,
3574          platform: platform3,
3575          elements
3576        } = state;
3577        const {
3578          mainAxis: checkMainAxis = true,
3579          crossAxis: checkCrossAxis = true,
3580          fallbackPlacements: specifiedFallbackPlacements,
3581          fallbackStrategy = "bestFit",
3582          fallbackAxisSideDirection = "none",
3583          flipAlignment = true,
3584          ...detectOverflowOptions
3585        } = evaluate(options, state);
3586        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3587          return {};
3588        }
3589        const side = getSide(placement);
3590        const initialSideAxis = getSideAxis(initialPlacement);
3591        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3592        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3593        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3594        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3595        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3596          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3597        }
3598        const placements2 = [initialPlacement, ...fallbackPlacements];
3599        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3600        const overflows = [];
3601        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3602        if (checkMainAxis) {
3603          overflows.push(overflow[side]);
3604        }
3605        if (checkCrossAxis) {
3606          const sides2 = getAlignmentSides(placement, rects, rtl);
3607          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3608        }
3609        overflowsData = [...overflowsData, {
3610          placement,
3611          overflows
3612        }];
3613        if (!overflows.every((side2) => side2 <= 0)) {
3614          var _middlewareData$flip2, _overflowsData$filter;
3615          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3616          const nextPlacement = placements2[nextIndex];
3617          if (nextPlacement) {
3618            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3619            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3620            // overflows the main axis.
3621            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3622              return {
3623                data: {
3624                  index: nextIndex,
3625                  overflows: overflowsData
3626                },
3627                reset: {
3628                  placement: nextPlacement
3629                }
3630              };
3631            }
3632          }
3633          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;
3634          if (!resetPlacement) {
3635            switch (fallbackStrategy) {
3636              case "bestFit": {
3637                var _overflowsData$filter2;
3638                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3639                  if (hasFallbackAxisSideDirection) {
3640                    const currentSideAxis = getSideAxis(d.placement);
3641                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3642                    // reading directions favoring greater width.
3643                    currentSideAxis === "y";
3644                  }
3645                  return true;
3646                }).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];
3647                if (placement2) {
3648                  resetPlacement = placement2;
3649                }
3650                break;
3651              }
3652              case "initialPlacement":
3653                resetPlacement = initialPlacement;
3654                break;
3655            }
3656          }
3657          if (placement !== resetPlacement) {
3658            return {
3659              reset: {
3660                placement: resetPlacement
3661              }
3662            };
3663          }
3664        }
3665        return {};
3666      }
3667    };
3668  };
3669  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3670  async function convertValueToCoords(state, options) {
3671    const {
3672      placement,
3673      platform: platform3,
3674      elements
3675    } = state;
3676    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3677    const side = getSide(placement);
3678    const alignment = getAlignment(placement);
3679    const isVertical = getSideAxis(placement) === "y";
3680    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3681    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3682    const rawValue = evaluate(options, state);
3683    let {
3684      mainAxis,
3685      crossAxis,
3686      alignmentAxis
3687    } = typeof rawValue === "number" ? {
3688      mainAxis: rawValue,
3689      crossAxis: 0,
3690      alignmentAxis: null
3691    } : {
3692      mainAxis: rawValue.mainAxis || 0,
3693      crossAxis: rawValue.crossAxis || 0,
3694      alignmentAxis: rawValue.alignmentAxis
3695    };
3696    if (alignment && typeof alignmentAxis === "number") {
3697      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3698    }
3699    return isVertical ? {
3700      x: crossAxis * crossAxisMulti,
3701      y: mainAxis * mainAxisMulti
3702    } : {
3703      x: mainAxis * mainAxisMulti,
3704      y: crossAxis * crossAxisMulti
3705    };
3706  }
3707  var offset = function(options) {
3708    if (options === void 0) {
3709      options = 0;
3710    }
3711    return {
3712      name: "offset",
3713      options,
3714      async fn(state) {
3715        var _middlewareData$offse, _middlewareData$arrow;
3716        const {
3717          x,
3718          y,
3719          placement,
3720          middlewareData
3721        } = state;
3722        const diffCoords = await convertValueToCoords(state, options);
3723        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3724          return {};
3725        }
3726        return {
3727          x: x + diffCoords.x,
3728          y: y + diffCoords.y,
3729          data: {
3730            ...diffCoords,
3731            placement
3732          }
3733        };
3734      }
3735    };
3736  };
3737  var shift = function(options) {
3738    if (options === void 0) {
3739      options = {};
3740    }
3741    return {
3742      name: "shift",
3743      options,
3744      async fn(state) {
3745        const {
3746          x,
3747          y,
3748          placement,
3749          platform: platform3
3750        } = state;
3751        const {
3752          mainAxis: checkMainAxis = true,
3753          crossAxis: checkCrossAxis = false,
3754          limiter = {
3755            fn: (_ref) => {
3756              let {
3757                x: x2,
3758                y: y2
3759              } = _ref;
3760              return {
3761                x: x2,
3762                y: y2
3763              };
3764            }
3765          },
3766          ...detectOverflowOptions
3767        } = evaluate(options, state);
3768        const coords = {
3769          x,
3770          y
3771        };
3772        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3773        const crossAxis = getSideAxis(placement);
3774        const mainAxis = getOppositeAxis(crossAxis);
3775        let mainAxisCoord = coords[mainAxis];
3776        let crossAxisCoord = coords[crossAxis];
3777        const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3778        if (checkMainAxis) {
3779          mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3780        }
3781        if (checkCrossAxis) {
3782          crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3783        }
3784        const limitedCoords = limiter.fn({
3785          ...state,
3786          [mainAxis]: mainAxisCoord,
3787          [crossAxis]: crossAxisCoord
3788        });
3789        return {
3790          ...limitedCoords,
3791          data: {
3792            x: limitedCoords.x - x,
3793            y: limitedCoords.y - y,
3794            enabled: {
3795              [mainAxis]: checkMainAxis,
3796              [crossAxis]: checkCrossAxis
3797            }
3798          }
3799        };
3800      }
3801    };
3802  };
3803  var limitShift = function(options) {
3804    if (options === void 0) {
3805      options = {};
3806    }
3807    return {
3808      options,
3809      fn(state) {
3810        var _rawOffset$mainAxis, _rawOffset$crossAxis;
3811        const {
3812          x,
3813          y,
3814          placement,
3815          rects,
3816          middlewareData
3817        } = state;
3818        const {
3819          offset: offset4 = 0,
3820          mainAxis: checkMainAxis = true,
3821          crossAxis: checkCrossAxis = true
3822        } = evaluate(options, state);
3823        const coords = {
3824          x,
3825          y
3826        };
3827        const crossAxis = getSideAxis(placement);
3828        const mainAxis = getOppositeAxis(crossAxis);
3829        let mainAxisCoord = coords[mainAxis];
3830        let crossAxisCoord = coords[crossAxis];
3831        const rawOffset = evaluate(offset4, state);
3832        const computedOffset = typeof rawOffset === "number" ? {
3833          mainAxis: rawOffset,
3834          crossAxis: 0
3835        } : {
3836          mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3837          crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3838        };
3839        if (checkMainAxis) {
3840          const len = mainAxis === "y" ? "height" : "width";
3841          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3842          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3843          if (mainAxisCoord < limitMin) {
3844            mainAxisCoord = limitMin;
3845          } else if (mainAxisCoord > limitMax) {
3846            mainAxisCoord = limitMax;
3847          }
3848        }
3849        if (checkCrossAxis) {
3850          var _middlewareData$offse, _middlewareData$offse2;
3851          const len = mainAxis === "y" ? "width" : "height";
3852          const isOriginSide = originSides.has(getSide(placement));
3853          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);
3854          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);
3855          if (crossAxisCoord < limitMin) {
3856            crossAxisCoord = limitMin;
3857          } else if (crossAxisCoord > limitMax) {
3858            crossAxisCoord = limitMax;
3859          }
3860        }
3861        return {
3862          [mainAxis]: mainAxisCoord,
3863          [crossAxis]: crossAxisCoord
3864        };
3865      }
3866    };
3867  };
3868  var size = function(options) {
3869    if (options === void 0) {
3870      options = {};
3871    }
3872    return {
3873      name: "size",
3874      options,
3875      async fn(state) {
3876        const {
3877          placement,
3878          rects,
3879          platform: platform3,
3880          elements
3881        } = state;
3882        const {
3883          apply = () => {
3884          },
3885          ...detectOverflowOptions
3886        } = evaluate(options, state);
3887        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3888        const side = getSide(placement);
3889        const alignment = getAlignment(placement);
3890        const isYAxis = getSideAxis(placement) === "y";
3891        const {
3892          width,
3893          height
3894        } = rects.floating;
3895        let heightSide;
3896        let widthSide;
3897        if (side === "top" || side === "bottom") {
3898          heightSide = side;
3899          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3900        } else {
3901          widthSide = side;
3902          heightSide = alignment === "end" ? "top" : "bottom";
3903        }
3904        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3905        const maximumClippingWidth = width - overflow.left - overflow.right;
3906        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3907        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3908        const shiftData = state.middlewareData.shift;
3909        const noShift = !shiftData;
3910        let availableHeight2 = overflowAvailableHeight;
3911        let availableWidth2 = overflowAvailableWidth;
3912        if (shiftData != null && shiftData.enabled.x) {
3913          availableWidth2 = maximumClippingWidth;
3914        }
3915        if (shiftData != null && shiftData.enabled.y) {
3916          availableHeight2 = maximumClippingHeight;
3917        }
3918        if (noShift && !alignment) {
3919          if (isYAxis) {
3920            availableWidth2 = width - 2 * max(overflow.left, overflow.right);
3921          } else {
3922            availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
3923          }
3924        }
3925        await apply({
3926          ...state,
3927          availableWidth: availableWidth2,
3928          availableHeight: availableHeight2
3929        });
3930        const nextDimensions = await platform3.getDimensions(elements.floating);
3931        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3932          return {
3933            reset: {
3934              rects: true
3935            }
3936          };
3937        }
3938        return {};
3939      }
3940    };
3941  };
3942  
3943  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3944  function getCssDimensions(element) {
3945    const css = getComputedStyle2(element);
3946    let width = parseFloat(css.width) || 0;
3947    let height = parseFloat(css.height) || 0;
3948    const hasOffset = isHTMLElement(element);
3949    const offsetWidth = hasOffset ? element.offsetWidth : width;
3950    const offsetHeight = hasOffset ? element.offsetHeight : height;
3951    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3952    if (shouldFallback) {
3953      width = offsetWidth;
3954      height = offsetHeight;
3955    }
3956    return {
3957      width,
3958      height,
3959      $: shouldFallback
3960    };
3961  }
3962  function unwrapElement(element) {
3963    return !isElement(element) ? element.contextElement : element;
3964  }
3965  function getScale(element) {
3966    const domElement = unwrapElement(element);
3967    if (!isHTMLElement(domElement)) {
3968      return createCoords(1);
3969    }
3970    const rect = domElement.getBoundingClientRect();
3971    const {
3972      width,
3973      height,
3974      $
3975    } = getCssDimensions(domElement);
3976    let x = ($ ? round(rect.width) : rect.width) / width;
3977    let y = ($ ? round(rect.height) : rect.height) / height;
3978    if (!x || !Number.isFinite(x)) {
3979      x = 1;
3980    }
3981    if (!y || !Number.isFinite(y)) {
3982      y = 1;
3983    }
3984    return {
3985      x,
3986      y
3987    };
3988  }
3989  var noOffsets = /* @__PURE__ */ createCoords(0);
3990  function getVisualOffsets(element) {
3991    const win = getWindow(element);
3992    if (!isWebKit() || !win.visualViewport) {
3993      return noOffsets;
3994    }
3995    return {
3996      x: win.visualViewport.offsetLeft,
3997      y: win.visualViewport.offsetTop
3998    };
3999  }
4000  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
4001    if (isFixed === void 0) {
4002      isFixed = false;
4003    }
4004    return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
4005  }
4006  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
4007    if (includeScale === void 0) {
4008      includeScale = false;
4009    }
4010    if (isFixedStrategy === void 0) {
4011      isFixedStrategy = false;
4012    }
4013    const clientRect = element.getBoundingClientRect();
4014    const domElement = unwrapElement(element);
4015    let scale = createCoords(1);
4016    if (includeScale) {
4017      if (offsetParent) {
4018        if (isElement(offsetParent)) {
4019          scale = getScale(offsetParent);
4020        }
4021      } else {
4022        scale = getScale(element);
4023      }
4024    }
4025    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
4026    let x = (clientRect.left + visualOffsets.x) / scale.x;
4027    let y = (clientRect.top + visualOffsets.y) / scale.y;
4028    let width = clientRect.width / scale.x;
4029    let height = clientRect.height / scale.y;
4030    if (domElement && offsetParent) {
4031      const win = getWindow(domElement);
4032      const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
4033      let currentWin = win;
4034      let currentIFrame = getFrameElement(currentWin);
4035      while (currentIFrame && offsetWin !== currentWin) {
4036        const iframeScale = getScale(currentIFrame);
4037        const iframeRect = currentIFrame.getBoundingClientRect();
4038        const css = getComputedStyle2(currentIFrame);
4039        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
4040        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
4041        x *= iframeScale.x;
4042        y *= iframeScale.y;
4043        width *= iframeScale.x;
4044        height *= iframeScale.y;
4045        x += left;
4046        y += top;
4047        currentWin = getWindow(currentIFrame);
4048        currentIFrame = getFrameElement(currentWin);
4049      }
4050    }
4051    return rectToClientRect({
4052      width,
4053      height,
4054      x,
4055      y
4056    });
4057  }
4058  function getWindowScrollBarX(element, rect) {
4059    const leftScroll = getNodeScroll(element).scrollLeft;
4060    if (!rect) {
4061      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
4062    }
4063    return rect.left + leftScroll;
4064  }
4065  function getHTMLOffset(documentElement, scroll) {
4066    const htmlRect = documentElement.getBoundingClientRect();
4067    const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
4068    const y = htmlRect.top + scroll.scrollTop;
4069    return {
4070      x,
4071      y
4072    };
4073  }
4074  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
4075    let {
4076      elements,
4077      rect,
4078      offsetParent,
4079      strategy
4080    } = _ref;
4081    const isFixed = strategy === "fixed";
4082    const documentElement = getDocumentElement(offsetParent);
4083    const topLayer = elements ? isTopLayer(elements.floating) : false;
4084    if (offsetParent === documentElement || topLayer && isFixed) {
4085      return rect;
4086    }
4087    let scroll = {
4088      scrollLeft: 0,
4089      scrollTop: 0
4090    };
4091    let scale = createCoords(1);
4092    const offsets = createCoords(0);
4093    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4094    if (isOffsetParentAnElement || !isFixed) {
4095      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4096        scroll = getNodeScroll(offsetParent);
4097      }
4098      if (isOffsetParentAnElement) {
4099        const offsetRect = getBoundingClientRect(offsetParent);
4100        scale = getScale(offsetParent);
4101        offsets.x = offsetRect.x + offsetParent.clientLeft;
4102        offsets.y = offsetRect.y + offsetParent.clientTop;
4103      }
4104    }
4105    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4106    return {
4107      width: rect.width * scale.x,
4108      height: rect.height * scale.y,
4109      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
4110      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
4111    };
4112  }
4113  function getClientRects(element) {
4114    return element.getClientRects ? Array.from(element.getClientRects()) : [];
4115  }
4116  function getDocumentRect(html) {
4117    const scroll = getNodeScroll(html);
4118    const body = html.ownerDocument.body;
4119    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
4120    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
4121    let x = -scroll.scrollLeft + getWindowScrollBarX(html);
4122    const y = -scroll.scrollTop;
4123    if (getComputedStyle2(body).direction === "rtl") {
4124      x += max(html.clientWidth, body.clientWidth) - width;
4125    }
4126    return {
4127      width,
4128      height,
4129      x,
4130      y
4131    };
4132  }
4133  var SCROLLBAR_MAX = 25;
4134  function getViewportRect(element, strategy, rootBoundary) {
4135    if (rootBoundary === void 0) {
4136      rootBoundary = "viewport";
4137    }
4138    const isLayoutViewport = rootBoundary === "layoutViewport";
4139    const win = getWindow(element);
4140    const html = getDocumentElement(element);
4141    const visualViewport = win.visualViewport;
4142    let width = html.clientWidth;
4143    let height = html.clientHeight;
4144    let x = 0;
4145    let y = 0;
4146    if (visualViewport) {
4147      const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
4148      if (isLayoutViewport) {
4149        if (!layoutRelativeClientCoords) {
4150          x = -visualViewport.offsetLeft;
4151          y = -visualViewport.offsetTop;
4152        }
4153      } else {
4154        width = visualViewport.width;
4155        height = visualViewport.height;
4156        if (layoutRelativeClientCoords) {
4157          x = visualViewport.offsetLeft;
4158          y = visualViewport.offsetTop;
4159        }
4160      }
4161    }
4162    const windowScrollbarX = getWindowScrollBarX(html);
4163    if (windowScrollbarX <= 0) {
4164      const doc = html.ownerDocument;
4165      const body = doc.body;
4166      const bodyStyles = getComputedStyle(body);
4167      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4168      const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4169      const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
4170      if (gutter <= SCROLLBAR_MAX) {
4171        width -= gutter;
4172      }
4173    }
4174    return {
4175      width,
4176      height,
4177      x,
4178      y
4179    };
4180  }
4181  function getInnerBoundingClientRect(element, strategy) {
4182    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4183    const top = clientRect.top + element.clientTop;
4184    const left = clientRect.left + element.clientLeft;
4185    const scale = getScale(element);
4186    const width = element.clientWidth * scale.x;
4187    const height = element.clientHeight * scale.y;
4188    const x = left * scale.x;
4189    const y = top * scale.y;
4190    return {
4191      width,
4192      height,
4193      x,
4194      y
4195    };
4196  }
4197  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4198    let rect;
4199    if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4200      rect = getViewportRect(element, strategy, clippingAncestor);
4201    } else if (clippingAncestor === "document") {
4202      rect = getDocumentRect(getDocumentElement(element));
4203    } else if (isElement(clippingAncestor)) {
4204      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4205    } else {
4206      const visualOffsets = getVisualOffsets(element);
4207      rect = {
4208        x: clippingAncestor.x - visualOffsets.x,
4209        y: clippingAncestor.y - visualOffsets.y,
4210        width: clippingAncestor.width,
4211        height: clippingAncestor.height
4212      };
4213    }
4214    return rectToClientRect(rect);
4215  }
4216  function getClippingElementAncestors(element, cache) {
4217    const cachedResult = cache.get(element);
4218    if (cachedResult) {
4219      return cachedResult;
4220    }
4221    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4222    let lastKeptComputedStyle = null;
4223    const elementIsFixed = getComputedStyle2(element).position === "fixed";
4224    let currentNode = elementIsFixed ? getParentNode(element) : element;
4225    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4226      const computedStyle = getComputedStyle2(currentNode);
4227      const currentNodeIsContaining = isContainingBlock(currentNode);
4228      const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4229      const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4230      if (shouldDropCurrentNode) {
4231        result = result.filter((ancestor) => ancestor !== currentNode);
4232      } else {
4233        lastKeptComputedStyle = computedStyle;
4234      }
4235      currentNode = getParentNode(currentNode);
4236    }
4237    cache.set(element, result);
4238    return result;
4239  }
4240  function getClippingRect(_ref) {
4241    let {
4242      element,
4243      boundary,
4244      rootBoundary,
4245      strategy
4246    } = _ref;
4247    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4248    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4249    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4250    let top = firstRect.top;
4251    let right = firstRect.right;
4252    let bottom = firstRect.bottom;
4253    let left = firstRect.left;
4254    for (let i = 1; i < clippingAncestors.length; i++) {
4255      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4256      top = max(rect.top, top);
4257      right = min(rect.right, right);
4258      bottom = min(rect.bottom, bottom);
4259      left = max(rect.left, left);
4260    }
4261    return {
4262      width: right - left,
4263      height: bottom - top,
4264      x: left,
4265      y: top
4266    };
4267  }
4268  function getDimensions(element) {
4269    const {
4270      width,
4271      height
4272    } = getCssDimensions(element);
4273    return {
4274      width,
4275      height
4276    };
4277  }
4278  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4279    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4280    const documentElement = getDocumentElement(offsetParent);
4281    const isFixed = strategy === "fixed";
4282    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4283    let scroll = {
4284      scrollLeft: 0,
4285      scrollTop: 0
4286    };
4287    const offsets = createCoords(0);
4288    if (isOffsetParentAnElement || !isFixed) {
4289      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4290        scroll = getNodeScroll(offsetParent);
4291      }
4292      if (isOffsetParentAnElement) {
4293        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4294        offsets.x = offsetRect.x + offsetParent.clientLeft;
4295        offsets.y = offsetRect.y + offsetParent.clientTop;
4296      }
4297    }
4298    if (!isOffsetParentAnElement && documentElement) {
4299      offsets.x = getWindowScrollBarX(documentElement);
4300    }
4301    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4302    const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4303    const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4304    return {
4305      x,
4306      y,
4307      width: rect.width,
4308      height: rect.height
4309    };
4310  }
4311  function isStaticPositioned(element) {
4312    return getComputedStyle2(element).position === "static";
4313  }
4314  function getTrueOffsetParent(element, polyfill) {
4315    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4316      return null;
4317    }
4318    if (polyfill) {
4319      return polyfill(element);
4320    }
4321    let rawOffsetParent = element.offsetParent;
4322    if (getDocumentElement(element) === rawOffsetParent) {
4323      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4324    }
4325    return rawOffsetParent;
4326  }
4327  function getOffsetParent(element, polyfill) {
4328    const win = getWindow(element);
4329    if (isTopLayer(element)) {
4330      return win;
4331    }
4332    if (!isHTMLElement(element)) {
4333      let svgOffsetParent = getParentNode(element);
4334      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4335        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4336          return svgOffsetParent;
4337        }
4338        svgOffsetParent = getParentNode(svgOffsetParent);
4339      }
4340      return win;
4341    }
4342    let offsetParent = getTrueOffsetParent(element, polyfill);
4343    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4344      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4345    }
4346    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4347      return win;
4348    }
4349    return offsetParent || getContainingBlock(element) || win;
4350  }
4351  var getElementRects = async function(data) {
4352    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4353    const getDimensionsFn = this.getDimensions;
4354    const floatingDimensions = await getDimensionsFn(data.floating);
4355    return {
4356      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4357      floating: {
4358        x: 0,
4359        y: 0,
4360        width: floatingDimensions.width,
4361        height: floatingDimensions.height
4362      }
4363    };
4364  };
4365  function isRTL(element) {
4366    return getComputedStyle2(element).direction === "rtl";
4367  }
4368  var platform2 = {
4369    convertOffsetParentRelativeRectToViewportRelativeRect,
4370    getDocumentElement,
4371    getClippingRect,
4372    getOffsetParent,
4373    getElementRects,
4374    getClientRects,
4375    getDimensions,
4376    getScale,
4377    isElement,
4378    isRTL
4379  };
4380  function rectsAreEqual(a, b) {
4381    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4382  }
4383  function observeMove(element, onMove, ancestorResize) {
4384    let io = null;
4385    let timeoutId;
4386    const root = getDocumentElement(element);
4387    function cleanup() {
4388      var _io;
4389      clearTimeout(timeoutId);
4390      (_io = io) == null || _io.disconnect();
4391      io = null;
4392    }
4393    function refresh(skip, threshold) {
4394      if (skip === void 0) {
4395        skip = false;
4396      }
4397      if (threshold === void 0) {
4398        threshold = 1;
4399      }
4400      cleanup();
4401      const elementRectForRootMargin = element.getBoundingClientRect();
4402      const {
4403        left,
4404        top,
4405        width,
4406        height
4407      } = elementRectForRootMargin;
4408      if (!skip) {
4409        onMove();
4410      }
4411      if (!width || !height) {
4412        return;
4413      }
4414      const insetTop = floor(top);
4415      const insetRight = floor(root.clientWidth - (left + width));
4416      const insetBottom = floor(root.clientHeight - (top + height));
4417      const insetLeft = floor(left);
4418      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4419      const options = {
4420        rootMargin,
4421        threshold: max(0, min(1, threshold)) || 1
4422      };
4423      let isFirstUpdate = true;
4424      function handleObserve(entries) {
4425        const ratio = entries[0].intersectionRatio;
4426        if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4427          return refresh();
4428        }
4429        if (ratio !== threshold) {
4430          if (!isFirstUpdate) {
4431            return refresh();
4432          }
4433          if (!ratio) {
4434            timeoutId = setTimeout(() => {
4435              refresh(false, 1e-7);
4436            }, 1e3);
4437          } else {
4438            refresh(false, ratio);
4439          }
4440        }
4441        isFirstUpdate = false;
4442      }
4443      try {
4444        io = new IntersectionObserver(handleObserve, {
4445          ...options,
4446          // Handle <iframe>s
4447          root: root.ownerDocument
4448        });
4449      } catch (_e) {
4450        io = new IntersectionObserver(handleObserve, options);
4451      }
4452      io.observe(element);
4453    }
4454    const win = getWindow(element);
4455    const handleResize = () => refresh(ancestorResize);
4456    win.addEventListener("resize", handleResize);
4457    refresh(true);
4458    return () => {
4459      win.removeEventListener("resize", handleResize);
4460      cleanup();
4461    };
4462  }
4463  function autoUpdate(reference, floating, update2, options) {
4464    if (options === void 0) {
4465      options = {};
4466    }
4467    const {
4468      ancestorScroll = true,
4469      ancestorResize = true,
4470      elementResize = typeof ResizeObserver === "function",
4471      layoutShift = typeof IntersectionObserver === "function",
4472      animationFrame = false
4473    } = options;
4474    const referenceEl = unwrapElement(reference);
4475    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4476    ancestors.forEach((ancestor) => {
4477      ancestorScroll && ancestor.addEventListener("scroll", update2);
4478      ancestorResize && ancestor.addEventListener("resize", update2);
4479    });
4480    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4481    let reobserveFrame = -1;
4482    let resizeObserver = null;
4483    if (elementResize) {
4484      resizeObserver = new ResizeObserver((_ref) => {
4485        let [firstEntry] = _ref;
4486        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4487          resizeObserver.unobserve(floating);
4488          cancelAnimationFrame(reobserveFrame);
4489          reobserveFrame = requestAnimationFrame(() => {
4490            var _resizeObserver;
4491            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4492          });
4493        }
4494        update2();
4495      });
4496      if (referenceEl && !animationFrame) {
4497        resizeObserver.observe(referenceEl);
4498      }
4499      if (floating) {
4500        resizeObserver.observe(floating);
4501      }
4502    }
4503    let frameId;
4504    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4505    if (animationFrame) {
4506      frameLoop();
4507    }
4508    function frameLoop() {
4509      const nextRefRect = getBoundingClientRect(reference);
4510      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4511        update2();
4512      }
4513      prevRefRect = nextRefRect;
4514      frameId = requestAnimationFrame(frameLoop);
4515    }
4516    update2();
4517    return () => {
4518      var _resizeObserver2;
4519      ancestors.forEach((ancestor) => {
4520        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4521        ancestorResize && ancestor.removeEventListener("resize", update2);
4522      });
4523      cleanupIo == null || cleanupIo();
4524      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4525      resizeObserver = null;
4526      if (animationFrame) {
4527        cancelAnimationFrame(frameId);
4528      }
4529    };
4530  }
4531  var offset2 = offset;
4532  var shift2 = shift;
4533  var flip2 = flip;
4534  var size2 = size;
4535  var limitShift2 = limitShift;
4536  var computePosition2 = (reference, floating, options) => {
4537    const cache = /* @__PURE__ */ new Map();
4538    const mergedOptions = options != null ? options : {};
4539    const platformWithCache = {
4540      ...platform2,
4541      ...mergedOptions.platform,
4542      _c: cache
4543    };
4544    return computePosition(reference, floating, {
4545      ...mergedOptions,
4546      platform: platformWithCache
4547    });
4548  };
4549  
4550  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4551  var React20 = __toESM(require_react(), 1);
4552  var import_react2 = __toESM(require_react(), 1);
4553  var ReactDOM3 = __toESM(require_react_dom(), 1);
4554  var isClient = typeof document !== "undefined";
4555  var noop2 = function noop3() {
4556  };
4557  var index = isClient ? import_react2.useLayoutEffect : noop2;
4558  function deepEqual(a, b) {
4559    if (a === b) {
4560      return true;
4561    }
4562    if (typeof a !== typeof b) {
4563      return false;
4564    }
4565    if (typeof a === "function" && a.toString() === b.toString()) {
4566      return true;
4567    }
4568    let length;
4569    let i;
4570    let keys;
4571    if (a && b && typeof a === "object") {
4572      if (Array.isArray(a)) {
4573        length = a.length;
4574        if (length !== b.length) return false;
4575        for (i = length; i-- !== 0; ) {
4576          if (!deepEqual(a[i], b[i])) {
4577            return false;
4578          }
4579        }
4580        return true;
4581      }
4582      keys = Object.keys(a);
4583      length = keys.length;
4584      if (length !== Object.keys(b).length) {
4585        return false;
4586      }
4587      for (i = length; i-- !== 0; ) {
4588        if (!{}.hasOwnProperty.call(b, keys[i])) {
4589          return false;
4590        }
4591      }
4592      for (i = length; i-- !== 0; ) {
4593        const key = keys[i];
4594        if (key === "_owner" && a.$$typeof) {
4595          continue;
4596        }
4597        if (!deepEqual(a[key], b[key])) {
4598          return false;
4599        }
4600      }
4601      return true;
4602    }
4603    return a !== a && b !== b;
4604  }
4605  function getDPR(element) {
4606    if (typeof window === "undefined") {
4607      return 1;
4608    }
4609    const win = element.ownerDocument.defaultView || window;
4610    return win.devicePixelRatio || 1;
4611  }
4612  function roundByDPR(element, value) {
4613    const dpr = getDPR(element);
4614    return Math.round(value * dpr) / dpr;
4615  }
4616  function useLatestRef(value) {
4617    const ref = React20.useRef(value);
4618    index(() => {
4619      ref.current = value;
4620    });
4621    return ref;
4622  }
4623  function useFloating(options) {
4624    if (options === void 0) {
4625      options = {};
4626    }
4627    const {
4628      placement = "bottom",
4629      strategy = "absolute",
4630      middleware = [],
4631      platform: platform3,
4632      elements: {
4633        reference: externalReference,
4634        floating: externalFloating
4635      } = {},
4636      transform = true,
4637      whileElementsMounted,
4638      open: open2
4639    } = options;
4640    const [data, setData] = React20.useState({
4641      x: 0,
4642      y: 0,
4643      strategy,
4644      placement,
4645      middlewareData: {},
4646      isPositioned: false
4647    });
4648    const [latestMiddleware, setLatestMiddleware] = React20.useState(middleware);
4649    if (!deepEqual(latestMiddleware, middleware)) {
4650      setLatestMiddleware(middleware);
4651    }
4652    const [_reference, _setReference] = React20.useState(null);
4653    const [_floating, _setFloating] = React20.useState(null);
4654    const setReference = React20.useCallback((node) => {
4655      if (node !== referenceRef.current) {
4656        referenceRef.current = node;
4657        _setReference(node);
4658      }
4659    }, []);
4660    const setFloating = React20.useCallback((node) => {
4661      if (node !== floatingRef.current) {
4662        floatingRef.current = node;
4663        _setFloating(node);
4664      }
4665    }, []);
4666    const referenceEl = externalReference || _reference;
4667    const floatingEl = externalFloating || _floating;
4668    const referenceRef = React20.useRef(null);
4669    const floatingRef = React20.useRef(null);
4670    const dataRef = React20.useRef(data);
4671    const hasWhileElementsMounted = whileElementsMounted != null;
4672    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4673    const platformRef = useLatestRef(platform3);
4674    const openRef = useLatestRef(open2);
4675    const update2 = React20.useCallback(() => {
4676      if (!referenceRef.current || !floatingRef.current) {
4677        return;
4678      }
4679      const config = {
4680        placement,
4681        strategy,
4682        middleware: latestMiddleware
4683      };
4684      if (platformRef.current) {
4685        config.platform = platformRef.current;
4686      }
4687      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4688        const fullData = {
4689          ...data2,
4690          // The floating element's position may be recomputed while it's closed
4691          // but still mounted (such as when transitioning out). To ensure
4692          // `isPositioned` will be `false` initially on the next open, avoid
4693          // setting it to `true` when `open === false` (must be specified).
4694          isPositioned: openRef.current !== false
4695        };
4696        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4697          dataRef.current = fullData;
4698          ReactDOM3.flushSync(() => {
4699            setData(fullData);
4700          });
4701        }
4702      });
4703    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4704    index(() => {
4705      if (open2 === false && dataRef.current.isPositioned) {
4706        dataRef.current.isPositioned = false;
4707        setData((data2) => ({
4708          ...data2,
4709          isPositioned: false
4710        }));
4711      }
4712    }, [open2]);
4713    const isMountedRef = React20.useRef(false);
4714    index(() => {
4715      isMountedRef.current = true;
4716      return () => {
4717        isMountedRef.current = false;
4718      };
4719    }, []);
4720    index(() => {
4721      if (referenceEl) referenceRef.current = referenceEl;
4722      if (floatingEl) floatingRef.current = floatingEl;
4723      if (referenceEl && floatingEl) {
4724        if (whileElementsMountedRef.current) {
4725          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4726        }
4727        update2();
4728      }
4729    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4730    const refs = React20.useMemo(() => ({
4731      reference: referenceRef,
4732      floating: floatingRef,
4733      setReference,
4734      setFloating
4735    }), [setReference, setFloating]);
4736    const elements = React20.useMemo(() => ({
4737      reference: referenceEl,
4738      floating: floatingEl
4739    }), [referenceEl, floatingEl]);
4740    const floatingStyles = React20.useMemo(() => {
4741      const initialStyles = {
4742        position: strategy,
4743        left: 0,
4744        top: 0
4745      };
4746      if (!elements.floating) {
4747        return initialStyles;
4748      }
4749      const x = roundByDPR(elements.floating, data.x);
4750      const y = roundByDPR(elements.floating, data.y);
4751      if (transform) {
4752        return {
4753          ...initialStyles,
4754          transform: "translate(" + x + "px, " + y + "px)",
4755          ...getDPR(elements.floating) >= 1.5 && {
4756            willChange: "transform"
4757          }
4758        };
4759      }
4760      return {
4761        position: strategy,
4762        left: x,
4763        top: y
4764      };
4765    }, [strategy, transform, elements.floating, data.x, data.y]);
4766    return React20.useMemo(() => ({
4767      ...data,
4768      update: update2,
4769      refs,
4770      elements,
4771      floatingStyles
4772    }), [data, update2, refs, elements, floatingStyles]);
4773  }
4774  var offset3 = (options, deps) => {
4775    const result = offset2(options);
4776    return {
4777      name: result.name,
4778      fn: result.fn,
4779      options: [options, deps]
4780    };
4781  };
4782  var shift3 = (options, deps) => {
4783    const result = shift2(options);
4784    return {
4785      name: result.name,
4786      fn: result.fn,
4787      options: [options, deps]
4788    };
4789  };
4790  var limitShift3 = (options, deps) => {
4791    const result = limitShift2(options);
4792    return {
4793      fn: result.fn,
4794      options: [options, deps]
4795    };
4796  };
4797  var flip3 = (options, deps) => {
4798    const result = flip2(options);
4799    return {
4800      name: result.name,
4801      fn: result.fn,
4802      options: [options, deps]
4803    };
4804  };
4805  var size3 = (options, deps) => {
4806    const result = size2(options);
4807    return {
4808      name: result.name,
4809      fn: result.fn,
4810      options: [options, deps]
4811    };
4812  };
4813  
4814  // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4815  var BasePopupHandle = class {
4816    /**
4817     * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4818     * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4819     * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4820     * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4821     */
4822    attachedStores = [];
4823    /**
4824     * Store of the root that currently controls the handle: the most recently attached one still
4825     * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4826     */
4827    attachedStoreValue = null;
4828    /**
4829     * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4830     */
4831    storeListeners = /* @__PURE__ */ new Set();
4832    /**
4833     * Creates a handle backed by the store used while no root is attached.
4834     *
4835     * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4836     * so they can render and register without a mounted root. Triggers register into whichever store
4837     * `store` currently resolves to, so while detached they live in this store's trigger map and
4838     * migrate themselves to the root's store (and back) as it attaches/detaches.
4839     * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4840     * `MenuHandle.open()` in warning text.
4841     * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4842     * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4843     * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4844     */
4845    constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4846      this.fallbackStore = fallbackStore;
4847      this.componentName = componentName;
4848      this.throwOnMissingTrigger = throwOnMissingTrigger;
4849    }
4850    get attachedStore() {
4851      return this.attachedStoreValue;
4852    }
4853    /**
4854     * Store that detached triggers read from: the attached root's store, or an inert fallback store
4855     * used while no root is attached.
4856     * @internal
4857     */
4858    get store() {
4859      return this.attachedStoreValue ?? this.fallbackStore;
4860    }
4861    /**
4862     * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4863     * the handle during render because a handle can be shared by concurrent server-rendered requests.
4864     * @internal
4865     */
4866    get serverStore() {
4867      return this.fallbackStore;
4868    }
4869    /**
4870     * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4871     * when a root attaches or detaches. Returns a function that removes the listener.
4872     * @internal
4873     */
4874    subscribeStore(listener) {
4875      this.storeListeners.add(listener);
4876      return () => {
4877        this.storeListeners.delete(listener);
4878      };
4879    }
4880    /**
4881     * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4882     * re-register into it (their registration effect migrates them when the store pointer changes).
4883     * Returns a cleanup function that detaches the store again.
4884     * @internal
4885     */
4886    attachStore(newStore) {
4887      this.attachedStores.push(newStore);
4888      this.setActiveStore(newStore);
4889      if (true) {
4890        if (this.attachedStores.length > 1) {
4891          const dev = this;
4892          (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4893            if (this.attachedStores.length > 1) {
4894              console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
4895            }
4896          });
4897        }
4898      }
4899      return () => {
4900        const index2 = this.attachedStores.lastIndexOf(newStore);
4901        if (index2 !== -1) {
4902          this.attachedStores.splice(index2, 1);
4903        }
4904        this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4905      };
4906    }
4907    /**
4908     * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4909     * detached triggers re-render and migrate their registration to the new store.
4910     */
4911    setActiveStore(store2) {
4912      if (this.attachedStoreValue !== store2) {
4913        this.attachedStoreValue = store2;
4914        this.storeListeners.forEach((listener) => {
4915          listener();
4916        });
4917      }
4918    }
4919    /**
4920     * Opens the attached root's store and associates it with the trigger with the given id, or a
4921     * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4922     * `open()` method, which only narrows the parameter type.
4923     *
4924     * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4925     * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4926     *
4927     * This method should only be called in an event handler or an effect (not during rendering).
4928     *
4929     * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4930     * without associating any trigger.
4931     */
4932    openByTrigger(triggerId) {
4933      const attachedStore = this.attachedStore;
4934      if (attachedStore === null) {
4935        if (true) {
4936          console.warn(`Base UI: $this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
4937        }
4938        return;
4939      }
4940      let triggerElement;
4941      if (triggerId) {
4942        for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
4943          triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
4944        }
4945        triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4946      }
4947      if (triggerId && !triggerElement) {
4948        if (this.throwOnMissingTrigger) {
4949          throw new Error(true ? `Base UI: $this.componentName}Handle.open() was called with the trigger id "$triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted $this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
4950        }
4951        if (true) {
4952          console.warn(`Base UI: $this.componentName}Handle.open: No trigger found with id "$triggerId}". The popup will open, but the trigger will not be associated with it.`);
4953        }
4954      }
4955      attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4956    }
4957    /**
4958     * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4959     * while no root is attached. Shared by every concrete handle's public `close()` method.
4960     *
4961     * This method should only be called in an event handler or an effect (not during rendering).
4962     */
4963    closePopup() {
4964      const attachedStore = this.attachedStore;
4965      if (attachedStore === null) {
4966        if (true) {
4967          console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4968        }
4969        return;
4970      }
4971      attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4972    }
4973  };
4974  
4975  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4976  var React25 = __toESM(require_react(), 1);
4977  var ReactDOM4 = __toESM(require_react_dom(), 1);
4978  
4979  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4980  var React24 = __toESM(require_react(), 1);
4981  
4982  // node_modules/@base-ui/utils/store/useStore.mjs
4983  var React22 = __toESM(require_react(), 1);
4984  var import_shim = __toESM(require_shim(), 1);
4985  var import_with_selector = __toESM(require_with_selector(), 1);
4986  
4987  // node_modules/@base-ui/utils/fastHooks.mjs
4988  var React21 = __toESM(require_react(), 1);
4989  var hooks = [];
4990  var currentInstance = void 0;
4991  function getInstance() {
4992    return currentInstance;
4993  }
4994  function register(hook) {
4995    hooks.push(hook);
4996  }
4997  function fastComponent(fn) {
4998    const FastComponent = (props, forwardedRef) => {
4999      const instance = useRefWithInit(createInstance).current;
5000      let result;
5001      try {
5002        currentInstance = instance;
5003        for (const hook of hooks) {
5004          hook.before(instance);
5005        }
5006        result = fn(props, forwardedRef);
5007        for (const hook of hooks) {
5008          hook.after(instance);
5009        }
5010        instance.didInitialize = true;
5011      } finally {
5012        currentInstance = void 0;
5013      }
5014      return result;
5015    };
5016    FastComponent.displayName = fn.displayName || fn.name;
5017    return FastComponent;
5018  }
5019  function fastComponentRef(fn) {
5020    return /* @__PURE__ */ React21.forwardRef(fastComponent(fn));
5021  }
5022  function createInstance() {
5023    return {
5024      didInitialize: false
5025    };
5026  }
5027  
5028  // node_modules/@base-ui/utils/store/useStore.mjs
5029  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
5030  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
5031  function useStore(store2, selector, a1, a2, a3) {
5032    return useStoreImplementation(store2, selector, a1, a2, a3);
5033  }
5034  function useStoreR19(store2, selector, a1, a2, a3) {
5035    const getSelection = React22.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
5036    return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
5037  }
5038  register({
5039    before(instance) {
5040      instance.syncIndex = 0;
5041      if (!instance.didInitialize) {
5042        instance.syncTick = 1;
5043        instance.syncHooks = [];
5044        instance.didChangeStore = true;
5045        instance.getSnapshot = () => {
5046          let didChange2 = false;
5047          for (let i = 0; i < instance.syncHooks.length; i += 1) {
5048            const hook = instance.syncHooks[i];
5049            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
5050            if (!Object.is(hook.value, value)) {
5051              didChange2 = true;
5052              hook.value = value;
5053            }
5054          }
5055          if (didChange2) {
5056            instance.syncTick += 1;
5057          }
5058          return instance.syncTick;
5059        };
5060      }
5061    },
5062    after(instance) {
5063      if (instance.syncHooks.length > 0) {
5064        if (instance.didChangeStore) {
5065          instance.didChangeStore = false;
5066          instance.subscribe = (onStoreChange) => {
5067            const stores = /* @__PURE__ */ new Set();
5068            for (const hook of instance.syncHooks) {
5069              stores.add(hook.store);
5070            }
5071            const unsubscribes = [];
5072            for (const store2 of stores) {
5073              unsubscribes.push(store2.subscribe(onStoreChange));
5074            }
5075            return () => {
5076              for (const unsubscribe of unsubscribes) {
5077                unsubscribe();
5078              }
5079            };
5080          };
5081        }
5082        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
5083      }
5084    }
5085  });
5086  function useStoreFast(store2, selector, a1, a2, a3) {
5087    const instance = getInstance();
5088    if (!instance) {
5089      return useStoreR19(store2, selector, a1, a2, a3);
5090    }
5091    const index2 = instance.syncIndex;
5092    instance.syncIndex += 1;
5093    let hook;
5094    if (!instance.didInitialize) {
5095      hook = {
5096        store: store2,
5097        selector,
5098        a1,
5099        a2,
5100        a3,
5101        value: selector(store2.getSnapshot(), a1, a2, a3)
5102      };
5103      instance.syncHooks.push(hook);
5104    } else {
5105      hook = instance.syncHooks[index2];
5106      if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
5107        if (hook.store !== store2) {
5108          instance.didChangeStore = true;
5109        }
5110        hook.store = store2;
5111        hook.selector = selector;
5112        hook.a1 = a1;
5113        hook.a2 = a2;
5114        hook.a3 = a3;
5115        hook.value = selector(store2.getSnapshot(), a1, a2, a3);
5116      }
5117    }
5118    return hook.value;
5119  }
5120  function useStoreLegacy(store2, selector, a1, a2, a3) {
5121    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
5122  }
5123  
5124  // node_modules/@base-ui/utils/store/Store.mjs
5125  var Store = class {
5126    /**
5127     * Creates a store with the given initial state, constructing the class it is called on.
5128     * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
5129     * class but degrades the inferred instance type to `Store`; use `new` there instead.
5130     */
5131    static create(state) {
5132      return new this(state);
5133    }
5134    /**
5135     * The current state of the store.
5136     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
5137     * 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).
5138     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
5139     *
5140     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
5141     */
5142    // Internal state to handle recursive `setState()` calls
5143    constructor(state) {
5144      this.state = state;
5145      this.listeners = /* @__PURE__ */ new Set();
5146      this.updateTick = 0;
5147    }
5148    /**
5149     * Registers a listener that will be called whenever the store's state changes.
5150     *
5151     * @param fn The listener function to be called on state changes.
5152     * @returns A function to unsubscribe the listener.
5153     */
5154    subscribe = (fn) => {
5155      this.listeners.add(fn);
5156      return () => {
5157        this.listeners.delete(fn);
5158      };
5159    };
5160    /**
5161     * Returns the current state of the store.
5162     */
5163    getSnapshot = () => {
5164      return this.state;
5165    };
5166    /**
5167     * Updates the entire store's state and notifies all registered listeners.
5168     *
5169     * @param newState The new state to set for the store.
5170     */
5171    setState(newState) {
5172      if (this.state === newState) {
5173        return;
5174      }
5175      this.state = newState;
5176      this.updateTick += 1;
5177      const currentTick = this.updateTick;
5178      for (const listener of this.listeners) {
5179        if (currentTick !== this.updateTick) {
5180          return;
5181        }
5182        listener(newState);
5183      }
5184    }
5185    /**
5186     * Merges the provided changes into the current state and notifies listeners if there are changes.
5187     * Each value must match its state key. Pass an exact known subset rather than a broad
5188     * `Partial<State>`, which may contain `undefined` for required state fields.
5189     *
5190     * @param changes An object containing the changes to apply to the current state.
5191     */
5192    update(changes) {
5193      for (const key in changes) {
5194        if (!Object.is(this.state[key], changes[key])) {
5195          this.setState({
5196            ...this.state,
5197            ...changes
5198          });
5199          return;
5200        }
5201      }
5202    }
5203    /**
5204     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5205     *
5206     * @param key The key in the store's state to update.
5207     * @param value The new value to set for the specified key.
5208     */
5209    set(key, value) {
5210      if (!Object.is(this.state[key], value)) {
5211        this.setState({
5212          ...this.state,
5213          [key]: value
5214        });
5215      }
5216    }
5217    /**
5218     * Gives the state a new reference and updates all registered listeners.
5219     */
5220    notifyAll() {
5221      const newState = {
5222        ...this.state
5223      };
5224      this.setState(newState);
5225    }
5226    use(selector, a1, a2, a3) {
5227      return useStore(this, selector, a1, a2, a3);
5228    }
5229  };
5230  
5231  // node_modules/@base-ui/utils/store/ReactStore.mjs
5232  var React23 = __toESM(require_react(), 1);
5233  var ReactStore = class extends Store {
5234    /**
5235     * Creates a new ReactStore instance.
5236     *
5237     * @param state Initial state of the store.
5238     * @param context Non-reactive context values.
5239     * @param selectors Optional selectors for use with `useState`.
5240     */
5241    constructor(state, context = {}, selectors3) {
5242      super(state);
5243      this.context = context;
5244      this.selectors = selectors3;
5245    }
5246    /**
5247     * Non-reactive values such as refs, callbacks, etc.
5248     */
5249    /**
5250     * Synchronizes a single external value into the store.
5251     *
5252     * Note that the while the value in `state` is updated immediately, the value returned
5253     * by `useState` is updated before the next render (similarly to React's `useState`).
5254     */
5255    useSyncedValue(key, value) {
5256      React23.useDebugValue(key);
5257      const store2 = this;
5258      useIsoLayoutEffect(() => {
5259        if (store2.state[key] !== value) {
5260          store2.set(key, value);
5261        }
5262      }, [store2, key, value]);
5263    }
5264    /**
5265     * Synchronizes a single external value into the store and
5266     * cleans it up (sets to `undefined`) on unmount.
5267     *
5268     * Note that the while the value in `state` is updated immediately, the value returned
5269     * by `useState` is updated before the next render (similarly to React's `useState`).
5270     */
5271    useSyncedValueWithCleanup(key, value) {
5272      const store2 = this;
5273      useIsoLayoutEffect(() => {
5274        if (store2.state[key] !== value) {
5275          store2.set(key, value);
5276        }
5277        return () => {
5278          store2.set(key, void 0);
5279        };
5280      }, [store2, key, value]);
5281    }
5282    /**
5283     * Synchronizes multiple external values into the store.
5284     * Each value must match its state key. Pass an exact known subset rather than a broad
5285     * `Partial<State>`, which may contain `undefined` for required state fields.
5286     *
5287     * Note that the while the values in `state` are updated immediately, the values returned
5288     * by `useState` are updated before the next render (similarly to React's `useState`).
5289     *
5290     * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
5291     */
5292    useSyncedValues(statePart) {
5293      const store2 = this;
5294      if (true) {
5295        React23.useDebugValue(statePart, (p) => Object.keys(p));
5296        const keys = React23.useRef(Object.keys(statePart)).current;
5297        const nextKeys = Object.keys(statePart);
5298        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5299          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5300        }
5301      }
5302      const dependencies = Object.values(statePart);
5303      useIsoLayoutEffect(() => {
5304        store2.update(statePart);
5305      }, [store2, ...dependencies]);
5306    }
5307    /**
5308     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5309     * is non-undefined, the store's state at `key` is updated to match `controlled`.
5310     */
5311    useControlledProp(key, controlled) {
5312      React23.useDebugValue(key);
5313      const store2 = this;
5314      const isControlled = controlled !== void 0;
5315      useIsoLayoutEffect(() => {
5316        if (isControlled && !Object.is(store2.state[key], controlled)) {
5317          store2.setState({
5318            ...store2.state,
5319            [key]: controlled
5320          });
5321        }
5322      }, [store2, key, controlled, isControlled]);
5323      if (true) {
5324        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5325        if (!cache.has(key)) {
5326          cache.set(key, isControlled);
5327        }
5328        const previouslyControlled = cache.get(key);
5329        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5330          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).`);
5331        }
5332      }
5333    }
5334    /** Gets the current value from the store using a selector with the provided key.
5335     *
5336     * @param key Key of the selector to use.
5337     */
5338    select(key, a1, a2, a3) {
5339      const selector = this.selectors[key];
5340      return selector(this.state, a1, a2, a3);
5341    }
5342    /**
5343     * Returns a value from the store's state using a selector function.
5344     * Used to subscribe to specific parts of the state.
5345     * This methods causes a rerender whenever the selected state changes.
5346     *
5347     * @param key Key of the selector to use.
5348     */
5349    useState(key, a1, a2, a3) {
5350      React23.useDebugValue(key);
5351      return useStore(this, this.selectors[key], a1, a2, a3);
5352    }
5353    /**
5354     * Wraps a function with `useStableCallback` to ensure it has a stable reference
5355     * and assigns it to the context.
5356     *
5357     * @param key Key of the event callback. Must be a function in the context.
5358     * @param fn Function to assign.
5359     */
5360    useContextCallback(key, fn) {
5361      React23.useDebugValue(key);
5362      const stableFunction = useStableCallback(fn ?? NOOP);
5363      this.context[key] = stableFunction;
5364    }
5365    /**
5366     * Returns a stable setter function for a specific key in the store's state.
5367     * It's commonly used to pass as a ref callback to React elements.
5368     *
5369     * @param key Key of the state to set.
5370     */
5371    useStateSetter(key) {
5372      const ref = React23.useRef(void 0);
5373      if (ref.current === void 0) {
5374        ref.current = (value) => {
5375          this.set(key, value);
5376        };
5377      }
5378      return ref.current;
5379    }
5380    /**
5381     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5382     *
5383     * @param key Key of the selector to observe.
5384     * @param listener Listener function called when the selector result changes.
5385     */
5386    observe(selector, listener) {
5387      let selectFn;
5388      if (typeof selector === "function") {
5389        selectFn = selector;
5390      } else {
5391        selectFn = this.selectors[selector];
5392      }
5393      let prevValue = selectFn(this.state);
5394      listener(prevValue, prevValue, this);
5395      return this.subscribe((nextState) => {
5396        const nextValue = selectFn(nextState);
5397        if (!Object.is(prevValue, nextValue)) {
5398          const oldValue = prevValue;
5399          prevValue = nextValue;
5400          listener(nextValue, oldValue, this);
5401        }
5402      });
5403    }
5404  };
5405  
5406  // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5407  var selectors = {
5408    open: (state) => state.open,
5409    transitionStatus: (state) => state.transitionStatus,
5410    domReferenceElement: (state) => state.domReferenceElement,
5411    referenceElement: (state) => state.positionReference ?? state.referenceElement,
5412    floatingElement: (state) => state.floatingElement,
5413    floatingId: (state) => state.floatingId
5414  };
5415  var FloatingRootStore = class extends ReactStore {
5416    constructor(options) {
5417      const {
5418        syncOnly,
5419        nested,
5420        onOpenChange,
5421        triggerElements,
5422        ...initialState
5423      } = options;
5424      super({
5425        ...initialState,
5426        positionReference: initialState.referenceElement,
5427        domReferenceElement: initialState.referenceElement
5428      }, {
5429        onOpenChange,
5430        dataRef: {
5431          current: {}
5432        },
5433        events: createEventEmitter(),
5434        nested,
5435        triggerElements
5436      }, selectors);
5437      this.syncOnly = syncOnly;
5438    }
5439    /**
5440     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5441     */
5442    syncOpenEvent = (newOpen, event) => {
5443      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5444      // click events to upgrade a hover-open.
5445      event != null && isClickLikeEvent(event)) {
5446        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5447      }
5448    };
5449    /**
5450     * Runs the root-owned side effects for an open state change.
5451     */
5452    dispatchOpenChange = (newOpen, eventDetails) => {
5453      this.syncOpenEvent(newOpen, eventDetails.event);
5454      const details = {
5455        open: newOpen,
5456        reason: eventDetails.reason,
5457        nativeEvent: eventDetails.event,
5458        nested: this.context.nested,
5459        triggerElement: eventDetails.trigger
5460      };
5461      this.context.events.emit("openchange", details);
5462    };
5463    /**
5464     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5465     *
5466     * @param newOpen The new open state.
5467     * @param eventDetails Details about the event that triggered the open state change.
5468     */
5469    setOpen = (newOpen, eventDetails) => {
5470      if (this.syncOnly) {
5471        this.context.onOpenChange?.(newOpen, eventDetails);
5472        return;
5473      }
5474      this.dispatchOpenChange(newOpen, eventDetails);
5475      this.context.onOpenChange?.(newOpen, eventDetails);
5476    };
5477  };
5478  
5479  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5480  function useSyncedFloatingRootContext(options) {
5481    const {
5482      popupStore,
5483      treatPopupAsFloatingElement = false,
5484      floatingRootContext: floatingRootContextProp,
5485      floatingId,
5486      nested,
5487      onOpenChange
5488    } = options;
5489    const open2 = popupStore.useState("open");
5490    const referenceElement = popupStore.useState("activeTriggerElement");
5491    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5492    const triggerElements = popupStore.context.triggerElements;
5493    const handleOpenChange = onOpenChange;
5494    const internalStoreRef = React24.useRef(null);
5495    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5496      internalStoreRef.current = new FloatingRootStore({
5497        open: open2,
5498        transitionStatus: void 0,
5499        referenceElement,
5500        floatingElement,
5501        triggerElements,
5502        onOpenChange: handleOpenChange,
5503        floatingId,
5504        syncOnly: true,
5505        nested
5506      });
5507    }
5508    const store2 = floatingRootContextProp ?? internalStoreRef.current;
5509    popupStore.useSyncedValue("floatingId", floatingId);
5510    useIsoLayoutEffect(() => {
5511      const valuesToSync = {
5512        open: open2,
5513        floatingId,
5514        referenceElement,
5515        floatingElement
5516      };
5517      if (isElement(referenceElement)) {
5518        valuesToSync.domReferenceElement = referenceElement;
5519      }
5520      if (store2.state.positionReference === store2.state.referenceElement) {
5521        valuesToSync.positionReference = referenceElement;
5522      }
5523      store2.update(valuesToSync);
5524    }, [open2, floatingId, referenceElement, floatingElement, store2]);
5525    store2.context.onOpenChange = handleOpenChange;
5526    store2.context.nested = nested;
5527    return store2;
5528  }
5529  
5530  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5531  var FOCUSABLE_POPUP_PROPS = {
5532    tabIndex: -1,
5533    [FOCUSABLE_ATTRIBUTE]: ""
5534  };
5535  function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5536    const floatingId = useId();
5537    const nested = useFloatingParentNodeId() != null;
5538    const store2 = useRefWithInit(() => createStore(floatingId, nested)).current;
5539    useSyncedFloatingRootContext({
5540      popupStore: store2,
5541      treatPopupAsFloatingElement,
5542      floatingRootContext: store2.state.floatingRootContext,
5543      floatingId,
5544      nested,
5545      onOpenChange: store2.setOpen
5546    });
5547    return store2;
5548  }
5549  function PopupHandleAttachment({
5550    handle,
5551    store: store2
5552  }) {
5553    useIsoLayoutEffect(() => {
5554      return handle.attachStore(store2);
5555    }, [handle, store2]);
5556    return null;
5557  }
5558  function syncTriggerCount(store2) {
5559    const triggerCount = store2.context.triggerElements.size;
5560    if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
5561      store2.set("triggerCount", triggerCount);
5562    }
5563  }
5564  function useTriggerRegistration(id, store2) {
5565    const registrationRef = React25.useRef(null);
5566    return useStableCallback((element) => {
5567      const registration = registrationRef.current;
5568      if (registration !== null) {
5569        if (registration.element === element && registration.store === store2 && registration.id === id) {
5570          return;
5571        }
5572        registrationRef.current = null;
5573        const registeredStore = registration.store;
5574        if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
5575          registeredStore.context.triggerElements.delete(registration.id);
5576          syncTriggerCount(registeredStore);
5577        }
5578      }
5579      if (element !== null && id !== void 0) {
5580        registrationRef.current = {
5581          store: store2,
5582          id,
5583          element
5584        };
5585        store2.context.triggerElements.add(id, element);
5586        syncTriggerCount(store2);
5587      }
5588    });
5589  }
5590  function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) {
5591    let preventUnmountingOnClose = state.preventUnmountingOnClose;
5592    if (open2) {
5593      preventUnmountingOnClose = false;
5594    } else if (preventUnmountOnClose) {
5595      preventUnmountingOnClose = true;
5596    }
5597    const triggerId = trigger?.id ?? null;
5598    let activeTriggerId = state.activeTriggerId;
5599    let activeTriggerElement = state.activeTriggerElement;
5600    if (triggerId || open2) {
5601      activeTriggerId = triggerId;
5602      activeTriggerElement = trigger ?? null;
5603    }
5604    return {
5605      open: open2,
5606      preventUnmountingOnClose,
5607      activeTriggerId,
5608      activeTriggerElement
5609    };
5610  }
5611  function attachPreventUnmountOnClose(eventDetails) {
5612    let preventUnmountOnClose = false;
5613    eventDetails.preventUnmountOnClose = () => {
5614      preventUnmountOnClose = true;
5615    };
5616    return () => preventUnmountOnClose;
5617  }
5618  function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) {
5619    const reason = eventDetails.reason;
5620    const isHover = reason === reason_parts_exports.triggerHover;
5621    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5622    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5623    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5624    store2.context.onOpenChange?.(nextOpen, eventDetails);
5625    if (eventDetails.isCanceled) {
5626      return;
5627    }
5628    options.onBeforeDispatch?.();
5629    store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5630    const changeState = () => {
5631      const popupOpenState = createPopupOpenState(store2.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5632      const updatedState = {
5633        ...options.extraState,
5634        ...popupOpenState
5635      };
5636      if (isFocusOpen) {
5637        updatedState.instantType = "focus";
5638      } else if (isDismissClose) {
5639        updatedState.instantType = "dismiss";
5640      } else if (isHover) {
5641        updatedState.instantType = void 0;
5642      }
5643      store2.update(updatedState);
5644    };
5645    if (isHover) {
5646      ReactDOM4.flushSync(changeState);
5647    } else {
5648      changeState();
5649    }
5650  }
5651  function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
5652    const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
5653    const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
5654    const applyTriggerData = useStableCallback((element) => {
5655      const open2 = store2.select("open");
5656      const activeTriggerId = store2.select("activeTriggerId");
5657      if (activeTriggerId === triggerId) {
5658        const changes = {
5659          activeTriggerElement: element,
5660          ...open2 ? stateUpdates : null
5661        };
5662        store2.update(changes);
5663        return;
5664      }
5665      if (activeTriggerId == null && open2) {
5666        const changes = {
5667          activeTriggerId: triggerId ?? null,
5668          activeTriggerElement: element,
5669          ...stateUpdates
5670        };
5671        store2.update(changes);
5672      }
5673    });
5674    const registerTrigger = useStableCallback((element) => {
5675      baseRegisterTrigger(element);
5676      if (element) {
5677        applyTriggerData(element);
5678      }
5679    });
5680    useIsoLayoutEffect(() => {
5681      registerTrigger(triggerElementRef.current);
5682      return () => registerTrigger(null);
5683    }, [registerTrigger, triggerElementRef, store2, triggerId]);
5684    useIsoLayoutEffect(() => {
5685      if (isMountedByThisTrigger) {
5686        const changes = {
5687          activeTriggerElement: triggerElementRef.current,
5688          ...stateUpdates
5689        };
5690        store2.update(changes);
5691      }
5692    }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
5693    return {
5694      registerTrigger,
5695      isMountedByThisTrigger
5696    };
5697  }
5698  function useImplicitActiveTrigger(store2, options = {}) {
5699    const {
5700      closeOnActiveTriggerUnmount = false
5701    } = options;
5702    const resolvedActiveTriggerIdRef = React25.useRef(null);
5703    const open2 = store2.useState("open");
5704    const reactiveTriggerCount = store2.useState("triggerCount");
5705    const activeTriggerId = store2.useState("activeTriggerId");
5706    const reactiveActiveTriggerElement = store2.useState("activeTriggerElement");
5707    useIsoLayoutEffect(() => {
5708      if (!open2) {
5709        resolvedActiveTriggerIdRef.current = null;
5710        if (store2.state.triggerCount !== 0) {
5711          store2.set("triggerCount", 0);
5712        }
5713        return;
5714      }
5715      const triggerCount = store2.context.triggerElements.size;
5716      const stateUpdates = {};
5717      if (store2.state.triggerCount !== triggerCount) {
5718        stateUpdates.triggerCount = triggerCount;
5719      }
5720      const currentActiveTriggerId = store2.select("activeTriggerId");
5721      let lostActiveTriggerId = null;
5722      if (currentActiveTriggerId) {
5723        const activeTriggerElement = store2.context.triggerElements.getById(currentActiveTriggerId);
5724        if (!activeTriggerElement) {
5725          for (const [triggerId, triggerElement] of store2.context.triggerElements.entries()) {
5726            if (triggerElement === store2.state.activeTriggerElement) {
5727              stateUpdates.activeTriggerId = triggerId;
5728              stateUpdates.activeTriggerElement = triggerElement;
5729              resolvedActiveTriggerIdRef.current = triggerId;
5730              break;
5731            }
5732          }
5733          if (stateUpdates.activeTriggerId === void 0) {
5734            if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5735              lostActiveTriggerId = currentActiveTriggerId;
5736            } else {
5737              resolvedActiveTriggerIdRef.current = null;
5738            }
5739          }
5740        } else {
5741          resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5742          if (activeTriggerElement !== store2.state.activeTriggerElement) {
5743            stateUpdates.activeTriggerElement = activeTriggerElement;
5744          }
5745        }
5746      } else {
5747        resolvedActiveTriggerIdRef.current = null;
5748      }
5749      if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5750        const iteratorResult = store2.context.triggerElements.entries().next();
5751        if (!iteratorResult.done) {
5752          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5753          stateUpdates.activeTriggerId = implicitTriggerId;
5754          stateUpdates.activeTriggerElement = implicitTriggerElement;
5755          resolvedActiveTriggerIdRef.current = implicitTriggerId;
5756        }
5757      }
5758      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5759        store2.update(stateUpdates);
5760      }
5761      if (lostActiveTriggerId) {
5762        if (closeOnActiveTriggerUnmount) {
5763          queueMicrotask(() => {
5764            if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) {
5765              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5766              store2.setOpen(false, eventDetails);
5767              if (!eventDetails.isCanceled) {
5768                store2.update({
5769                  activeTriggerId: null,
5770                  activeTriggerElement: null
5771                });
5772              }
5773            }
5774          });
5775        }
5776      }
5777    }, [open2, store2, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5778  }
5779  function useOpenStateTransitions(open2, store2, onUnmount, animateInitialOpen) {
5780    const {
5781      mounted,
5782      setMounted,
5783      transitionStatus
5784    } = useTransitionStatus(open2, false, false, animateInitialOpen);
5785    const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
5786    const syncedPreventUnmountingOnClose = open2 ? false : preventUnmountingOnClose;
5787    store2.useSyncedValues({
5788      mounted,
5789      transitionStatus,
5790      preventUnmountingOnClose: syncedPreventUnmountingOnClose
5791    });
5792    const forceUnmount = useStableCallback(() => {
5793      setMounted(false);
5794      store2.update({
5795        activeTriggerId: null,
5796        activeTriggerElement: null,
5797        mounted: false,
5798        preventUnmountingOnClose: false
5799      });
5800      onUnmount?.();
5801      store2.context.onOpenChangeComplete?.(false);
5802    });
5803    useOpenChangeComplete({
5804      enabled: mounted && !open2 && !syncedPreventUnmountingOnClose,
5805      open: open2,
5806      ref: store2.context.popupRef,
5807      onComplete() {
5808        if (!open2) {
5809          forceUnmount();
5810        }
5811      }
5812    });
5813    return {
5814      forceUnmount,
5815      transitionStatus
5816    };
5817  }
5818  function usePopupInteractionProps(store2, statePart) {
5819    store2.useSyncedValues(statePart);
5820    useIsoLayoutEffect(() => () => {
5821      store2.update({
5822        activeTriggerProps: EMPTY_OBJECT,
5823        inactiveTriggerProps: EMPTY_OBJECT,
5824        popupProps: EMPTY_OBJECT
5825      });
5826    }, [store2]);
5827  }
5828  
5829  // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5830  var devElementIdsByMap;
5831  function getDevElementIds(map) {
5832    devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5833    let elementIds = devElementIdsByMap.get(map);
5834    if (!elementIds) {
5835      elementIds = /* @__PURE__ */ new WeakMap();
5836      devElementIdsByMap.set(map, elementIds);
5837    }
5838    return elementIds;
5839  }
5840  var PopupTriggerMap = class {
5841    constructor() {
5842      this.idMap = /* @__PURE__ */ new Map();
5843    }
5844    /**
5845     * Adds a trigger element with the given ID.
5846     *
5847     * Note: The provided element is assumed to not be registered under multiple IDs.
5848     */
5849    add(id, element) {
5850      if (true) {
5851        const elementIds = getDevElementIds(this);
5852        const existingId = elementIds.get(element);
5853        if (existingId !== void 0 && existingId !== id) {
5854          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5855        }
5856        const previousElement = this.idMap.get(id);
5857        if (previousElement !== void 0 && previousElement !== element) {
5858          elementIds.delete(previousElement);
5859        }
5860        elementIds.set(element, id);
5861      }
5862      this.idMap.set(id, element);
5863    }
5864    /**
5865     * Removes the trigger element with the given ID.
5866     */
5867    delete(id) {
5868      if (true) {
5869        const element = this.idMap.get(id);
5870        if (element !== void 0) {
5871          devElementIdsByMap?.get(this)?.delete(element);
5872        }
5873      }
5874      this.idMap.delete(id);
5875    }
5876    /**
5877     * Whether the given element is registered as a trigger.
5878     */
5879    hasElement(element) {
5880      for (const registered of this.idMap.values()) {
5881        if (registered === element) {
5882          return true;
5883        }
5884      }
5885      return false;
5886    }
5887    /**
5888     * Whether there is a registered trigger element matching the given predicate.
5889     */
5890    hasMatchingElement(predicate) {
5891      for (const element of this.idMap.values()) {
5892        if (predicate(element)) {
5893          return true;
5894        }
5895      }
5896      return false;
5897    }
5898    /**
5899     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5900     */
5901    getById(id) {
5902      return this.idMap.get(id);
5903    }
5904    /**
5905     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5906     */
5907    entries() {
5908      return this.idMap.entries();
5909    }
5910    /**
5911     * Returns an iterable of all registered trigger elements.
5912     */
5913    elements() {
5914      return this.idMap.values();
5915    }
5916    /**
5917     * Returns the number of registered trigger elements.
5918     */
5919    get size() {
5920      return this.idMap.size;
5921    }
5922  };
5923  
5924  // node_modules/@base-ui/react/utils/popups/store.mjs
5925  function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
5926    return {
5927      open: false,
5928      openProp: void 0,
5929      mounted: false,
5930      transitionStatus: void 0,
5931      floatingRootContext: new FloatingRootStore({
5932        open: false,
5933        transitionStatus: void 0,
5934        floatingElement: null,
5935        referenceElement: null,
5936        triggerElements,
5937        floatingId,
5938        syncOnly: true,
5939        nested,
5940        onOpenChange: void 0
5941      }),
5942      floatingId,
5943      triggerCount: 0,
5944      preventUnmountingOnClose: false,
5945      payload: void 0,
5946      activeTriggerId: null,
5947      activeTriggerElement: null,
5948      triggerIdProp: void 0,
5949      popupElement: null,
5950      positionerElement: null,
5951      activeTriggerProps: EMPTY_OBJECT,
5952      inactiveTriggerProps: EMPTY_OBJECT,
5953      popupProps: EMPTY_OBJECT
5954    };
5955  }
5956  var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5957  var openSelector = (state) => state.openProp ?? state.open;
5958  var popupIdSelector = (state) => {
5959    const popupId = state.popupElement?.id ?? state.floatingId;
5960    return popupId || void 0;
5961  };
5962  function triggerOwnsOpenPopup(state, triggerId) {
5963    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5964  }
5965  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5966    if (triggerOwnsOpenPopup(state, triggerId)) {
5967      return true;
5968    }
5969    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5970  }
5971  var popupStoreSelectors = {
5972    open: openSelector,
5973    mounted: (state) => state.mounted,
5974    transitionStatus: (state) => state.transitionStatus,
5975    floatingRootContext: (state) => state.floatingRootContext,
5976    triggerCount: (state) => state.triggerCount,
5977    preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5978    payload: (state) => state.payload,
5979    activeTriggerId: activeTriggerIdSelector,
5980    activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5981    popupId: popupIdSelector,
5982    /**
5983     * Whether the trigger with the given ID was used to open the popup.
5984     */
5985    isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5986    /**
5987     * Whether the popup is open and was activated by a trigger with the given ID.
5988     */
5989    isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5990    /**
5991     * Whether the popup is mounted and was activated by a trigger with the given ID.
5992     */
5993    isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5994    triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5995    /**
5996     * Popup id for the trigger that currently owns the open popup.
5997     */
5998    triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5999    popupProps: (state) => state.popupProps,
6000    popupElement: (state) => state.popupElement,
6001    positionerElement: (state) => state.positionerElement
6002  };
6003  
6004  // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
6005  var React26 = __toESM(require_react(), 1);
6006  var import_shim2 = __toESM(require_shim(), 1);
6007  function usePopupHandleStore(handle) {
6008    const subscribe = React26.useCallback((listener) => {
6009      if (handle === void 0) {
6010        return NOOP;
6011      }
6012      return handle.subscribeStore(listener);
6013    }, [handle]);
6014    const getSnapshot = React26.useCallback(() => {
6015      return handle === void 0 ? void 0 : handle.store;
6016    }, [handle]);
6017    return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
6018  }
6019  
6020  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
6021  function useBaseUIFloating(options) {
6022    return useFloatingWithStore(options, options.rootContext);
6023  }
6024  function useFloatingWithStore(options, store2) {
6025    const {
6026      nodeId,
6027      externalTree
6028    } = options;
6029    const referenceElement = store2.useState("referenceElement");
6030    const floatingElement = store2.useState("floatingElement");
6031    const domReferenceElement = store2.useState("domReferenceElement");
6032    const open2 = store2.useState("open");
6033    const floatingId = store2.useState("floatingId");
6034    const [positionReference, setPositionReferenceRaw] = React27.useState(null);
6035    const [localDomReference, setLocalDomReference] = React27.useState(void 0);
6036    const [localFloatingElement, setLocalFloatingElement] = React27.useState(void 0);
6037    const domReferenceRef = React27.useRef(null);
6038    const tree = useFloatingTree(externalTree);
6039    const storeElements = React27.useMemo(() => ({
6040      reference: referenceElement,
6041      floating: floatingElement,
6042      domReference: domReferenceElement
6043    }), [referenceElement, floatingElement, domReferenceElement]);
6044    const position = useFloating({
6045      ...options,
6046      elements: {
6047        ...storeElements,
6048        ...positionReference && {
6049          reference: positionReference
6050        }
6051      }
6052    });
6053    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
6054    const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
6055    store2.useSyncedValue("referenceElement", localDomReference ?? null);
6056    store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
6057    store2.useSyncedValue("floatingElement", syncedFloatingElement);
6058    const setPositionReference = React27.useCallback((node) => {
6059      const computedPositionReference = isElement(node) ? {
6060        getBoundingClientRect: () => node.getBoundingClientRect(),
6061        getClientRects: () => node.getClientRects(),
6062        contextElement: node
6063      } : node;
6064      setPositionReferenceRaw(computedPositionReference);
6065      position.refs.setReference(computedPositionReference);
6066    }, [position.refs]);
6067    const setReference = React27.useCallback((node) => {
6068      if (isElement(node) || node === null) {
6069        domReferenceRef.current = node;
6070        setLocalDomReference(node);
6071      }
6072      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
6073      // `null` to support `positionReference` + an unstable `reference`
6074      // callback ref.
6075      node !== null && !isElement(node)) {
6076        position.refs.setReference(node);
6077      }
6078    }, [position.refs, setLocalDomReference]);
6079    const setFloating = React27.useCallback((node) => {
6080      setLocalFloatingElement(node);
6081      position.refs.setFloating(node);
6082    }, [position.refs]);
6083    const refs = React27.useMemo(() => ({
6084      ...position.refs,
6085      setReference,
6086      setFloating,
6087      setPositionReference,
6088      domReference: domReferenceRef
6089    }), [position.refs, setReference, setFloating, setPositionReference]);
6090    const elements = React27.useMemo(() => ({
6091      ...position.elements,
6092      domReference: domReferenceElement
6093    }), [position.elements, domReferenceElement]);
6094    const context = React27.useMemo(() => ({
6095      ...position,
6096      dataRef: store2.context.dataRef,
6097      open: open2,
6098      onOpenChange: store2.setOpen,
6099      events: store2.context.events,
6100      floatingId,
6101      refs,
6102      elements,
6103      nodeId,
6104      rootStore: store2
6105    }), [position, refs, elements, nodeId, store2, open2, floatingId]);
6106    useIsoLayoutEffect(() => {
6107      if (domReferenceElement) {
6108        domReferenceRef.current = domReferenceElement;
6109      }
6110    }, [domReferenceElement]);
6111    useIsoLayoutEffect(() => {
6112      store2.context.dataRef.current.floatingContext = context;
6113      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
6114      if (node) {
6115        node.context = context;
6116      }
6117    });
6118    return React27.useMemo(() => ({
6119      ...position,
6120      context,
6121      refs,
6122      elements,
6123      rootStore: store2
6124    }), [position, refs, elements, context, store2]);
6125  }
6126  
6127  // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
6128  var React28 = __toESM(require_react(), 1);
6129  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
6130  function useFocus(context, props = {}) {
6131    const {
6132      enabled = true,
6133      delay
6134    } = props;
6135    const store2 = "rootStore" in context ? context.rootStore : context;
6136    const {
6137      events,
6138      dataRef
6139    } = store2.context;
6140    const blockFocusRef = React28.useRef(false);
6141    const blockedReferenceRef = React28.useRef(null);
6142    const keyboardModalityRef = React28.useRef(true);
6143    const timeout = useTimeout();
6144    React28.useEffect(() => {
6145      const domReference = store2.select("domReferenceElement");
6146      if (!enabled) {
6147        return void 0;
6148      }
6149      const win = getWindow(domReference);
6150      function onBlur() {
6151        const currentDomReference = store2.select("domReferenceElement");
6152        if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
6153          blockFocusRef.current = true;
6154          blockedReferenceRef.current = currentDomReference;
6155        }
6156      }
6157      function onKeyDown() {
6158        keyboardModalityRef.current = true;
6159      }
6160      function onPointerDown() {
6161        keyboardModalityRef.current = false;
6162      }
6163      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
6164    }, [store2, enabled]);
6165    React28.useEffect(() => {
6166      if (!enabled) {
6167        return void 0;
6168      }
6169      function onOpenChangeLocal(details) {
6170        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6171          const referenceElement = store2.select("domReferenceElement");
6172          if (isElement(referenceElement)) {
6173            blockedReferenceRef.current = referenceElement;
6174            blockFocusRef.current = true;
6175          }
6176        }
6177      }
6178      events.on("openchange", onOpenChangeLocal);
6179      return () => {
6180        events.off("openchange", onOpenChangeLocal);
6181      };
6182    }, [events, enabled, store2]);
6183    const reference = React28.useMemo(() => {
6184      function resetBlockedFocus() {
6185        blockFocusRef.current = false;
6186        blockedReferenceRef.current = null;
6187      }
6188      return {
6189        onMouseLeave() {
6190          resetBlockedFocus();
6191        },
6192        onFocus(event) {
6193          const focusTarget = event.currentTarget;
6194          if (blockFocusRef.current) {
6195            if (blockedReferenceRef.current === focusTarget) {
6196              return;
6197            }
6198            resetBlockedFocus();
6199          }
6200          const target = getTarget(event.nativeEvent);
6201          if (isElement(target)) {
6202            if (isMacSafari && !event.relatedTarget) {
6203              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6204                return;
6205              }
6206            } else if (!matchesFocusVisible(target)) {
6207              return;
6208            }
6209          }
6210          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
6211          const {
6212            nativeEvent,
6213            currentTarget
6214          } = event;
6215          const delayValue = typeof delay === "function" ? delay() : delay;
6216          if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6217            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6218            return;
6219          }
6220          timeout.start(delayValue, () => {
6221            if (blockFocusRef.current) {
6222              return;
6223            }
6224            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6225          });
6226        },
6227        onBlur(event) {
6228          resetBlockedFocus();
6229          const relatedTarget = event.relatedTarget;
6230          const nativeEvent = event.nativeEvent;
6231          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6232          timeout.start(0, () => {
6233            const domReference = store2.select("domReferenceElement");
6234            const activeEl = activeElement(ownerDocument(domReference));
6235            if (!relatedTarget && activeEl === domReference) {
6236              return;
6237            }
6238            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6239              return;
6240            }
6241            const nextFocusedElement = relatedTarget ?? activeEl;
6242            if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
6243              return;
6244            }
6245            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6246          });
6247        }
6248      };
6249    }, [dataRef, delay, store2, timeout]);
6250    return React28.useMemo(() => enabled ? {
6251      reference,
6252      trigger: reference
6253    } : {}, [enabled, reference]);
6254  }
6255  
6256  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6257  var React29 = __toESM(require_react(), 1);
6258  
6259  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6260  var HoverInteraction = class _HoverInteraction {
6261    constructor() {
6262      this.pointerType = void 0;
6263      this.interactedInside = false;
6264      this.handler = void 0;
6265      this.blockMouseMove = true;
6266      this.performedPointerEventsMutation = false;
6267      this.pointerEventsScopeElement = null;
6268      this.pointerEventsReferenceElement = null;
6269      this.pointerEventsFloatingElement = null;
6270      this.restTimeoutPending = false;
6271      this.openChangeTimeout = new Timeout();
6272      this.restTimeout = new Timeout();
6273      this.handleCloseOptions = void 0;
6274    }
6275    static create() {
6276      return new _HoverInteraction();
6277    }
6278    dispose = () => {
6279      this.openChangeTimeout.clear();
6280      this.restTimeout.clear();
6281    };
6282    disposeEffect = () => {
6283      return this.dispose;
6284    };
6285  };
6286  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6287  function clearSafePolygonPointerEventsMutation(instance) {
6288    if (!instance.performedPointerEventsMutation) {
6289      return;
6290    }
6291    const scopeElement = instance.pointerEventsScopeElement;
6292    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6293      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6294      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6295      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6296      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6297    }
6298    instance.performedPointerEventsMutation = false;
6299    instance.pointerEventsScopeElement = null;
6300    instance.pointerEventsReferenceElement = null;
6301    instance.pointerEventsFloatingElement = null;
6302  }
6303  function applySafePolygonPointerEventsMutation(instance, options) {
6304    const {
6305      scopeElement,
6306      referenceElement,
6307      floatingElement
6308    } = options;
6309    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6310    if (existingOwner && existingOwner !== instance) {
6311      clearSafePolygonPointerEventsMutation(existingOwner);
6312    }
6313    clearSafePolygonPointerEventsMutation(instance);
6314    instance.performedPointerEventsMutation = true;
6315    instance.pointerEventsScopeElement = scopeElement;
6316    instance.pointerEventsReferenceElement = referenceElement;
6317    instance.pointerEventsFloatingElement = floatingElement;
6318    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6319    scopeElement.style.pointerEvents = "none";
6320    referenceElement.style.pointerEvents = "auto";
6321    floatingElement.style.pointerEvents = "auto";
6322  }
6323  function useHoverInteractionSharedState(store2) {
6324    const data = store2.context.dataRef.current;
6325    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6326    if (!data.hoverInteractionState) {
6327      data.hoverInteractionState = instance;
6328    }
6329    useOnMount(data.hoverInteractionState.disposeEffect);
6330    return data.hoverInteractionState;
6331  }
6332  
6333  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6334  function useHoverFloatingInteraction(context, parameters = {}) {
6335    const {
6336      enabled = true,
6337      closeDelay: closeDelayProp = 0,
6338      nodeId: nodeIdProp
6339    } = parameters;
6340    const store2 = "rootStore" in context ? context.rootStore : context;
6341    const open2 = store2.useState("open");
6342    const floatingElement = store2.useState("floatingElement");
6343    const domReferenceElement = store2.useState("domReferenceElement");
6344    const {
6345      dataRef
6346    } = store2.context;
6347    const tree = useFloatingTree();
6348    const parentId = useFloatingParentNodeId();
6349    const instance = useHoverInteractionSharedState(store2);
6350    const childClosedTimeout = useTimeout();
6351    const isClickLikeOpenEvent2 = useStableCallback(() => {
6352      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6353    });
6354    const isHoverOpen = useStableCallback(() => {
6355      return isHoverOpenEvent(dataRef.current.openEvent?.type);
6356    });
6357    const clearPointerEvents = useStableCallback(() => {
6358      clearSafePolygonPointerEventsMutation(instance);
6359    });
6360    useIsoLayoutEffect(() => {
6361      if (!open2) {
6362        instance.pointerType = void 0;
6363        instance.restTimeoutPending = false;
6364        instance.interactedInside = false;
6365        clearPointerEvents();
6366      }
6367    }, [open2, instance, clearPointerEvents]);
6368    React29.useEffect(() => {
6369      return clearPointerEvents;
6370    }, [clearPointerEvents]);
6371    useIsoLayoutEffect(() => {
6372      if (!enabled) {
6373        return void 0;
6374      }
6375      if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6376        const ref = domReferenceElement;
6377        const floatingEl = floatingElement;
6378        const doc = ownerDocument(floatingElement);
6379        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6380        if (parentFloating) {
6381          parentFloating.style.pointerEvents = "";
6382        }
6383        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6384        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6385        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6386        applySafePolygonPointerEventsMutation(instance, {
6387          scopeElement,
6388          referenceElement: ref,
6389          floatingElement: floatingEl
6390        });
6391        return () => {
6392          clearPointerEvents();
6393        };
6394      }
6395      return void 0;
6396    }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6397    React29.useEffect(() => {
6398      if (!enabled) {
6399        return void 0;
6400      }
6401      function hasParentChildren() {
6402        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6403      }
6404      function closeWithDelay(event) {
6405        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6406        const close = () => {
6407          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6408          tree?.events.emit("floating.closed", event);
6409        };
6410        if (closeDelay) {
6411          instance.openChangeTimeout.start(closeDelay, close);
6412        } else {
6413          instance.openChangeTimeout.clear();
6414          close();
6415        }
6416      }
6417      function handleInteractInside(event) {
6418        const target = getTarget(event);
6419        if (!isInteractiveElement(target)) {
6420          instance.interactedInside = false;
6421          return;
6422        }
6423        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6424      }
6425      function onFloatingMouseEnter() {
6426        instance.openChangeTimeout.clear();
6427        childClosedTimeout.clear();
6428        tree?.events.off("floating.closed", onNodeClosed);
6429        clearPointerEvents();
6430      }
6431      function onFloatingMouseLeave(event) {
6432        if (hasParentChildren() && tree) {
6433          tree.events.on("floating.closed", onNodeClosed);
6434          return;
6435        }
6436        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6437          return;
6438        }
6439        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6440        const relatedTarget = event.relatedTarget;
6441        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6442        if (isMovingIntoDescendantFloating) {
6443          return;
6444        }
6445        if (instance.handler) {
6446          instance.handler(event);
6447          return;
6448        }
6449        clearPointerEvents();
6450        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6451          closeWithDelay(event);
6452        }
6453      }
6454      function onNodeClosed(event) {
6455        if (!tree || !parentId || hasParentChildren()) {
6456          return;
6457        }
6458        childClosedTimeout.start(0, () => {
6459          tree.events.off("floating.closed", onNodeClosed);
6460          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6461          tree.events.emit("floating.closed", event);
6462        });
6463      }
6464      const floating = floatingElement;
6465      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6466        tree?.events.off("floating.closed", onNodeClosed);
6467      });
6468    }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6469  }
6470  
6471  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6472  var React30 = __toESM(require_react(), 1);
6473  var ReactDOM5 = __toESM(require_react_dom(), 1);
6474  var EMPTY_REF = {
6475    current: null
6476  };
6477  function useHoverReferenceInteraction(context, props = {}) {
6478    const {
6479      enabled = true,
6480      delay = 0,
6481      handleClose = null,
6482      mouseOnly = false,
6483      restMs = 0,
6484      move = true,
6485      triggerElementRef = EMPTY_REF,
6486      externalTree,
6487      isActiveTrigger = true,
6488      getHandleCloseContext,
6489      isClosing,
6490      shouldOpen: shouldOpenProp,
6491      guardStaleOpen = false
6492    } = props;
6493    const store2 = "rootStore" in context ? context.rootStore : context;
6494    const {
6495      dataRef,
6496      events
6497    } = store2.context;
6498    const tree = useFloatingTree(externalTree);
6499    const instance = useHoverInteractionSharedState(store2);
6500    const isHoverCloseActiveRef = React30.useRef(false);
6501    const handleCloseRef = useValueAsRef(handleClose);
6502    const delayRef = useValueAsRef(delay);
6503    const restMsRef = useValueAsRef(restMs);
6504    const enabledRef = useValueAsRef(enabled);
6505    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6506    const isClosingRef = useValueAsRef(isClosing);
6507    const isClickLikeOpenEvent2 = useStableCallback(() => {
6508      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6509    });
6510    const checkShouldOpen = useStableCallback(() => {
6511      return shouldOpenRef.current?.() !== false;
6512    });
6513    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6514      const allTriggers = store2.context.triggerElements;
6515      if (allTriggers.hasElement(currentTarget)) {
6516        return !currentDomReference || !contains(currentDomReference, currentTarget);
6517      }
6518      if (!isElement(target)) {
6519        return false;
6520      }
6521      const targetElement = target;
6522      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6523    });
6524    const cleanupMouseMoveHandler = useStableCallback(() => {
6525      if (!instance.handler) {
6526        return;
6527      }
6528      const doc = ownerDocument(store2.select("domReferenceElement"));
6529      doc.removeEventListener("mousemove", instance.handler);
6530      instance.handler = void 0;
6531    });
6532    const clearPointerEvents = useStableCallback(() => {
6533      clearSafePolygonPointerEventsMutation(instance);
6534    });
6535    if (isActiveTrigger) {
6536      instance.handleCloseOptions = handleClose?.__options;
6537    }
6538    React30.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6539    React30.useEffect(() => {
6540      if (!enabled) {
6541        return void 0;
6542      }
6543      function onOpenChangeLocal(details) {
6544        if (!details.open) {
6545          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6546          cleanupMouseMoveHandler();
6547          instance.openChangeTimeout.clear();
6548          instance.restTimeout.clear();
6549          instance.blockMouseMove = true;
6550          instance.restTimeoutPending = false;
6551        } else {
6552          isHoverCloseActiveRef.current = false;
6553        }
6554      }
6555      events.on("openchange", onOpenChangeLocal);
6556      return () => {
6557        events.off("openchange", onOpenChangeLocal);
6558      };
6559    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6560    React30.useEffect(() => {
6561      if (!enabled) {
6562        return void 0;
6563      }
6564      function closeWithDelay(event, runElseBranch = true) {
6565        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6566        if (closeDelay) {
6567          instance.openChangeTimeout.start(closeDelay, () => {
6568            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6569            tree?.events.emit("floating.closed", event);
6570          });
6571        } else if (runElseBranch) {
6572          instance.openChangeTimeout.clear();
6573          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6574          tree?.events.emit("floating.closed", event);
6575        }
6576      }
6577      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
6578      if (!isElement(trigger)) {
6579        return void 0;
6580      }
6581      function onMouseEnter(event) {
6582        instance.openChangeTimeout.clear();
6583        instance.blockMouseMove = false;
6584        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6585          return;
6586        }
6587        const restMsValue = getRestMs(restMsRef.current);
6588        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6589        const eventTarget = getTarget(event);
6590        const currentTarget = event.currentTarget ?? null;
6591        const currentDomReference = store2.select("domReferenceElement");
6592        let triggerNode = currentTarget;
6593        if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
6594          for (const triggerElement of store2.context.triggerElements.elements()) {
6595            if (contains(triggerElement, eventTarget)) {
6596              triggerNode = triggerElement;
6597              break;
6598            }
6599          }
6600        }
6601        if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6602          triggerNode = currentDomReference;
6603        }
6604        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6605        const isOpen = store2.select("open");
6606        const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
6607        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6608        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6609        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6610        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6611        const shouldOpen = !isOpen || isOverInactive;
6612        if (shouldOpenImmediately) {
6613          if (checkShouldOpen()) {
6614            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6615          }
6616          return;
6617        }
6618        if (isRestOnlyDelay) {
6619          return;
6620        }
6621        if (openDelay) {
6622          instance.openChangeTimeout.start(openDelay, () => {
6623            if (shouldOpen && checkShouldOpen()) {
6624              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6625            }
6626          });
6627        } else if (shouldOpen) {
6628          if (checkShouldOpen()) {
6629            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6630          }
6631        }
6632      }
6633      function onMouseLeave(event) {
6634        if (isClickLikeOpenEvent2()) {
6635          clearPointerEvents();
6636          return;
6637        }
6638        cleanupMouseMoveHandler();
6639        const domReferenceElement = store2.select("domReferenceElement");
6640        const doc = ownerDocument(domReferenceElement);
6641        instance.restTimeout.clear();
6642        instance.restTimeoutPending = false;
6643        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6644        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6645          return;
6646        }
6647        if (handleCloseRef.current && handleCloseContextBase) {
6648          if (!store2.select("open")) {
6649            instance.openChangeTimeout.clear();
6650          }
6651          const currentTrigger = triggerElementRef.current;
6652          instance.handler = handleCloseRef.current({
6653            ...handleCloseContextBase,
6654            tree,
6655            x: event.clientX,
6656            y: event.clientY,
6657            onClose() {
6658              clearPointerEvents();
6659              cleanupMouseMoveHandler();
6660              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
6661                closeWithDelay(event, true);
6662              }
6663            }
6664          });
6665          doc.addEventListener("mousemove", instance.handler);
6666          instance.handler(event);
6667          return;
6668        }
6669        const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
6670        if (shouldClose) {
6671          closeWithDelay(event);
6672        }
6673      }
6674      function onMouseOut(event) {
6675        if (contains(trigger, event.relatedTarget)) {
6676          return;
6677        }
6678        instance.openChangeTimeout.clear();
6679        instance.restTimeout.clear();
6680        instance.restTimeoutPending = false;
6681      }
6682      const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6683      if (move) {
6684        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6685          once: true
6686        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6687      }
6688      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6689    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6690    return React30.useMemo(() => {
6691      if (!enabled) {
6692        return void 0;
6693      }
6694      function setPointerRef(event) {
6695        instance.pointerType = event.pointerType;
6696      }
6697      return {
6698        onPointerDown: setPointerRef,
6699        onPointerEnter: setPointerRef,
6700        onMouseMove(event) {
6701          const {
6702            nativeEvent
6703          } = event;
6704          const trigger = event.currentTarget;
6705          const currentDomReference = store2.select("domReferenceElement");
6706          const currentOpen = store2.select("open");
6707          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6708          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6709            return;
6710          }
6711          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6712            const floatingElement = store2.select("floatingElement");
6713            if (floatingElement) {
6714              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6715              applySafePolygonPointerEventsMutation(instance, {
6716                scopeElement,
6717                referenceElement: trigger,
6718                floatingElement
6719              });
6720            }
6721          }
6722          const restMsValue = getRestMs(restMsRef.current);
6723          if (currentOpen && !isOverInactive || restMsValue === 0) {
6724            return;
6725          }
6726          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6727            return;
6728          }
6729          instance.restTimeout.clear();
6730          function handleMouseMove() {
6731            instance.restTimeoutPending = false;
6732            if (isClickLikeOpenEvent2()) {
6733              return;
6734            }
6735            const latestOpen = store2.select("open");
6736            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6737              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6738            }
6739          }
6740          if (instance.pointerType === "touch") {
6741            ReactDOM5.flushSync(() => {
6742              handleMouseMove();
6743            });
6744          } else if (isOverInactive && currentOpen) {
6745            handleMouseMove();
6746          } else {
6747            instance.restTimeoutPending = true;
6748            instance.restTimeout.start(restMsValue, handleMouseMove);
6749          }
6750        }
6751      };
6752    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
6753  }
6754  
6755  // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6756  var CURSOR_SPEED_THRESHOLD = 0.1;
6757  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6758  var POLYGON_BUFFER = 0.5;
6759  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6760    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6761  }
6762  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6763    let isInsideValue = false;
6764    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6765      isInsideValue = !isInsideValue;
6766    }
6767    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6768      isInsideValue = !isInsideValue;
6769    }
6770    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6771      isInsideValue = !isInsideValue;
6772    }
6773    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6774      isInsideValue = !isInsideValue;
6775    }
6776    return isInsideValue;
6777  }
6778  function isInsideRect(pointX, pointY, rect) {
6779    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6780  }
6781  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6782    const minX = Math.min(x1, x2);
6783    const maxX = Math.max(x1, x2);
6784    const minY = Math.min(y1, y2);
6785    const maxY = Math.max(y1, y2);
6786    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6787  }
6788  function safePolygon(options = {}) {
6789    const {
6790      blockPointerEvents = false
6791    } = options;
6792    const timeout = new Timeout();
6793    const fn = ({
6794      x,
6795      y,
6796      placement,
6797      elements,
6798      onClose,
6799      nodeId,
6800      tree
6801    }) => {
6802      const side = placement?.split("-")[0];
6803      let hasLanded = false;
6804      let lastX = null;
6805      let lastY = null;
6806      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6807      function isCursorMovingSlowly(nextX, nextY) {
6808        const currentTime = performance.now();
6809        const elapsedTime = currentTime - lastCursorTime;
6810        if (lastX === null || lastY === null || elapsedTime === 0) {
6811          lastX = nextX;
6812          lastY = nextY;
6813          lastCursorTime = currentTime;
6814          return false;
6815        }
6816        const deltaX = nextX - lastX;
6817        const deltaY = nextY - lastY;
6818        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6819        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6820        lastX = nextX;
6821        lastY = nextY;
6822        lastCursorTime = currentTime;
6823        return distanceSquared < thresholdSquared;
6824      }
6825      function close() {
6826        timeout.clear();
6827        onClose();
6828      }
6829      return function onMouseMove(event) {
6830        timeout.clear();
6831        const domReference = elements.domReference;
6832        const floating = elements.floating;
6833        if (!domReference || !floating || side == null || x == null || y == null) {
6834          return void 0;
6835        }
6836        const {
6837          clientX,
6838          clientY
6839        } = event;
6840        const target = getTarget(event);
6841        const isLeave = event.type === "mouseleave";
6842        const isOverFloatingEl = contains(floating, target);
6843        const isOverReferenceEl = contains(domReference, target);
6844        if (isOverFloatingEl) {
6845          hasLanded = true;
6846          if (!isLeave) {
6847            return void 0;
6848          }
6849        }
6850        if (isOverReferenceEl) {
6851          hasLanded = false;
6852          if (!isLeave) {
6853            hasLanded = true;
6854            return void 0;
6855          }
6856        }
6857        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6858          return void 0;
6859        }
6860        function hasOpenChildNode() {
6861          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6862        }
6863        function closeIfNoOpenChild() {
6864          if (!hasOpenChildNode()) {
6865            close();
6866          }
6867        }
6868        if (hasOpenChildNode()) {
6869          return void 0;
6870        }
6871        const refRect = domReference.getBoundingClientRect();
6872        const rect = floating.getBoundingClientRect();
6873        const cursorLeaveFromRight = x > rect.right - rect.width / 2;
6874        const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
6875        const isFloatingWider = rect.width > refRect.width;
6876        const isFloatingTaller = rect.height > refRect.height;
6877        const left = (isFloatingWider ? refRect : rect).left;
6878        const right = (isFloatingWider ? refRect : rect).right;
6879        const top = (isFloatingTaller ? refRect : rect).top;
6880        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6881        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) {
6882          closeIfNoOpenChild();
6883          return void 0;
6884        }
6885        let isInsideTroughRect = false;
6886        switch (side) {
6887          case "top":
6888            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6889            break;
6890          case "bottom":
6891            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6892            break;
6893          case "left":
6894            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6895            break;
6896          case "right":
6897            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6898            break;
6899          default:
6900        }
6901        if (isInsideTroughRect) {
6902          return void 0;
6903        }
6904        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6905          closeIfNoOpenChild();
6906          return void 0;
6907        }
6908        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6909          closeIfNoOpenChild();
6910          return void 0;
6911        }
6912        let isInsidePolygon = false;
6913        switch (side) {
6914          case "top": {
6915            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6916            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6917            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6918            const cursorPointY = y + POLYGON_BUFFER + 1;
6919            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6920            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6921            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6922            break;
6923          }
6924          case "bottom": {
6925            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6926            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6927            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6928            const cursorPointY = y - POLYGON_BUFFER;
6929            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6930            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6931            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6932            break;
6933          }
6934          case "left": {
6935            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6936            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6937            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6938            const cursorPointX = x + POLYGON_BUFFER + 1;
6939            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6940            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6941            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6942            break;
6943          }
6944          case "right": {
6945            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6946            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6947            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6948            const cursorPointX = x - POLYGON_BUFFER;
6949            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6950            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6951            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6952            break;
6953          }
6954          default:
6955        }
6956        if (!isInsidePolygon) {
6957          closeIfNoOpenChild();
6958        } else if (!hasLanded) {
6959          timeout.start(40, closeIfNoOpenChild);
6960        }
6961        return void 0;
6962      };
6963    };
6964    fn.__options = {
6965      ...options,
6966      blockPointerEvents
6967    };
6968    return fn;
6969  }
6970  
6971  // node_modules/@base-ui/react/utils/NullStore.mjs
6972  var NullStore = class extends ReactStore {
6973    // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6974    // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6975    // inert even if a future base-class change stops routing a mutator through `setState`.
6976    setState(_newState) {
6977    }
6978    update(_changes) {
6979    }
6980    set(_key, _value) {
6981    }
6982    notifyAll() {
6983    }
6984  };
6985  
6986  // node_modules/@base-ui/utils/inertValue.mjs
6987  function inertValue(value) {
6988    if (isReactVersionAtLeast(19)) {
6989      return value;
6990    }
6991    return value ? "true" : void 0;
6992  }
6993  
6994  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6995  var React31 = __toESM(require_react(), 1);
6996  var DirectionContext = /* @__PURE__ */ React31.createContext(void 0);
6997  if (true) DirectionContext.displayName = "DirectionContext";
6998  function useDirection() {
6999    const context = React31.useContext(DirectionContext);
7000    return context?.direction ?? "ltr";
7001  }
7002  
7003  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7004  var React32 = __toESM(require_react(), 1);
7005  
7006  // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
7007  var baseArrow = (options) => ({
7008    name: "arrow",
7009    options,
7010    async fn(state) {
7011      const {
7012        x,
7013        y,
7014        placement,
7015        rects,
7016        platform: platform3,
7017        elements,
7018        middlewareData
7019      } = state;
7020      const {
7021        element,
7022        padding = 0,
7023        offsetParent = "real"
7024      } = evaluate(options, state) || {};
7025      if (element == null) {
7026        return {};
7027      }
7028      const paddingObject = getPaddingObject(padding);
7029      const coords = {
7030        x,
7031        y
7032      };
7033      const axis = getAlignmentAxis(placement);
7034      const length = getAxisLength(axis);
7035      const arrowDimensions = await platform3.getDimensions(element);
7036      const isYAxis = axis === "y";
7037      const minProp = isYAxis ? "top" : "left";
7038      const maxProp = isYAxis ? "bottom" : "right";
7039      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
7040      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
7041      const startDiff = coords[axis] - rects.reference[axis];
7042      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
7043      let clientSize = elements.floating[clientProp] || rects.floating[length];
7044      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
7045        clientSize = elements.floating[clientProp] || rects.floating[length];
7046      }
7047      const centerToReference = endDiff / 2 - startDiff / 2;
7048      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
7049      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
7050      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
7051      const min2 = minPadding;
7052      const max2 = clientSize - arrowDimensions[length] - maxPadding;
7053      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
7054      const offset4 = clamp(min2, center, max2);
7055      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
7056      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
7057      return {
7058        [axis]: coords[axis] + alignmentOffset,
7059        data: {
7060          [axis]: offset4,
7061          centerOffset: center - offset4 - alignmentOffset,
7062          ...shouldAddOffset && {
7063            alignmentOffset
7064          }
7065        },
7066        reset: shouldAddOffset
7067      };
7068    }
7069  });
7070  var arrow4 = (options, deps) => {
7071    const {
7072      name,
7073      fn
7074    } = baseArrow(options);
7075    return {
7076      name,
7077      fn,
7078      options: [options, deps]
7079    };
7080  };
7081  
7082  // node_modules/@base-ui/react/utils/hideMiddleware.mjs
7083  var hide4 = {
7084    name: "hide",
7085    async fn(state) {
7086      const {
7087        width,
7088        height,
7089        x,
7090        y
7091      } = state.rects.reference;
7092      const anchorHidden2 = width === 0 && height === 0 && x === 0 && y === 0;
7093      const overflow = await state.platform.detectOverflow(state, {
7094        elementContext: "reference"
7095      });
7096      const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
7097      return {
7098        data: {
7099          referenceHidden: referenceHidden || anchorHidden2
7100        }
7101      };
7102    }
7103  };
7104  
7105  // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
7106  var DEFAULT_SIDES = {
7107    sideX: "left",
7108    sideY: "top"
7109  };
7110  
7111  // node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
7112  var availableWidth = "--available-width";
7113  var availableHeight = "--available-height";
7114  var anchorWidth = "--anchor-width";
7115  var anchorHeight = "--anchor-height";
7116  var transformOrigin = "--transform-origin";
7117  var positionerWidth = "--positioner-width";
7118  var positionerHeight = "--positioner-height";
7119  
7120  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7121  var AVAILABLE_WIDTH_VAR = availableWidth;
7122  var AVAILABLE_HEIGHT_VAR = availableHeight;
7123  function getLogicalSide(sideParam, renderedSide, isRtl) {
7124    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
7125    const logicalRight = isRtl ? "inline-start" : "inline-end";
7126    const logicalLeft = isRtl ? "inline-end" : "inline-start";
7127    return {
7128      top: "top",
7129      right: isLogicalSideParam ? logicalRight : "right",
7130      bottom: "bottom",
7131      left: isLogicalSideParam ? logicalLeft : "left"
7132    }[renderedSide];
7133  }
7134  function getOffsetData(state, sideParam, isRtl) {
7135    const {
7136      rects,
7137      placement
7138    } = state;
7139    const data = {
7140      side: getLogicalSide(sideParam, getSide(placement), isRtl),
7141      align: getAlignment(placement) || "center",
7142      anchor: {
7143        width: rects.reference.width,
7144        height: rects.reference.height
7145      },
7146      positioner: {
7147        width: rects.floating.width,
7148        height: rects.floating.height
7149      }
7150    };
7151    return data;
7152  }
7153  function useAnchorPositioning(params) {
7154    return useAnchorPositioningWithHook(params, useBaseUIFloating);
7155  }
7156  function useAnchorPositioningWithHook(params, useFloatingHook) {
7157    const {
7158      // Public parameters
7159      anchor,
7160      positionMethod = "absolute",
7161      side: sideParam = "bottom",
7162      sideOffset = 0,
7163      align = "center",
7164      alignOffset = 0,
7165      collisionBoundary,
7166      collisionPadding: collisionPaddingParam = 5,
7167      sticky = false,
7168      arrowPadding = 5,
7169      disableAnchorTracking = false,
7170      inline: inlineMiddleware,
7171      // Private parameters
7172      keepMounted = false,
7173      floatingRootContext,
7174      mounted,
7175      collisionAvoidance,
7176      shift: shift4,
7177      nodeId,
7178      adaptiveOrigin: adaptiveOrigin2,
7179      lazyFlip = false,
7180      externalTree
7181    } = params;
7182    const [mountSide, setMountSide] = React32.useState(null);
7183    if (!mounted && mountSide !== null) {
7184      setMountSide(null);
7185    }
7186    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7187    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7188    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7189    const shiftCrossAxis = shift4?.crossAxis ?? false;
7190    const shiftRootBoundary = shift4?.rootBoundary;
7191    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7192    const anchorFnCallback = useStableCallback(anchorFn);
7193    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7194    const anchorValueRef = useValueAsRef(anchor);
7195    const mountedRef = useValueAsRef(mounted);
7196    const direction = useDirection();
7197    const isRtl = direction === "rtl";
7198    const side = mountSide || {
7199      top: "top",
7200      right: "right",
7201      bottom: "bottom",
7202      left: "left",
7203      "inline-end": isRtl ? "left" : "right",
7204      "inline-start": isRtl ? "right" : "left"
7205    }[sideParam];
7206    const placement = align === "center" ? side : `$side}-$align}`;
7207    let collisionPadding = collisionPaddingParam;
7208    if (typeof collisionPadding === "number") {
7209      collisionPadding = {
7210        top: collisionPadding,
7211        right: collisionPadding,
7212        bottom: collisionPadding,
7213        left: collisionPadding
7214      };
7215    } else if (collisionPadding) {
7216      collisionPadding = {
7217        top: collisionPadding.top || 0,
7218        right: collisionPadding.right || 0,
7219        bottom: collisionPadding.bottom || 0,
7220        left: collisionPadding.left || 0
7221      };
7222    }
7223    const bias = 1;
7224    const biasTop = sideParam === "bottom" ? bias : 0;
7225    const biasBottom = sideParam === "top" ? bias : 0;
7226    const biasLeft = sideParam === "right" ? bias : 0;
7227    const biasRight = sideParam === "left" ? bias : 0;
7228    const commonCollisionProps = {
7229      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7230      padding: collisionPadding
7231    };
7232    const arrowRef = React32.useRef(null);
7233    const sideOffsetRef = useValueAsRef(sideOffset);
7234    const alignOffsetRef = useValueAsRef(alignOffset);
7235    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7236    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7237    const middleware = [];
7238    if (inlineMiddleware) {
7239      middleware.push(inlineMiddleware);
7240    }
7241    middleware.push(offset3((state) => {
7242      const data = getOffsetData(state, sideParam, isRtl);
7243      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7244      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7245      return {
7246        mainAxis: sideAxis,
7247        crossAxis: alignAxis,
7248        alignmentAxis: alignAxis
7249      };
7250    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7251    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7252    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7253    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7254      ...commonCollisionProps,
7255      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7256      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7257      padding: {
7258        top: collisionPadding.top + bias + biasTop,
7259        right: collisionPadding.right + bias + biasRight,
7260        bottom: collisionPadding.bottom + bias + biasBottom,
7261        left: collisionPadding.left + bias + biasLeft
7262      },
7263      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7264      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7265      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7266    });
7267    const shiftMiddleware = shiftDisabled ? null : shift3({
7268      ...commonCollisionProps,
7269      // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7270      rootBoundary: shiftRootBoundary,
7271      mainAxis: collisionAvoidanceAlign !== "none",
7272      crossAxis: crossAxisShiftEnabled,
7273      limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7274        if (!arrowRef.current) {
7275          return {};
7276        }
7277        const {
7278          width,
7279          height
7280        } = arrowRef.current.getBoundingClientRect();
7281        const sideAxis = getSideAxis(getSide(limitData.placement));
7282        const arrowSize = sideAxis === "y" ? width : height;
7283        const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7284        return {
7285          offset: arrowSize / 2 + offsetAmount / 2
7286        };
7287      })
7288    }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7289    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7290      middleware.push(shiftMiddleware, flipMiddleware);
7291    } else {
7292      middleware.push(flipMiddleware, shiftMiddleware);
7293    }
7294    middleware.push(size3({
7295      ...commonCollisionProps,
7296      apply({
7297        elements: {
7298          floating
7299        },
7300        availableWidth: availableWidth2,
7301        availableHeight: availableHeight2,
7302        rects
7303      }) {
7304        if (!mountedRef.current) {
7305          return;
7306        }
7307        const floatingStyle = floating.style;
7308        floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth2}px`);
7309        floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight2}px`);
7310        const dpr = getWindow(floating).devicePixelRatio || 1;
7311        const {
7312          x: x2,
7313          y: y2,
7314          width,
7315          height
7316        } = rects.reference;
7317        const anchorWidth2 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7318        const anchorHeight2 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7319        floatingStyle.setProperty(anchorWidth, `$anchorWidth2}px`);
7320        floatingStyle.setProperty(anchorHeight, `$anchorHeight2}px`);
7321      }
7322    }), arrow4((state) => ({
7323      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7324      // we'll create a fake element.
7325      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7326      // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
7327      padding: arrowRef.current ? arrowPadding : 0,
7328      offsetParent: "floating"
7329    }), [arrowPadding]), {
7330      name: "transformOrigin",
7331      fn(state) {
7332        const {
7333          elements: {
7334            floating
7335          },
7336          middlewareData: middlewareData2,
7337          placement: renderedPlacement2,
7338          platform: platform3,
7339          rects,
7340          y: y2
7341        } = state;
7342        const renderedSide2 = getSide(renderedPlacement2);
7343        const renderedAlign2 = getAlignment(renderedPlacement2);
7344        const isVertical = getSideAxis(renderedSide2) === "y";
7345        const arrowEl = arrowRef.current;
7346        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7347        let crossOrigin;
7348        if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
7349          crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
7350        } else {
7351          const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
7352          const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
7353          crossOrigin = `$arrowOffset + arrowSize / 2}px`;
7354        }
7355        let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + $sideOffsetValue}px)` : `${-sideOffsetValue}px`;
7356        if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
7357          sideOrigin = `$rects.reference.y + rects.reference.height / 2 - y2}px`;
7358        }
7359        floating.style.setProperty(transformOrigin, isVertical ? `$crossOrigin} $sideOrigin}` : `$sideOrigin} $crossOrigin}`);
7360        return {};
7361      }
7362    }, hide4, adaptiveOrigin2);
7363    useIsoLayoutEffect(() => {
7364      if (!mounted && floatingRootContext) {
7365        floatingRootContext.update({
7366          referenceElement: null,
7367          floatingElement: null,
7368          domReferenceElement: null,
7369          positionReference: null
7370        });
7371      }
7372    }, [mounted, floatingRootContext]);
7373    const autoUpdateOptions = React32.useMemo(() => ({
7374      ancestorScroll: !disableAnchorTracking,
7375      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7376      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7377    }), [disableAnchorTracking]);
7378    const {
7379      refs,
7380      elements,
7381      x,
7382      y,
7383      middlewareData,
7384      update: update2,
7385      placement: renderedPlacement,
7386      context,
7387      isPositioned,
7388      floatingStyles: originalFloatingStyles
7389    } = useFloatingHook({
7390      rootContext: floatingRootContext,
7391      open: keepMounted ? mounted : void 0,
7392      placement,
7393      middleware,
7394      strategy: positionMethod,
7395      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7396      nodeId,
7397      externalTree
7398    });
7399    const {
7400      sideX,
7401      sideY
7402    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7403    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7404    const floatingStyles = React32.useMemo(() => {
7405      let base;
7406      if (!isPositioned) {
7407        base = {
7408          position: resolvedPosition,
7409          top: 0,
7410          left: 0
7411        };
7412      } else if (adaptiveOrigin2) {
7413        base = {
7414          position: resolvedPosition,
7415          [sideX]: x,
7416          [sideY]: y
7417        };
7418      } else {
7419        base = {
7420          ...originalFloatingStyles,
7421          position: resolvedPosition
7422        };
7423      }
7424      base[AVAILABLE_WIDTH_VAR] = "100vw";
7425      base[AVAILABLE_HEIGHT_VAR] = "100vh";
7426      if (!isPositioned) {
7427        base.opacity = 0;
7428      }
7429      return base;
7430    }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7431    const registeredPositionReferenceRef = React32.useRef(null);
7432    useIsoLayoutEffect(() => {
7433      if (!mounted) {
7434        return;
7435      }
7436      const anchorValue = anchorValueRef.current;
7437      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7438      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7439      const finalAnchor = unwrappedElement || null;
7440      if (finalAnchor !== registeredPositionReferenceRef.current) {
7441        refs.setPositionReference(finalAnchor);
7442        registeredPositionReferenceRef.current = finalAnchor;
7443      }
7444    }, [mounted, refs, anchorDep, anchorValueRef]);
7445    React32.useEffect(() => {
7446      if (!mounted) {
7447        return;
7448      }
7449      const anchorValue = anchorValueRef.current;
7450      if (typeof anchorValue === "function") {
7451        return;
7452      }
7453      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7454        refs.setPositionReference(anchorValue.current);
7455        registeredPositionReferenceRef.current = anchorValue.current;
7456      }
7457    }, [mounted, refs, anchorDep, anchorValueRef]);
7458    React32.useEffect(() => {
7459      if (keepMounted && mounted && elements.reference && elements.floating) {
7460        return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7461      }
7462      return void 0;
7463    }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7464    const renderedSide = getSide(renderedPlacement);
7465    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7466    const renderedAlign = getAlignment(renderedPlacement) || "center";
7467    const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
7468    useIsoLayoutEffect(() => {
7469      if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7470        setMountSide(renderedSide);
7471      }
7472    }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7473    const arrowStyles = React32.useMemo(() => ({
7474      position: "absolute",
7475      top: middlewareData.arrow?.y,
7476      left: middlewareData.arrow?.x
7477    }), [middlewareData.arrow]);
7478    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7479    return React32.useMemo(() => ({
7480      positionerStyles: floatingStyles,
7481      arrowStyles,
7482      arrowRef,
7483      arrowUncentered,
7484      side: logicalRenderedSide,
7485      align: renderedAlign,
7486      physicalSide: renderedSide,
7487      anchorHidden: anchorHidden2,
7488      refs,
7489      context,
7490      isPositioned,
7491      update: update2
7492    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
7493  }
7494  function isRef(param) {
7495    return param != null && "current" in param;
7496  }
7497  
7498  // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7499  function getDisabledMountTransitionStyles(transitionStatus) {
7500    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7501  }
7502  
7503  // node_modules/@base-ui/react/utils/usePositioner.mjs
7504  function usePositioner(componentProps, state, {
7505    styles,
7506    transitionStatus,
7507    props,
7508    refs,
7509    hidden,
7510    inert = false
7511  }) {
7512    const style = {
7513      ...styles
7514    };
7515    if (inert) {
7516      style.pointerEvents = "none";
7517    }
7518    return useRenderElement("div", componentProps, {
7519      state,
7520      ref: refs,
7521      props: [{
7522        role: "presentation",
7523        hidden,
7524        style
7525      }, getDisabledMountTransitionStyles(transitionStatus), props],
7526      stateAttributesMapping: popupStateMapping
7527    });
7528  }
7529  
7530  // node_modules/@base-ui/react/button/Button.mjs
7531  var React33 = __toESM(require_react(), 1);
7532  var Button = /* @__PURE__ */ React33.forwardRef(function Button2(componentProps, forwardedRef) {
7533    const {
7534      render,
7535      className,
7536      disabled: disabled2 = false,
7537      focusableWhenDisabled = false,
7538      nativeButton = true,
7539      style,
7540      ...elementProps
7541    } = componentProps;
7542    const {
7543      getButtonProps,
7544      buttonRef
7545    } = useButton({
7546      disabled: disabled2,
7547      focusableWhenDisabled,
7548      native: nativeButton
7549    });
7550    const state = {
7551      disabled: disabled2
7552    };
7553    return useRenderElement("button", componentProps, {
7554      state,
7555      ref: [forwardedRef, buttonRef],
7556      props: [elementProps, getButtonProps]
7557    });
7558  });
7559  if (true) Button.displayName = "Button";
7560  
7561  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7562  var React37 = __toESM(require_react(), 1);
7563  var ReactDOM6 = __toESM(require_react_dom(), 1);
7564  
7565  // node_modules/@base-ui/utils/usePreviousValue.mjs
7566  var React34 = __toESM(require_react(), 1);
7567  function usePreviousValue(value) {
7568    const [state, setState] = React34.useState({
7569      current: value,
7570      previous: null
7571    });
7572    if (!Object.is(value, state.current)) {
7573      setState({
7574        current: value,
7575        previous: state.current
7576      });
7577    }
7578    return state.previous;
7579  }
7580  
7581  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7582  var React35 = __toESM(require_react(), 1);
7583  
7584  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
7585  function getCssDimensions2(element) {
7586    const css = getComputedStyle2(element);
7587    let width = parseFloat(css.width) || 0;
7588    let height = parseFloat(css.height) || 0;
7589    const hasOffset = isHTMLElement(element);
7590    const offsetWidth = hasOffset ? element.offsetWidth : width;
7591    const offsetHeight = hasOffset ? element.offsetHeight : height;
7592    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7593    if (shouldFallback) {
7594      width = offsetWidth;
7595      height = offsetHeight;
7596    }
7597    return {
7598      width,
7599      height
7600    };
7601  }
7602  
7603  // node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
7604  var popupWidth = "--popup-width";
7605  var popupHeight = "--popup-height";
7606  
7607  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7608  function usePopupAutoResize(parameters) {
7609    const {
7610      popupElement,
7611      positionerElement,
7612      content,
7613      mounted,
7614      onMeasureLayout: onMeasureLayoutParam,
7615      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7616      side,
7617      direction
7618    } = parameters;
7619    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7620    const animationFrame = useAnimationFrame();
7621    const committedDimensionsRef = React35.useRef(null);
7622    const isInitialRenderRef = React35.useRef(true);
7623    const restoreAnchoringStylesRef = React35.useRef(NOOP);
7624    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7625    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7626    const anchoringStyles = React35.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7627    useIsoLayoutEffect(() => {
7628      if (!mounted) {
7629        restoreAnchoringStylesRef.current = NOOP;
7630        isInitialRenderRef.current = true;
7631        committedDimensionsRef.current = null;
7632        return void 0;
7633      }
7634      if (!popupElement || !positionerElement) {
7635        return void 0;
7636      }
7637      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7638      setPopupCssSize(popupElement, "auto");
7639      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7640      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7641      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7642      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7643        [availableWidth]: "max-content",
7644        [availableHeight]: "max-content"
7645      });
7646      function restoreMeasurementOverrides() {
7647        restorePopupPosition();
7648        restorePopupTransform();
7649        restorePositionerAvailableSize();
7650      }
7651      function restoreMeasurementOverridesIncludingScale() {
7652        restoreMeasurementOverrides();
7653        restorePopupScale();
7654      }
7655      onMeasureLayout?.();
7656      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7657        setPositionerCssSize(positionerElement, "max-content");
7658        const dimensions = getCssDimensions2(popupElement);
7659        committedDimensionsRef.current = dimensions;
7660        setPositionerCssSize(positionerElement, dimensions);
7661        restoreMeasurementOverridesIncludingScale();
7662        onMeasureLayoutComplete?.(null, dimensions);
7663        isInitialRenderRef.current = false;
7664        return () => {
7665          restoreAnchoringStylesRef.current();
7666          restoreAnchoringStylesRef.current = NOOP;
7667        };
7668      }
7669      setPositionerCssSize(positionerElement, "max-content");
7670      const previousDimensions = committedDimensionsRef.current;
7671      const newDimensions = getCssDimensions2(popupElement);
7672      committedDimensionsRef.current = newDimensions;
7673      setPopupCssSize(popupElement, previousDimensions);
7674      restoreMeasurementOverridesIncludingScale();
7675      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7676      setPositionerCssSize(positionerElement, newDimensions);
7677      const abortController = new AbortController();
7678      animationFrame.request(() => {
7679        setPopupCssSize(popupElement, newDimensions);
7680        runOnceAnimationsFinish(() => {
7681          popupElement.style.setProperty(popupWidth, "auto");
7682          popupElement.style.setProperty(popupHeight, "auto");
7683        }, abortController.signal);
7684      });
7685      return () => {
7686        abortController.abort();
7687        animationFrame.cancel();
7688        restoreAnchoringStylesRef.current();
7689        restoreAnchoringStylesRef.current = NOOP;
7690      };
7691    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7692  }
7693  function getPopupAnchoringStyles(side, direction) {
7694    const isPhysicalTop = side === "top";
7695    const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7696    if (!isPhysicalTop && !isPhysicalLeft) {
7697      return EMPTY_OBJECT;
7698    }
7699    return {
7700      position: "absolute",
7701      [isPhysicalTop ? "bottom" : "top"]: "0",
7702      [isPhysicalLeft ? "right" : "left"]: "0"
7703    };
7704  }
7705  function overrideElementStyle(element, property, value) {
7706    const originalValue = element.style.getPropertyValue(property);
7707    element.style.setProperty(property, value);
7708    return () => {
7709      element.style.setProperty(property, originalValue);
7710    };
7711  }
7712  function applyElementStyles(element, styles) {
7713    const restorers = [];
7714    for (const [key, value] of Object.entries(styles)) {
7715      restorers.push(overrideElementStyle(element, key, value));
7716    }
7717    return restorers.length ? () => {
7718      restorers.forEach((restore) => restore());
7719    } : NOOP;
7720  }
7721  function setPopupCssSize(popupElement, size4) {
7722    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7723    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7724    popupElement.style.setProperty(popupWidth, width);
7725    popupElement.style.setProperty(popupHeight, height);
7726  }
7727  function setPositionerCssSize(positionerElement, size4) {
7728    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7729    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7730    positionerElement.style.setProperty(positionerWidth, width);
7731    positionerElement.style.setProperty(positionerHeight, height);
7732  }
7733  
7734  // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7735  var React36 = __toESM(require_react(), 1);
7736  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7737  var DirectionProvider = function DirectionProvider2(props) {
7738    const {
7739      direction = "ltr"
7740    } = props;
7741    const contextValue = React36.useMemo(() => ({
7742      direction
7743    }), [direction]);
7744    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7745      value: contextValue,
7746      children: props.children
7747    });
7748  };
7749  if (true) DirectionProvider.displayName = "DirectionProvider";
7750  
7751  // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7752  var adaptiveOrigin = {
7753    name: "adaptiveOrigin",
7754    async fn(state) {
7755      const {
7756        x: rawX,
7757        y: rawY,
7758        rects: {
7759          floating: floatRect
7760        },
7761        elements: {
7762          floating
7763        },
7764        platform: platform3,
7765        strategy,
7766        placement
7767      } = state;
7768      const win = getWindow(floating);
7769      const styles = win.getComputedStyle(floating);
7770      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7771      if (!hasTransition) {
7772        return {
7773          x: rawX,
7774          y: rawY,
7775          data: DEFAULT_SIDES
7776        };
7777      }
7778      const offsetParent = await platform3.getOffsetParent?.(floating);
7779      let offsetDimensions = {
7780        width: 0,
7781        height: 0
7782      };
7783      if (strategy === "fixed" && win?.visualViewport) {
7784        offsetDimensions = {
7785          width: win.visualViewport.width,
7786          height: win.visualViewport.height
7787        };
7788      } else if (offsetParent === win) {
7789        const doc = ownerDocument(floating);
7790        offsetDimensions = {
7791          width: doc.documentElement.clientWidth,
7792          height: doc.documentElement.clientHeight
7793        };
7794      } else if (await platform3.isElement?.(offsetParent)) {
7795        offsetDimensions = await platform3.getDimensions(offsetParent);
7796      }
7797      const currentSide = getSide(placement);
7798      let x = rawX;
7799      let y = rawY;
7800      if (currentSide === "left") {
7801        x = offsetDimensions.width - (rawX + floatRect.width);
7802      }
7803      if (currentSide === "top") {
7804        y = offsetDimensions.height - (rawY + floatRect.height);
7805      }
7806      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7807      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7808      return {
7809        x,
7810        y,
7811        data: {
7812          sideX,
7813          sideY
7814        }
7815      };
7816    }
7817  };
7818  
7819  // node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
7820  var activationDirection = "data-activation-direction";
7821  
7822  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7823  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7824  var popupViewportStateMapping = {
7825    activationDirection: (value) => value ? {
7826      [activationDirection]: value
7827    } : null
7828  };
7829  function usePopupViewport(parameters) {
7830    const {
7831      store: store2,
7832      side,
7833      children
7834    } = parameters;
7835    const direction = useDirection();
7836    const activeTrigger = store2.useState("activeTriggerElement");
7837    const activeTriggerId = store2.useState("activeTriggerId");
7838    const open2 = store2.useState("open");
7839    const payload = store2.useState("payload");
7840    const mounted = store2.useState("mounted");
7841    const popupElement = store2.useState("popupElement");
7842    const positionerElement = store2.useState("positionerElement");
7843    const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null);
7844    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7845    const capturedNodeRef = React37.useRef(null);
7846    const [previousContentNode, setPreviousContentNode] = React37.useState(null);
7847    const [newTriggerOffset, setNewTriggerOffset] = React37.useState(null);
7848    const currentContainerRef = React37.useRef(null);
7849    const previousContainerRef = React37.useRef(null);
7850    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7851    const cleanupFrame = useAnimationFrame();
7852    const cleanupControllerRef = React37.useRef(null);
7853    const [previousContentDimensions, setPreviousContentDimensions] = React37.useState(null);
7854    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React37.useState(false);
7855    useIsoLayoutEffect(() => {
7856      store2.set("adaptiveOrigin", adaptiveOrigin);
7857      return () => {
7858        store2.set("adaptiveOrigin", void 0);
7859      };
7860    }, [store2]);
7861    const handleMeasureLayout = useStableCallback(() => {
7862      currentContainerRef.current?.style.setProperty("animation", "none");
7863      currentContainerRef.current?.style.setProperty("transition", "none");
7864      previousContainerRef.current?.style.setProperty("display", "none");
7865    });
7866    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7867      currentContainerRef.current?.style.removeProperty("animation");
7868      currentContainerRef.current?.style.removeProperty("transition");
7869      previousContainerRef.current?.style.removeProperty("display");
7870      if (previousDimensions) {
7871        setPreviousContentDimensions(previousDimensions);
7872      }
7873    });
7874    const armViewportCleanup = useStableCallback(() => {
7875      cleanupControllerRef.current?.abort();
7876      const controller = new AbortController();
7877      cleanupControllerRef.current = controller;
7878      onAnimationsFinished(() => {
7879        setPreviousContentNode(null);
7880        setPreviousContentDimensions(null);
7881        capturedNodeRef.current = null;
7882      }, controller.signal);
7883    });
7884    const lastHandledTriggerRef = React37.useRef(null);
7885    useIsoLayoutEffect(() => {
7886      if (!open2 || !mounted) {
7887        lastHandledTriggerRef.current = null;
7888      }
7889    }, [open2, mounted]);
7890    useIsoLayoutEffect(() => {
7891      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7892        setPreviousContentNode(capturedNodeRef.current);
7893        setShowStartingStyleAttribute(true);
7894        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7895        setNewTriggerOffset(offset4);
7896        lastHandledTriggerRef.current = activeTrigger;
7897      }
7898    }, [activeTrigger, previousActiveTrigger]);
7899    useIsoLayoutEffect(() => {
7900      if (previousContentNode == null) {
7901        return;
7902      }
7903      cleanupControllerRef.current?.abort();
7904      setShowStartingStyleAttribute(true);
7905      cleanupFrame.request(() => {
7906        ReactDOM6.flushSync(() => {
7907          setShowStartingStyleAttribute(false);
7908        });
7909        armViewportCleanup();
7910      });
7911    }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7912    useIsoLayoutEffect(() => {
7913      const source = currentContainerRef.current;
7914      if (!source) {
7915        return;
7916      }
7917      const wrapper = ownerDocument(source).createElement("div");
7918      for (const child of Array.from(source.childNodes)) {
7919        wrapper.appendChild(child.cloneNode(true));
7920      }
7921      capturedNodeRef.current = wrapper;
7922    });
7923    const isTransitioning = previousContentNode != null;
7924    let childrenToRender;
7925    if (!isTransitioning) {
7926      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7927        "data-current": true,
7928        ref: currentContainerRef,
7929        children
7930      }, currentContentKey);
7931    } else {
7932      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React37.Fragment, {
7933        children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7934          "data-previous": true,
7935          inert: inertValue(true),
7936          ref: previousContainerRef,
7937          style: {
7938            ...previousContentDimensions ? {
7939              [popupWidth]: `$previousContentDimensions.width}px`,
7940              [popupHeight]: `$previousContentDimensions.height}px`
7941            } : null,
7942            position: "absolute"
7943          },
7944          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7945        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7946          "data-current": true,
7947          ref: currentContainerRef,
7948          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7949          children
7950        }, currentContentKey)]
7951      });
7952    }
7953    useIsoLayoutEffect(() => {
7954      const container = previousContainerRef.current;
7955      if (!container || !previousContentNode) {
7956        return;
7957      }
7958      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7959    }, [previousContentNode]);
7960    usePopupAutoResize({
7961      popupElement,
7962      positionerElement,
7963      mounted,
7964      content: payload,
7965      onMeasureLayout: handleMeasureLayout,
7966      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7967      side,
7968      direction
7969    });
7970    const state = {
7971      activationDirection: getActivationDirection(newTriggerOffset),
7972      transitioning: isTransitioning
7973    };
7974    return {
7975      children: childrenToRender,
7976      state
7977    };
7978  }
7979  function getActivationDirection(offset4) {
7980    if (!offset4) {
7981      return void 0;
7982    }
7983    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7984  }
7985  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7986    if (value > tolerance) {
7987      return positiveLabel;
7988    }
7989    if (value < -tolerance) {
7990      return negativeLabel;
7991    }
7992    return "";
7993  }
7994  function calculateRelativePosition(from, to) {
7995    const fromRect = from.getBoundingClientRect();
7996    const toRect = to.getBoundingClientRect();
7997    const fromCenter = {
7998      x: fromRect.left + fromRect.width / 2,
7999      y: fromRect.top + fromRect.height / 2
8000    };
8001    const toCenter = {
8002      x: toRect.left + toRect.width / 2,
8003      y: toRect.top + toRect.height / 2
8004    };
8005    return {
8006      horizontal: toCenter.x - fromCenter.x,
8007      vertical: toCenter.y - fromCenter.y
8008    };
8009  }
8010  function usePopupContentKey(activeTriggerId, payload) {
8011    const [contentKey, setContentKey] = React37.useState(0);
8012    const previousActiveTriggerIdRef = React37.useRef(activeTriggerId);
8013    const previousPayloadRef = React37.useRef(payload);
8014    const pendingPayloadUpdateRef = React37.useRef(false);
8015    useIsoLayoutEffect(() => {
8016      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
8017      const previousPayload = previousPayloadRef.current;
8018      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
8019      const payloadChanged = payload !== previousPayload;
8020      if (triggerIdChanged) {
8021        setContentKey((value) => value + 1);
8022        pendingPayloadUpdateRef.current = !payloadChanged;
8023      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
8024        setContentKey((value) => value + 1);
8025        pendingPayloadUpdateRef.current = false;
8026      }
8027      previousActiveTriggerIdRef.current = activeTriggerId;
8028      previousPayloadRef.current = payload;
8029    }, [activeTriggerId, payload]);
8030    return `$activeTriggerId ?? "current"}-$contentKey}`;
8031  }
8032  
8033  // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
8034  var React38 = __toESM(require_react(), 1);
8035  var ReactDOM7 = __toESM(require_react_dom(), 1);
8036  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
8037  var FloatingPortalLite = /* @__PURE__ */ React38.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
8038    const {
8039      children,
8040      container,
8041      className,
8042      render,
8043      style,
8044      ...elementProps
8045    } = componentProps;
8046    const {
8047      node: portalNode,
8048      subtree: portalSubtree
8049    } = useFloatingPortalNode({
8050      container,
8051      ref: forwardedRef,
8052      componentProps,
8053      elementProps
8054    });
8055    if (!portalSubtree && !portalNode) {
8056      return null;
8057    }
8058    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React38.Fragment, {
8059      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
8060    });
8061  });
8062  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
8063  
8064  // node_modules/@base-ui/react/tooltip/index.parts.mjs
8065  var index_parts_exports = {};
8066  __export(index_parts_exports, {
8067    Arrow: () => TooltipArrow,
8068    Handle: () => TooltipHandle,
8069    Popup: () => TooltipPopup,
8070    Portal: () => TooltipPortal,
8071    Positioner: () => TooltipPositioner,
8072    Provider: () => TooltipProvider,
8073    Root: () => TooltipRoot,
8074    Trigger: () => TooltipTrigger,
8075    Viewport: () => TooltipViewport,
8076    createHandle: () => createTooltipHandle
8077  });
8078  
8079  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8080  var React41 = __toESM(require_react(), 1);
8081  
8082  // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
8083  var React39 = __toESM(require_react(), 1);
8084  var TooltipRootContext = /* @__PURE__ */ React39.createContext(void 0);
8085  if (true) TooltipRootContext.displayName = "TooltipRootContext";
8086  function useTooltipRootContext(optional) {
8087    const context = React39.useContext(TooltipRootContext);
8088    if (context === void 0 && !optional) {
8089      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
8090    }
8091    return context;
8092  }
8093  
8094  // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
8095  var React40 = __toESM(require_react(), 1);
8096  var selectors2 = {
8097    ...popupStoreSelectors,
8098    disabled: (state) => state.disabled,
8099    instantType: (state) => state.instantType,
8100    isInstantPhase: (state) => state.isInstantPhase,
8101    trackCursorAxis: (state) => state.trackCursorAxis,
8102    disableHoverablePopup: (state) => state.disableHoverablePopup,
8103    lastOpenChangeReason: (state) => state.openChangeReason,
8104    closeOnClick: (state) => state.closeOnClick,
8105    closeDelay: (state) => state.closeDelay,
8106    adaptiveOrigin: (state) => state.adaptiveOrigin
8107  };
8108  var TooltipStore = class extends ReactStore {
8109    constructor(initialState, floatingId, nested) {
8110      const triggerElements = new PopupTriggerMap();
8111      super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
8112    }
8113    setOpen = (nextOpen, eventDetails) => {
8114      applyPopupOpenChange(this, nextOpen, eventDetails, {
8115        extraState: {
8116          openChangeReason: eventDetails.reason
8117        }
8118      });
8119    };
8120    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
8121    cancelPendingOpen(event) {
8122      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
8123    }
8124  };
8125  function createNullTooltipStore() {
8126    const triggerElements = new PopupTriggerMap();
8127    const store2 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
8128    return Object.assign(store2, {
8129      setOpen: NOOP,
8130      cancelPendingOpen: NOOP
8131    });
8132  }
8133  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
8134    const state = {
8135      ...createInitialPopupStoreState(triggerElements, floatingId, nested),
8136      disabled: false,
8137      instantType: void 0,
8138      isInstantPhase: false,
8139      trackCursorAxis: "none",
8140      disableHoverablePopup: false,
8141      openChangeReason: null,
8142      closeOnClick: true,
8143      closeDelay: 0,
8144      adaptiveOrigin: void 0,
8145      ...initialState
8146    };
8147    return state;
8148  }
8149  function createInitialContext(triggerElements) {
8150    return {
8151      popupRef: /* @__PURE__ */ React40.createRef(),
8152      onOpenChange: void 0,
8153      onOpenChangeComplete: void 0,
8154      triggerElements
8155    };
8156  }
8157  
8158  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8159  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8160  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
8161    const {
8162      disabled: disabled2 = false,
8163      defaultOpen = false,
8164      open: openProp,
8165      disableHoverablePopup = false,
8166      trackCursorAxis = "none",
8167      actionsRef,
8168      onOpenChange,
8169      onOpenChangeComplete,
8170      handle,
8171      triggerId: triggerIdProp,
8172      defaultTriggerId: defaultTriggerIdProp = null,
8173      children
8174    } = props;
8175    const store2 = usePopupRootStore((floatingId, nested) => new TooltipStore({
8176      open: defaultOpen,
8177      openProp,
8178      activeTriggerId: defaultTriggerIdProp,
8179      triggerIdProp
8180    }, floatingId, nested));
8181    store2.useControlledProp("openProp", openProp);
8182    store2.useControlledProp("triggerIdProp", triggerIdProp);
8183    store2.useContextCallback("onOpenChange", onOpenChange);
8184    store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
8185    const openState = store2.useState("open");
8186    const open2 = !disabled2 && openState;
8187    const activeTriggerId = store2.useState("activeTriggerId");
8188    const mounted = store2.useState("mounted");
8189    const payload = store2.useState("payload");
8190    store2.useSyncedValues({
8191      trackCursorAxis,
8192      disableHoverablePopup,
8193      disabled: disabled2
8194    });
8195    useImplicitActiveTrigger(store2, {
8196      closeOnActiveTriggerUnmount: true
8197    });
8198    const {
8199      forceUnmount,
8200      transitionStatus
8201    } = useOpenStateTransitions(open2, store2);
8202    const isInstantPhase = store2.useState("isInstantPhase");
8203    const instantType = store2.useState("instantType");
8204    const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
8205    const previousInstantTypeRef = React41.useRef(null);
8206    useIsoLayoutEffect(() => {
8207      if (openState && disabled2) {
8208        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
8209      }
8210    }, [openState, disabled2, store2]);
8211    useIsoLayoutEffect(() => {
8212      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8213        if (instantType !== "delay") {
8214          previousInstantTypeRef.current = instantType;
8215        }
8216        store2.set("instantType", "delay");
8217      } else if (previousInstantTypeRef.current !== null) {
8218        store2.set("instantType", previousInstantTypeRef.current);
8219        previousInstantTypeRef.current = null;
8220      }
8221    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
8222    useIsoLayoutEffect(() => {
8223      if (open2) {
8224        if (activeTriggerId == null) {
8225          store2.set("payload", void 0);
8226        }
8227      }
8228    }, [store2, activeTriggerId, open2]);
8229    React41.useImperativeHandle(actionsRef, () => ({
8230      unmount: forceUnmount,
8231      close: () => store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8232    }), [forceUnmount, store2]);
8233    const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none";
8234    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8235      value: store2,
8236      children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8237        handle,
8238        store: store2
8239      }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8240        store: store2,
8241        disabled: disabled2,
8242        trackCursorAxis
8243      }), typeof children === "function" ? children({
8244        payload
8245      }) : children]
8246    });
8247  });
8248  if (true) TooltipRoot.displayName = "TooltipRoot";
8249  function TooltipInteractions({
8250    store: store2,
8251    disabled: disabled2,
8252    trackCursorAxis
8253  }) {
8254    const floatingRootContext = store2.useState("floatingRootContext");
8255    const dismiss = useDismiss(floatingRootContext, {
8256      enabled: !disabled2,
8257      referencePress: () => store2.select("closeOnClick")
8258    });
8259    const clientPoint = useClientPoint(floatingRootContext, {
8260      enabled: !disabled2 && trackCursorAxis !== "none",
8261      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8262    });
8263    const triggerProps = React41.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8264    usePopupInteractionProps(store2, {
8265      activeTriggerProps: triggerProps,
8266      inactiveTriggerProps: triggerProps,
8267      popupProps: dismiss.floating ?? EMPTY_OBJECT
8268    });
8269    return null;
8270  }
8271  
8272  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8273  var React43 = __toESM(require_react(), 1);
8274  
8275  // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8276  var React42 = __toESM(require_react(), 1);
8277  var TooltipProviderContext = /* @__PURE__ */ React42.createContext(void 0);
8278  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8279  function useTooltipProviderContext() {
8280    return React42.useContext(TooltipProviderContext);
8281  }
8282  
8283  // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8284  var OPEN_DELAY = 600;
8285  
8286  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8287  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8288  function getTargetElement(event) {
8289    if ("composedPath" in event) {
8290      const path = event.composedPath();
8291      for (let i = 0; i < path.length; i += 1) {
8292        const element = path[i];
8293        if (isElement(element)) {
8294          return element;
8295        }
8296      }
8297    }
8298    const target = event.target;
8299    if (isElement(target)) {
8300      return target;
8301    }
8302    return null;
8303  }
8304  function closestEnabledTooltipTrigger(element) {
8305    let current = element;
8306    while (current) {
8307      const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8308      if (trigger) {
8309        return trigger;
8310      }
8311      const root = current.getRootNode();
8312      current = "host" in root && isElement(root.host) ? root.host : null;
8313    }
8314    return null;
8315  }
8316  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8317    const {
8318      render,
8319      className,
8320      style,
8321      handle,
8322      payload,
8323      disabled: disabledProp,
8324      delay,
8325      closeOnClick = true,
8326      closeDelay,
8327      id: idProp,
8328      ...elementProps
8329    } = componentProps;
8330    const rootContext = useTooltipRootContext(true);
8331    const handleStore = usePopupHandleStore(handle);
8332    const store2 = handleStore ?? rootContext;
8333    if (!store2) {
8334      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));
8335    }
8336    const thisTriggerId = useBaseUiId(idProp);
8337    const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
8338    const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
8339    const floatingRootContext = store2.useState("floatingRootContext");
8340    const triggerElementRef = React43.useRef(null);
8341    const closeDelayWithDefault = closeDelay ?? 0;
8342    const {
8343      registerTrigger,
8344      isMountedByThisTrigger
8345    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
8346      payload,
8347      closeOnClick,
8348      closeDelay: closeDelayWithDefault
8349    });
8350    const providerDelay = useTooltipProviderContext();
8351    const {
8352      activeIdRef,
8353      delayRef,
8354      isInstantPhase,
8355      hasProvider
8356    } = useDelayGroup(floatingRootContext, {
8357      open: isOpenedByThisTrigger
8358    });
8359    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8360    store2.useSyncedValue("isInstantPhase", isInstantPhase);
8361    const rootDisabled = store2.useState("disabled");
8362    const disabled2 = disabledProp ?? rootDisabled;
8363    const disabledRef = useValueAsRef(disabled2);
8364    const trackCursorAxis = store2.useState("trackCursorAxis");
8365    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8366    const isNestedTriggerHoveredRef = React43.useRef(false);
8367    const nestedTriggerOpenTimeout = useTimeout();
8368    const pointerTypeRef = React43.useRef(void 0);
8369    function getOpenDelay() {
8370      if (hasProvider && activeIdRef.current != null) {
8371        return 0;
8372      }
8373      return delay ?? providerDelay ?? OPEN_DELAY;
8374    }
8375    function isEnabledNestedTriggerTarget(target) {
8376      const triggerEl = triggerElementRef.current;
8377      if (!triggerEl || !target) {
8378        return false;
8379      }
8380      const nearestTrigger = closestEnabledTooltipTrigger(target);
8381      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8382    }
8383    function detectNestedTriggerHover(target) {
8384      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8385      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8386      if (nestedTriggerHovered) {
8387        hoverInteraction.openChangeTimeout.clear();
8388        hoverInteraction.restTimeout.clear();
8389        hoverInteraction.restTimeoutPending = false;
8390        nestedTriggerOpenTimeout.clear();
8391      }
8392      return nestedTriggerHovered;
8393    }
8394    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8395      enabled: !disabled2,
8396      mouseOnly: true,
8397      move: false,
8398      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8399      restMs: getOpenDelay,
8400      delay() {
8401        if (closeDelay == null && hasProvider) {
8402          return {
8403            close: getDelay(delayRef.current, "close")
8404          };
8405        }
8406        return {
8407          close: closeDelayWithDefault
8408        };
8409      },
8410      triggerElementRef,
8411      isActiveTrigger: isTriggerActive,
8412      isClosing: () => store2.select("transitionStatus") === "ending",
8413      shouldOpen() {
8414        return !isNestedTriggerHoveredRef.current;
8415      }
8416    });
8417    const focusProps = useFocus(floatingRootContext, {
8418      enabled: !disabled2
8419    }).reference;
8420    const handleNestedTriggerHover = (event) => {
8421      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8422      const target = getTargetElement(event);
8423      const nestedTriggerHovered = detectNestedTriggerHover(target);
8424      const triggerEl = triggerElementRef.current;
8425      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8426      if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8427        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8428        return;
8429      }
8430      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8431      isMouseLikePointerType(pointerTypeRef.current)) {
8432        const open2 = () => {
8433          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
8434            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8435          }
8436        };
8437        const openDelay = getOpenDelay();
8438        if (openDelay === 0) {
8439          nestedTriggerOpenTimeout.clear();
8440          open2();
8441        } else {
8442          nestedTriggerOpenTimeout.start(openDelay, open2);
8443        }
8444      }
8445    };
8446    const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
8447    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8448    const state = {
8449      open: isOpenedByThisTrigger
8450    };
8451    const element = useRenderElement("button", componentProps, {
8452      state,
8453      ref: [forwardedRef, registerTrigger, triggerElementRef],
8454      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8455        onMouseOver(event) {
8456          handleNestedTriggerHover(event.nativeEvent);
8457        },
8458        onFocus(event) {
8459          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8460            event.preventBaseUIHandler();
8461          }
8462        },
8463        onMouseLeave() {
8464          isNestedTriggerHoveredRef.current = false;
8465          nestedTriggerOpenTimeout.clear();
8466          pointerTypeRef.current = void 0;
8467        },
8468        onPointerEnter(event) {
8469          pointerTypeRef.current = event.pointerType;
8470        },
8471        onPointerDown(event) {
8472          pointerTypeRef.current = event.pointerType;
8473          store2.set("closeOnClick", closeOnClick);
8474          if (closeOnClick && !store2.select("open")) {
8475            store2.cancelPendingOpen(event.nativeEvent);
8476          }
8477        },
8478        onClick(event) {
8479          if (closeOnClick && !store2.select("open")) {
8480            store2.cancelPendingOpen(event.nativeEvent);
8481          }
8482        },
8483        id: thisTriggerId,
8484        [triggerDisabled]: disabled2 ? "" : void 0,
8485        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8486      }, elementProps],
8487      stateAttributesMapping: triggerOpenStateMapping
8488    });
8489    return element;
8490  });
8491  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8492  
8493  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8494  var React45 = __toESM(require_react(), 1);
8495  
8496  // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8497  var React44 = __toESM(require_react(), 1);
8498  var TooltipPortalContext = /* @__PURE__ */ React44.createContext(void 0);
8499  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8500  function useTooltipPortalContext() {
8501    const value = React44.useContext(TooltipPortalContext);
8502    if (value === void 0) {
8503      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8504    }
8505    return value;
8506  }
8507  
8508  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8509  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8510  var TooltipPortal = /* @__PURE__ */ React45.forwardRef(function TooltipPortal2(props, forwardedRef) {
8511    const {
8512      keepMounted = false,
8513      ...portalProps
8514    } = props;
8515    const store2 = useTooltipRootContext();
8516    const mounted = store2.useState("mounted");
8517    const shouldRender = mounted || keepMounted;
8518    if (!shouldRender) {
8519      return null;
8520    }
8521    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8522      value: keepMounted,
8523      children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8524        ref: forwardedRef,
8525        ...portalProps
8526      })
8527    });
8528  });
8529  if (true) TooltipPortal.displayName = "TooltipPortal";
8530  
8531  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8532  var React47 = __toESM(require_react(), 1);
8533  
8534  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8535  var React46 = __toESM(require_react(), 1);
8536  var TooltipPositionerContext = /* @__PURE__ */ React46.createContext(void 0);
8537  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8538  function useTooltipPositionerContext() {
8539    const context = React46.useContext(TooltipPositionerContext);
8540    if (context === void 0) {
8541      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8542    }
8543    return context;
8544  }
8545  
8546  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8547  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8548  var TooltipPositioner = /* @__PURE__ */ React47.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8549    const {
8550      render,
8551      className,
8552      anchor,
8553      positionMethod = "absolute",
8554      side = "top",
8555      align = "center",
8556      sideOffset = 0,
8557      alignOffset = 0,
8558      collisionBoundary = "clipping-ancestors",
8559      collisionPadding = 5,
8560      arrowPadding = 5,
8561      sticky = false,
8562      disableAnchorTracking = false,
8563      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8564      style,
8565      ...elementProps
8566    } = componentProps;
8567    const store2 = useTooltipRootContext();
8568    const keepMounted = useTooltipPortalContext();
8569    const open2 = store2.useState("open");
8570    const mounted = store2.useState("mounted");
8571    const trackCursorAxis = store2.useState("trackCursorAxis");
8572    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8573    const floatingRootContext = store2.useState("floatingRootContext");
8574    const instantType = store2.useState("instantType");
8575    const transitionStatus = store2.useState("transitionStatus");
8576    const adaptiveOrigin2 = store2.useState("adaptiveOrigin");
8577    const positioning = useAnchorPositioning({
8578      anchor,
8579      positionMethod,
8580      floatingRootContext,
8581      mounted,
8582      side,
8583      sideOffset,
8584      align,
8585      alignOffset,
8586      collisionBoundary,
8587      collisionPadding,
8588      sticky,
8589      arrowPadding,
8590      disableAnchorTracking,
8591      keepMounted,
8592      collisionAvoidance,
8593      adaptiveOrigin: adaptiveOrigin2
8594    });
8595    const state = React47.useMemo(() => ({
8596      open: open2,
8597      side: positioning.side,
8598      align: positioning.align,
8599      anchorHidden: positioning.anchorHidden,
8600      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8601    }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8602    const element = usePositioner(componentProps, state, {
8603      styles: positioning.positionerStyles,
8604      transitionStatus,
8605      props: elementProps,
8606      refs: [forwardedRef, store2.useStateSetter("positionerElement")],
8607      hidden: !mounted,
8608      inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup
8609    });
8610    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8611      value: positioning,
8612      children: element
8613    });
8614  });
8615  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8616  
8617  // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8618  var React48 = __toESM(require_react(), 1);
8619  var TooltipPopup = /* @__PURE__ */ React48.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8620    const {
8621      render,
8622      className,
8623      style,
8624      ...elementProps
8625    } = componentProps;
8626    const store2 = useTooltipRootContext();
8627    const {
8628      side,
8629      align
8630    } = useTooltipPositionerContext();
8631    const open2 = store2.useState("open");
8632    const instantType = store2.useState("instantType");
8633    const transitionStatus = store2.useState("transitionStatus");
8634    const popupProps = store2.useState("popupProps");
8635    const floatingContext = store2.useState("floatingRootContext");
8636    const disabled2 = store2.useState("disabled");
8637    const closeDelay = store2.useState("closeDelay");
8638    useOpenChangeComplete({
8639      open: open2,
8640      ref: store2.context.popupRef,
8641      onComplete() {
8642        if (open2) {
8643          store2.context.onOpenChangeComplete?.(true);
8644        }
8645      }
8646    });
8647    useHoverFloatingInteraction(floatingContext, {
8648      enabled: !disabled2,
8649      closeDelay
8650    });
8651    const setPopupElement = store2.useStateSetter("popupElement");
8652    const state = {
8653      open: open2,
8654      side,
8655      align,
8656      instant: instantType,
8657      transitionStatus
8658    };
8659    const element = useRenderElement("div", componentProps, {
8660      state,
8661      ref: [forwardedRef, store2.context.popupRef, setPopupElement],
8662      props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8663      stateAttributesMapping: popupTransitionStateMapping
8664    });
8665    return element;
8666  });
8667  if (true) TooltipPopup.displayName = "TooltipPopup";
8668  
8669  // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8670  var React49 = __toESM(require_react(), 1);
8671  var TooltipArrow = /* @__PURE__ */ React49.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8672    const {
8673      render,
8674      className,
8675      style,
8676      ...elementProps
8677    } = componentProps;
8678    const store2 = useTooltipRootContext();
8679    const {
8680      arrowRef,
8681      side,
8682      align,
8683      arrowUncentered,
8684      arrowStyles
8685    } = useTooltipPositionerContext();
8686    const open2 = store2.useState("open");
8687    const instantType = store2.useState("instantType");
8688    const state = {
8689      open: open2,
8690      side,
8691      align,
8692      uncentered: arrowUncentered,
8693      instant: instantType
8694    };
8695    const element = useRenderElement("div", componentProps, {
8696      state,
8697      ref: [forwardedRef, arrowRef],
8698      props: [{
8699        style: arrowStyles,
8700        "aria-hidden": true
8701      }, elementProps],
8702      stateAttributesMapping: popupStateMapping
8703    });
8704    return element;
8705  });
8706  if (true) TooltipArrow.displayName = "TooltipArrow";
8707  
8708  // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8709  var React50 = __toESM(require_react(), 1);
8710  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8711  var TooltipProvider = function TooltipProvider2(props) {
8712    const {
8713      delay,
8714      closeDelay,
8715      timeout = 400
8716    } = props;
8717    const delayValue = React50.useMemo(() => ({
8718      open: delay,
8719      close: closeDelay
8720    }), [delay, closeDelay]);
8721    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8722      value: delay,
8723      children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8724        delay: delayValue,
8725        timeoutMs: timeout,
8726        children: props.children
8727      })
8728    });
8729  };
8730  if (true) TooltipProvider.displayName = "TooltipProvider";
8731  
8732  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8733  var React51 = __toESM(require_react(), 1);
8734  var TooltipViewport = /* @__PURE__ */ React51.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8735    const {
8736      render,
8737      className,
8738      style,
8739      children,
8740      ...elementProps
8741    } = componentProps;
8742    const store2 = useTooltipRootContext();
8743    const positioner = useTooltipPositionerContext();
8744    const instantType = store2.useState("instantType");
8745    const {
8746      children: childrenToRender,
8747      state: viewportState
8748    } = usePopupViewport({
8749      store: store2,
8750      side: positioner.side,
8751      children
8752    });
8753    const state = {
8754      activationDirection: viewportState.activationDirection,
8755      transitioning: viewportState.transitioning,
8756      instant: instantType
8757    };
8758    return useRenderElement("div", componentProps, {
8759      state,
8760      ref: forwardedRef,
8761      props: [elementProps, {
8762        children: childrenToRender
8763      }],
8764      stateAttributesMapping: popupViewportStateMapping
8765    });
8766  });
8767  if (true) TooltipViewport.displayName = "TooltipViewport";
8768  
8769  // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8770  var TooltipHandle = class extends BasePopupHandle {
8771    constructor() {
8772      super(createNullTooltipStore(), "Tooltip");
8773    }
8774    /**
8775     * Opens the tooltip and associates it with the trigger with the given id.
8776     *
8777     * This method should only be called in an event handler or an effect (not during rendering).
8778     *
8779     * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8780     * `Tooltip.Trigger` with this handle passed as a prop.
8781     */
8782    open(triggerId) {
8783      this.openByTrigger(triggerId);
8784    }
8785    /**
8786     * Closes the tooltip.
8787     *
8788     * This method should only be called in an event handler or an effect (not during rendering).
8789     */
8790    close() {
8791      this.closePopup();
8792    }
8793    /**
8794     * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8795     */
8796    get isOpen() {
8797      return this.attachedStore?.select("open") ?? false;
8798    }
8799  };
8800  function createTooltipHandle() {
8801    return new TooltipHandle();
8802  }
8803  
8804  // node_modules/@base-ui/react/use-render/useRender.mjs
8805  function useRender(params) {
8806    return useRenderElement(params.defaultTagName ?? "div", params, params);
8807  }
8808  
8809  // packages/ui/build-module/text/text.mjs
8810  var import_element10 = __toESM(require_element(), 1);
8811  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8812  function getRuntime() {
8813    const globalScope = globalThis;
8814    if (globalScope.__wpStyleRuntime) {
8815      return globalScope.__wpStyleRuntime;
8816    }
8817    globalScope.__wpStyleRuntime = {
8818      documents: /* @__PURE__ */ new Map(),
8819      styles: /* @__PURE__ */ new Map(),
8820      injectedStyles: /* @__PURE__ */ new WeakMap()
8821    };
8822    if (typeof document !== "undefined") {
8823      registerDocument(document);
8824    }
8825    return globalScope.__wpStyleRuntime;
8826  }
8827  function documentContainsStyleHash(targetDocument, hash) {
8828    if (!targetDocument.head) {
8829      return false;
8830    }
8831    for (const style of targetDocument.head.querySelectorAll(
8832      `style[$STYLE_HASH_ATTRIBUTE}]`
8833    )) {
8834      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8835        return true;
8836      }
8837    }
8838    return false;
8839  }
8840  function injectStyle(targetDocument, hash, css) {
8841    if (!targetDocument.head) {
8842      return;
8843    }
8844    const runtime = getRuntime();
8845    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8846    if (!injectedStyles) {
8847      injectedStyles = /* @__PURE__ */ new Set();
8848      runtime.injectedStyles.set(targetDocument, injectedStyles);
8849    }
8850    if (injectedStyles.has(hash)) {
8851      return;
8852    }
8853    if (documentContainsStyleHash(targetDocument, hash)) {
8854      injectedStyles.add(hash);
8855      return;
8856    }
8857    const style = targetDocument.createElement("style");
8858    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8859    style.appendChild(targetDocument.createTextNode(css));
8860    targetDocument.head.appendChild(style);
8861    injectedStyles.add(hash);
8862  }
8863  function registerDocument(targetDocument) {
8864    const runtime = getRuntime();
8865    runtime.documents.set(
8866      targetDocument,
8867      (runtime.documents.get(targetDocument) ?? 0) + 1
8868    );
8869    for (const [hash, css] of runtime.styles) {
8870      injectStyle(targetDocument, hash, css);
8871    }
8872    return () => {
8873      const count = runtime.documents.get(targetDocument);
8874      if (count === void 0) {
8875        return;
8876      }
8877      if (count <= 1) {
8878        runtime.documents.delete(targetDocument);
8879        return;
8880      }
8881      runtime.documents.set(targetDocument, count - 1);
8882    };
8883  }
8884  function registerStyle(hash, css) {
8885    const runtime = getRuntime();
8886    runtime.styles.set(hash, css);
8887    for (const targetDocument of runtime.documents.keys()) {
8888      injectStyle(targetDocument, hash, css);
8889    }
8890  }
8891  if (typeof process === "undefined" || true) {
8892    registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;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-emphasis,600);--_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-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_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-emphasis,600);--_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-emphasis,600);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-emphasis,600);--_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-emphasis,600);--_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-emphasis,600);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-default,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-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,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-default,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-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,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)}}}');
8893  }
8894  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" };
8895  if (typeof process === "undefined" || true) {
8896    registerStyle("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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-foreground-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-foreground-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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
8897  }
8898  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", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
8899  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8900    const element = useRender({
8901      render,
8902      defaultTagName: "span",
8903      ref,
8904      props: mergeProps(props, {
8905        className: clsx_default(
8906          style_default.text,
8907          global_css_defense_default.heading,
8908          global_css_defense_default.p,
8909          style_default[variant],
8910          className
8911        )
8912      })
8913    });
8914    return element;
8915  });
8916  
8917  // packages/ui/build-module/badge/badge.mjs
8918  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8919  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8920  function getRuntime2() {
8921    const globalScope = globalThis;
8922    if (globalScope.__wpStyleRuntime) {
8923      return globalScope.__wpStyleRuntime;
8924    }
8925    globalScope.__wpStyleRuntime = {
8926      documents: /* @__PURE__ */ new Map(),
8927      styles: /* @__PURE__ */ new Map(),
8928      injectedStyles: /* @__PURE__ */ new WeakMap()
8929    };
8930    if (typeof document !== "undefined") {
8931      registerDocument2(document);
8932    }
8933    return globalScope.__wpStyleRuntime;
8934  }
8935  function documentContainsStyleHash2(targetDocument, hash) {
8936    if (!targetDocument.head) {
8937      return false;
8938    }
8939    for (const style of targetDocument.head.querySelectorAll(
8940      `style[$STYLE_HASH_ATTRIBUTE2}]`
8941    )) {
8942      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8943        return true;
8944      }
8945    }
8946    return false;
8947  }
8948  function injectStyle2(targetDocument, hash, css) {
8949    if (!targetDocument.head) {
8950      return;
8951    }
8952    const runtime = getRuntime2();
8953    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8954    if (!injectedStyles) {
8955      injectedStyles = /* @__PURE__ */ new Set();
8956      runtime.injectedStyles.set(targetDocument, injectedStyles);
8957    }
8958    if (injectedStyles.has(hash)) {
8959      return;
8960    }
8961    if (documentContainsStyleHash2(targetDocument, hash)) {
8962      injectedStyles.add(hash);
8963      return;
8964    }
8965    const style = targetDocument.createElement("style");
8966    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8967    style.appendChild(targetDocument.createTextNode(css));
8968    targetDocument.head.appendChild(style);
8969    injectedStyles.add(hash);
8970  }
8971  function registerDocument2(targetDocument) {
8972    const runtime = getRuntime2();
8973    runtime.documents.set(
8974      targetDocument,
8975      (runtime.documents.get(targetDocument) ?? 0) + 1
8976    );
8977    for (const [hash, css] of runtime.styles) {
8978      injectStyle2(targetDocument, hash, css);
8979    }
8980    return () => {
8981      const count = runtime.documents.get(targetDocument);
8982      if (count === void 0) {
8983        return;
8984      }
8985      if (count <= 1) {
8986        runtime.documents.delete(targetDocument);
8987        return;
8988      }
8989      runtime.documents.set(targetDocument, count - 1);
8990    };
8991  }
8992  function registerStyle2(hash, css) {
8993    const runtime = getRuntime2();
8994    runtime.styles.set(hash, css);
8995    for (const targetDocument of runtime.documents.keys()) {
8996      injectStyle2(targetDocument, hash, css);
8997    }
8998  }
8999  if (typeof process === "undefined" || true) {
9000    registerStyle2("40ea4a6382", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#fae5e1);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c2f8ca);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");
9001  }
9002  var style_default2 = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
9003  var Badge = (0, import_element11.forwardRef)(function Badge2({ intent = "none", className, ...props }, ref) {
9004    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
9005      Text,
9006      {
9007        ref,
9008        className: clsx_default(
9009          style_default2.badge,
9010          style_default2[`is-$intent}-intent`],
9011          className
9012        ),
9013        ...props,
9014        variant: "body-sm"
9015      }
9016    );
9017  });
9018  
9019  // packages/ui/build-module/tooltip/popup.mjs
9020  var import_element15 = __toESM(require_element(), 1);
9021  
9022  // packages/ui/build-module/tooltip/portal.mjs
9023  var import_element12 = __toESM(require_element(), 1);
9024  
9025  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
9026  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
9027  function getRuntime3() {
9028    const globalScope = globalThis;
9029    if (globalScope.__wpStyleRuntime) {
9030      return globalScope.__wpStyleRuntime;
9031    }
9032    globalScope.__wpStyleRuntime = {
9033      documents: /* @__PURE__ */ new Map(),
9034      styles: /* @__PURE__ */ new Map(),
9035      injectedStyles: /* @__PURE__ */ new WeakMap()
9036    };
9037    if (typeof document !== "undefined") {
9038      registerDocument3(document);
9039    }
9040    return globalScope.__wpStyleRuntime;
9041  }
9042  function documentContainsStyleHash3(targetDocument, hash) {
9043    if (!targetDocument.head) {
9044      return false;
9045    }
9046    for (const style of targetDocument.head.querySelectorAll(
9047      `style[$STYLE_HASH_ATTRIBUTE3}]`
9048    )) {
9049      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
9050        return true;
9051      }
9052    }
9053    return false;
9054  }
9055  function injectStyle3(targetDocument, hash, css) {
9056    if (!targetDocument.head) {
9057      return;
9058    }
9059    const runtime = getRuntime3();
9060    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9061    if (!injectedStyles) {
9062      injectedStyles = /* @__PURE__ */ new Set();
9063      runtime.injectedStyles.set(targetDocument, injectedStyles);
9064    }
9065    if (injectedStyles.has(hash)) {
9066      return;
9067    }
9068    if (documentContainsStyleHash3(targetDocument, hash)) {
9069      injectedStyles.add(hash);
9070      return;
9071    }
9072    const style = targetDocument.createElement("style");
9073    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
9074    style.appendChild(targetDocument.createTextNode(css));
9075    targetDocument.head.appendChild(style);
9076    injectedStyles.add(hash);
9077  }
9078  function registerDocument3(targetDocument) {
9079    const runtime = getRuntime3();
9080    runtime.documents.set(
9081      targetDocument,
9082      (runtime.documents.get(targetDocument) ?? 0) + 1
9083    );
9084    for (const [hash, css] of runtime.styles) {
9085      injectStyle3(targetDocument, hash, css);
9086    }
9087    return () => {
9088      const count = runtime.documents.get(targetDocument);
9089      if (count === void 0) {
9090        return;
9091      }
9092      if (count <= 1) {
9093        runtime.documents.delete(targetDocument);
9094        return;
9095      }
9096      runtime.documents.set(targetDocument, count - 1);
9097    };
9098  }
9099  function registerStyle3(hash, css) {
9100    const runtime = getRuntime3();
9101    runtime.styles.set(hash, css);
9102    for (const targetDocument of runtime.documents.keys()) {
9103      injectStyle3(targetDocument, hash, css);
9104    }
9105  }
9106  if (typeof process === "undefined" || true) {
9107    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}}}");
9108  }
9109  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
9110  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
9111  function resolveOwnerDocument() {
9112    return typeof document === "undefined" ? null : document;
9113  }
9114  function isInWordPressEnvironment() {
9115    let topWp;
9116    try {
9117      topWp = window.top?.wp;
9118    } catch {
9119    }
9120    const wp = topWp ?? window.wp;
9121    return typeof wp?.components === "object" && wp.components !== null;
9122  }
9123  var cachedSlot = null;
9124  function ensureSlotIsAccessible(element) {
9125    element.setAttribute("aria-hidden", "false");
9126    return element;
9127  }
9128  function createSlot(ownerDocument2) {
9129    const element = ownerDocument2.createElement("div");
9130    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
9131    if (wp_compat_overlay_slot_default.slot) {
9132      element.classList.add(wp_compat_overlay_slot_default.slot);
9133    }
9134    ownerDocument2.body.appendChild(element);
9135    return element;
9136  }
9137  function getWpCompatOverlaySlot() {
9138    if (typeof window === "undefined") {
9139      return void 0;
9140    }
9141    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
9142      return void 0;
9143    }
9144    const ownerDocument2 = resolveOwnerDocument();
9145    if (!ownerDocument2 || !ownerDocument2.body) {
9146      return void 0;
9147    }
9148    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
9149      return ensureSlotIsAccessible(cachedSlot);
9150    }
9151    const existing = ownerDocument2.querySelector(
9152      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
9153    );
9154    if (existing instanceof HTMLDivElement) {
9155      cachedSlot = ensureSlotIsAccessible(existing);
9156      return cachedSlot;
9157    }
9158    if (cachedSlot?.isConnected) {
9159      cachedSlot.remove();
9160    }
9161    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9162    return cachedSlot;
9163  }
9164  
9165  // packages/ui/build-module/tooltip/portal.mjs
9166  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
9167  var Portal = (0, import_element12.forwardRef)(
9168    function TooltipPortal3({ container, ...restProps }, ref) {
9169      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9170        index_parts_exports.Portal,
9171        {
9172          container: container ?? getWpCompatOverlaySlot(),
9173          ...restProps,
9174          ref
9175        }
9176      );
9177    }
9178  );
9179  
9180  // packages/ui/build-module/tooltip/positioner.mjs
9181  var import_element13 = __toESM(require_element(), 1);
9182  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9183  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9184  function getRuntime4() {
9185    const globalScope = globalThis;
9186    if (globalScope.__wpStyleRuntime) {
9187      return globalScope.__wpStyleRuntime;
9188    }
9189    globalScope.__wpStyleRuntime = {
9190      documents: /* @__PURE__ */ new Map(),
9191      styles: /* @__PURE__ */ new Map(),
9192      injectedStyles: /* @__PURE__ */ new WeakMap()
9193    };
9194    if (typeof document !== "undefined") {
9195      registerDocument4(document);
9196    }
9197    return globalScope.__wpStyleRuntime;
9198  }
9199  function documentContainsStyleHash4(targetDocument, hash) {
9200    if (!targetDocument.head) {
9201      return false;
9202    }
9203    for (const style of targetDocument.head.querySelectorAll(
9204      `style[$STYLE_HASH_ATTRIBUTE4}]`
9205    )) {
9206      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9207        return true;
9208      }
9209    }
9210    return false;
9211  }
9212  function injectStyle4(targetDocument, hash, css) {
9213    if (!targetDocument.head) {
9214      return;
9215    }
9216    const runtime = getRuntime4();
9217    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9218    if (!injectedStyles) {
9219      injectedStyles = /* @__PURE__ */ new Set();
9220      runtime.injectedStyles.set(targetDocument, injectedStyles);
9221    }
9222    if (injectedStyles.has(hash)) {
9223      return;
9224    }
9225    if (documentContainsStyleHash4(targetDocument, hash)) {
9226      injectedStyles.add(hash);
9227      return;
9228    }
9229    const style = targetDocument.createElement("style");
9230    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9231    style.appendChild(targetDocument.createTextNode(css));
9232    targetDocument.head.appendChild(style);
9233    injectedStyles.add(hash);
9234  }
9235  function registerDocument4(targetDocument) {
9236    const runtime = getRuntime4();
9237    runtime.documents.set(
9238      targetDocument,
9239      (runtime.documents.get(targetDocument) ?? 0) + 1
9240    );
9241    for (const [hash, css] of runtime.styles) {
9242      injectStyle4(targetDocument, hash, css);
9243    }
9244    return () => {
9245      const count = runtime.documents.get(targetDocument);
9246      if (count === void 0) {
9247        return;
9248      }
9249      if (count <= 1) {
9250        runtime.documents.delete(targetDocument);
9251        return;
9252      }
9253      runtime.documents.set(targetDocument, count - 1);
9254    };
9255  }
9256  function registerStyle4(hash, css) {
9257    const runtime = getRuntime4();
9258    runtime.styles.set(hash, css);
9259    for (const targetDocument of runtime.documents.keys()) {
9260      injectStyle4(targetDocument, hash, css);
9261    }
9262  }
9263  if (typeof process === "undefined" || true) {
9264    registerStyle4("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9265  }
9266  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9267  if (typeof process === "undefined" || true) {
9268    registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-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}}}}');
9269  }
9270  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9271  var Positioner = (0, import_element13.forwardRef)(
9272    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9273      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9274        index_parts_exports.Positioner,
9275        {
9276          ref,
9277          align,
9278          side,
9279          sideOffset,
9280          ...props,
9281          className: clsx_default(
9282            resets_default["box-sizing"],
9283            style_default3.positioner,
9284            className
9285          )
9286        }
9287      );
9288    }
9289  );
9290  
9291  // packages/ui/build-module/utils/render-slot-with-children.mjs
9292  var import_element14 = __toESM(require_element(), 1);
9293  function renderSlotWithChildren(slot, defaultSlot, children) {
9294    return (0, import_element14.cloneElement)(slot ?? defaultSlot, { children });
9295  }
9296  
9297  // packages/ui/build-module/utils/theme-provider.mjs
9298  var theme = __toESM(require_theme(), 1);
9299  
9300  // packages/ui/build-module/lock-unlock.mjs
9301  var import_private_apis = __toESM(require_private_apis(), 1);
9302  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9303    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9304    "@wordpress/ui"
9305  );
9306  
9307  // packages/ui/build-module/utils/theme-provider.mjs
9308  function getThemeProvider() {
9309    const themePackage = theme;
9310    if (themePackage.ThemeProvider) {
9311      return themePackage.ThemeProvider;
9312    }
9313    if (!themePackage.privateApis) {
9314      throw new Error(
9315        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9316      );
9317    }
9318    return unlock(
9319      themePackage.privateApis
9320    ).ThemeProvider;
9321  }
9322  var ThemeProvider = getThemeProvider();
9323  
9324  // packages/ui/build-module/tooltip/popup.mjs
9325  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9326  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9327  function getRuntime5() {
9328    const globalScope = globalThis;
9329    if (globalScope.__wpStyleRuntime) {
9330      return globalScope.__wpStyleRuntime;
9331    }
9332    globalScope.__wpStyleRuntime = {
9333      documents: /* @__PURE__ */ new Map(),
9334      styles: /* @__PURE__ */ new Map(),
9335      injectedStyles: /* @__PURE__ */ new WeakMap()
9336    };
9337    if (typeof document !== "undefined") {
9338      registerDocument5(document);
9339    }
9340    return globalScope.__wpStyleRuntime;
9341  }
9342  function documentContainsStyleHash5(targetDocument, hash) {
9343    if (!targetDocument.head) {
9344      return false;
9345    }
9346    for (const style of targetDocument.head.querySelectorAll(
9347      `style[$STYLE_HASH_ATTRIBUTE5}]`
9348    )) {
9349      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9350        return true;
9351      }
9352    }
9353    return false;
9354  }
9355  function injectStyle5(targetDocument, hash, css) {
9356    if (!targetDocument.head) {
9357      return;
9358    }
9359    const runtime = getRuntime5();
9360    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9361    if (!injectedStyles) {
9362      injectedStyles = /* @__PURE__ */ new Set();
9363      runtime.injectedStyles.set(targetDocument, injectedStyles);
9364    }
9365    if (injectedStyles.has(hash)) {
9366      return;
9367    }
9368    if (documentContainsStyleHash5(targetDocument, hash)) {
9369      injectedStyles.add(hash);
9370      return;
9371    }
9372    const style = targetDocument.createElement("style");
9373    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9374    style.appendChild(targetDocument.createTextNode(css));
9375    targetDocument.head.appendChild(style);
9376    injectedStyles.add(hash);
9377  }
9378  function registerDocument5(targetDocument) {
9379    const runtime = getRuntime5();
9380    runtime.documents.set(
9381      targetDocument,
9382      (runtime.documents.get(targetDocument) ?? 0) + 1
9383    );
9384    for (const [hash, css] of runtime.styles) {
9385      injectStyle5(targetDocument, hash, css);
9386    }
9387    return () => {
9388      const count = runtime.documents.get(targetDocument);
9389      if (count === void 0) {
9390        return;
9391      }
9392      if (count <= 1) {
9393        runtime.documents.delete(targetDocument);
9394        return;
9395      }
9396      runtime.documents.set(targetDocument, count - 1);
9397    };
9398  }
9399  function registerStyle5(hash, css) {
9400    const runtime = getRuntime5();
9401    runtime.styles.set(hash, css);
9402    for (const targetDocument of runtime.documents.keys()) {
9403      injectStyle5(targetDocument, hash, css);
9404    }
9405  }
9406  if (typeof process === "undefined" || true) {
9407    registerStyle5("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-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}}}}');
9408  }
9409  var style_default4 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9410  var POPUP_COLOR = { background: "#1e1e1e" };
9411  var Popup = (0, import_element15.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9412    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
9413      index_parts_exports.Popup,
9414      {
9415        ref,
9416        className: clsx_default(style_default4.popup, className),
9417        ...props,
9418        children
9419      }
9420    ) });
9421    const positionedPopup = renderSlotWithChildren(
9422      positioner,
9423      /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Positioner, {}),
9424      popupContent
9425    );
9426    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Portal, {}), positionedPopup);
9427  });
9428  
9429  // packages/ui/build-module/tooltip/trigger.mjs
9430  var import_element16 = __toESM(require_element(), 1);
9431  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9432  var Trigger = (0, import_element16.forwardRef)(
9433    function TooltipTrigger3(props, ref) {
9434      return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(index_parts_exports.Trigger, { ref, ...props });
9435    }
9436  );
9437  
9438  // packages/ui/build-module/utils/direction-provider.mjs
9439  var import_i18n = __toESM(require_i18n(), 1);
9440  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9441  function DirectionProvider3({ children }) {
9442    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9443  }
9444  
9445  // packages/ui/build-module/tooltip/root.mjs
9446  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9447  function Root(props) {
9448    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Root, { ...props }) });
9449  }
9450  
9451  // packages/ui/build-module/link/link.mjs
9452  var import_element17 = __toESM(require_element(), 1);
9453  var import_i18n2 = __toESM(require_i18n(), 1);
9454  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9455  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9456  function getRuntime6() {
9457    const globalScope = globalThis;
9458    if (globalScope.__wpStyleRuntime) {
9459      return globalScope.__wpStyleRuntime;
9460    }
9461    globalScope.__wpStyleRuntime = {
9462      documents: /* @__PURE__ */ new Map(),
9463      styles: /* @__PURE__ */ new Map(),
9464      injectedStyles: /* @__PURE__ */ new WeakMap()
9465    };
9466    if (typeof document !== "undefined") {
9467      registerDocument6(document);
9468    }
9469    return globalScope.__wpStyleRuntime;
9470  }
9471  function documentContainsStyleHash6(targetDocument, hash) {
9472    if (!targetDocument.head) {
9473      return false;
9474    }
9475    for (const style of targetDocument.head.querySelectorAll(
9476      `style[$STYLE_HASH_ATTRIBUTE6}]`
9477    )) {
9478      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9479        return true;
9480      }
9481    }
9482    return false;
9483  }
9484  function injectStyle6(targetDocument, hash, css) {
9485    if (!targetDocument.head) {
9486      return;
9487    }
9488    const runtime = getRuntime6();
9489    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9490    if (!injectedStyles) {
9491      injectedStyles = /* @__PURE__ */ new Set();
9492      runtime.injectedStyles.set(targetDocument, injectedStyles);
9493    }
9494    if (injectedStyles.has(hash)) {
9495      return;
9496    }
9497    if (documentContainsStyleHash6(targetDocument, hash)) {
9498      injectedStyles.add(hash);
9499      return;
9500    }
9501    const style = targetDocument.createElement("style");
9502    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9503    style.appendChild(targetDocument.createTextNode(css));
9504    targetDocument.head.appendChild(style);
9505    injectedStyles.add(hash);
9506  }
9507  function registerDocument6(targetDocument) {
9508    const runtime = getRuntime6();
9509    runtime.documents.set(
9510      targetDocument,
9511      (runtime.documents.get(targetDocument) ?? 0) + 1
9512    );
9513    for (const [hash, css] of runtime.styles) {
9514      injectStyle6(targetDocument, hash, css);
9515    }
9516    return () => {
9517      const count = runtime.documents.get(targetDocument);
9518      if (count === void 0) {
9519        return;
9520      }
9521      if (count <= 1) {
9522        runtime.documents.delete(targetDocument);
9523        return;
9524      }
9525      runtime.documents.set(targetDocument, count - 1);
9526    };
9527  }
9528  function registerStyle6(hash, css) {
9529    const runtime = getRuntime6();
9530    runtime.styles.set(hash, css);
9531    for (const targetDocument of runtime.documents.keys()) {
9532      injectStyle6(targetDocument, hash, css);
9533    }
9534  }
9535  if (typeof process === "undefined" || true) {
9536    registerStyle6("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9537  }
9538  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9539  if (typeof process === "undefined" || true) {
9540    registerStyle6("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9541  }
9542  var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
9543  if (typeof process === "undefined" || true) {
9544    registerStyle6("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
9545  }
9546  var style_default5 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9547  if (typeof process === "undefined" || true) {
9548    registerStyle6("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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-foreground-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-foreground-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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
9549  }
9550  var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
9551  var Link = (0, import_element17.forwardRef)(function Link2({
9552    children,
9553    variant = "default",
9554    tone = "brand",
9555    openInNewTab = false,
9556    target,
9557    render,
9558    className,
9559    ...props
9560  }, ref) {
9561    const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9562    const element = useRender({
9563      render,
9564      defaultTagName: "a",
9565      ref,
9566      props: mergeProps(props, {
9567        className: clsx_default(
9568          global_css_defense_default2.a,
9569          resets_default2["box-sizing"],
9570          focus_module_default["outset-ring--focus-except-active"],
9571          variant !== "unstyled" && style_default5.link,
9572          variant !== "unstyled" && style_default5[`is-$tone}`],
9573          variant === "unstyled" && style_default5["is-unstyled"],
9574          className
9575        ),
9576        target: target ?? (openInNewTab ? "_blank" : void 0),
9577        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9578          children,
9579          shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9580            "span",
9581            {
9582              className: style_default5["link-icon"],
9583              role: "img",
9584              "aria-label": (
9585                /* translators: accessibility text appended to link text */
9586                (0, import_i18n2.__)("(opens in a new tab)")
9587              )
9588            }
9589          )
9590        ] })
9591      })
9592    });
9593    return element;
9594  });
9595  
9596  // packages/icons/build-module/library/caution.mjs
9597  var import_primitives = __toESM(require_primitives(), 1);
9598  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9599  var caution_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives.Path, { d: "M12 8L12 13M12 14.5L12 16M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
9600  
9601  // packages/icons/build-module/library/close-small.mjs
9602  var import_primitives2 = __toESM(require_primitives(), 1);
9603  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9604  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.Path, { d: "M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75", vectorEffect: "non-scaling-stroke" }) });
9605  
9606  // packages/icons/build-module/library/error.mjs
9607  var import_primitives3 = __toESM(require_primitives(), 1);
9608  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9609  var error_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M12 9L12 14M12 15.5V17M11.1284 5.04947L3.83827 18.0097C3.46331 18.6763 3.94502 19.5 4.70985 19.5H19.2902C20.055 19.5 20.5367 18.6763 20.1617 18.0097L12.8716 5.04947C12.4893 4.36982 11.5107 4.36982 11.1284 5.04947Z", vectorEffect: "non-scaling-stroke" }) });
9610  
9611  // packages/icons/build-module/library/info.mjs
9612  var import_primitives4 = __toESM(require_primitives(), 1);
9613  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9614  var info_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.Path, { d: "M12 16V11M12 9.5V8M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
9615  
9616  // packages/icons/build-module/library/published.mjs
9617  var import_primitives5 = __toESM(require_primitives(), 1);
9618  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9619  var published_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
9620    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
9621    /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
9622  ] });
9623  
9624  // packages/ui/build-module/icon/icon.mjs
9625  var import_element18 = __toESM(require_element(), 1);
9626  var import_primitives6 = __toESM(require_primitives(), 1);
9627  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9628  var Icon = (0, import_element18.forwardRef)(function Icon2({ icon, size: size4 = 24, style, ...restProps }, ref) {
9629    const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
9630    return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9631      import_primitives6.SVG,
9632      {
9633        ref,
9634        ...icon.props,
9635        ...restProps,
9636        ...mergedStyle ? { style: mergedStyle } : {},
9637        width: size4,
9638        height: size4
9639      }
9640    );
9641  });
9642  
9643  // packages/ui/build-module/utils/keyboard-shortcut.mjs
9644  var import_element20 = __toESM(require_element(), 1);
9645  var import_i18n3 = __toESM(require_i18n(), 1);
9646  
9647  // packages/ui/build-module/visually-hidden/visually-hidden.mjs
9648  var import_element19 = __toESM(require_element(), 1);
9649  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9650  function getRuntime7() {
9651    const globalScope = globalThis;
9652    if (globalScope.__wpStyleRuntime) {
9653      return globalScope.__wpStyleRuntime;
9654    }
9655    globalScope.__wpStyleRuntime = {
9656      documents: /* @__PURE__ */ new Map(),
9657      styles: /* @__PURE__ */ new Map(),
9658      injectedStyles: /* @__PURE__ */ new WeakMap()
9659    };
9660    if (typeof document !== "undefined") {
9661      registerDocument7(document);
9662    }
9663    return globalScope.__wpStyleRuntime;
9664  }
9665  function documentContainsStyleHash7(targetDocument, hash) {
9666    if (!targetDocument.head) {
9667      return false;
9668    }
9669    for (const style of targetDocument.head.querySelectorAll(
9670      `style[$STYLE_HASH_ATTRIBUTE7}]`
9671    )) {
9672      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9673        return true;
9674      }
9675    }
9676    return false;
9677  }
9678  function injectStyle7(targetDocument, hash, css) {
9679    if (!targetDocument.head) {
9680      return;
9681    }
9682    const runtime = getRuntime7();
9683    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9684    if (!injectedStyles) {
9685      injectedStyles = /* @__PURE__ */ new Set();
9686      runtime.injectedStyles.set(targetDocument, injectedStyles);
9687    }
9688    if (injectedStyles.has(hash)) {
9689      return;
9690    }
9691    if (documentContainsStyleHash7(targetDocument, hash)) {
9692      injectedStyles.add(hash);
9693      return;
9694    }
9695    const style = targetDocument.createElement("style");
9696    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9697    style.appendChild(targetDocument.createTextNode(css));
9698    targetDocument.head.appendChild(style);
9699    injectedStyles.add(hash);
9700  }
9701  function registerDocument7(targetDocument) {
9702    const runtime = getRuntime7();
9703    runtime.documents.set(
9704      targetDocument,
9705      (runtime.documents.get(targetDocument) ?? 0) + 1
9706    );
9707    for (const [hash, css] of runtime.styles) {
9708      injectStyle7(targetDocument, hash, css);
9709    }
9710    return () => {
9711      const count = runtime.documents.get(targetDocument);
9712      if (count === void 0) {
9713        return;
9714      }
9715      if (count <= 1) {
9716        runtime.documents.delete(targetDocument);
9717        return;
9718      }
9719      runtime.documents.set(targetDocument, count - 1);
9720    };
9721  }
9722  function registerStyle7(hash, css) {
9723    const runtime = getRuntime7();
9724    runtime.styles.set(hash, css);
9725    for (const targetDocument of runtime.documents.keys()) {
9726      injectStyle7(targetDocument, hash, css);
9727    }
9728  }
9729  if (typeof process === "undefined" || true) {
9730    registerStyle7("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
9731  }
9732  var style_default6 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9733  var VisuallyHidden = (0, import_element19.forwardRef)(
9734    function VisuallyHidden2({ render, ...restProps }, ref) {
9735      const element = useRender({
9736        render,
9737        ref,
9738        props: mergeProps(
9739          { className: style_default6["visually-hidden"] },
9740          restProps,
9741          {
9742            // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9743            "data-visually-hidden": ""
9744          }
9745        )
9746      });
9747      return element;
9748    }
9749  );
9750  
9751  // packages/ui/build-module/utils/keyboard-shortcut.mjs
9752  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9753  function useKeyboardShortcutProps({
9754    "aria-describedby": ariaDescribedBy,
9755    "aria-keyshortcuts": ariaKeyShortcuts,
9756    shortcut
9757  }) {
9758    const generatedDescriptionId = (0, import_element20.useId)();
9759    const descriptionId = shortcut ? generatedDescriptionId : void 0;
9760    const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ");
9761    return {
9762      descriptionId,
9763      targetProps: {
9764        "aria-describedby": describedBy || void 0,
9765        "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts
9766      }
9767    };
9768  }
9769  var KeyboardShortcutDescription = (0, import_element20.forwardRef)(function KeyboardShortcutDescription2({ descriptionId, shortcut }, ref) {
9770    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9771      VisuallyHidden,
9772      {
9773        id: descriptionId,
9774        "aria-hidden": "true",
9775        render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref }),
9776        children: (0, import_i18n3.sprintf)(
9777          /* translators: %s: keyboard shortcut. */
9778          (0, import_i18n3.__)("Keyboard shortcut: %s"),
9779          shortcut.label ?? shortcut.ariaKeyShortcut
9780        )
9781      }
9782    );
9783  });
9784  var KeyboardShortcutDisplay = (0, import_element20.forwardRef)(function KeyboardShortcutDisplay2({ className, shortcut }, ref) {
9785    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut });
9786  });
9787  
9788  // packages/ui/build-module/button/button.mjs
9789  var import_element21 = __toESM(require_element(), 1);
9790  var import_i18n4 = __toESM(require_i18n(), 1);
9791  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9792  import { speak } from "@wordpress/a11y";
9793  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9794  function getRuntime8() {
9795    const globalScope = globalThis;
9796    if (globalScope.__wpStyleRuntime) {
9797      return globalScope.__wpStyleRuntime;
9798    }
9799    globalScope.__wpStyleRuntime = {
9800      documents: /* @__PURE__ */ new Map(),
9801      styles: /* @__PURE__ */ new Map(),
9802      injectedStyles: /* @__PURE__ */ new WeakMap()
9803    };
9804    if (typeof document !== "undefined") {
9805      registerDocument8(document);
9806    }
9807    return globalScope.__wpStyleRuntime;
9808  }
9809  function documentContainsStyleHash8(targetDocument, hash) {
9810    if (!targetDocument.head) {
9811      return false;
9812    }
9813    for (const style of targetDocument.head.querySelectorAll(
9814      `style[$STYLE_HASH_ATTRIBUTE8}]`
9815    )) {
9816      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9817        return true;
9818      }
9819    }
9820    return false;
9821  }
9822  function injectStyle8(targetDocument, hash, css) {
9823    if (!targetDocument.head) {
9824      return;
9825    }
9826    const runtime = getRuntime8();
9827    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9828    if (!injectedStyles) {
9829      injectedStyles = /* @__PURE__ */ new Set();
9830      runtime.injectedStyles.set(targetDocument, injectedStyles);
9831    }
9832    if (injectedStyles.has(hash)) {
9833      return;
9834    }
9835    if (documentContainsStyleHash8(targetDocument, hash)) {
9836      injectedStyles.add(hash);
9837      return;
9838    }
9839    const style = targetDocument.createElement("style");
9840    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9841    style.appendChild(targetDocument.createTextNode(css));
9842    targetDocument.head.appendChild(style);
9843    injectedStyles.add(hash);
9844  }
9845  function registerDocument8(targetDocument) {
9846    const runtime = getRuntime8();
9847    runtime.documents.set(
9848      targetDocument,
9849      (runtime.documents.get(targetDocument) ?? 0) + 1
9850    );
9851    for (const [hash, css] of runtime.styles) {
9852      injectStyle8(targetDocument, hash, css);
9853    }
9854    return () => {
9855      const count = runtime.documents.get(targetDocument);
9856      if (count === void 0) {
9857        return;
9858      }
9859      if (count <= 1) {
9860        runtime.documents.delete(targetDocument);
9861        return;
9862      }
9863      runtime.documents.set(targetDocument, count - 1);
9864    };
9865  }
9866  function registerStyle8(hash, css) {
9867    const runtime = getRuntime8();
9868    runtime.styles.set(hash, css);
9869    for (const targetDocument of runtime.documents.keys()) {
9870      injectStyle8(targetDocument, hash, css);
9871    }
9872  }
9873  if (typeof process === "undefined" || true) {
9874    registerStyle8("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
9875  }
9876  var style_default7 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
9877  if (typeof process === "undefined" || true) {
9878    registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9879  }
9880  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9881  if (typeof process === "undefined" || true) {
9882    registerStyle8("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9883  }
9884  var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
9885  if (typeof process === "undefined" || true) {
9886    registerStyle8("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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-foreground-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-foreground-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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
9887  }
9888  var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
9889  var Button3 = (0, import_element21.forwardRef)(
9890    function Button22({
9891      tone = "brand",
9892      variant = "solid",
9893      size: size4 = "default",
9894      className,
9895      focusableWhenDisabled = true,
9896      disabled: disabled2,
9897      loading,
9898      loadingAnnouncement = (0, import_i18n4.__)("Loading"),
9899      children,
9900      ...props
9901    }, ref) {
9902      const mergedClassName = clsx_default(
9903        global_css_defense_default3.button,
9904        resets_default3["box-sizing"],
9905        focus_module_default2["outset-ring--focus-except-active"],
9906        variant !== "unstyled" && style_default7.button,
9907        style_default7[`is-$tone}`],
9908        style_default7[`is-$variant}`],
9909        style_default7[`is-$size4}`],
9910        loading && style_default7["is-loading"],
9911        className
9912      );
9913      (0, import_element21.useEffect)(() => {
9914        if (loading && loadingAnnouncement) {
9915          speak(loadingAnnouncement);
9916        }
9917      }, [loading, loadingAnnouncement]);
9918      return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9919        Button,
9920        {
9921          ref,
9922          className: mergedClassName,
9923          focusableWhenDisabled,
9924          disabled: disabled2 ?? loading,
9925          ...props,
9926          children
9927        }
9928      );
9929    }
9930  );
9931  
9932  // packages/ui/build-module/button/icon.mjs
9933  var import_element22 = __toESM(require_element(), 1);
9934  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
9935  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9936  function getRuntime9() {
9937    const globalScope = globalThis;
9938    if (globalScope.__wpStyleRuntime) {
9939      return globalScope.__wpStyleRuntime;
9940    }
9941    globalScope.__wpStyleRuntime = {
9942      documents: /* @__PURE__ */ new Map(),
9943      styles: /* @__PURE__ */ new Map(),
9944      injectedStyles: /* @__PURE__ */ new WeakMap()
9945    };
9946    if (typeof document !== "undefined") {
9947      registerDocument9(document);
9948    }
9949    return globalScope.__wpStyleRuntime;
9950  }
9951  function documentContainsStyleHash9(targetDocument, hash) {
9952    if (!targetDocument.head) {
9953      return false;
9954    }
9955    for (const style of targetDocument.head.querySelectorAll(
9956      `style[$STYLE_HASH_ATTRIBUTE9}]`
9957    )) {
9958      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9959        return true;
9960      }
9961    }
9962    return false;
9963  }
9964  function injectStyle9(targetDocument, hash, css) {
9965    if (!targetDocument.head) {
9966      return;
9967    }
9968    const runtime = getRuntime9();
9969    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9970    if (!injectedStyles) {
9971      injectedStyles = /* @__PURE__ */ new Set();
9972      runtime.injectedStyles.set(targetDocument, injectedStyles);
9973    }
9974    if (injectedStyles.has(hash)) {
9975      return;
9976    }
9977    if (documentContainsStyleHash9(targetDocument, hash)) {
9978      injectedStyles.add(hash);
9979      return;
9980    }
9981    const style = targetDocument.createElement("style");
9982    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9983    style.appendChild(targetDocument.createTextNode(css));
9984    targetDocument.head.appendChild(style);
9985    injectedStyles.add(hash);
9986  }
9987  function registerDocument9(targetDocument) {
9988    const runtime = getRuntime9();
9989    runtime.documents.set(
9990      targetDocument,
9991      (runtime.documents.get(targetDocument) ?? 0) + 1
9992    );
9993    for (const [hash, css] of runtime.styles) {
9994      injectStyle9(targetDocument, hash, css);
9995    }
9996    return () => {
9997      const count = runtime.documents.get(targetDocument);
9998      if (count === void 0) {
9999        return;
10000      }
10001      if (count <= 1) {
10002        runtime.documents.delete(targetDocument);
10003        return;
10004      }
10005      runtime.documents.set(targetDocument, count - 1);
10006    };
10007  }
10008  function registerStyle9(hash, css) {
10009    const runtime = getRuntime9();
10010    runtime.styles.set(hash, css);
10011    for (const targetDocument of runtime.documents.keys()) {
10012      injectStyle9(targetDocument, hash, css);
10013    }
10014  }
10015  if (typeof process === "undefined" || true) {
10016    registerStyle9("effc4e3032", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
10017  }
10018  var style_default8 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
10019  var ButtonIcon = (0, import_element22.forwardRef)(
10020    function ButtonIcon2({ className, icon, ...props }, ref) {
10021      return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10022        Icon,
10023        {
10024          ref,
10025          icon,
10026          className: clsx_default(style_default8.icon, className),
10027          size: 24,
10028          ...props
10029        }
10030      );
10031    }
10032  );
10033  
10034  // packages/ui/build-module/button/index.mjs
10035  ButtonIcon.displayName = "Button.Icon";
10036  var Button4 = Object.assign(Button3, {
10037    /**
10038     * An icon component specifically designed to work well when rendered inside
10039     * a `Button` component.
10040     */
10041    Icon: ButtonIcon
10042  });
10043  
10044  // packages/ui/build-module/icon-button/icon-button.mjs
10045  var import_element23 = __toESM(require_element(), 1);
10046  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
10047  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
10048  function getRuntime10() {
10049    const globalScope = globalThis;
10050    if (globalScope.__wpStyleRuntime) {
10051      return globalScope.__wpStyleRuntime;
10052    }
10053    globalScope.__wpStyleRuntime = {
10054      documents: /* @__PURE__ */ new Map(),
10055      styles: /* @__PURE__ */ new Map(),
10056      injectedStyles: /* @__PURE__ */ new WeakMap()
10057    };
10058    if (typeof document !== "undefined") {
10059      registerDocument10(document);
10060    }
10061    return globalScope.__wpStyleRuntime;
10062  }
10063  function documentContainsStyleHash10(targetDocument, hash) {
10064    if (!targetDocument.head) {
10065      return false;
10066    }
10067    for (const style of targetDocument.head.querySelectorAll(
10068      `style[$STYLE_HASH_ATTRIBUTE10}]`
10069    )) {
10070      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
10071        return true;
10072      }
10073    }
10074    return false;
10075  }
10076  function injectStyle10(targetDocument, hash, css) {
10077    if (!targetDocument.head) {
10078      return;
10079    }
10080    const runtime = getRuntime10();
10081    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10082    if (!injectedStyles) {
10083      injectedStyles = /* @__PURE__ */ new Set();
10084      runtime.injectedStyles.set(targetDocument, injectedStyles);
10085    }
10086    if (injectedStyles.has(hash)) {
10087      return;
10088    }
10089    if (documentContainsStyleHash10(targetDocument, hash)) {
10090      injectedStyles.add(hash);
10091      return;
10092    }
10093    const style = targetDocument.createElement("style");
10094    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
10095    style.appendChild(targetDocument.createTextNode(css));
10096    targetDocument.head.appendChild(style);
10097    injectedStyles.add(hash);
10098  }
10099  function registerDocument10(targetDocument) {
10100    const runtime = getRuntime10();
10101    runtime.documents.set(
10102      targetDocument,
10103      (runtime.documents.get(targetDocument) ?? 0) + 1
10104    );
10105    for (const [hash, css] of runtime.styles) {
10106      injectStyle10(targetDocument, hash, css);
10107    }
10108    return () => {
10109      const count = runtime.documents.get(targetDocument);
10110      if (count === void 0) {
10111        return;
10112      }
10113      if (count <= 1) {
10114        runtime.documents.delete(targetDocument);
10115        return;
10116      }
10117      runtime.documents.set(targetDocument, count - 1);
10118    };
10119  }
10120  function registerStyle10(hash, css) {
10121    const runtime = getRuntime10();
10122    runtime.styles.set(hash, css);
10123    for (const targetDocument of runtime.documents.keys()) {
10124      injectStyle10(targetDocument, hash, css);
10125    }
10126  }
10127  if (typeof process === "undefined" || true) {
10128    registerStyle10("c5cdafb1bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");
10129  }
10130  var style_default9 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
10131  var IconButton = (0, import_element23.forwardRef)(
10132    function IconButton2({
10133      label,
10134      className,
10135      // Prevent accidental forwarding of `children`
10136      children: _children,
10137      disabled: disabled2,
10138      focusableWhenDisabled = true,
10139      icon,
10140      size: size4,
10141      shortcut,
10142      positioner,
10143      "aria-describedby": ariaDescribedBy,
10144      "aria-keyshortcuts": ariaKeyShortcuts,
10145      ...restProps
10146    }, ref) {
10147      const classes = clsx_default(style_default9["icon-button"], className);
10148      const { descriptionId, targetProps } = useKeyboardShortcutProps({
10149        "aria-describedby": ariaDescribedBy,
10150        "aria-keyshortcuts": ariaKeyShortcuts,
10151        shortcut
10152      });
10153      return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Root, { children: [
10154        /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
10155          Trigger,
10156          {
10157            ref,
10158            ...targetProps,
10159            disabled: disabled2 && !focusableWhenDisabled,
10160            render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10161              Button4,
10162              {
10163                ...restProps,
10164                size: size4,
10165                "aria-label": label,
10166                disabled: disabled2,
10167                focusableWhenDisabled
10168              }
10169            ),
10170            className: classes,
10171            children: [
10172              /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon, size: 24, className: style_default9.icon }),
10173              shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10174                KeyboardShortcutDescription,
10175                {
10176                  descriptionId,
10177                  shortcut
10178                }
10179              )
10180            ]
10181          }
10182        ),
10183        /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Popup, { positioner, children: [
10184          label,
10185          shortcut && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
10186            " ",
10187            /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(KeyboardShortcutDisplay, { shortcut })
10188          ] })
10189        ] })
10190      ] });
10191    }
10192  );
10193  
10194  // packages/ui/build-module/stack/stack.mjs
10195  var import_element24 = __toESM(require_element(), 1);
10196  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10197  function getRuntime11() {
10198    const globalScope = globalThis;
10199    if (globalScope.__wpStyleRuntime) {
10200      return globalScope.__wpStyleRuntime;
10201    }
10202    globalScope.__wpStyleRuntime = {
10203      documents: /* @__PURE__ */ new Map(),
10204      styles: /* @__PURE__ */ new Map(),
10205      injectedStyles: /* @__PURE__ */ new WeakMap()
10206    };
10207    if (typeof document !== "undefined") {
10208      registerDocument11(document);
10209    }
10210    return globalScope.__wpStyleRuntime;
10211  }
10212  function documentContainsStyleHash11(targetDocument, hash) {
10213    if (!targetDocument.head) {
10214      return false;
10215    }
10216    for (const style of targetDocument.head.querySelectorAll(
10217      `style[$STYLE_HASH_ATTRIBUTE11}]`
10218    )) {
10219      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10220        return true;
10221      }
10222    }
10223    return false;
10224  }
10225  function injectStyle11(targetDocument, hash, css) {
10226    if (!targetDocument.head) {
10227      return;
10228    }
10229    const runtime = getRuntime11();
10230    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10231    if (!injectedStyles) {
10232      injectedStyles = /* @__PURE__ */ new Set();
10233      runtime.injectedStyles.set(targetDocument, injectedStyles);
10234    }
10235    if (injectedStyles.has(hash)) {
10236      return;
10237    }
10238    if (documentContainsStyleHash11(targetDocument, hash)) {
10239      injectedStyles.add(hash);
10240      return;
10241    }
10242    const style = targetDocument.createElement("style");
10243    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10244    style.appendChild(targetDocument.createTextNode(css));
10245    targetDocument.head.appendChild(style);
10246    injectedStyles.add(hash);
10247  }
10248  function registerDocument11(targetDocument) {
10249    const runtime = getRuntime11();
10250    runtime.documents.set(
10251      targetDocument,
10252      (runtime.documents.get(targetDocument) ?? 0) + 1
10253    );
10254    for (const [hash, css] of runtime.styles) {
10255      injectStyle11(targetDocument, hash, css);
10256    }
10257    return () => {
10258      const count = runtime.documents.get(targetDocument);
10259      if (count === void 0) {
10260        return;
10261      }
10262      if (count <= 1) {
10263        runtime.documents.delete(targetDocument);
10264        return;
10265      }
10266      runtime.documents.set(targetDocument, count - 1);
10267    };
10268  }
10269  function registerStyle11(hash, css) {
10270    const runtime = getRuntime11();
10271    runtime.styles.set(hash, css);
10272    for (const targetDocument of runtime.documents.keys()) {
10273      injectStyle11(targetDocument, hash, css);
10274    }
10275  }
10276  if (typeof process === "undefined" || true) {
10277    registerStyle11("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
10278  }
10279  var style_default10 = { "stack": "_19ce0419607e1896__stack" };
10280  var gapTokens = {
10281    xs: "var(--wpds-dimension-gap-xs, 4px)",
10282    sm: "var(--wpds-dimension-gap-sm, 8px)",
10283    md: "var(--wpds-dimension-gap-md, 12px)",
10284    lg: "var(--wpds-dimension-gap-lg, 16px)",
10285    xl: "var(--wpds-dimension-gap-xl, 24px)",
10286    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
10287    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
10288  };
10289  var Stack = (0, import_element24.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
10290    const style = {
10291      gap: gap && gapTokens[gap],
10292      alignItems: align,
10293      justifyContent: justify,
10294      flexDirection: direction,
10295      flexWrap: wrap
10296    };
10297    const element = useRender({
10298      render,
10299      ref,
10300      props: mergeProps(props, { style, className: style_default10.stack })
10301    });
10302    return element;
10303  });
10304  
10305  // packages/ui/build-module/notice/index.mjs
10306  var notice_exports = {};
10307  __export(notice_exports, {
10308    ActionButton: () => ActionButton,
10309    ActionLink: () => ActionLink,
10310    Actions: () => Actions,
10311    CloseIcon: () => CloseIcon,
10312    Description: () => Description,
10313    Root: () => Root2,
10314    Title: () => Title
10315  });
10316  
10317  // packages/ui/build-module/notice/root.mjs
10318  var import_element25 = __toESM(require_element(), 1);
10319  import { speak as speak2 } from "@wordpress/a11y";
10320  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
10321  var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
10322  function getRuntime12() {
10323    const globalScope = globalThis;
10324    if (globalScope.__wpStyleRuntime) {
10325      return globalScope.__wpStyleRuntime;
10326    }
10327    globalScope.__wpStyleRuntime = {
10328      documents: /* @__PURE__ */ new Map(),
10329      styles: /* @__PURE__ */ new Map(),
10330      injectedStyles: /* @__PURE__ */ new WeakMap()
10331    };
10332    if (typeof document !== "undefined") {
10333      registerDocument12(document);
10334    }
10335    return globalScope.__wpStyleRuntime;
10336  }
10337  function documentContainsStyleHash12(targetDocument, hash) {
10338    if (!targetDocument.head) {
10339      return false;
10340    }
10341    for (const style of targetDocument.head.querySelectorAll(
10342      `style[$STYLE_HASH_ATTRIBUTE12}]`
10343    )) {
10344      if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
10345        return true;
10346      }
10347    }
10348    return false;
10349  }
10350  function injectStyle12(targetDocument, hash, css) {
10351    if (!targetDocument.head) {
10352      return;
10353    }
10354    const runtime = getRuntime12();
10355    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10356    if (!injectedStyles) {
10357      injectedStyles = /* @__PURE__ */ new Set();
10358      runtime.injectedStyles.set(targetDocument, injectedStyles);
10359    }
10360    if (injectedStyles.has(hash)) {
10361      return;
10362    }
10363    if (documentContainsStyleHash12(targetDocument, hash)) {
10364      injectedStyles.add(hash);
10365      return;
10366    }
10367    const style = targetDocument.createElement("style");
10368    style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
10369    style.appendChild(targetDocument.createTextNode(css));
10370    targetDocument.head.appendChild(style);
10371    injectedStyles.add(hash);
10372  }
10373  function registerDocument12(targetDocument) {
10374    const runtime = getRuntime12();
10375    runtime.documents.set(
10376      targetDocument,
10377      (runtime.documents.get(targetDocument) ?? 0) + 1
10378    );
10379    for (const [hash, css] of runtime.styles) {
10380      injectStyle12(targetDocument, hash, css);
10381    }
10382    return () => {
10383      const count = runtime.documents.get(targetDocument);
10384      if (count === void 0) {
10385        return;
10386      }
10387      if (count <= 1) {
10388        runtime.documents.delete(targetDocument);
10389        return;
10390      }
10391      runtime.documents.set(targetDocument, count - 1);
10392    };
10393  }
10394  function registerStyle12(hash, css) {
10395    const runtime = getRuntime12();
10396    runtime.styles.set(hash, css);
10397    for (const targetDocument of runtime.documents.keys()) {
10398      injectStyle12(targetDocument, hash, css);
10399    }
10400  }
10401  if (typeof process === "undefined" || true) {
10402    registerStyle12("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10403  }
10404  var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10405  if (typeof process === "undefined" || true) {
10406    registerStyle12("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10407  }
10408  var style_default11 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10409  var icons = {
10410    neutral: null,
10411    info: info_default,
10412    warning: caution_default,
10413    success: published_default,
10414    error: error_default
10415  };
10416  function getDefaultPoliteness(intent) {
10417    return intent === "error" ? "assertive" : "polite";
10418  }
10419  function safeRenderToString(message) {
10420    if (!message) {
10421      return void 0;
10422    }
10423    if (typeof message === "string") {
10424      return message;
10425    }
10426    try {
10427      return (0, import_element25.renderToString)(message);
10428    } catch {
10429      return void 0;
10430    }
10431  }
10432  function useSpokenMessage(message, politeness) {
10433    const spokenMessage = safeRenderToString(message);
10434    (0, import_element25.useEffect)(() => {
10435      if (spokenMessage) {
10436        speak2(spokenMessage, politeness);
10437      }
10438    }, [spokenMessage, politeness]);
10439  }
10440  var Root2 = (0, import_element25.forwardRef)(function Notice({
10441    intent = "neutral",
10442    children,
10443    icon,
10444    spokenMessage = children,
10445    politeness = getDefaultPoliteness(intent),
10446    render,
10447    ...restProps
10448  }, ref) {
10449    useSpokenMessage(spokenMessage, politeness);
10450    const iconElement = icon === null ? null : icon ?? icons[intent];
10451    const mergedClassName = clsx_default(
10452      style_default11.notice,
10453      style_default11[`is-$intent}`],
10454      resets_default4["box-sizing"]
10455    );
10456    const element = useRender({
10457      defaultTagName: "div",
10458      render,
10459      ref,
10460      props: mergeProps(
10461        {
10462          className: mergedClassName,
10463          children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
10464            children,
10465            iconElement && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
10466              Icon,
10467              {
10468                className: style_default11.icon,
10469                icon: iconElement
10470              }
10471            )
10472          ] })
10473        },
10474        restProps
10475      )
10476    });
10477    return element;
10478  });
10479  
10480  // packages/ui/build-module/notice/title.mjs
10481  var import_element26 = __toESM(require_element(), 1);
10482  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
10483  var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
10484  function getRuntime13() {
10485    const globalScope = globalThis;
10486    if (globalScope.__wpStyleRuntime) {
10487      return globalScope.__wpStyleRuntime;
10488    }
10489    globalScope.__wpStyleRuntime = {
10490      documents: /* @__PURE__ */ new Map(),
10491      styles: /* @__PURE__ */ new Map(),
10492      injectedStyles: /* @__PURE__ */ new WeakMap()
10493    };
10494    if (typeof document !== "undefined") {
10495      registerDocument13(document);
10496    }
10497    return globalScope.__wpStyleRuntime;
10498  }
10499  function documentContainsStyleHash13(targetDocument, hash) {
10500    if (!targetDocument.head) {
10501      return false;
10502    }
10503    for (const style of targetDocument.head.querySelectorAll(
10504      `style[$STYLE_HASH_ATTRIBUTE13}]`
10505    )) {
10506      if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
10507        return true;
10508      }
10509    }
10510    return false;
10511  }
10512  function injectStyle13(targetDocument, hash, css) {
10513    if (!targetDocument.head) {
10514      return;
10515    }
10516    const runtime = getRuntime13();
10517    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10518    if (!injectedStyles) {
10519      injectedStyles = /* @__PURE__ */ new Set();
10520      runtime.injectedStyles.set(targetDocument, injectedStyles);
10521    }
10522    if (injectedStyles.has(hash)) {
10523      return;
10524    }
10525    if (documentContainsStyleHash13(targetDocument, hash)) {
10526      injectedStyles.add(hash);
10527      return;
10528    }
10529    const style = targetDocument.createElement("style");
10530    style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
10531    style.appendChild(targetDocument.createTextNode(css));
10532    targetDocument.head.appendChild(style);
10533    injectedStyles.add(hash);
10534  }
10535  function registerDocument13(targetDocument) {
10536    const runtime = getRuntime13();
10537    runtime.documents.set(
10538      targetDocument,
10539      (runtime.documents.get(targetDocument) ?? 0) + 1
10540    );
10541    for (const [hash, css] of runtime.styles) {
10542      injectStyle13(targetDocument, hash, css);
10543    }
10544    return () => {
10545      const count = runtime.documents.get(targetDocument);
10546      if (count === void 0) {
10547        return;
10548      }
10549      if (count <= 1) {
10550        runtime.documents.delete(targetDocument);
10551        return;
10552      }
10553      runtime.documents.set(targetDocument, count - 1);
10554    };
10555  }
10556  function registerStyle13(hash, css) {
10557    const runtime = getRuntime13();
10558    runtime.styles.set(hash, css);
10559    for (const targetDocument of runtime.documents.keys()) {
10560      injectStyle13(targetDocument, hash, css);
10561    }
10562  }
10563  if (typeof process === "undefined" || true) {
10564    registerStyle13("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10565  }
10566  var style_default12 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10567  var Title = (0, import_element26.forwardRef)(
10568    function NoticeTitle({ className, ...props }, ref) {
10569      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10570        Text,
10571        {
10572          ref,
10573          variant: "heading-md",
10574          className: clsx_default(style_default12.title, className),
10575          ...props
10576        }
10577      );
10578    }
10579  );
10580  
10581  // packages/ui/build-module/notice/description.mjs
10582  var import_element27 = __toESM(require_element(), 1);
10583  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10584  var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
10585  function getRuntime14() {
10586    const globalScope = globalThis;
10587    if (globalScope.__wpStyleRuntime) {
10588      return globalScope.__wpStyleRuntime;
10589    }
10590    globalScope.__wpStyleRuntime = {
10591      documents: /* @__PURE__ */ new Map(),
10592      styles: /* @__PURE__ */ new Map(),
10593      injectedStyles: /* @__PURE__ */ new WeakMap()
10594    };
10595    if (typeof document !== "undefined") {
10596      registerDocument14(document);
10597    }
10598    return globalScope.__wpStyleRuntime;
10599  }
10600  function documentContainsStyleHash14(targetDocument, hash) {
10601    if (!targetDocument.head) {
10602      return false;
10603    }
10604    for (const style of targetDocument.head.querySelectorAll(
10605      `style[$STYLE_HASH_ATTRIBUTE14}]`
10606    )) {
10607      if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
10608        return true;
10609      }
10610    }
10611    return false;
10612  }
10613  function injectStyle14(targetDocument, hash, css) {
10614    if (!targetDocument.head) {
10615      return;
10616    }
10617    const runtime = getRuntime14();
10618    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10619    if (!injectedStyles) {
10620      injectedStyles = /* @__PURE__ */ new Set();
10621      runtime.injectedStyles.set(targetDocument, injectedStyles);
10622    }
10623    if (injectedStyles.has(hash)) {
10624      return;
10625    }
10626    if (documentContainsStyleHash14(targetDocument, hash)) {
10627      injectedStyles.add(hash);
10628      return;
10629    }
10630    const style = targetDocument.createElement("style");
10631    style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
10632    style.appendChild(targetDocument.createTextNode(css));
10633    targetDocument.head.appendChild(style);
10634    injectedStyles.add(hash);
10635  }
10636  function registerDocument14(targetDocument) {
10637    const runtime = getRuntime14();
10638    runtime.documents.set(
10639      targetDocument,
10640      (runtime.documents.get(targetDocument) ?? 0) + 1
10641    );
10642    for (const [hash, css] of runtime.styles) {
10643      injectStyle14(targetDocument, hash, css);
10644    }
10645    return () => {
10646      const count = runtime.documents.get(targetDocument);
10647      if (count === void 0) {
10648        return;
10649      }
10650      if (count <= 1) {
10651        runtime.documents.delete(targetDocument);
10652        return;
10653      }
10654      runtime.documents.set(targetDocument, count - 1);
10655    };
10656  }
10657  function registerStyle14(hash, css) {
10658    const runtime = getRuntime14();
10659    runtime.styles.set(hash, css);
10660    for (const targetDocument of runtime.documents.keys()) {
10661      injectStyle14(targetDocument, hash, css);
10662    }
10663  }
10664  if (typeof process === "undefined" || true) {
10665    registerStyle14("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10666  }
10667  var style_default13 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10668  var Description = (0, import_element27.forwardRef)(
10669    function NoticeDescription({ className, ...props }, ref) {
10670      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10671        Text,
10672        {
10673          ref,
10674          variant: "body-md",
10675          className: clsx_default(style_default13.description, className),
10676          ...props
10677        }
10678      );
10679    }
10680  );
10681  
10682  // packages/ui/build-module/notice/actions.mjs
10683  var import_element28 = __toESM(require_element(), 1);
10684  var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
10685  function getRuntime15() {
10686    const globalScope = globalThis;
10687    if (globalScope.__wpStyleRuntime) {
10688      return globalScope.__wpStyleRuntime;
10689    }
10690    globalScope.__wpStyleRuntime = {
10691      documents: /* @__PURE__ */ new Map(),
10692      styles: /* @__PURE__ */ new Map(),
10693      injectedStyles: /* @__PURE__ */ new WeakMap()
10694    };
10695    if (typeof document !== "undefined") {
10696      registerDocument15(document);
10697    }
10698    return globalScope.__wpStyleRuntime;
10699  }
10700  function documentContainsStyleHash15(targetDocument, hash) {
10701    if (!targetDocument.head) {
10702      return false;
10703    }
10704    for (const style of targetDocument.head.querySelectorAll(
10705      `style[$STYLE_HASH_ATTRIBUTE15}]`
10706    )) {
10707      if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
10708        return true;
10709      }
10710    }
10711    return false;
10712  }
10713  function injectStyle15(targetDocument, hash, css) {
10714    if (!targetDocument.head) {
10715      return;
10716    }
10717    const runtime = getRuntime15();
10718    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10719    if (!injectedStyles) {
10720      injectedStyles = /* @__PURE__ */ new Set();
10721      runtime.injectedStyles.set(targetDocument, injectedStyles);
10722    }
10723    if (injectedStyles.has(hash)) {
10724      return;
10725    }
10726    if (documentContainsStyleHash15(targetDocument, hash)) {
10727      injectedStyles.add(hash);
10728      return;
10729    }
10730    const style = targetDocument.createElement("style");
10731    style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
10732    style.appendChild(targetDocument.createTextNode(css));
10733    targetDocument.head.appendChild(style);
10734    injectedStyles.add(hash);
10735  }
10736  function registerDocument15(targetDocument) {
10737    const runtime = getRuntime15();
10738    runtime.documents.set(
10739      targetDocument,
10740      (runtime.documents.get(targetDocument) ?? 0) + 1
10741    );
10742    for (const [hash, css] of runtime.styles) {
10743      injectStyle15(targetDocument, hash, css);
10744    }
10745    return () => {
10746      const count = runtime.documents.get(targetDocument);
10747      if (count === void 0) {
10748        return;
10749      }
10750      if (count <= 1) {
10751        runtime.documents.delete(targetDocument);
10752        return;
10753      }
10754      runtime.documents.set(targetDocument, count - 1);
10755    };
10756  }
10757  function registerStyle15(hash, css) {
10758    const runtime = getRuntime15();
10759    runtime.styles.set(hash, css);
10760    for (const targetDocument of runtime.documents.keys()) {
10761      injectStyle15(targetDocument, hash, css);
10762    }
10763  }
10764  if (typeof process === "undefined" || true) {
10765    registerStyle15("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10766  }
10767  var style_default14 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10768  var Actions = (0, import_element28.forwardRef)(
10769    function NoticeActions({ render, ...props }, ref) {
10770      const element = useRender({
10771        defaultTagName: "div",
10772        render,
10773        ref,
10774        props: mergeProps(
10775          {
10776            className: style_default14.actions
10777          },
10778          props
10779        )
10780      });
10781      return element;
10782    }
10783  );
10784  
10785  // packages/ui/build-module/notice/close-icon.mjs
10786  var import_element29 = __toESM(require_element(), 1);
10787  var import_i18n5 = __toESM(require_i18n(), 1);
10788  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10789  var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
10790  function getRuntime16() {
10791    const globalScope = globalThis;
10792    if (globalScope.__wpStyleRuntime) {
10793      return globalScope.__wpStyleRuntime;
10794    }
10795    globalScope.__wpStyleRuntime = {
10796      documents: /* @__PURE__ */ new Map(),
10797      styles: /* @__PURE__ */ new Map(),
10798      injectedStyles: /* @__PURE__ */ new WeakMap()
10799    };
10800    if (typeof document !== "undefined") {
10801      registerDocument16(document);
10802    }
10803    return globalScope.__wpStyleRuntime;
10804  }
10805  function documentContainsStyleHash16(targetDocument, hash) {
10806    if (!targetDocument.head) {
10807      return false;
10808    }
10809    for (const style of targetDocument.head.querySelectorAll(
10810      `style[$STYLE_HASH_ATTRIBUTE16}]`
10811    )) {
10812      if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
10813        return true;
10814      }
10815    }
10816    return false;
10817  }
10818  function injectStyle16(targetDocument, hash, css) {
10819    if (!targetDocument.head) {
10820      return;
10821    }
10822    const runtime = getRuntime16();
10823    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10824    if (!injectedStyles) {
10825      injectedStyles = /* @__PURE__ */ new Set();
10826      runtime.injectedStyles.set(targetDocument, injectedStyles);
10827    }
10828    if (injectedStyles.has(hash)) {
10829      return;
10830    }
10831    if (documentContainsStyleHash16(targetDocument, hash)) {
10832      injectedStyles.add(hash);
10833      return;
10834    }
10835    const style = targetDocument.createElement("style");
10836    style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
10837    style.appendChild(targetDocument.createTextNode(css));
10838    targetDocument.head.appendChild(style);
10839    injectedStyles.add(hash);
10840  }
10841  function registerDocument16(targetDocument) {
10842    const runtime = getRuntime16();
10843    runtime.documents.set(
10844      targetDocument,
10845      (runtime.documents.get(targetDocument) ?? 0) + 1
10846    );
10847    for (const [hash, css] of runtime.styles) {
10848      injectStyle16(targetDocument, hash, css);
10849    }
10850    return () => {
10851      const count = runtime.documents.get(targetDocument);
10852      if (count === void 0) {
10853        return;
10854      }
10855      if (count <= 1) {
10856        runtime.documents.delete(targetDocument);
10857        return;
10858      }
10859      runtime.documents.set(targetDocument, count - 1);
10860    };
10861  }
10862  function registerStyle16(hash, css) {
10863    const runtime = getRuntime16();
10864    runtime.styles.set(hash, css);
10865    for (const targetDocument of runtime.documents.keys()) {
10866      injectStyle16(targetDocument, hash, css);
10867    }
10868  }
10869  if (typeof process === "undefined" || true) {
10870    registerStyle16("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10871  }
10872  var style_default15 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10873  var CloseIcon = (0, import_element29.forwardRef)(
10874    function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n5.__)("Dismiss"), ...props }, ref) {
10875      return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10876        IconButton,
10877        {
10878          ...props,
10879          ref,
10880          className: clsx_default(style_default15["close-icon"], className),
10881          variant: "minimal",
10882          size: "small",
10883          tone: "neutral",
10884          icon,
10885          label
10886        }
10887      );
10888    }
10889  );
10890  
10891  // packages/ui/build-module/notice/action-button.mjs
10892  var import_element30 = __toESM(require_element(), 1);
10893  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10894  var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
10895  function getRuntime17() {
10896    const globalScope = globalThis;
10897    if (globalScope.__wpStyleRuntime) {
10898      return globalScope.__wpStyleRuntime;
10899    }
10900    globalScope.__wpStyleRuntime = {
10901      documents: /* @__PURE__ */ new Map(),
10902      styles: /* @__PURE__ */ new Map(),
10903      injectedStyles: /* @__PURE__ */ new WeakMap()
10904    };
10905    if (typeof document !== "undefined") {
10906      registerDocument17(document);
10907    }
10908    return globalScope.__wpStyleRuntime;
10909  }
10910  function documentContainsStyleHash17(targetDocument, hash) {
10911    if (!targetDocument.head) {
10912      return false;
10913    }
10914    for (const style of targetDocument.head.querySelectorAll(
10915      `style[$STYLE_HASH_ATTRIBUTE17}]`
10916    )) {
10917      if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
10918        return true;
10919      }
10920    }
10921    return false;
10922  }
10923  function injectStyle17(targetDocument, hash, css) {
10924    if (!targetDocument.head) {
10925      return;
10926    }
10927    const runtime = getRuntime17();
10928    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10929    if (!injectedStyles) {
10930      injectedStyles = /* @__PURE__ */ new Set();
10931      runtime.injectedStyles.set(targetDocument, injectedStyles);
10932    }
10933    if (injectedStyles.has(hash)) {
10934      return;
10935    }
10936    if (documentContainsStyleHash17(targetDocument, hash)) {
10937      injectedStyles.add(hash);
10938      return;
10939    }
10940    const style = targetDocument.createElement("style");
10941    style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
10942    style.appendChild(targetDocument.createTextNode(css));
10943    targetDocument.head.appendChild(style);
10944    injectedStyles.add(hash);
10945  }
10946  function registerDocument17(targetDocument) {
10947    const runtime = getRuntime17();
10948    runtime.documents.set(
10949      targetDocument,
10950      (runtime.documents.get(targetDocument) ?? 0) + 1
10951    );
10952    for (const [hash, css] of runtime.styles) {
10953      injectStyle17(targetDocument, hash, css);
10954    }
10955    return () => {
10956      const count = runtime.documents.get(targetDocument);
10957      if (count === void 0) {
10958        return;
10959      }
10960      if (count <= 1) {
10961        runtime.documents.delete(targetDocument);
10962        return;
10963      }
10964      runtime.documents.set(targetDocument, count - 1);
10965    };
10966  }
10967  function registerStyle17(hash, css) {
10968    const runtime = getRuntime17();
10969    runtime.styles.set(hash, css);
10970    for (const targetDocument of runtime.documents.keys()) {
10971      injectStyle17(targetDocument, hash, css);
10972    }
10973  }
10974  if (typeof process === "undefined" || true) {
10975    registerStyle17("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10976  }
10977  var style_default16 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10978  var ActionButton = (0, import_element30.forwardRef)(
10979    function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
10980      const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
10981      return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10982        Button4,
10983        {
10984          ...props,
10985          ...loadingProps,
10986          ref,
10987          size: "compact",
10988          tone: "neutral",
10989          variant,
10990          className: clsx_default(
10991            style_default16["action-button"],
10992            style_default16[`is-action-button-$variant}`],
10993            className
10994          )
10995        }
10996      );
10997    }
10998  );
10999  
11000  // packages/ui/build-module/notice/action-link.mjs
11001  var import_element31 = __toESM(require_element(), 1);
11002  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
11003  var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
11004  function getRuntime18() {
11005    const globalScope = globalThis;
11006    if (globalScope.__wpStyleRuntime) {
11007      return globalScope.__wpStyleRuntime;
11008    }
11009    globalScope.__wpStyleRuntime = {
11010      documents: /* @__PURE__ */ new Map(),
11011      styles: /* @__PURE__ */ new Map(),
11012      injectedStyles: /* @__PURE__ */ new WeakMap()
11013    };
11014    if (typeof document !== "undefined") {
11015      registerDocument18(document);
11016    }
11017    return globalScope.__wpStyleRuntime;
11018  }
11019  function documentContainsStyleHash18(targetDocument, hash) {
11020    if (!targetDocument.head) {
11021      return false;
11022    }
11023    for (const style of targetDocument.head.querySelectorAll(
11024      `style[$STYLE_HASH_ATTRIBUTE18}]`
11025    )) {
11026      if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
11027        return true;
11028      }
11029    }
11030    return false;
11031  }
11032  function injectStyle18(targetDocument, hash, css) {
11033    if (!targetDocument.head) {
11034      return;
11035    }
11036    const runtime = getRuntime18();
11037    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11038    if (!injectedStyles) {
11039      injectedStyles = /* @__PURE__ */ new Set();
11040      runtime.injectedStyles.set(targetDocument, injectedStyles);
11041    }
11042    if (injectedStyles.has(hash)) {
11043      return;
11044    }
11045    if (documentContainsStyleHash18(targetDocument, hash)) {
11046      injectedStyles.add(hash);
11047      return;
11048    }
11049    const style = targetDocument.createElement("style");
11050    style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
11051    style.appendChild(targetDocument.createTextNode(css));
11052    targetDocument.head.appendChild(style);
11053    injectedStyles.add(hash);
11054  }
11055  function registerDocument18(targetDocument) {
11056    const runtime = getRuntime18();
11057    runtime.documents.set(
11058      targetDocument,
11059      (runtime.documents.get(targetDocument) ?? 0) + 1
11060    );
11061    for (const [hash, css] of runtime.styles) {
11062      injectStyle18(targetDocument, hash, css);
11063    }
11064    return () => {
11065      const count = runtime.documents.get(targetDocument);
11066      if (count === void 0) {
11067        return;
11068      }
11069      if (count <= 1) {
11070        runtime.documents.delete(targetDocument);
11071        return;
11072      }
11073      runtime.documents.set(targetDocument, count - 1);
11074    };
11075  }
11076  function registerStyle18(hash, css) {
11077    const runtime = getRuntime18();
11078    runtime.styles.set(hash, css);
11079    for (const targetDocument of runtime.documents.keys()) {
11080      injectStyle18(targetDocument, hash, css);
11081    }
11082  }
11083  if (typeof process === "undefined" || true) {
11084    registerStyle18("2e53930a41", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
11085  }
11086  var style_default17 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
11087  var ActionLink = (0, import_element31.forwardRef)(
11088    function NoticeActionLink({ className, render, ...props }, ref) {
11089      return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11090        Text,
11091        {
11092          ref,
11093          className: clsx_default(style_default17["action-link"], className),
11094          ...props,
11095          variant: "body-md",
11096          render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Link, { tone: "neutral", variant: "default", render })
11097        }
11098      );
11099    }
11100  );
11101  
11102  // packages/admin-ui/build-module/navigable-region/index.mjs
11103  var import_element32 = __toESM(require_element(), 1);
11104  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
11105  var NavigableRegion = (0, import_element32.forwardRef)(
11106    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
11107      return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11108        Tag,
11109        {
11110          ref,
11111          className: clsx_default("admin-ui-navigable-region", className),
11112          "aria-label": ariaLabel,
11113          role: "region",
11114          tabIndex: "-1",
11115          ...props,
11116          children
11117        }
11118      );
11119    }
11120  );
11121  NavigableRegion.displayName = "NavigableRegion";
11122  var navigable_region_default = NavigableRegion;
11123  
11124  // packages/admin-ui/build-module/navigation/index.mjs
11125  var import_i18n6 = __toESM(require_i18n(), 1);
11126  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
11127  var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
11128  function getRuntime19() {
11129    const globalScope = globalThis;
11130    if (globalScope.__wpStyleRuntime) {
11131      return globalScope.__wpStyleRuntime;
11132    }
11133    globalScope.__wpStyleRuntime = {
11134      documents: /* @__PURE__ */ new Map(),
11135      styles: /* @__PURE__ */ new Map(),
11136      injectedStyles: /* @__PURE__ */ new WeakMap()
11137    };
11138    if (typeof document !== "undefined") {
11139      registerDocument19(document);
11140    }
11141    return globalScope.__wpStyleRuntime;
11142  }
11143  function documentContainsStyleHash19(targetDocument, hash) {
11144    if (!targetDocument.head) {
11145      return false;
11146    }
11147    for (const style of targetDocument.head.querySelectorAll(
11148      `style[$STYLE_HASH_ATTRIBUTE19}]`
11149    )) {
11150      if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
11151        return true;
11152      }
11153    }
11154    return false;
11155  }
11156  function injectStyle19(targetDocument, hash, css) {
11157    if (!targetDocument.head) {
11158      return;
11159    }
11160    const runtime = getRuntime19();
11161    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11162    if (!injectedStyles) {
11163      injectedStyles = /* @__PURE__ */ new Set();
11164      runtime.injectedStyles.set(targetDocument, injectedStyles);
11165    }
11166    if (injectedStyles.has(hash)) {
11167      return;
11168    }
11169    if (documentContainsStyleHash19(targetDocument, hash)) {
11170      injectedStyles.add(hash);
11171      return;
11172    }
11173    const style = targetDocument.createElement("style");
11174    style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
11175    style.appendChild(targetDocument.createTextNode(css));
11176    targetDocument.head.appendChild(style);
11177    injectedStyles.add(hash);
11178  }
11179  function registerDocument19(targetDocument) {
11180    const runtime = getRuntime19();
11181    runtime.documents.set(
11182      targetDocument,
11183      (runtime.documents.get(targetDocument) ?? 0) + 1
11184    );
11185    for (const [hash, css] of runtime.styles) {
11186      injectStyle19(targetDocument, hash, css);
11187    }
11188    return () => {
11189      const count = runtime.documents.get(targetDocument);
11190      if (count === void 0) {
11191        return;
11192      }
11193      if (count <= 1) {
11194        runtime.documents.delete(targetDocument);
11195        return;
11196      }
11197      runtime.documents.set(targetDocument, count - 1);
11198    };
11199  }
11200  function registerStyle19(hash, css) {
11201    const runtime = getRuntime19();
11202    runtime.styles.set(hash, css);
11203    for (const targetDocument of runtime.documents.keys()) {
11204      injectStyle19(targetDocument, hash, css);
11205    }
11206  }
11207  if (typeof process === "undefined" || true) {
11208    registerStyle19("72ef022400", ".bfb5a2dd8cceebd3__list{--focus-ring-size:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*2);list-style:none;margin:calc(var(--focus-ring-size)*-1);overflow-x:auto;padding:var(--focus-ring-size);scroll-padding:var(--focus-ring-size)}.a4759b4cb2c8bd92__li{flex-shrink:0}._07da506d3f2d9afe__item{align-items:center;color:var(--wpds-color-foreground-interactive-neutral-weak,#707070);display:flex;font-weight:var(--wpds-typography-font-weight-default,400);min-block-size:44px;min-inline-size:44px;text-decoration:none}._07da506d3f2d9afe__item:hover,._07da506d3f2d9afe__item[aria-current=page]{color:var(--wpds-color-foreground-interactive-neutral-weak-active,#1e1e1e)}._07da506d3f2d9afe__item[aria-current=page]{font-weight:var(--wpds-typography-font-weight-emphasis,600)}");
11209  }
11210  var style_default18 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
11211  var Navigation = ({
11212    items,
11213    currentHref,
11214    ariaLabel = (0, import_i18n6.__)("Sections"),
11215    linkComponent,
11216    className
11217  }) => {
11218    if (!items.length) {
11219      return null;
11220    }
11221    const LinkComponent = linkComponent ?? "a";
11222    if (true) {
11223      const invalidItem = items.find(
11224        (item) => typeof item.href !== "string"
11225      );
11226      if (invalidItem) {
11227        throw new Error(
11228          `Navigation: item "$invalidItem.label}" is missing an \`href\` prop.`
11229        );
11230      }
11231      const duplicate = items.find(
11232        (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
11233      );
11234      if (duplicate) {
11235        throw new Error(
11236          `Navigation: duplicate \`href\` "$duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
11237        );
11238      }
11239    }
11240    return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11241      Stack,
11242      {
11243        render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { role: "list" }),
11244        direction: "row",
11245        align: "center",
11246        gap: "md",
11247        className: style_default18.list,
11248        children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { className: style_default18.li, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11249          Text,
11250          {
11251            variant: "body-md",
11252            className: style_default18.item,
11253            render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11254              Link,
11255              {
11256                variant: "unstyled",
11257                "aria-current": item.href === currentHref ? "page" : void 0,
11258                render: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LinkComponent, { href: item.href })
11259              }
11260            ),
11261            children: item.label
11262          }
11263        ) }, item.href))
11264      }
11265    ) });
11266  };
11267  var navigation_default = Navigation;
11268  
11269  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
11270  var import_components = __toESM(require_components(), 1);
11271  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
11272  
11273  // packages/admin-ui/build-module/page/header.mjs
11274  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
11275  var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash";
11276  function getRuntime20() {
11277    const globalScope = globalThis;
11278    if (globalScope.__wpStyleRuntime) {
11279      return globalScope.__wpStyleRuntime;
11280    }
11281    globalScope.__wpStyleRuntime = {
11282      documents: /* @__PURE__ */ new Map(),
11283      styles: /* @__PURE__ */ new Map(),
11284      injectedStyles: /* @__PURE__ */ new WeakMap()
11285    };
11286    if (typeof document !== "undefined") {
11287      registerDocument20(document);
11288    }
11289    return globalScope.__wpStyleRuntime;
11290  }
11291  function documentContainsStyleHash20(targetDocument, hash) {
11292    if (!targetDocument.head) {
11293      return false;
11294    }
11295    for (const style of targetDocument.head.querySelectorAll(
11296      `style[$STYLE_HASH_ATTRIBUTE20}]`
11297    )) {
11298      if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) {
11299        return true;
11300      }
11301    }
11302    return false;
11303  }
11304  function injectStyle20(targetDocument, hash, css) {
11305    if (!targetDocument.head) {
11306      return;
11307    }
11308    const runtime = getRuntime20();
11309    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11310    if (!injectedStyles) {
11311      injectedStyles = /* @__PURE__ */ new Set();
11312      runtime.injectedStyles.set(targetDocument, injectedStyles);
11313    }
11314    if (injectedStyles.has(hash)) {
11315      return;
11316    }
11317    if (documentContainsStyleHash20(targetDocument, hash)) {
11318      injectedStyles.add(hash);
11319      return;
11320    }
11321    const style = targetDocument.createElement("style");
11322    style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash);
11323    style.appendChild(targetDocument.createTextNode(css));
11324    targetDocument.head.appendChild(style);
11325    injectedStyles.add(hash);
11326  }
11327  function registerDocument20(targetDocument) {
11328    const runtime = getRuntime20();
11329    runtime.documents.set(
11330      targetDocument,
11331      (runtime.documents.get(targetDocument) ?? 0) + 1
11332    );
11333    for (const [hash, css] of runtime.styles) {
11334      injectStyle20(targetDocument, hash, css);
11335    }
11336    return () => {
11337      const count = runtime.documents.get(targetDocument);
11338      if (count === void 0) {
11339        return;
11340      }
11341      if (count <= 1) {
11342        runtime.documents.delete(targetDocument);
11343        return;
11344      }
11345      runtime.documents.set(targetDocument, count - 1);
11346    };
11347  }
11348  function registerStyle20(hash, css) {
11349    const runtime = getRuntime20();
11350    runtime.styles.set(hash, css);
11351    for (const targetDocument of runtime.documents.keys()) {
11352      injectStyle20(targetDocument, hash, css);
11353    }
11354  }
11355  if (typeof process === "undefined" || true) {
11356    registerStyle20("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-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:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;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:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{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-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.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)}}");
11357  }
11358  var style_default19 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
11359  function Header({
11360    headingLevel = 1,
11361    breadcrumbs,
11362    badges,
11363    visual,
11364    title,
11365    subTitle,
11366    actions,
11367    navigation,
11368    components,
11369    showSidebarToggle = true
11370  }) {
11371    const HeadingTag = `h$headingLevel}`;
11372    const hasNavigation = !!navigation?.items?.length;
11373    return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11374      Stack,
11375      {
11376        direction: "column",
11377        className: clsx_default(
11378          style_default19.header,
11379          hasNavigation && style_default19["has-navigation"]
11380        ),
11381        children: [
11382          /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11383            Stack,
11384            {
11385              className: style_default19["header-content"],
11386              direction: "row",
11387              gap: "sm",
11388              justify: "space-between",
11389              children: [
11390                /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11391                  Stack,
11392                  {
11393                    direction: "row",
11394                    gap: "sm",
11395                    align: "center",
11396                    justify: "start",
11397                    className: style_default19["header-lockup"],
11398                    children: [
11399                      showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11400                        SidebarToggleSlot,
11401                        {
11402                          bubblesVirtually: true,
11403                          className: style_default19["sidebar-toggle-slot"]
11404                        }
11405                      ),
11406                      visual && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11407                        "div",
11408                        {
11409                          className: style_default19["header-visual"],
11410                          "aria-hidden": "true",
11411                          children: visual
11412                        }
11413                      ),
11414                      title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11415                        Text,
11416                        {
11417                          className: style_default19["header-title"],
11418                          render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(HeadingTag, {}),
11419                          variant: "heading-lg",
11420                          children: title
11421                        }
11422                      ),
11423                      breadcrumbs,
11424                      badges
11425                    ]
11426                  }
11427                ),
11428                actions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11429                  Stack,
11430                  {
11431                    align: "center",
11432                    className: style_default19["header-actions"],
11433                    direction: "row",
11434                    gap: "sm",
11435                    children: actions
11436                  }
11437                )
11438              ]
11439            }
11440          ),
11441          subTitle && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11442            Text,
11443            {
11444              render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", {}),
11445              variant: "body-md",
11446              className: style_default19["header-subtitle"],
11447              children: subTitle
11448            }
11449          ),
11450          hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11451            navigation_default,
11452            {
11453              ...navigation,
11454              linkComponent: components?.link,
11455              className: style_default19["header-navigation"]
11456            }
11457          )
11458        ]
11459      }
11460    );
11461  }
11462  
11463  // packages/admin-ui/build-module/page/index.mjs
11464  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
11465  var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash";
11466  function getRuntime21() {
11467    const globalScope = globalThis;
11468    if (globalScope.__wpStyleRuntime) {
11469      return globalScope.__wpStyleRuntime;
11470    }
11471    globalScope.__wpStyleRuntime = {
11472      documents: /* @__PURE__ */ new Map(),
11473      styles: /* @__PURE__ */ new Map(),
11474      injectedStyles: /* @__PURE__ */ new WeakMap()
11475    };
11476    if (typeof document !== "undefined") {
11477      registerDocument21(document);
11478    }
11479    return globalScope.__wpStyleRuntime;
11480  }
11481  function documentContainsStyleHash21(targetDocument, hash) {
11482    if (!targetDocument.head) {
11483      return false;
11484    }
11485    for (const style of targetDocument.head.querySelectorAll(
11486      `style[$STYLE_HASH_ATTRIBUTE21}]`
11487    )) {
11488      if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) {
11489        return true;
11490      }
11491    }
11492    return false;
11493  }
11494  function injectStyle21(targetDocument, hash, css) {
11495    if (!targetDocument.head) {
11496      return;
11497    }
11498    const runtime = getRuntime21();
11499    let injectedStyles = runtime.injectedStyles.get(targetDocument);
11500    if (!injectedStyles) {
11501      injectedStyles = /* @__PURE__ */ new Set();
11502      runtime.injectedStyles.set(targetDocument, injectedStyles);
11503    }
11504    if (injectedStyles.has(hash)) {
11505      return;
11506    }
11507    if (documentContainsStyleHash21(targetDocument, hash)) {
11508      injectedStyles.add(hash);
11509      return;
11510    }
11511    const style = targetDocument.createElement("style");
11512    style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash);
11513    style.appendChild(targetDocument.createTextNode(css));
11514    targetDocument.head.appendChild(style);
11515    injectedStyles.add(hash);
11516  }
11517  function registerDocument21(targetDocument) {
11518    const runtime = getRuntime21();
11519    runtime.documents.set(
11520      targetDocument,
11521      (runtime.documents.get(targetDocument) ?? 0) + 1
11522    );
11523    for (const [hash, css] of runtime.styles) {
11524      injectStyle21(targetDocument, hash, css);
11525    }
11526    return () => {
11527      const count = runtime.documents.get(targetDocument);
11528      if (count === void 0) {
11529        return;
11530      }
11531      if (count <= 1) {
11532        runtime.documents.delete(targetDocument);
11533        return;
11534      }
11535      runtime.documents.set(targetDocument, count - 1);
11536    };
11537  }
11538  function registerStyle21(hash, css) {
11539    const runtime = getRuntime21();
11540    runtime.styles.set(hash, css);
11541    for (const targetDocument of runtime.documents.keys()) {
11542      injectStyle21(targetDocument, hash, css);
11543    }
11544  }
11545  if (typeof process === "undefined" || true) {
11546    registerStyle21("1f3750277d", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-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:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;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:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{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-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.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)}}");
11547  }
11548  var style_default20 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
11549  function Page({
11550    headingLevel,
11551    breadcrumbs,
11552    badges,
11553    visual,
11554    title,
11555    subTitle,
11556    children,
11557    className,
11558    actions,
11559    navigation,
11560    components,
11561    ariaLabel,
11562    hasPadding = false,
11563    showSidebarToggle = true
11564  }) {
11565    const classes = clsx_default(style_default20.page, className);
11566    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
11567    return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
11568      (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11569        Header,
11570        {
11571          headingLevel,
11572          breadcrumbs,
11573          badges,
11574          visual,
11575          title,
11576          subTitle,
11577          actions,
11578          navigation,
11579          components,
11580          showSidebarToggle
11581        }
11582      ),
11583      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11584        "div",
11585        {
11586          className: clsx_default(
11587            style_default20.content,
11588            style_default20["has-padding"]
11589          ),
11590          children
11591        }
11592      ) : children
11593    ] });
11594  }
11595  Page.SidebarToggleFill = SidebarToggleFill;
11596  var page_default = Page;
11597  
11598  // routes/connectors-home/stage.tsx
11599  var import_components4 = __toESM(require_components());
11600  var import_data4 = __toESM(require_data());
11601  var import_element36 = __toESM(require_element());
11602  var import_i18n10 = __toESM(require_i18n());
11603  var import_core_data3 = __toESM(require_core_data());
11604  import {
11605    privateApis as connectorsPrivateApis2
11606  } from "@wordpress/connectors";
11607  
11608  // routes/lock-unlock/index.ts
11609  var import_private_apis2 = __toESM(require_private_apis());
11610  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11611    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11612    "@wordpress/routes"
11613  );
11614  
11615  // routes/connectors-home/style.scss
11616  if (typeof document !== "undefined" && (typeof process === "undefined" || true) && !document.head.querySelector("style[data-wp-hash='87cd95b244']")) {
11617    const style = document.createElement("style");
11618    style.setAttribute("data-wp-hash", "87cd95b244");
11619    style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 92% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 58% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 8% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 42% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page__help-text{color:#2f2f2f}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}"));
11620    document.head.appendChild(style);
11621  }
11622  
11623  // routes/connectors-home/ai-plugin-callout.tsx
11624  var import_components3 = __toESM(require_components());
11625  var import_core_data2 = __toESM(require_core_data());
11626  var import_data3 = __toESM(require_data());
11627  var import_element35 = __toESM(require_element());
11628  var import_i18n9 = __toESM(require_i18n());
11629  var import_notices2 = __toESM(require_notices());
11630  var import_url = __toESM(require_url());
11631  
11632  // routes/connectors-home/default-connectors.tsx
11633  var import_components2 = __toESM(require_components());
11634  var import_element34 = __toESM(require_element());
11635  var import_data2 = __toESM(require_data());
11636  var import_i18n8 = __toESM(require_i18n());
11637  import {
11638    __experimentalRegisterConnector as registerConnector,
11639    __experimentalConnectorItem as ConnectorItem,
11640    __experimentalDefaultConnectorSettings as DefaultConnectorSettings,
11641    __experimentalApplicationPasswordConnectorSettings as ApplicationPasswordConnectorSettings,
11642    privateApis as connectorsPrivateApis
11643  } from "@wordpress/connectors";
11644  
11645  // routes/connectors-home/use-connector-plugin.ts
11646  var import_core_data = __toESM(require_core_data());
11647  var import_data = __toESM(require_data());
11648  var import_element33 = __toESM(require_element());
11649  var import_i18n7 = __toESM(require_i18n());
11650  var import_notices = __toESM(require_notices());
11651  function useConnectorPlugin({
11652    file: pluginFileFromServer,
11653    settingName,
11654    connectorName,
11655    isInstalled,
11656    isActivated,
11657    keySource = "none",
11658    initialIsConnected = false
11659  }) {
11660    const [isExpanded, setIsExpanded] = (0, import_element33.useState)(false);
11661    const [isBusy, setIsBusy] = (0, import_element33.useState)(false);
11662    const [connectedState, setConnectedState] = (0, import_element33.useState)(initialIsConnected);
11663    const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element33.useState)(null);
11664    const pluginBasename = pluginFileFromServer?.replace(/\.php$/, "");
11665    const pluginSlug = pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
11666    const {
11667      derivedPluginStatus,
11668      canManagePlugins,
11669      currentApiKey,
11670      currentUsername,
11671      hasStoredCredentials,
11672      hasResolvedSettings,
11673      canInstallPlugins
11674    } = (0, import_data.useSelect)(
11675      (select2) => {
11676        const store2 = select2(import_core_data.store);
11677        const siteSettings = store2.getEntityRecord("root", "site");
11678        const settingValue = siteSettings?.[settingName];
11679        const apiKey = typeof settingValue === "string" ? settingValue : "";
11680        const credentials = typeof settingValue === "object" && settingValue !== null ? settingValue : void 0;
11681        const credentialsExist = credentials !== void 0 ? !!credentials.username && !!credentials.password : !!apiKey;
11682        const settingsResolved = store2.hasFinishedResolution(
11683          "getEntityRecord",
11684          ["root", "site"]
11685        );
11686        const canCreate = !!store2.canUser("create", {
11687          kind: "root",
11688          name: "plugin"
11689        });
11690        const common = {
11691          currentApiKey: apiKey,
11692          currentUsername: credentials?.username ?? "",
11693          hasStoredCredentials: credentialsExist,
11694          hasResolvedSettings: settingsResolved,
11695          canInstallPlugins: canCreate
11696        };
11697        if (!pluginFileFromServer) {
11698          return {
11699            ...common,
11700            derivedPluginStatus: settingsResolved ? "active" : "checking",
11701            canManagePlugins: void 0
11702          };
11703        }
11704        const plugin = store2.getEntityRecord(
11705          "root",
11706          "plugin",
11707          pluginBasename
11708        );
11709        const hasFinished = store2.hasFinishedResolution(
11710          "getEntityRecord",
11711          ["root", "plugin", pluginBasename]
11712        );
11713        if (!hasFinished) {
11714          return {
11715            ...common,
11716            derivedPluginStatus: "checking",
11717            canManagePlugins: void 0
11718          };
11719        }
11720        if (plugin) {
11721          const isPluginActive = plugin.status === "active" || plugin.status === "network-active";
11722          return {
11723            ...common,
11724            derivedPluginStatus: isPluginActive ? "active" : "inactive",
11725            canManagePlugins: true
11726          };
11727        }
11728        let status = "not-installed";
11729        if (isActivated) {
11730          status = "active";
11731        } else if (isInstalled) {
11732          status = "inactive";
11733        }
11734        return {
11735          ...common,
11736          derivedPluginStatus: status,
11737          canManagePlugins: false
11738        };
11739      },
11740      [
11741        pluginFileFromServer,
11742        pluginBasename,
11743        settingName,
11744        isInstalled,
11745        isActivated
11746      ]
11747    );
11748    const pluginStatus = pluginStatusOverride ?? derivedPluginStatus;
11749    const canActivatePlugins = canManagePlugins;
11750    const isConnected = pluginStatus === "active" && connectedState || // After install/activate, if settings re-fetch reveals stored credentials,
11751    // update connected state (mirrors what the server would report on page load).
11752    pluginStatusOverride === "active" && hasStoredCredentials;
11753    const { saveEntityRecord, invalidateResolution } = (0, import_data.useDispatch)(import_core_data.store);
11754    const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
11755    const saveConnectorSetting = (value) => saveEntityRecord(
11756      "root",
11757      "site",
11758      { [settingName]: value },
11759      { throwOnError: true }
11760    );
11761    const createConnectedNotice = () => {
11762      createSuccessNotice(
11763        (0, import_i18n7.sprintf)(
11764          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11765          (0, import_i18n7.__)("%s connected successfully."),
11766          connectorName
11767        ),
11768        {
11769          id: "connector-connect-success",
11770          type: "snackbar"
11771        }
11772      );
11773    };
11774    const createDisconnectedNotice = () => {
11775      createSuccessNotice(
11776        (0, import_i18n7.sprintf)(
11777          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11778          (0, import_i18n7.__)("%s disconnected."),
11779          connectorName
11780        ),
11781        {
11782          id: "connector-disconnect-success",
11783          type: "snackbar"
11784        }
11785      );
11786    };
11787    const createDisconnectErrorNotice = () => {
11788      createErrorNotice(
11789        (0, import_i18n7.sprintf)(
11790          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11791          (0, import_i18n7.__)("Failed to disconnect %s."),
11792          connectorName
11793        ),
11794        {
11795          id: "connector-disconnect-error",
11796          type: "snackbar"
11797        }
11798      );
11799    };
11800    const installPlugin = async () => {
11801      if (!pluginSlug) {
11802        return;
11803      }
11804      setIsBusy(true);
11805      try {
11806        await saveEntityRecord(
11807          "root",
11808          "plugin",
11809          { slug: pluginSlug, status: "active" },
11810          { throwOnError: true }
11811        );
11812        setPluginStatusOverride("active");
11813        invalidateResolution("getEntityRecord", ["root", "site"]);
11814        setIsExpanded(true);
11815        createSuccessNotice(
11816          (0, import_i18n7.sprintf)(
11817            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11818            (0, import_i18n7.__)("Plugin for %s installed and activated successfully."),
11819            connectorName
11820          ),
11821          {
11822            id: "connector-plugin-install-success",
11823            type: "snackbar"
11824          }
11825        );
11826      } catch {
11827        createErrorNotice(
11828          (0, import_i18n7.sprintf)(
11829            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11830            (0, import_i18n7.__)("Failed to install plugin for %s."),
11831            connectorName
11832          ),
11833          {
11834            id: "connector-plugin-install-error",
11835            type: "snackbar"
11836          }
11837        );
11838      } finally {
11839        setIsBusy(false);
11840      }
11841    };
11842    const activatePlugin = async () => {
11843      if (!pluginFileFromServer) {
11844        return;
11845      }
11846      setIsBusy(true);
11847      try {
11848        await saveEntityRecord(
11849          "root",
11850          "plugin",
11851          {
11852            plugin: pluginBasename,
11853            status: "active"
11854          },
11855          { throwOnError: true }
11856        );
11857        setPluginStatusOverride("active");
11858        invalidateResolution("getEntityRecord", ["root", "site"]);
11859        setIsExpanded(true);
11860        createSuccessNotice(
11861          (0, import_i18n7.sprintf)(
11862            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11863            (0, import_i18n7.__)("Plugin for %s activated successfully."),
11864            connectorName
11865          ),
11866          {
11867            id: "connector-plugin-activate-success",
11868            type: "snackbar"
11869          }
11870        );
11871      } catch {
11872        createErrorNotice(
11873          (0, import_i18n7.sprintf)(
11874            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11875            (0, import_i18n7.__)("Failed to activate plugin for %s."),
11876            connectorName
11877          ),
11878          {
11879            id: "connector-plugin-activate-error",
11880            type: "snackbar"
11881          }
11882        );
11883      } finally {
11884        setIsBusy(false);
11885      }
11886    };
11887    const handleButtonClick = () => {
11888      if (pluginStatus === "not-installed") {
11889        if (canInstallPlugins === false) {
11890          return;
11891        }
11892        installPlugin();
11893      } else if (pluginStatus === "inactive") {
11894        if (canActivatePlugins === false) {
11895          return;
11896        }
11897        activatePlugin();
11898      } else {
11899        setIsExpanded(!isExpanded);
11900      }
11901    };
11902    const getButtonLabel = () => {
11903      if (isBusy) {
11904        return pluginStatus === "not-installed" ? (0, import_i18n7.__)("Installing\u2026") : (0, import_i18n7.__)("Activating\u2026");
11905      }
11906      if (isExpanded) {
11907        return (0, import_i18n7.__)("Cancel");
11908      }
11909      if (isConnected) {
11910        return (0, import_i18n7.__)("Edit");
11911      }
11912      switch (pluginStatus) {
11913        case "checking":
11914          return (0, import_i18n7.__)("Checking\u2026");
11915        case "not-installed":
11916          return (0, import_i18n7.__)("Install");
11917        case "inactive":
11918          return (0, import_i18n7.__)("Activate");
11919        case "active":
11920          return (0, import_i18n7.__)("Set up");
11921      }
11922    };
11923    const saveApiKey = async (apiKey) => {
11924      const previousApiKey = currentApiKey;
11925      try {
11926        const updatedRecord = await saveConnectorSetting(apiKey);
11927        const record = updatedRecord;
11928        const returnedKey = record?.[settingName];
11929        if (apiKey && (returnedKey === previousApiKey || !returnedKey)) {
11930          throw new Error(
11931            "It was not possible to connect to the provider using this key."
11932          );
11933        }
11934        setConnectedState(true);
11935        createConnectedNotice();
11936      } catch (error2) {
11937        console.error("Failed to save API key:", error2);
11938        throw error2;
11939      }
11940    };
11941    const saveCredentials = async ({
11942      username,
11943      applicationPassword
11944    }) => {
11945      try {
11946        const updatedRecord = await saveConnectorSetting({
11947          username,
11948          password: applicationPassword
11949        });
11950        const record = updatedRecord;
11951        const credentials = record?.[settingName];
11952        if (!credentials?.username || !credentials?.password) {
11953          throw new Error(
11954            (0, import_i18n7.__)("It was not possible to save these credentials.")
11955          );
11956        }
11957        setConnectedState(true);
11958        createConnectedNotice();
11959      } catch (error2) {
11960        console.error("Failed to save credentials:", error2);
11961        throw error2;
11962      }
11963    };
11964    const removeApiKey = async () => {
11965      try {
11966        await saveConnectorSetting("");
11967        setConnectedState(false);
11968        createDisconnectedNotice();
11969      } catch (error2) {
11970        console.error("Failed to remove API key:", error2);
11971        createDisconnectErrorNotice();
11972      }
11973    };
11974    const removeCredentials = async () => {
11975      try {
11976        await saveConnectorSetting({
11977          username: "",
11978          password: ""
11979        });
11980        setConnectedState(false);
11981        createDisconnectedNotice();
11982      } catch (error2) {
11983        console.error("Failed to remove credentials:", error2);
11984        createDisconnectErrorNotice();
11985      }
11986    };
11987    return {
11988      pluginStatus,
11989      canInstallPlugins,
11990      canActivatePlugins,
11991      isExpanded,
11992      setIsExpanded,
11993      isBusy,
11994      isConnected,
11995      currentApiKey,
11996      currentUsername,
11997      hasResolvedSettings,
11998      keySource,
11999      handleButtonClick,
12000      getButtonLabel,
12001      saveApiKey,
12002      removeApiKey,
12003      saveCredentials,
12004      removeCredentials
12005    };
12006  }
12007  
12008  // routes/connectors-home/logos.tsx
12009  var import_jsx_runtime40 = __toESM(require_jsx_runtime());
12010  var OpenAILogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12011    "svg",
12012    {
12013      width: "40",
12014      height: "40",
12015      viewBox: "0 0 24 24",
12016      fill: "none",
12017      xmlns: "http://www.w3.org/2000/svg",
12018      "aria-hidden": "true",
12019      children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12020        "path",
12021        {
12022          d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",
12023          fill: "currentColor"
12024        }
12025      )
12026    }
12027  );
12028  var ClaudeLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12029    "svg",
12030    {
12031      width: "40",
12032      height: "40",
12033      viewBox: "0 0 32 32",
12034      fill: "none",
12035      xmlns: "http://www.w3.org/2000/svg",
12036      "aria-hidden": "true",
12037      children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12038        "path",
12039        {
12040          d: "M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",
12041          fill: "#D97757"
12042        }
12043      )
12044    }
12045  );
12046  var DefaultConnectorLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12047    "svg",
12048    {
12049      width: "40",
12050      height: "40",
12051      viewBox: "0 0 32 32",
12052      fill: "none",
12053      xmlns: "http://www.w3.org/2000/svg",
12054      "aria-hidden": "true",
12055      children: [
12056        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12057          "path",
12058          {
12059            d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",
12060            fill: "#F0F0F0"
12061          }
12062        ),
12063        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12064          "path",
12065          {
12066            d: "M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",
12067            fill: "#949494"
12068          }
12069        )
12070      ]
12071    }
12072  );
12073  var AkismetLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12074    "svg",
12075    {
12076      width: "40",
12077      height: "40",
12078      viewBox: "0 0 44 44",
12079      fill: "none",
12080      xmlns: "http://www.w3.org/2000/svg",
12081      "aria-hidden": "true",
12082      children: [
12083        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("rect", { width: "44", height: "44", fill: "#357B49", rx: "6" }),
12084        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12085          "path",
12086          {
12087            fill: "#fff",
12088            fillRule: "evenodd",
12089            d: "m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",
12090            clipRule: "evenodd"
12091          }
12092        )
12093      ]
12094    }
12095  );
12096  var GeminiLogo = () => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12097    "svg",
12098    {
12099      width: "40",
12100      height: "40",
12101      style: { flex: "none", lineHeight: 1 },
12102      viewBox: "0 0 24 24",
12103      xmlns: "http://www.w3.org/2000/svg",
12104      "aria-hidden": "true",
12105      children: [
12106        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12107          "path",
12108          {
12109            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
12110            fill: "#3186FF"
12111          }
12112        ),
12113        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12114          "path",
12115          {
12116            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
12117            fill: "url(#lobe-icons-gemini-fill-0)"
12118          }
12119        ),
12120        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12121          "path",
12122          {
12123            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
12124            fill: "url(#lobe-icons-gemini-fill-1)"
12125          }
12126        ),
12127        /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12128          "path",
12129          {
12130            d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
12131            fill: "url(#lobe-icons-gemini-fill-2)"
12132          }
12133        ),
12134        /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("defs", { children: [
12135          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12136            "linearGradient",
12137            {
12138              gradientUnits: "userSpaceOnUse",
12139              id: "lobe-icons-gemini-fill-0",
12140              x1: "7",
12141              x2: "11",
12142              y1: "15.5",
12143              y2: "12",
12144              children: [
12145                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#08B962" }),
12146                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: "1", stopColor: "#08B962", stopOpacity: "0" })
12147              ]
12148            }
12149          ),
12150          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12151            "linearGradient",
12152            {
12153              gradientUnits: "userSpaceOnUse",
12154              id: "lobe-icons-gemini-fill-1",
12155              x1: "8",
12156              x2: "11.5",
12157              y1: "5.5",
12158              y2: "11",
12159              children: [
12160                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#F94543" }),
12161                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: "1", stopColor: "#F94543", stopOpacity: "0" })
12162              ]
12163            }
12164          ),
12165          /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12166            "linearGradient",
12167            {
12168              gradientUnits: "userSpaceOnUse",
12169              id: "lobe-icons-gemini-fill-2",
12170              x1: "3.5",
12171              x2: "17.5",
12172              y1: "13.5",
12173              y2: "12",
12174              children: [
12175                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { stopColor: "#FABC12" }),
12176                /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("stop", { offset: ".46", stopColor: "#FABC12", stopOpacity: "0" })
12177              ]
12178            }
12179          )
12180        ] })
12181      ]
12182    }
12183  );
12184  
12185  // routes/connectors-home/default-connectors.tsx
12186  var import_jsx_runtime41 = __toESM(require_jsx_runtime());
12187  var { store: connectorsStore } = unlock2(connectorsPrivateApis);
12188  function getConnectorScriptModuleData() {
12189    try {
12190      return JSON.parse(
12191        document.getElementById(
12192          "wp-script-module-data-options-connectors-wp-admin"
12193        )?.textContent ?? "{}"
12194      );
12195    } catch {
12196      return {};
12197    }
12198  }
12199  function getConnectorData() {
12200    return getConnectorScriptModuleData().connectors ?? {};
12201  }
12202  function getIsFileModDisabled() {
12203    return !!getConnectorScriptModuleData().isFileModDisabled;
12204  }
12205  var CONNECTOR_LOGOS = {
12206    google: GeminiLogo,
12207    openai: OpenAILogo,
12208    anthropic: ClaudeLogo,
12209    akismet: AkismetLogo
12210  };
12211  function getConnectorLogo(connectorId, logoUrl) {
12212    if (logoUrl) {
12213      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { src: logoUrl, alt: "", width: 40, height: 40 });
12214    }
12215    const Logo = CONNECTOR_LOGOS[connectorId];
12216    if (Logo) {
12217      return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Logo, {});
12218    }
12219    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DefaultConnectorLogo, {});
12220  }
12221  var ConnectedBadge = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12222    "span",
12223    {
12224      style: {
12225        color: "#345b37",
12226        backgroundColor: "#eff8f0",
12227        padding: "4px 12px",
12228        borderRadius: "2px",
12229        fontSize: "13px",
12230        fontWeight: "var(--wpds-typography-font-weight-emphasis)",
12231        whiteSpace: "nowrap"
12232      },
12233      children: (0, import_i18n8.__)("Connected")
12234    }
12235  );
12236  var PluginDirectoryLink = ({ slug }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12237    Link,
12238    {
12239      href: (0, import_i18n8.sprintf)(
12240        /* translators: %s: plugin slug. */
12241        (0, import_i18n8.__)("https://wordpress.org/plugins/%s/"),
12242        slug
12243      ),
12244      openInNewTab: true,
12245      children: (0, import_i18n8.__)("Learn more")
12246    }
12247  );
12248  var UnavailableActionBadge = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Badge, { children: (0, import_i18n8.__)("Not available") });
12249  function ConnectorActionArea({
12250    isConnected,
12251    showUnavailableBadge,
12252    pluginSlug,
12253    isExpanded,
12254    isBusy,
12255    pluginStatus,
12256    actionButtonRef,
12257    handleButtonClick,
12258    getButtonLabel
12259  }) {
12260    return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_components2.__experimentalHStack, { spacing: 3, expanded: false, children: [
12261      isConnected && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ConnectedBadge, {}),
12262      showUnavailableBadge && (pluginSlug ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PluginDirectoryLink, { slug: pluginSlug }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UnavailableActionBadge, {})),
12263      !showUnavailableBadge && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12264        import_components2.Button,
12265        {
12266          ref: actionButtonRef,
12267          variant: isExpanded || isConnected ? "tertiary" : "secondary",
12268          size: "compact",
12269          onClick: handleButtonClick,
12270          disabled: pluginStatus === "checking" || isBusy,
12271          isBusy,
12272          accessibleWhenDisabled: true,
12273          children: getButtonLabel()
12274        }
12275      )
12276    ] });
12277  }
12278  function getPluginSlug(pluginFile) {
12279    const pluginBasename = pluginFile?.replace(/\.php$/, "");
12280    return pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
12281  }
12282  function ApiKeyConnector({
12283    name,
12284    description,
12285    logo,
12286    authentication,
12287    plugin
12288  }) {
12289    const auth = authentication?.method === "api_key" ? authentication : void 0;
12290    const settingName = auth?.settingName ?? "";
12291    const helpUrl = auth?.credentialsUrl ?? void 0;
12292    const pluginSlug = getPluginSlug(plugin?.file);
12293    const {
12294      pluginStatus,
12295      canInstallPlugins,
12296      canActivatePlugins,
12297      isExpanded,
12298      setIsExpanded,
12299      isBusy,
12300      isConnected,
12301      currentApiKey,
12302      hasResolvedSettings,
12303      keySource,
12304      handleButtonClick,
12305      getButtonLabel,
12306      saveApiKey,
12307      removeApiKey
12308    } = useConnectorPlugin({
12309      file: plugin?.file,
12310      settingName,
12311      connectorName: name,
12312      isInstalled: plugin?.isInstalled,
12313      isActivated: plugin?.isActivated,
12314      keySource: auth?.keySource,
12315      initialIsConnected: auth?.isConnected
12316    });
12317    const isExternallyConfigured = keySource === "env" || keySource === "constant";
12318    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
12319    const actionButtonRef = (0, import_element34.useRef)(null);
12320    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12321      ConnectorItem,
12322      {
12323        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
12324        logo,
12325        name,
12326        description,
12327        actionArea: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12328          ConnectorActionArea,
12329          {
12330            isConnected,
12331            showUnavailableBadge,
12332            pluginSlug,
12333            isExpanded,
12334            isBusy,
12335            pluginStatus,
12336            actionButtonRef,
12337            handleButtonClick,
12338            getButtonLabel
12339          }
12340        ),
12341        children: isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12342          DefaultConnectorSettings,
12343          {
12344            initialValue: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentApiKey,
12345            helpUrl,
12346            readOnly: isConnected || isExternallyConfigured,
12347            keySource,
12348            onRemove: isExternallyConfigured ? void 0 : async () => {
12349              await removeApiKey();
12350              actionButtonRef.current?.focus();
12351            },
12352            onSave: async (apiKey) => {
12353              await saveApiKey(apiKey);
12354              setIsExpanded(false);
12355              actionButtonRef.current?.focus();
12356            }
12357          },
12358          isConnected ? "connected" : "setup"
12359        )
12360      }
12361    );
12362  }
12363  function ApplicationPasswordConnector({
12364    name,
12365    description,
12366    logo,
12367    authentication,
12368    plugin
12369  }) {
12370    const auth = authentication?.method === "application_password" ? authentication : void 0;
12371    const settingName = auth?.settingName ?? "";
12372    const helpUrl = auth?.credentialsUrl ?? void 0;
12373    const pluginSlug = getPluginSlug(plugin?.file);
12374    const {
12375      pluginStatus,
12376      canInstallPlugins,
12377      canActivatePlugins,
12378      isExpanded,
12379      setIsExpanded,
12380      isBusy,
12381      isConnected,
12382      currentUsername,
12383      hasResolvedSettings,
12384      keySource,
12385      handleButtonClick,
12386      getButtonLabel,
12387      saveCredentials,
12388      removeCredentials
12389    } = useConnectorPlugin({
12390      file: plugin?.file,
12391      settingName,
12392      connectorName: name,
12393      isInstalled: plugin?.isInstalled,
12394      isActivated: plugin?.isActivated,
12395      keySource: auth?.keySource,
12396      initialIsConnected: auth?.isConnected
12397    });
12398    const isExternallyConfigured = keySource === "env" || keySource === "constant";
12399    const actionButtonRef = (0, import_element34.useRef)(null);
12400    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
12401    return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12402      ConnectorItem,
12403      {
12404        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
12405        logo,
12406        name,
12407        description,
12408        actionArea: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12409          ConnectorActionArea,
12410          {
12411            isConnected,
12412            showUnavailableBadge,
12413            pluginSlug,
12414            isExpanded,
12415            isBusy,
12416            pluginStatus,
12417            actionButtonRef,
12418            handleButtonClick,
12419            getButtonLabel
12420          }
12421        ),
12422        children: isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12423          ApplicationPasswordConnectorSettings,
12424          {
12425            initialUsername: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentUsername,
12426            helpUrl,
12427            readOnly: isConnected || isExternallyConfigured,
12428            keySource,
12429            onRemove: isExternallyConfigured ? void 0 : async () => {
12430              await removeCredentials();
12431              actionButtonRef.current?.focus();
12432            },
12433            onSave: async (credentials) => {
12434              await saveCredentials(credentials);
12435              setIsExpanded(false);
12436              actionButtonRef.current?.focus();
12437            }
12438          },
12439          isConnected ? "connected" : "setup"
12440        )
12441      }
12442    );
12443  }
12444  function registerDefaultConnectors() {
12445    const connectors = getConnectorData();
12446    const sanitize = (s) => s.replace(/[^a-z0-9-_]/gi, "-");
12447    for (const [connectorId, data] of Object.entries(connectors)) {
12448      if (connectorId === "akismet" && !data.plugin?.isInstalled) {
12449        continue;
12450      }
12451      const { authentication } = data;
12452      const connectorName = sanitize(connectorId);
12453      const args = {
12454        name: data.name,
12455        description: data.description,
12456        type: data.type,
12457        logo: getConnectorLogo(connectorId, data.logoUrl),
12458        authentication,
12459        plugin: data.plugin
12460      };
12461      const existing = unlock2((0, import_data2.select)(connectorsStore)).getConnector(
12462        connectorName
12463      );
12464      if (authentication.method === "api_key" && !existing?.render) {
12465        args.render = ApiKeyConnector;
12466      } else if (authentication.method === "application_password" && !existing?.render) {
12467        args.render = ApplicationPasswordConnector;
12468      }
12469      registerConnector(connectorName, args);
12470    }
12471  }
12472  
12473  // routes/connectors-home/wp-logo-decoration.tsx
12474  var import_jsx_runtime42 = __toESM(require_jsx_runtime());
12475  function WpLogoDecoration() {
12476    return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "ai-plugin-callout__decoration", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12477      "svg",
12478      {
12479        viewBox: "0 0 248 248",
12480        xmlns: "http://www.w3.org/2000/svg",
12481        xmlnsXlink: "http://www.w3.org/1999/xlink",
12482        focusable: "false",
12483        style: { width: "100%", height: "100%" },
12484        children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12485          "image",
12486          {
12487            href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHdrbQz8VRgKnDrCkzDunVFZ76pwFTgbhWYhnW30s7EU4GpwK0rMA3r1hW9fr6ZYSowFfiiAtOwvijMyFOBqcDzVWAa1vM9k9nRVGAq8EUFpmF9UZiRpwKPqMCs8bMKTMP6Wb0meyowFfjFCkzD+sXiz9JTganAzyowDetn9ZrsqcBU4Bcr8NIN6xfrNktPBaYCv1CBaVi/UPRZciowFbisAtOwLqvbjJoKTAV+oQLTsH6h6LPkBRWYIVOBQwWmYR2KMF9TganAa1RgGtZrPKfZ5VRgKnCowDSsQxHmayowFXimCny9l2lYX9dmIlOBqcCTVWAa1pM9kNnOVGAq8HUFpmF9XZuJTAWmAk9WgWlYT/ZArt/OzDAV2G8FpmHt99nOyaYCu6vANKzdPdK7HOjfDrP+9yf4B/fP138efoeDma+pwP0rMA3r/jXewwqaVFjP8x8HAmIHd74eXIG3W24a1ts98pse+H8Os8HBzNdU4P4VmIZ1/xrvYQU/9v3L4SCwNqh/P2iwagdpvqYC96nANKz71HVmnQpMBe5QgXduWHco526n9B3W9tJ91fi7Pfwc7HkqMA3reZ7FM+/kXw+bc7EeDvTPV1z8jzC/TQXuWYFpWPes7sw9FZgK3LQC07BuWs7dTva/h5P91ye6YGfT2EP4eb9mZ/uowDSsfTzHe5/CHVXQqKzHbjX6YCpwtwpMw7pbaX808f8dsoN7oQOdr6nAVGBbgWlY24o8hvvEzXcnp1YTl3cq51ExTdRe7GldE6ev2vhTgbtV4KyGdbfV33diDeC7T9bE5T1LlezFntb94PRVG38qcLcKTMO6W2lPTuy/GPdfiJfED+6G6Lg8/m/Dnuxne7lOe5Y9/naNZv0HVGAa1gOKfMYSGkI4I/1XUp59f79SlFn0sRWYhvXYereaex/3PyunQT9iiePlPMbOKlOBJ67ANKzfeTiakvufVsdDmjgtPnYq8PYVmIb1Oy8B9z7uf06tLi7vVM7EpgJvVYFpWM/xuF1mB3dFz7Gr2cXOK/B6x5uG9RzPzH1VeI4dzS6mAk9YgWlYT/hQZktTganA8QpMwzpel1GnAlOBJ6zANKyLH8oMnApMBR5dgWlYj674rDcVmApcXIFpWBeXbgZOBaYCj67ANKxHV3zWe8UKzJ6fpALTsJ7kQcw2pgJTge8rMA3r+xpNxlRgKvAkFZiG9SQPYrYxFZgKfF+BRzSs73cxGVOBqcBU4IwKTMM6o0iTMhWYCjxHBaZhPcdzmF1MBaYCZ1RgGtYZRXrSFP9Wln/gD/htEwd/mTqNT4Nyj2ny+7/3sDgYh4NxNBYHcdrH4Tc8HOifL/E044hsmjgN0tj2Ko6DcfLE8EADcfmAg1w64IMXrcA0rNd5cN6Y3njrjnE4pvkHANP58iCNxQO+B3x11v84HA6c9+DO1ytWYBrW6zw1/6Df/FtZlz8vtYPLZ5iRv16BaVi//gjO3sD2zYb7F0mB30Q4aHBpfBqU68cjHPjl4iHNPy5oDljH4yBeLh7SxNN+Mr7cY+PFmpNtLf52/2suv9yx11TgF8ZOw/qFor/gkt7kKzrCJZox9xzf3GN3WIFpWK/xUN27hHbsuyIXyyBGZ/FAgzgrh7aO59PE5AQaiKfJ2WriNCiPPZabxsqBa8ebw9rAD9agmX+r0QcvVoFpWK/xwLzxvOFcGq87pof0OHtKE5MDLqpxwAMO4mksDfggjgMecBBPY2lsEKdBGouDOB5oEGdx4Ac8pLFpY1+sAtOwfuuBXb+uN/H1s9x2hm0zWH/8u+1KM9tbVmAa1ms8dj/SuEh2odyOXUSHtTGksadyjZETjuWm/e/BKc+4A/1g09iPw69j2kH+OHe8XHMF89GOjaeXx+LAD41nt5rcwYtVYBrWiz2wZbvehBoZ8IVYPNAgzuKw5vK32prLD8dy08xRHosDP5TLbrVtLg7lscbRWDzQIM7isObyaYMXrMA0rBd8aN9s2Y9lodQ4m/ZK1r7Duu80Np0f0n7ZzvK3qsA0rFtV8vHzeFP6r9+Bbwesy/lAgzgrh8YaC+t3I3SclRdoEGflbDU6TYwfaBBn5Ww1fN2nPB820ECcZiweaLDmyqGBcSunDV6sAtOwXuyBPWC73tTe9NulaNuLfhqsuY1nV13eOeONMRb4t4Q93HK+mevBFZiG9eCC33i5ay+S3efAui3fibjc3+o06625OH3VjKOZZ9V9aCB/1XC5q2YczTyrfq7vgt5YWMc076qN/2IVeIGG9WIVfdx2vSG9CaFVaRpDSI+zcuisxgDrHMXYFfLhO018m0eDrY6D2AoapNmjvUN7FcdDueLyQU762B1UYBrWDh7iHGEq8C4VmIa1vyfdJbTvNDqdi/Ww3g3JgfKe1TpT+2+/zpHGtne6HEgbu5MKTMPayYNcjuENC9sL7iXl765LaPi78MvOLZZ3dmc65/y3WG/meGAFpmE9sNhPuJQ7HhffT7i1i7fkTODy/eJJZuBzVmAa1nM+l2t21SW0S+fm4Qdv5lV/hR+dNNXt/p0jje1M6a9wrvY89swKTMM6s1AvnuZNHF7xKO092xnibNrYF6nAJduchnVJ1Z57jO8sQjt1aR3c8aS/inWe7f6dI43tLPSQNnYnFZiGtZMHuRzDhTOsl869gdkl9cOna7Bqz+g7i72H9hhnV00DU4O0sTupwDSsnTzIOcZU4B0qMA3rRZ/yiW27gAYX1aXxw3rf0wV9ec9qfeJ3bP9pbHv346NzqUHa2J1UYBrWTh7kcgwNKSR7E4e0V7LtnXU2e2fxQBvsvALTsHb+gD+P544nfEovZdo7u24cD6s+/k4rMA1rfw/WJTq4eO50/OANvtXjz2pdoLd/31HZp3OksTQQx1n89TEn+HsFpmH9vRRv6XjTw94O70w+Wdzbud7+PNOw9vcScLcDLqq/O52Lafgu75Xizu5M60X8K+1/9nqiAtOwThTnRUPerLD+SORTs+AN3dH4EH9W6zztv3PZdxrb3ukhbexOKrD/hrWTBzXHmApMBT4+pmHt71Xgwhn6TsQJXcIH9zs04AP/meE87b9z2Xca2/7pciBt7E4qMA1rJw9yOYY3LJxz6awRwDL85V1n96niOed/+cO+2wGmYb3bE//reXd21/PncJ3pnA8d/gyY316nAtOwXudZnbvTfzkkgovqg/vnix+8of+Ih9/SDu5Tf/nEr722fzaN7QDp8yNhFdmRnYa1o4d54ijexOFE2tOG2nu2jcbZtLE7rsA0rP09XN9ZhE7nniq440l/Fes82/07Rxr7KmeZfV5RgaVhXTHLDH2mCrhwhvXS2Zs7rHutEazaM/rO0v7Z9sgPac7kU8NpYlVkR3Ya1o4e5hzlLxWYS/e/lGMfZBrWPp7jeoouqNl0fljve3w3sl5Yl/9sVvM5tv80tj07kw8d2LSxO6nANKydPMjlGN6omhIk0wLt1dDe2c7F4uHVzjT7vaAC07AuKNoLDumeh33B7X/Yd/hYfqWxizzuXiswDWt/T9aFM6yXzvywvrnTnr0KPkRor76jsl/nSGNpII6z+GBHFZiGtaOHecFRvOnhgqFPPcSZfLL41Jt81Ob2tM40rD09zb+dxd0OuKj+m/L17y7c4euM14v4zsqZ1ov41zvF7PhoBaZhHS3LS4verOCN20F8ahY0s3Q+xJ/VOk/771z2ncauexeDVRt/BxWYhrWDhzhHmAq8SwWmYX3zpF8w7MIZ+k7EEVzCB/c7NOAD/5nhPO2/c9l3Gtv+6XIgbexOKjANaycPcjmGNyycc+msEcAy/OVdZ/ep4jnnf/nDvtsBpmG92xP/63nd88Bf1ddmzgPnfOjw2id9w91Pw9rfQ3cBDS6qOx0/eDNv9fizWp/4bffvHGlse0//+Y+EzTD2aSswDetpH81NN+ZNHG468YMma+/Zlo2zaWN3XIFpWPt7uL6zCJ0uzrrjSX+Utaa1gW9dFg+0r7Dm8strLJs2dscVmIa1v4frwhnWS2c8rCf26Rqs2j381mZrOCwO617pPghg24uckM6mseVqXs5kjrSxO6nA7RrWTgoyx3iaCmhIT7OZ2chzVGAa1nM8h1vuwgV1aN44u973uJyH8u5lfWJnbWh9Fg+tTXeJ7jultGPjxRrL4mCcM5kDH+yoAtOwdvQwP4/iDQve+J/SBx4+fuFXa7Pti8WBf2pbckK5bBp7avzEdlKBaVg7eZDfHMOPV+Gb1HPCP85pbbbB/BXpx+xXeV/px+YYbQcVmIa1g4e4OYILZ1gvnfnBm7wh8mDVil1jfcezzulSvPXFzC2eJk4DcTqLgzgN0tfxdHkgjrP4YEcVmIa1o4f5w6N4w/9wyFnp5tVgzkr+Iskc6yeHX6R9KV87/suJJ/C7FZiG9bv1v8fq7nbARfWp+eW4rIZTeT+NmdeFN/vTsfKNsyfAf4prx/90vb3nP9X5pmE91eO4yWY0C1h/JPKpWfCGbiE5sGrFrrHb+eyn9a1nbjZNnAbGirE4iJcrRhNPY2lAl8Pigx1VYBrWjh7mHGUqsPcKTMPa3xN24Qy+y+h0LtaD+x06Kwfwe8Ia9gTWtRaLgzjtK8hpoPtu7gAAEABJREFU/+Uan8Y2li4H0sbupALTsO77IH9jdm9YOOfS2uU4yL/3Xq0B6zo4nLPXddwp33zOdMs5T603sQdWYBrWA4s9Sz2kAu6u4LsPHR6ymVnkthWYhnXbej7DbC6gwUV1++EHb2Y6Kw/4tHvBj2fWgdZi29N3nwiKl2ucfbJpLA3SrYkPdlSBaVg7epgnjuJNHE6kPTzUnthTi4uvKPeYVuzhdha8fwWmYd2/xo9ewR0OrN9h8INYe+JD/FmtPR7bfxr7rHuffd2wAtOwbljMJ5nKJ2qwXjq7hA5tUxOQB/z0Z7TtnW2vLB7at+blU0PnShu7kwpMw9rJg5xjTAXeoQJP07DeodgPOqML6tCSx+56aC6rgV/uM1qf+NkjrPvDQ7rvsJxJDdLG7qQC07B28iCXY3jDgjdysjdwWHU+lPes1nnaP98+7TuNpQUxiI/dSQWmYe3kQX5zDPc94ZvUpwy3d3bdIB5WffydVmAa1v4erAtnWC+d+cEb3KlZecCnPQY/X8XFevvvOyx7TmObVRxn08bupALTsHbyIOcYf6mAZrZ+SvqX4JDXrcA0rNd9dl/t3N0NuKj+Kocux8U04HvBXs+1l+dz1TmmYV1Vvqcc7AIa1h+J/JWY4A3dxuXAqhV7Jus87d9+7c2e01ga0OWw+OBXK3Dbxadh3baeM9tUYCpwxwpMw7pjcR8wtbsaaCm+S/SQHmflpL+K9R2Ti3Ro/6zzhM4iJ8hJH7uDCkzDeu2H2Bvz0lNoBHDp+EeO03zCqXXLYU/lTewFKzAN66kf2rebc08D3yZ+kaBZXTP+i2lHngrcpwLTsO5T10fN6jIaWk/zwUN6nJWTzm457dmgsdo7tF8WD+05zspJH7uDCkzD2sFD3BzBmzQUirNpr2btPbT3OHtKKzb2xSswDet1H6A7Gt95AL+T4CFNPKTtwXZOtvPwgzNv9VUr9gx29nBGBaZhnVGkJ03xxvNXVoBvmyweaEC/9oLePM8EZ+qc63/Vnsa2Xw0MB+PSx75YBaZhvdgDm+1OBd65AtOwXvfpu7cJ6ynS2HTfYbiEhrQ9WH+tKHQe515Bx8vj0wYvWIG9NKwXLP3VW/bG04BAQzLhqtFpQQzir26dxbmB33mcO6SJywN++tgXq8A0rBd7YMt23cWERf5IYz/u+Mv8K1rqmFbsEfbY+se0R+xl1rhxBaZh3bigd5rOhfn2r6B4E9LBdw6WXjU67RZo3tYxZ5p1XGbTAA84GNf+jaMBH/iXwFhzs41vbTadxUF+uXScTRv7xBWYhvXED+fJtuZNvX4ad4vtmVMT+dFcS7Lxa7NcQme5144/a5FJul0FpmHdrpb3nMm/beXuBe65zqm5u7Q+lXMqZu+w5vjuZv2nYdbYOb753Fex5+Rvc6x/zfjtfMPvXIFpWHcu8I2m743lzdWUNG924NO9cfFAuwXMaw22+fDWWfeVxq65cmCdo/il1lywjrduKLbulb/ml7Nq4z9pBaZhPemDmW1NBaYCHx8fmyJMw9oU5AmoexXfBbBtpwtrNl2O+x9IK/8aay5Y57CGtcG6YiwO4jTAAw7iacbRrEGHNPq1MJc5oblop9Zfcxsz9gkrMA3r+R6KS2Twhv5ud3JCubg3aPyn1nhvYPanY3+abw245WW+ucwJ3+1HTvgud+JPUIFpWE/wEDZb6IJ9I59N3cnA2QM2ica6YGc3oaFTgd+twDSs363/sdV9d+Rymi2OhxqJ+FYr/285sZ9ZY829jtLAtmvJSRMvP41NE8fB/HQWB3HaLWAuc0LzrXu1Lp2VE2iDJ6/ANKwnf0Cf2/PmCp/SH5PG/hHu9Jv5V7TMJZoxp8YXu9SaP6xzpLHp/JA29okrMA3r+R6O7wZCu4uz7lzS+RC/hbVGaD5rpPHpbBpLA37AYc3lbzX5tHvBmtYAfuvgIU08jZ8+9gkqMA3rdx+CNwS0C74L95AeZ9PkuhwHfvq11hqhueJsa7E4uOg+lntMM47OGgvrePqtz2RO6wB/uz6dBvyAvwjeY5vTsH73OXvzwLFd+FHlmH5P7au93HPNY3PbBxyLjfbGFZiG9bsPvx891l1oVODTwnQ8rFoXxmLp11qX1qG57MUakMYP4sf0NPFy0+Ks+Kr7L9XVJu1aa43OxG8+fkizl2O5xcf+YgWmYf1i8Y8s7c1TE1rfsGmsnIbyIX6tNZd1Q/Ph1gY+XS4OaXQ84CCexqd9NV7s1rCWdYFvfrY9sTSQE/DBE1VgGtafh/FUv/lRKLSxOJt2L2uN0Bpx9pj2lX4q15gV5T7SHlv/mPbIPc1aJyowDetEce4c8qf4uX9dxCV08IZqa3yIX2vN1Tps87mExsG+6WuuOA3kBBzE04yjsWniNDA/ncVvAWtVa745WesEGsRZOTTg33JP5hz8sALTsH5YsCdL9yaCJ9vWVdvxiaEzsVdNdOPBmirceNqZ7icVmIb1k2rdNtcdSrh0Zn/iw6Xjn3GcS291YW+5P3PCpXO6iF/vui6dZ8ZdUYFpWFcU78qh3jzeAFDTofmELLREnJWTfmtrbmuE5rfHtPbKpomXm8amieNgHJ3FQZwGdJzFbwHnMifwzclaO9AgzsqhAR/4g1+qwDSsXyr8LDsVmAr8vALTsH5es0tGuJPxHQM0nu9iF8TpLB5oEGfl0G453lzmNLc1Ag3E0+RsNXEalMfiII7DT8Yfy01jzResA3FWDu3Y+mJygjyIs3Jo63g+bfALFfhpw/qFLe5iSZe1sF4k870hQgeNs6c0MTkBhziLAz/gIc1etppYmjge0uPiW00sTRwP6XHxrSaWJo6H9Dh7ShOTE3CIszjwAx7S7CVt7IMrMA3rwQWf5aYCU4HLKzAN6/La/WSky16XuGzj+tSJ1mUui4dy46wcuh9NcEhj8SAP4qwc2jreXmhicgINxNPk0I6Np5fH4nDp+NY6Nl7MGsE6EGfl0Na9prFygjyIs3Jo63h7oQ1+oQLTsH6h6J9LejOs+JQ/ztU+Dr/OzT2Wdxj+cUz/u/bxj1+rxi/CD+dq8s/NPZZ3yXjzGBdwiLM48AMe0ti0sQ+uwDSsxxTcn9DBXYhV2a1GT2Nx4AfjaOxWo6exOPCDcTQ2jaUBP+Cw5vK3mnwa8AMOxqTxaZDG4sAP5bJbbZuLQ3mscTQWBz4N8IBDnC2XxYM8iLP44M4VmIZ15wJ/Tu/CPXxKH3HWG4LO4oEGcRaHNZe/1dZcfpAHxqR1kbxqYvKAH+TQ2LTG09NYOV9p3uRy4KvxxoKc0JxsGisP+AGHNZe/1eTTgB9wMCbtu73KH9ypAtOw7lTYN53WG/tNj/7ix36R7U/DesyDcu+xwqr+6kkaHtLYn2ryjQs4xFkc+MFeaJDG4iCOAw78IL7VitHFV06Ls+I0wAMO4luNnsbiwA84xFk84OFczV7KdQEf0sbesQLTsO5Y3GVqnziFZD8SpfHp3jxpLA34QQ6NTbv3ePOfWkvcnqA8FgdxHPi0Y/unywlyaMak8WliaSwN+EEOjU271XjzmivggztXYBrWnQv8Ob0flcKn9BHPfnz+irOf0gc/fCy/0thkfjiliZXH4sAPOMSzNIizOPADDvEsDeIsDvyAQzxLgziLAz/gIY39qSbfuIBDnMUHd67ANKxbFPgfc3jh9u8u+ZO3iL/mEeTQXeJuNbE0Vh7wgxya+beaWBorD/hBDm0dby80sfJYGojjIId2bDxdTsDh0vGtdWy8WOuw1gF+kENb95rGlsfKA36QQ1vH2wtNrDyWFsTyx96wAtOwbljMmWoq8FkBDUyT+6RjblWBaVi3quQ/5nFfEv6hjvdOFfC3GrwG3unMDznrNKzbltmLtMtdfrN7AYd0eWn9aSyWxp4ab4wc4Mu9dLy9nBovbh1oLRYHceMBDziIpxlHY9PEaZDGOg9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4P/y8fFhLzSxNJa2Qnzl49+gAtOwblDEmWIqMBV4TAWmYV1XZ5er0Cz+JHZ/Afx0PJQvvtXE0thHjbcXa321vrj9gBy5q8angZyAg3jaT8Yfy01jm5O1DvCDHNqx9cXKY+UBP8ihreP5NLHyWBqI4yCHNrhRBaZhXV5IL0Yvyj41aiY6rH+FAw/liaex6fxwShMrj8WBH3CIs3jAwV62Gj1NHA/pcfGtJpYmjof0uPhWE0sTx0N6nD2lickJOMRZHPgBD2n2stXE0sRxSBt7owo8uGHdaNfPM417ivW/fH6enc1OpgI7rMA0rMsfqmblAtaPAM1C669qsOn8IIeu0W01epq5cUhjG8/iwJcHOPxkvHxjgR9wOLZXa5bHygN+wOHS8db4ajy9dVgc+KHx7Fbb5uJQHmscjcUDDeIsDny1B+NogxtVYBrWjQr5OY0XqAYG/E/5Aw8fn7/ibLksDvzP1A88fHz+Ek/jk9mtRk9jcTiWu2prLj/I+Wo8vTwWB364x3hzWwf4AQdrpvG3mhgN+AEHY9L4W02MBuIBH9ywAtOwLi+mOwovVOCbicUDDeKsHBqLA58GeMAhzpbL4sCXB3jAIc6Wy+JBHsRZHNZc/lZbc/kA8sAYHPhbjU4DfjiWm7bNxaGxbLksDnx5gAcc4my5LB7kQZzFYc3lb7U1V2zwgwpMw/pBsTapLtvD+sJMc/nakDT2mHZs/Fe5jTdGDvDpLB5oEGdxWHPb66qtufwg56vx9PJYHPjhHuPNbR3gBxysmcbfamI04AccjEm7Za3MPfhBBaZh/aBYkzoVmAr8bgWmYV1efxfJ27uKOCve7HhIE99qYmksDvyAQ5zFAx7O1ezlVK74qTnFHz3eeu2JxYEfcIizeMDDudotz9qaL28fdYBpWJdX2l2ET4KAbyYvfhzS6HiQQxNP49PE0lga8IMcGpt27/HmP7WWuD1BeSwO4jjwacf2T5cT5NCMSePTxNJYGvCDHBqbdu/x5j+1lrg9DS6owDSsC4r2OcS9xopP+eMSzZiPz1/88Cl9xNmP5RcekuPsKU1MTsAhzuLAX0GDSzRjjAV+wCHO4sBfQYNztZ/kHpvz0vHmMhb4AR9cUIFpWOcVzZ+K/qt2thEuYWnghUgXx0GcBngoV3yriaWxxgI/yKGta6Wx5bHygB/k0Nbx9kITK4+lgTgOcmjHxtPlBBwuHd9ax8aLtQ5rHeAHObR1r2lseaw84Ac5tHW8vdDEymNpII6DHNqx8fTBDyswDeu8gvlkyIuPPW/ED7Im9a0r4B98fOsC/OTw07DOq5aLVvcg7HkjJmsqcF4Fjv3TNOeNfMOsaVjnPXTf0rtIZRuBe7FBOouDeLl40Pjo4mnG0cTSWBrwgxyaMWl8mlgaSwN+kEMzJs1eaGJpLA3EcTCOxuIgTgM84CCeZhyNTROnQRprPzRxHIyjieGBBnFWDs0YHPg0MTzQIM7KoRmDg73QxPBAA/E042hsmjhtcEEFpmFdUFjYef8AAA5ZSURBVLQZMhW4uAIz8KoKTMP65/K5q4I14gI1FPOn5ilNvDnKY0+NF5MTHjW+vX61vnh7kmNfq8anQXksDuI4/GT8sdw01nzBOhBn5dCOrS8mJ8iDOCuHto7n08TkBBqIp8nZauI0KI/FB99UYBrWPxfIiwd6scngBxxcwKexNOCDOA54wEE8jaUBP+AQZ/GAh59q8htrLziksTiI44EGcXEc0lgcxPFAg7g4DmksDuJ4oEGcxYEf8JDG/lSTbxzYCw54wEE8jaUBH8RxwAM++KYC07C+KdCEpwJTgeepwGs1rMfUrctRl6qt6N84Cuk+MdxqYmnsT8fLNw7Wy1k8WEMeu9XoaSwO/GAcjU1jacAPOFx6VmPh0vH2+NV4evtkceCD+jWepQFfHuABhzhbLosHeRBncfjJWe0xGDv4pgLTsL4p0GfYvUP4lD7irBf0x+EXiwP/IP35wsMf4fBbnC2XxYF/SPvzhYc/wuE38TT+Qfpg09iPz1/88Cl9rLn8j8Mvtjz2IP354gc5RHar0dNYHPjBOBq71ehpLA78YByNTWNpwAdxHPg04G81Og34AQdj0vhbTYwG/HAsN00uP+CDbyowDeuvBXKf0IuNLcoPcujsVqOnsTjwg3E0dqvR01gc+ME4GrvV6GksDvxgHI1NY2nADzisufytJp8G/ICDMWl8GqSxOPBDuexW2+biUB5rHI3FgU8DPOAgnsbfamI04AccjEnjbzUxGvADDsYEfLBUYBrWUoyD64Xir1bAejmKh0Pan684axzRiw+HS8abx9hgToizOKy5/K225vKDPDAmrb2umpg84Ac5NDat8fQ0Fgd+MI72Ta0+5MsDfmg8m8bKA37AYc3lbzX5NOAHHIxJ66yrJiYP+EEOjU1rPD2NxUGuD30AHywVmIa1FONM17fwZ6ZO2gtWQMN4wW2/x5anYf31OWtGweVp0TQ2TRyHNH4QP6aniZebxqaxOPADDnEWD3g4V7OXU7nip+YUf/R467UnFgd+wCHO4gEP52r3Pqv9uMSH9jT2swLTsD4L8Wm8WPrUxo8sn/Kf/z15epp4Gp9+zng5co05NV5MHvBD49k0c8lbNTEa8IMcGpv23XjxU7ni5oTyWBzEceDTjq1PlxPk0IxJ49PE0lga8IMcGpt27/HmP7WWuD1BeSwO9ioH8HfA2WechvXPpfIjQSgaZ49pX+nHco9pl4w3j3EBhziLAz/gIY09V/tJ7rE5f2O8fVg34BBnceAHPKSx52o/yT025zq++Fvbd29Y/hSDXgR8l52wXoTioVzxtF5Y54wv99h4seZkW4sf5NDXtdLY8lh5wA9yaOt4e6GJlcfSQBwHObRj4+lyAg6Xjm+tY+PFWoe1DvCDHNq61zS2PFYeHFtrHS8u79rx5rBuwMH8adagDT4r8M4Ny4vBi2P91OazLGOmAlOBZ6zAOzcsz8PFJvBfFbPv21bAH2S3nXFmu1kF3rlhdbnJVlDf+vdXc9aL0DS2XHEcjKOzOIjTAA+tJ55mnDyxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaZDG2g9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4GAvNDE80EA8zTgamyZOgzQWB3EcjKMNPivwzg3rswRjpgJTgVepwDs3LH96bS83V43fcyyPTRPHoR8jVo1frpxwLDeNLY991Pj2+tX64vYDcuxr1fg0kBNwEE/7yfhjuWlsc7LWAX6QQzu2vlh5rDw4lrtqfHnXjjeHdQMO5k+zBg3o/3lwVu1A3+vrnRuWy3YPP/Tk4+JbTSxNHA/pcfGtJpYmjof0OHtKE5MTcIizOPADHtLsZauJpYnjIT0uvtXE0sTxkB4X32piaeJ4SI+zpzQxOQGHOIvDuhYe5ID4VqOnieMhPS6+1cTSxPGQ7gMioKe9nX3nhvV2D3sOfFYF3rohnFWhX0x654blr1j4hBBcoHoMLB5oEGdxuHS8Nb4aT7dGwCHONp7FgS8P8IBDnC2XxYM8iLM4XHpWY+HS8fb41Xi6PQYc4i6vG8+m8+VBGosDP5TLprHygB9wuPSsxsKx8XSX8OBHQ/wt8VYNa/OEPfjgBSnMbjV6GosDPxhHY7caPY3FgR+Mo7FpLA34AYc1l7/V5NOAH3AwJo2/1cRowA/HctO2uTg0li2XxYEvD/CAQ5wtl8WDPIiL48Df6qsmJg/4AYc1l7/V5NOAH47lpm1zcWgsu+aKvT3epWH5Nj/00HEvCuDTWTzQIM7KobE48LcanQb8cCw3bZuLQ2PZclkc+PIADzjE2XJZPMiDOIvDmsvfamsuP8gDY9L4W02MBvxwLDdtm4tDY9lyWRz48gAPOIin8beaGA34AQdj0vhbTYwG/ICDMWn8rSZGe0u8S8PqUxe2B+0CM6wvjDSXn8dyj2n3GG8fx9ZKs6Yc4NNZPNAgzuKw5nbWVVtz+UHOV+Pp5bE48MM9xpvbOsAPOFgzjb/VxGjgNYIDDsbg8Ey1sre3wrs0rLd6qHPYj4+PKcIuK/AuDauLUbYH6XLTHQGk8YP4MT1NvNy0OCt+TE8TlwdpLB5wiLM48AMe0thzNXs5lStuPjiWJ35MTxM3FtL4QfyYniZebhqbxuLADzjEWTzg4VzNXk7lip+aU/xW45vnbey7NCw/94ceLu6TJODTvdBwSKPjQQ5NPI1PE9tq9DRWDs0YHPg0MTzQIM7KobE43Hu8+a0D/K/Wp8sJOBiTxqcd2z+9PFYOzRgc+DQxPNAgzsqhsTjce7z5rQP8r9anywk4GJPGpx3bP/3t8C4N6+0e7Bx4KrDHChxvWPs7qYtU6E8sJ8T/7+BAOouD+CH85wsPLmCJ4mnG0dg0cRqksafGi8kJxkKclUNb1+LTxOQEGsRZOTRjcGivYniQB+JpxtHYNHEapLE4iONgHI3FQZwGeLAfmniacTSxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaW+Jd2lYXlzQJzxv+bDn0FOBV6/AuzQsdwCwXni++rOb/U8F3q4C79KwtpeYHjTNX3UA33LTWBzEaYAHjY8mnmYcjU0Tp0Eae2q8mJxgLMRZObR1LT5NTE6gQZyVQzPmXz4+PmjtVQwP8kA8zTgamyZOgzQWB3EcjKOxOIjTAA/2QxNPM44mlsbSgB/k0IxJ49PE0lga8IMcmjFp9kITS2NpII6DcTQWB3Ea4AEH8TTjaGyaOO0t8S4N6y0f7hx6KrC3Crxzw/KnlgtMcL/l2a4anwZywrHcNLa8a8ebx9rAD9agmX+riaWx8oAf5NDW8XyaWHksDcRxkLPVxGkgJ+AgnvaT8cdy09jmZK0D/CCHdmx9sfJYecAPcmjreD5NrDyWBuI4yNlq4jSQE3AQT2s8nQ/8t8U7NywX8F4AsL4AcBBPx0OaeBpLZ4M4DdJYHMTxQIM4iwM/4CGN/akm3ziwFxzwgIN4GksDPojjgAccxNNYGvBBHAc84CCextKAH3CIs3jAw081+Y21FxzSWBzE8UCDuDgOaSwO4niggb8WpJHR8Uvw8mPeuWG9/MObA7xVBXxg5N7srQ69Pew7Nyx/TccFJvRCYOmhesVZOXQvIBzSWDzIgzgrh3ZsPF1OwCHONp7FgS8PcHAuHPBQLpvGygN+wOHYXh8x3hpfrU9vnywO/NB4dqttc3EojzWOxuKBBnEWh3vUyrx+VPRM7QV/S7xzw/LgQw8f98IAfjoejmnlsuXxj+Ue08plG88ey01bc/l01jjg0wAPOIin8beaGA344Vhu2jYXh8ay5bI48OUBHnCIs+WyeJAHcRaHNZe/1dZcfpAHxqTxt5oYDfjhWG7aNheHxrJrrtjb450b1rGH735gRTlePEGczp7SxOQBPxhHY7caPY3FgR+Mo7FbjZ7G4sAPxtHYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",
12488            width: "248",
12489            height: "248",
12490            style: { mixBlendMode: "multiply" }
12491          }
12492        )
12493      }
12494    ) });
12495  }
12496  
12497  // routes/connectors-home/ai-plugin-callout.tsx
12498  var import_jsx_runtime43 = __toESM(require_jsx_runtime());
12499  var AI_PLUGIN_SLUG = "ai";
12500  var AI_PLUGIN_PAGE_SLUG = "ai-wp-admin";
12501  var AI_PLUGIN_ID = "ai/ai";
12502  var AI_PLUGIN_URL = "https://wordpress.org/plugins/ai/";
12503  var connectorDataValues = Object.values(getConnectorData());
12504  var hasAiProviders = connectorDataValues.some(
12505    (c) => c.type === "ai_provider"
12506  );
12507  var aiProviderSettingNames = [];
12508  for (const c of connectorDataValues) {
12509    if (c.type === "ai_provider" && c.authentication.method === "api_key") {
12510      aiProviderSettingNames.push(c.authentication.settingName);
12511    }
12512  }
12513  function AiPluginCallout() {
12514    const [isBusy, setIsBusy] = (0, import_element35.useState)(false);
12515    const [justActivated, setJustActivated] = (0, import_element35.useState)(false);
12516    const actionButtonRef = (0, import_element35.useRef)(null);
12517    (0, import_element35.useEffect)(() => {
12518      if (justActivated) {
12519        actionButtonRef.current?.focus();
12520      }
12521    }, [justActivated]);
12522    const initialHasConnectedProvider = (0, import_element35.useRef)(
12523      connectorDataValues.some(
12524        (c) => c.type === "ai_provider" && c.authentication.method === "api_key" && c.authentication.isConnected
12525      )
12526    ).current;
12527    const {
12528      pluginStatus,
12529      canInstallPlugins,
12530      canManagePlugins,
12531      hasConnectedProvider
12532    } = (0, import_data3.useSelect)((select2) => {
12533      const store2 = select2(import_core_data2.store);
12534      const canCreate = !!store2.canUser("create", {
12535        kind: "root",
12536        name: "plugin"
12537      });
12538      const siteSettings = store2.getEntityRecord("root", "site");
12539      const hasConnected = initialHasConnectedProvider || aiProviderSettingNames.some(
12540        (name) => !!siteSettings?.[name]
12541      );
12542      const plugin = store2.getEntityRecord(
12543        "root",
12544        "plugin",
12545        AI_PLUGIN_ID
12546      );
12547      const hasFinished = store2.hasFinishedResolution("getEntityRecord", [
12548        "root",
12549        "plugin",
12550        AI_PLUGIN_ID
12551      ]);
12552      if (!hasFinished) {
12553        return {
12554          pluginStatus: "checking",
12555          canInstallPlugins: canCreate,
12556          canManagePlugins: void 0,
12557          hasConnectedProvider: hasConnected
12558        };
12559      }
12560      if (!plugin) {
12561        return {
12562          pluginStatus: "not-installed",
12563          canInstallPlugins: canCreate,
12564          canManagePlugins: canCreate,
12565          hasConnectedProvider: hasConnected
12566        };
12567      }
12568      return {
12569        pluginStatus: plugin.status === "active" ? "active" : "inactive",
12570        canInstallPlugins: canCreate,
12571        canManagePlugins: true,
12572        hasConnectedProvider: hasConnected
12573      };
12574    }, []);
12575    const { saveEntityRecord } = (0, import_data3.useDispatch)(import_core_data2.store);
12576    const { createSuccessNotice, createErrorNotice } = (0, import_data3.useDispatch)(import_notices2.store);
12577    const installPlugin = async () => {
12578      setIsBusy(true);
12579      try {
12580        await saveEntityRecord(
12581          "root",
12582          "plugin",
12583          { slug: AI_PLUGIN_SLUG, status: "active" },
12584          { throwOnError: true }
12585        );
12586        setJustActivated(true);
12587        createSuccessNotice(
12588          (0, import_i18n9.__)("AI plugin installed and activated successfully."),
12589          {
12590            id: "ai-plugin-install-success",
12591            type: "snackbar"
12592          }
12593        );
12594      } catch {
12595        createErrorNotice((0, import_i18n9.__)("Failed to install the AI plugin."), {
12596          id: "ai-plugin-install-error",
12597          type: "snackbar"
12598        });
12599      } finally {
12600        setIsBusy(false);
12601      }
12602    };
12603    const activatePlugin = async () => {
12604      setIsBusy(true);
12605      try {
12606        await saveEntityRecord(
12607          "root",
12608          "plugin",
12609          { plugin: AI_PLUGIN_ID, status: "active" },
12610          { throwOnError: true }
12611        );
12612        setJustActivated(true);
12613        createSuccessNotice((0, import_i18n9.__)("AI plugin activated successfully."), {
12614          id: "ai-plugin-activate-success",
12615          type: "snackbar"
12616        });
12617      } catch {
12618        createErrorNotice((0, import_i18n9.__)("Failed to activate the AI plugin."), {
12619          id: "ai-plugin-activate-error",
12620          type: "snackbar"
12621        });
12622      } finally {
12623        setIsBusy(false);
12624      }
12625    };
12626    if (!hasAiProviders) {
12627      return null;
12628    }
12629    if (pluginStatus === "checking") {
12630      return null;
12631    }
12632    if (pluginStatus === "active" && initialHasConnectedProvider && !justActivated) {
12633      return null;
12634    }
12635    if (pluginStatus === "inactive" && canManagePlugins === false) {
12636      return null;
12637    }
12638    const isActiveNoProvider = pluginStatus === "active" && !hasConnectedProvider;
12639    const isJustConnected = pluginStatus === "active" && hasConnectedProvider && (!initialHasConnectedProvider || justActivated);
12640    const showInstallActivate = pluginStatus === "not-installed" || pluginStatus === "inactive";
12641    const hideButtons = pluginStatus === "not-installed" && canInstallPlugins === false;
12642    const getMessage = () => {
12643      if (isJustConnected) {
12644        return (0, import_i18n9.__)(
12645          "The <strong>AI plugin</strong> is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12646        );
12647      }
12648      if (isActiveNoProvider) {
12649        return (0, import_i18n9.__)(
12650          "The <strong>AI plugin</strong> is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. <a>Learn more</a>"
12651        );
12652      }
12653      return (0, import_i18n9.__)(
12654        "The <strong>AI plugin</strong> can use your AI connectors to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12655      );
12656    };
12657    const getPrimaryButtonProps = () => {
12658      if (pluginStatus === "not-installed") {
12659        return {
12660          label: isBusy ? (0, import_i18n9.__)("Installing\u2026") : (0, import_i18n9.__)("Install the AI plugin"),
12661          disabled: isBusy,
12662          onClick: isBusy ? void 0 : installPlugin
12663        };
12664      }
12665      return {
12666        label: isBusy ? (0, import_i18n9.__)("Activating\u2026") : (0, import_i18n9.__)("Activate the AI plugin"),
12667        disabled: isBusy,
12668        onClick: isBusy ? void 0 : activatePlugin
12669      };
12670    };
12671    return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "ai-plugin-callout", children: [
12672      /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "ai-plugin-callout__content", children: [
12673        /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: (0, import_element35.createInterpolateElement)(getMessage(), {
12674          strong: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", {}),
12675          // @ts-expect-error `children` is injected by `createInterpolateElement` at runtime.
12676          a: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components3.ExternalLink, { href: AI_PLUGIN_URL })
12677        }) }),
12678        !hideButtons && (showInstallActivate ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12679          import_components3.Button,
12680          {
12681            variant: "primary",
12682            size: "compact",
12683            isBusy,
12684            disabled: getPrimaryButtonProps().disabled,
12685            accessibleWhenDisabled: true,
12686            onClick: getPrimaryButtonProps().onClick,
12687            children: getPrimaryButtonProps().label
12688          }
12689        ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12690          import_components3.Button,
12691          {
12692            ref: actionButtonRef,
12693            variant: "secondary",
12694            size: "compact",
12695            href: (0, import_url.addQueryArgs)("options-general.php", {
12696              page: AI_PLUGIN_PAGE_SLUG
12697            }),
12698            children: (0, import_i18n9.__)("Control features in the AI plugin")
12699          }
12700        ))
12701      ] }),
12702      /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(WpLogoDecoration, {})
12703    ] });
12704  }
12705  
12706  // routes/connectors-home/stage.tsx
12707  var import_jsx_runtime44 = __toESM(require_jsx_runtime());
12708  var { store } = unlock2(connectorsPrivateApis2);
12709  registerDefaultConnectors();
12710  function ConnectorsPage() {
12711    const isFileModDisabled = getIsFileModDisabled();
12712    const { connectors, canInstallPlugins, isAiPluginInstalled } = (0, import_data4.useSelect)(
12713      (select2) => {
12714        const coreSelect = select2(import_core_data3.store);
12715        const aiPlugin = coreSelect.getEntityRecord(
12716          "root",
12717          "plugin",
12718          "ai/ai"
12719        );
12720        return {
12721          connectors: unlock2(select2(store)).getConnectors(),
12722          canInstallPlugins: coreSelect.canUser("create", {
12723            kind: "root",
12724            name: "plugin"
12725          }),
12726          isAiPluginInstalled: !!aiPlugin
12727        };
12728      },
12729      []
12730    );
12731    const renderableConnectors = connectors.filter(
12732      (connector) => connector.render
12733    );
12734    const aiProviderPluginSlugs = Array.from(
12735      new Set(
12736        connectors.filter(
12737          (connector) => connector.type === "ai_provider"
12738        ).map(
12739          (connector) => connector.plugin?.file?.split("/")[0]
12740        ).filter(
12741          (slug) => !!slug
12742        )
12743      )
12744    ).sort();
12745    const installedPluginSlugs = new Set(
12746      connectors.filter(
12747        (connector) => connector.plugin?.isInstalled
12748      ).map(
12749        (connector) => connector.plugin?.file?.split("/")[0]
12750      ).filter((slug) => !!slug)
12751    );
12752    if (isAiPluginInstalled) {
12753      installedPluginSlugs.add("ai");
12754    }
12755    const manualInstallPluginSlugs = ["ai", ...aiProviderPluginSlugs].filter(
12756      (slug) => !installedPluginSlugs.has(slug)
12757    );
12758    const isEmpty = renderableConnectors.length === 0;
12759    return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12760      page_default,
12761      {
12762        title: (0, import_i18n10.__)("Connectors"),
12763        subTitle: (0, import_i18n10.__)(
12764          "All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere."
12765        ),
12766        children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12767          "div",
12768          {
12769            className: `connectors-page$isEmpty ? " connectors-page--empty" : ""}`,
12770            children: [
12771              manualInstallPluginSlugs.length > 0 && (isFileModDisabled || !canInstallPlugins) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12772                notice_exports.Root,
12773                {
12774                  intent: "info",
12775                  className: "connectors-page__file-mods-notice",
12776                  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(notice_exports.Description, { children: isFileModDisabled ? (0, import_i18n10.__)(
12777                    "Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."
12778                  ) : (0, import_i18n10.__)(
12779                    "You do not have permission to install plugins. Please ask a site administrator to install them for you."
12780                  ) })
12781                }
12782              ),
12783              isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12784                import_components4.__experimentalVStack,
12785                {
12786                  alignment: "center",
12787                  spacing: 3,
12788                  style: { maxWidth: 480 },
12789                  children: [
12790                    /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_components4.__experimentalVStack, { alignment: "center", spacing: 2, children: [
12791                      /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalHeading, { level: 2, size: 15, children: (0, import_i18n10.__)("No connectors yet") }),
12792                      /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalText, { size: 12, children: (0, import_i18n10.__)(
12793                        "Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."
12794                      ) })
12795                    ] }),
12796                    /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12797                      import_components4.Button,
12798                      {
12799                        variant: "secondary",
12800                        href: "plugin-install.php",
12801                        __next40pxDefaultSize: true,
12802                        children: (0, import_i18n10.__)("Learn more")
12803                      }
12804                    )
12805                  ]
12806                }
12807              ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_components4.__experimentalVStack, { spacing: 3, children: [
12808                /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AiPluginCallout, {}),
12809                /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components4.__experimentalVStack, { spacing: 3, role: "list", children: connectors.map(
12810                  (connector) => {
12811                    if (connector.render) {
12812                      return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12813                        connector.render,
12814                        {
12815                          slug: connector.slug,
12816                          name: connector.name,
12817                          description: connector.description,
12818                          type: connector.type,
12819                          logo: connector.logo,
12820                          authentication: connector.authentication,
12821                          plugin: connector.plugin
12822                        },
12823                        connector.slug
12824                      );
12825                    }
12826                    return null;
12827                  }
12828                ) })
12829              ] }),
12830              canInstallPlugins && !isFileModDisabled && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "connectors-page__help-text", children: (0, import_element36.createInterpolateElement)(
12831                (0, import_i18n10.__)(
12832                  "If the connector you need is not listed, <a>search the plugin directory</a> to see if a connector is available."
12833                ),
12834                {
12835                  a: (
12836                    // eslint-disable-next-line jsx-a11y/anchor-has-content
12837                    /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("a", { href: "plugin-install.php?s=connector&tab=search&type=tag" })
12838                  )
12839                }
12840              ) })
12841            ]
12842          }
12843        )
12844      }
12845    );
12846  }
12847  function Stage() {
12848    return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ConnectorsPage, {});
12849  }
12850  var stage = Stage;
12851  export {
12852    stage
12853  };
12854  /*! Bundled license information:
12855  
12856  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
12857    (**
12858     * @license React
12859     * use-sync-external-store-shim.development.js
12860     *
12861     * Copyright (c) Meta Platforms, Inc. and affiliates.
12862     *
12863     * This source code is licensed under the MIT license found in the
12864     * LICENSE file in the root directory of this source tree.
12865     *)
12866  
12867  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
12868    (**
12869     * @license React
12870     * use-sync-external-store-shim/with-selector.development.js
12871     *
12872     * Copyright (c) Meta Platforms, Inc. and affiliates.
12873     *
12874     * This source code is licensed under the MIT license found in the
12875     * LICENSE file in the root directory of this source tree.
12876     *)
12877  */


Generated : Mon Oct 12 08:20:33 2026 Cross-referenced by PHPXref