[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/build/routes/font-list/ -> 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 __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
   8    get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
   9  }) : x2)(function(x2) {
  10    if (typeof require !== "undefined") return require.apply(this, arguments);
  11    throw Error('Dynamic require of "' + x2 + '" is not supported');
  12  });
  13  var __commonJS = (cb, mod) => function __require4() {
  14    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  15  };
  16  var __export = (target, all) => {
  17    for (var name2 in all)
  18      __defProp(target, name2, { get: all[name2], enumerable: true });
  19  };
  20  var __copyProps = (to, from, except, desc) => {
  21    if (from && typeof from === "object" || typeof from === "function") {
  22      for (let key of __getOwnPropNames(from))
  23        if (!__hasOwnProp.call(to, key) && key !== except)
  24          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  25    }
  26    return to;
  27  };
  28  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  29    // If the importer is in node compatibility mode or this is not an ESM
  30    // file that has been converted to a CommonJS file using a Babel-
  31    // compatible transform (i.e. "__esModule" has not been set), then set
  32    // "default" to the CommonJS "module.exports" for node compatibility.
  33    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  34    mod
  35  ));
  36  
  37  // package-external:@wordpress/i18n
  38  var require_i18n = __commonJS({
  39    "package-external:@wordpress/i18n"(exports, module) {
  40      module.exports = window.wp.i18n;
  41    }
  42  });
  43  
  44  // package-external:@wordpress/element
  45  var require_element = __commonJS({
  46    "package-external:@wordpress/element"(exports, module) {
  47      module.exports = window.wp.element;
  48    }
  49  });
  50  
  51  // vendor-external:react
  52  var require_react = __commonJS({
  53    "vendor-external:react"(exports, module) {
  54      module.exports = window.React;
  55    }
  56  });
  57  
  58  // vendor-external:react/jsx-runtime
  59  var require_jsx_runtime = __commonJS({
  60    "vendor-external:react/jsx-runtime"(exports, module) {
  61      module.exports = window.ReactJSXRuntime;
  62    }
  63  });
  64  
  65  // vendor-external:react-dom
  66  var require_react_dom = __commonJS({
  67    "vendor-external:react-dom"(exports, module) {
  68      module.exports = window.ReactDOM;
  69    }
  70  });
  71  
  72  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  73  var require_use_sync_external_store_shim_development = __commonJS({
  74    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  75      "use strict";
  76      (function() {
  77        function is(x2, y2) {
  78          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
  79        }
  80        function useSyncExternalStore$2(subscribe, getSnapshot) {
  81          didWarnOld18Alpha || void 0 === React48.startTransition || (didWarnOld18Alpha = true, console.error(
  82            "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."
  83          ));
  84          var value = getSnapshot();
  85          if (!didWarnUncachedGetSnapshot) {
  86            var cachedValue = getSnapshot();
  87            objectIs(value, cachedValue) || (console.error(
  88              "The result of getSnapshot should be cached to avoid an infinite loop"
  89            ), didWarnUncachedGetSnapshot = true);
  90          }
  91          cachedValue = useState28({
  92            inst: { value, getSnapshot }
  93          });
  94          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  95          useLayoutEffect4(
  96            function() {
  97              inst.value = value;
  98              inst.getSnapshot = getSnapshot;
  99              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 100            },
 101            [subscribe, value, getSnapshot]
 102          );
 103          useEffect20(
 104            function() {
 105              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 106              return subscribe(function() {
 107                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 108              });
 109            },
 110            [subscribe]
 111          );
 112          useDebugValue2(value);
 113          return value;
 114        }
 115        function checkIfSnapshotChanged(inst) {
 116          var latestGetSnapshot = inst.getSnapshot;
 117          inst = inst.value;
 118          try {
 119            var nextValue = latestGetSnapshot();
 120            return !objectIs(inst, nextValue);
 121          } catch (error) {
 122            return true;
 123          }
 124        }
 125        function useSyncExternalStore$1(subscribe, getSnapshot) {
 126          return getSnapshot();
 127        }
 128        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 129        var React48 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState28 = React48.useState, useEffect20 = React48.useEffect, useLayoutEffect4 = React48.useLayoutEffect, useDebugValue2 = React48.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 130        exports.useSyncExternalStore = void 0 !== React48.useSyncExternalStore ? React48.useSyncExternalStore : shim;
 131        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 132      })();
 133    }
 134  });
 135  
 136  // node_modules/use-sync-external-store/shim/index.js
 137  var require_shim = __commonJS({
 138    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 139      "use strict";
 140      if (false) {
 141        module.exports = null;
 142      } else {
 143        module.exports = require_use_sync_external_store_shim_development();
 144      }
 145    }
 146  });
 147  
 148  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 149  var require_with_selector_development = __commonJS({
 150    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 151      "use strict";
 152      (function() {
 153        function is(x2, y2) {
 154          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
 155        }
 156        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 157        var React48 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef22 = React48.useRef, useEffect20 = React48.useEffect, useMemo32 = React48.useMemo, useDebugValue2 = React48.useDebugValue;
 158        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 159          var instRef = useRef22(null);
 160          if (null === instRef.current) {
 161            var inst = { hasValue: false, value: null };
 162            instRef.current = inst;
 163          } else inst = instRef.current;
 164          instRef = useMemo32(
 165            function() {
 166              function memoizedSelector(nextSnapshot) {
 167                if (!hasMemo) {
 168                  hasMemo = true;
 169                  memoizedSnapshot = nextSnapshot;
 170                  nextSnapshot = selector(nextSnapshot);
 171                  if (void 0 !== isEqual && inst.hasValue) {
 172                    var currentSelection = inst.value;
 173                    if (isEqual(currentSelection, nextSnapshot))
 174                      return memoizedSelection = currentSelection;
 175                  }
 176                  return memoizedSelection = nextSnapshot;
 177                }
 178                currentSelection = memoizedSelection;
 179                if (objectIs(memoizedSnapshot, nextSnapshot))
 180                  return currentSelection;
 181                var nextSelection = selector(nextSnapshot);
 182                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 183                  return memoizedSnapshot = nextSnapshot, currentSelection;
 184                memoizedSnapshot = nextSnapshot;
 185                return memoizedSelection = nextSelection;
 186              }
 187              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 188              return [
 189                function() {
 190                  return memoizedSelector(getSnapshot());
 191                },
 192                null === maybeGetServerSnapshot ? void 0 : function() {
 193                  return memoizedSelector(maybeGetServerSnapshot());
 194                }
 195              ];
 196            },
 197            [getSnapshot, getServerSnapshot, selector, isEqual]
 198          );
 199          var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 200          useEffect20(
 201            function() {
 202              inst.hasValue = true;
 203              inst.value = value;
 204            },
 205            [value]
 206          );
 207          useDebugValue2(value);
 208          return value;
 209        };
 210        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 211      })();
 212    }
 213  });
 214  
 215  // node_modules/use-sync-external-store/shim/with-selector.js
 216  var require_with_selector = __commonJS({
 217    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 218      "use strict";
 219      if (false) {
 220        module.exports = null;
 221      } else {
 222        module.exports = require_with_selector_development();
 223      }
 224    }
 225  });
 226  
 227  // package-external:@wordpress/compose
 228  var require_compose = __commonJS({
 229    "package-external:@wordpress/compose"(exports, module) {
 230      module.exports = window.wp.compose;
 231    }
 232  });
 233  
 234  // package-external:@wordpress/theme
 235  var require_theme = __commonJS({
 236    "package-external:@wordpress/theme"(exports, module) {
 237      module.exports = window.wp.theme;
 238    }
 239  });
 240  
 241  // package-external:@wordpress/private-apis
 242  var require_private_apis = __commonJS({
 243    "package-external:@wordpress/private-apis"(exports, module) {
 244      module.exports = window.wp.privateApis;
 245    }
 246  });
 247  
 248  // package-external:@wordpress/primitives
 249  var require_primitives = __commonJS({
 250    "package-external:@wordpress/primitives"(exports, module) {
 251      module.exports = window.wp.primitives;
 252    }
 253  });
 254  
 255  // package-external:@wordpress/components
 256  var require_components = __commonJS({
 257    "package-external:@wordpress/components"(exports, module) {
 258      module.exports = window.wp.components;
 259    }
 260  });
 261  
 262  // package-external:@wordpress/editor
 263  var require_editor = __commonJS({
 264    "package-external:@wordpress/editor"(exports, module) {
 265      module.exports = window.wp.editor;
 266    }
 267  });
 268  
 269  // package-external:@wordpress/core-data
 270  var require_core_data = __commonJS({
 271    "package-external:@wordpress/core-data"(exports, module) {
 272      module.exports = window.wp.coreData;
 273    }
 274  });
 275  
 276  // package-external:@wordpress/data
 277  var require_data = __commonJS({
 278    "package-external:@wordpress/data"(exports, module) {
 279      module.exports = window.wp.data;
 280    }
 281  });
 282  
 283  // package-external:@wordpress/blocks
 284  var require_blocks = __commonJS({
 285    "package-external:@wordpress/blocks"(exports, module) {
 286      module.exports = window.wp.blocks;
 287    }
 288  });
 289  
 290  // package-external:@wordpress/block-editor
 291  var require_block_editor = __commonJS({
 292    "package-external:@wordpress/block-editor"(exports, module) {
 293      module.exports = window.wp.blockEditor;
 294    }
 295  });
 296  
 297  // package-external:@wordpress/style-engine
 298  var require_style_engine = __commonJS({
 299    "package-external:@wordpress/style-engine"(exports, module) {
 300      module.exports = window.wp.styleEngine;
 301    }
 302  });
 303  
 304  // node_modules/fast-deep-equal/es6/index.js
 305  var require_es6 = __commonJS({
 306    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
 307      "use strict";
 308      module.exports = function equal(a2, b2) {
 309        if (a2 === b2) return true;
 310        if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
 311          if (a2.constructor !== b2.constructor) return false;
 312          var length, i2, keys;
 313          if (Array.isArray(a2)) {
 314            length = a2.length;
 315            if (length != b2.length) return false;
 316            for (i2 = length; i2-- !== 0; )
 317              if (!equal(a2[i2], b2[i2])) return false;
 318            return true;
 319          }
 320          if (a2 instanceof Map && b2 instanceof Map) {
 321            if (a2.size !== b2.size) return false;
 322            for (i2 of a2.entries())
 323              if (!b2.has(i2[0])) return false;
 324            for (i2 of a2.entries())
 325              if (!equal(i2[1], b2.get(i2[0]))) return false;
 326            return true;
 327          }
 328          if (a2 instanceof Set && b2 instanceof Set) {
 329            if (a2.size !== b2.size) return false;
 330            for (i2 of a2.entries())
 331              if (!b2.has(i2[0])) return false;
 332            return true;
 333          }
 334          if (ArrayBuffer.isView(a2) && ArrayBuffer.isView(b2)) {
 335            length = a2.length;
 336            if (length != b2.length) return false;
 337            for (i2 = length; i2-- !== 0; )
 338              if (a2[i2] !== b2[i2]) return false;
 339            return true;
 340          }
 341          if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
 342          if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
 343          if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
 344          keys = Object.keys(a2);
 345          length = keys.length;
 346          if (length !== Object.keys(b2).length) return false;
 347          for (i2 = length; i2-- !== 0; )
 348            if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false;
 349          for (i2 = length; i2-- !== 0; ) {
 350            var key = keys[i2];
 351            if (!equal(a2[key], b2[key])) return false;
 352          }
 353          return true;
 354        }
 355        return a2 !== a2 && b2 !== b2;
 356      };
 357    }
 358  });
 359  
 360  // node_modules/deepmerge/dist/cjs.js
 361  var require_cjs = __commonJS({
 362    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
 363      "use strict";
 364      var isMergeableObject = function isMergeableObject2(value) {
 365        return isNonNullObject(value) && !isSpecial(value);
 366      };
 367      function isNonNullObject(value) {
 368        return !!value && typeof value === "object";
 369      }
 370      function isSpecial(value) {
 371        var stringValue = Object.prototype.toString.call(value);
 372        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
 373      }
 374      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
 375      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
 376      function isReactElement(value) {
 377        return value.$$typeof === REACT_ELEMENT_TYPE;
 378      }
 379      function emptyTarget(val) {
 380        return Array.isArray(val) ? [] : {};
 381      }
 382      function cloneUnlessOtherwiseSpecified(value, options) {
 383        return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
 384      }
 385      function defaultArrayMerge(target, source, options) {
 386        return target.concat(source).map(function(element) {
 387          return cloneUnlessOtherwiseSpecified(element, options);
 388        });
 389      }
 390      function getMergeFunction(key, options) {
 391        if (!options.customMerge) {
 392          return deepmerge2;
 393        }
 394        var customMerge = options.customMerge(key);
 395        return typeof customMerge === "function" ? customMerge : deepmerge2;
 396      }
 397      function getEnumerableOwnPropertySymbols(target) {
 398        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
 399          return Object.propertyIsEnumerable.call(target, symbol);
 400        }) : [];
 401      }
 402      function getKeys(target) {
 403        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
 404      }
 405      function propertyIsOnObject(object, property) {
 406        try {
 407          return property in object;
 408        } catch (_) {
 409          return false;
 410        }
 411      }
 412      function propertyIsUnsafe(target, key) {
 413        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
 414      }
 415      function mergeObject(target, source, options) {
 416        var destination = {};
 417        if (options.isMergeableObject(target)) {
 418          getKeys(target).forEach(function(key) {
 419            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
 420          });
 421        }
 422        getKeys(source).forEach(function(key) {
 423          if (propertyIsUnsafe(target, key)) {
 424            return;
 425          }
 426          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
 427            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
 428          } else {
 429            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
 430          }
 431        });
 432        return destination;
 433      }
 434      function deepmerge2(target, source, options) {
 435        options = options || {};
 436        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
 437        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
 438        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
 439        var sourceIsArray = Array.isArray(source);
 440        var targetIsArray = Array.isArray(target);
 441        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
 442        if (!sourceAndTargetTypesMatch) {
 443          return cloneUnlessOtherwiseSpecified(source, options);
 444        } else if (sourceIsArray) {
 445          return options.arrayMerge(target, source, options);
 446        } else {
 447          return mergeObject(target, source, options);
 448        }
 449      }
 450      deepmerge2.all = function deepmergeAll(array, options) {
 451        if (!Array.isArray(array)) {
 452          throw new Error("first argument should be an array");
 453        }
 454        return array.reduce(function(prev, next) {
 455          return deepmerge2(prev, next, options);
 456        }, {});
 457      };
 458      var deepmerge_1 = deepmerge2;
 459      module.exports = deepmerge_1;
 460    }
 461  });
 462  
 463  // package-external:@wordpress/keycodes
 464  var require_keycodes = __commonJS({
 465    "package-external:@wordpress/keycodes"(exports, module) {
 466      module.exports = window.wp.keycodes;
 467    }
 468  });
 469  
 470  // package-external:@wordpress/api-fetch
 471  var require_api_fetch = __commonJS({
 472    "package-external:@wordpress/api-fetch"(exports, module) {
 473      module.exports = window.wp.apiFetch;
 474    }
 475  });
 476  
 477  // package-external:@wordpress/date
 478  var require_date = __commonJS({
 479    "package-external:@wordpress/date"(exports, module) {
 480      module.exports = window.wp.date;
 481    }
 482  });
 483  
 484  // node_modules/clsx/dist/clsx.mjs
 485  function r(e2) {
 486    var t2, f2, n2 = "";
 487    if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
 488    else if ("object" == typeof e2) if (Array.isArray(e2)) {
 489      var o2 = e2.length;
 490      for (t2 = 0; t2 < o2; t2++) e2[t2] && (f2 = r(e2[t2])) && (n2 && (n2 += " "), n2 += f2);
 491    } else for (f2 in e2) e2[f2] && (n2 && (n2 += " "), n2 += f2);
 492    return n2;
 493  }
 494  function clsx() {
 495    for (var e2, t2, f2 = 0, n2 = "", o2 = arguments.length; f2 < o2; f2++) (e2 = arguments[f2]) && (t2 = r(e2)) && (n2 && (n2 += " "), n2 += t2);
 496    return n2;
 497  }
 498  var clsx_default = clsx;
 499  
 500  // node_modules/@base-ui/utils/safeReact.mjs
 501  var React = __toESM(require_react(), 1);
 502  var SafeReact = {
 503    ...React
 504  };
 505  
 506  // node_modules/@base-ui/utils/useRefWithInit.mjs
 507  var React2 = __toESM(require_react(), 1);
 508  var UNINITIALIZED = {};
 509  function useRefWithInit(init, initArg) {
 510    const ref = React2.useRef(UNINITIALIZED);
 511    if (ref.current === UNINITIALIZED) {
 512      ref.current = init(initArg);
 513    }
 514    return ref;
 515  }
 516  
 517  // node_modules/@base-ui/utils/useStableCallback.mjs
 518  var useInsertionEffect = SafeReact.useInsertionEffect;
 519  var useSafeInsertionEffect = (
 520    // React 17 doesn't have useInsertionEffect.
 521    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 522    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 523  );
 524  function useStableCallback(callback) {
 525    const stable = useRefWithInit(createStableCallback).current;
 526    stable.next = callback;
 527    useSafeInsertionEffect(stable.effect);
 528    return stable.trampoline;
 529  }
 530  function createStableCallback() {
 531    const stable = {
 532      next: void 0,
 533      callback: assertNotCalled,
 534      trampoline: (...args) => stable.callback?.(...args),
 535      effect: () => {
 536        stable.callback = stable.next;
 537      }
 538    };
 539    return stable;
 540  }
 541  function assertNotCalled() {
 542    if (true) {
 543      throw (
 544        /* minify-error-disabled */
 545        new Error("Base UI: Cannot call an event handler while rendering.")
 546      );
 547    }
 548  }
 549  
 550  // node_modules/@base-ui/utils/warn.mjs
 551  var set;
 552  if (true) {
 553    set = /* @__PURE__ */ new Set();
 554  }
 555  function warn(...messages) {
 556    if (true) {
 557      const messageKey = messages.join(" ");
 558      if (!set.has(messageKey)) {
 559        set.add(messageKey);
 560        console.warn(`Base UI: $messageKey}`);
 561      }
 562    }
 563  }
 564  
 565  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 566  var React3 = __toESM(require_react(), 1);
 567  var noop = () => {
 568  };
 569  var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
 570  
 571  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 572  var React6 = __toESM(require_react(), 1);
 573  
 574  // node_modules/@base-ui/utils/useMergedRefs.mjs
 575  function useMergedRefs(a2, b2, c2, d2) {
 576    const forkRef = useRefWithInit(createForkRef).current;
 577    if (didChange(forkRef, a2, b2, c2, d2)) {
 578      update(forkRef, [a2, b2, c2, d2]);
 579    }
 580    return forkRef.callback;
 581  }
 582  function useMergedRefsN(refs) {
 583    const forkRef = useRefWithInit(createForkRef).current;
 584    if (didChangeN(forkRef, refs)) {
 585      update(forkRef, refs);
 586    }
 587    return forkRef.callback;
 588  }
 589  function createForkRef() {
 590    return {
 591      callback: null,
 592      cleanup: null,
 593      refs: []
 594    };
 595  }
 596  function didChange(forkRef, a2, b2, c2, d2) {
 597    return forkRef.refs[0] !== a2 || forkRef.refs[1] !== b2 || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d2;
 598  }
 599  function didChangeN(forkRef, newRefs) {
 600    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 601  }
 602  function update(forkRef, refs) {
 603    forkRef.refs = refs;
 604    if (refs.every((ref) => ref == null)) {
 605      forkRef.callback = null;
 606      return;
 607    }
 608    forkRef.callback = (instance) => {
 609      if (forkRef.cleanup) {
 610        forkRef.cleanup();
 611        forkRef.cleanup = null;
 612      }
 613      if (instance != null) {
 614        const cleanupCallbacks = Array(refs.length).fill(null);
 615        for (let i2 = 0; i2 < refs.length; i2 += 1) {
 616          const ref = refs[i2];
 617          if (ref == null) {
 618            continue;
 619          }
 620          switch (typeof ref) {
 621            case "function": {
 622              const refCleanup = ref(instance);
 623              if (typeof refCleanup === "function") {
 624                cleanupCallbacks[i2] = refCleanup;
 625              }
 626              break;
 627            }
 628            case "object": {
 629              ref.current = instance;
 630              break;
 631            }
 632            default:
 633          }
 634        }
 635        forkRef.cleanup = () => {
 636          for (let i2 = 0; i2 < refs.length; i2 += 1) {
 637            const ref = refs[i2];
 638            if (ref == null) {
 639              continue;
 640            }
 641            switch (typeof ref) {
 642              case "function": {
 643                const cleanupCallback = cleanupCallbacks[i2];
 644                if (typeof cleanupCallback === "function") {
 645                  cleanupCallback();
 646                } else {
 647                  void ref(null);
 648                }
 649                break;
 650              }
 651              case "object": {
 652                ref.current = null;
 653                break;
 654              }
 655              default:
 656            }
 657          }
 658        };
 659      }
 660    };
 661  }
 662  
 663  // node_modules/@base-ui/utils/getReactElementRef.mjs
 664  var React5 = __toESM(require_react(), 1);
 665  
 666  // node_modules/@base-ui/utils/reactVersion.mjs
 667  var React4 = __toESM(require_react(), 1);
 668  var majorVersion = parseInt(React4.version, 10);
 669  function isReactVersionAtLeast(reactVersionToCheck) {
 670    return majorVersion >= reactVersionToCheck;
 671  }
 672  
 673  // node_modules/@base-ui/utils/getReactElementRef.mjs
 674  function getReactElementRef(element) {
 675    if (!/* @__PURE__ */ React5.isValidElement(element)) {
 676      return null;
 677    }
 678    const reactElement = element;
 679    const propsWithRef = reactElement.props;
 680    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 681  }
 682  
 683  // node_modules/@base-ui/utils/mergeObjects.mjs
 684  function mergeObjects(a2, b2) {
 685    if (a2 && !b2) {
 686      return a2;
 687    }
 688    if (!a2 && b2) {
 689      return b2;
 690    }
 691    if (a2 || b2) {
 692      return {
 693        ...a2,
 694        ...b2
 695      };
 696    }
 697    return void 0;
 698  }
 699  
 700  // node_modules/@base-ui/utils/empty.mjs
 701  function NOOP() {
 702  }
 703  var EMPTY_ARRAY = Object.freeze([]);
 704  var EMPTY_OBJECT = Object.freeze({});
 705  
 706  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 707  function getStateAttributesProps(state, customMapping) {
 708    const props = {};
 709    for (const key in state) {
 710      const value = state[key];
 711      if (customMapping?.hasOwnProperty(key)) {
 712        const customProps = customMapping[key](value);
 713        if (customProps != null) {
 714          Object.assign(props, customProps);
 715        }
 716        continue;
 717      }
 718      if (value === true) {
 719        props[`data-$key.toLowerCase()}`] = "";
 720      } else if (value) {
 721        props[`data-$key.toLowerCase()}`] = value.toString();
 722      }
 723    }
 724    return props;
 725  }
 726  
 727  // node_modules/@base-ui/react/utils/resolveClassName.mjs
 728  function resolveClassName(className, state) {
 729    return typeof className === "function" ? className(state) : className;
 730  }
 731  
 732  // node_modules/@base-ui/react/utils/resolveStyle.mjs
 733  function resolveStyle(style, state) {
 734    return typeof style === "function" ? style(state) : style;
 735  }
 736  
 737  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 738  var EMPTY_PROPS = {};
 739  function mergeProps(a2, b2, c2, d2, e2) {
 740    if (!c2 && !d2 && !e2 && !a2) {
 741      return createInitialMergedProps(b2);
 742    }
 743    let merged = createInitialMergedProps(a2);
 744    if (b2) {
 745      merged = mergeInto(merged, b2);
 746    }
 747    if (c2) {
 748      merged = mergeInto(merged, c2);
 749    }
 750    if (d2) {
 751      merged = mergeInto(merged, d2);
 752    }
 753    if (e2) {
 754      merged = mergeInto(merged, e2);
 755    }
 756    return merged;
 757  }
 758  function mergePropsN(props) {
 759    if (props.length === 0) {
 760      return EMPTY_PROPS;
 761    }
 762    if (props.length === 1) {
 763      return createInitialMergedProps(props[0]);
 764    }
 765    let merged = createInitialMergedProps(props[0]);
 766    for (let i2 = 1; i2 < props.length; i2 += 1) {
 767      merged = mergeInto(merged, props[i2]);
 768    }
 769    return merged;
 770  }
 771  function createInitialMergedProps(inputProps) {
 772    if (isPropsGetter(inputProps)) {
 773      return {
 774        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 775      };
 776    }
 777    return copyInitialProps(inputProps);
 778  }
 779  function mergeInto(merged, inputProps) {
 780    if (isPropsGetter(inputProps)) {
 781      return resolvePropsGetter(inputProps, merged);
 782    }
 783    return mutablyMergeInto(merged, inputProps);
 784  }
 785  function copyInitialProps(inputProps) {
 786    const copiedProps = {
 787      ...inputProps
 788    };
 789    for (const propName in copiedProps) {
 790      const propValue = copiedProps[propName];
 791      if (isEventHandler(propName, propValue)) {
 792        copiedProps[propName] = wrapEventHandler(propValue);
 793      }
 794    }
 795    return copiedProps;
 796  }
 797  function mutablyMergeInto(mergedProps, externalProps) {
 798    if (!externalProps) {
 799      return mergedProps;
 800    }
 801    for (const propName in externalProps) {
 802      const externalPropValue = externalProps[propName];
 803      switch (propName) {
 804        case "style": {
 805          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 806          break;
 807        }
 808        case "className": {
 809          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 810          break;
 811        }
 812        default: {
 813          if (isEventHandler(propName, externalPropValue)) {
 814            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 815          } else {
 816            mergedProps[propName] = externalPropValue;
 817          }
 818        }
 819      }
 820    }
 821    return mergedProps;
 822  }
 823  function isEventHandler(key, value) {
 824    const code0 = key.charCodeAt(0);
 825    const code1 = key.charCodeAt(1);
 826    const code2 = key.charCodeAt(2);
 827    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 828  }
 829  function isPropsGetter(inputProps) {
 830    return typeof inputProps === "function";
 831  }
 832  function resolvePropsGetter(inputProps, previousProps) {
 833    if (isPropsGetter(inputProps)) {
 834      return inputProps(previousProps);
 835    }
 836    return inputProps ?? EMPTY_PROPS;
 837  }
 838  function mergeEventHandlers(ourHandler, theirHandler) {
 839    if (!theirHandler) {
 840      return ourHandler;
 841    }
 842    if (!ourHandler) {
 843      return wrapEventHandler(theirHandler);
 844    }
 845    return (...args) => {
 846      const event = args[0];
 847      if (isSyntheticEvent(event)) {
 848        const baseUIEvent = event;
 849        makeEventPreventable(baseUIEvent);
 850        const result2 = theirHandler(...args);
 851        if (!baseUIEvent.baseUIHandlerPrevented) {
 852          ourHandler?.(...args);
 853        }
 854        return result2;
 855      }
 856      const result = theirHandler(...args);
 857      ourHandler?.(...args);
 858      return result;
 859    };
 860  }
 861  function wrapEventHandler(handler) {
 862    if (!handler) {
 863      return handler;
 864    }
 865    return (...args) => {
 866      const event = args[0];
 867      if (isSyntheticEvent(event)) {
 868        makeEventPreventable(event);
 869      }
 870      return handler(...args);
 871    };
 872  }
 873  function makeEventPreventable(event) {
 874    event.preventBaseUIHandler = () => {
 875      event.baseUIHandlerPrevented = true;
 876    };
 877    return event;
 878  }
 879  function mergeClassNames(ourClassName, theirClassName) {
 880    if (theirClassName) {
 881      if (ourClassName) {
 882        return theirClassName + " " + ourClassName;
 883      }
 884      return theirClassName;
 885    }
 886    return ourClassName;
 887  }
 888  function isSyntheticEvent(event) {
 889    return event != null && typeof event === "object" && "nativeEvent" in event;
 890  }
 891  
 892  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 893  var import_react = __toESM(require_react(), 1);
 894  function useRenderElement(element, componentProps, params = {}) {
 895    const renderProp = componentProps.render;
 896    const outProps = useRenderElementProps(componentProps, params);
 897    if (params.enabled === false) {
 898      return null;
 899    }
 900    const state = params.state ?? EMPTY_OBJECT;
 901    return evaluateRenderProp(element, renderProp, outProps, state);
 902  }
 903  function useRenderElementProps(componentProps, params = {}) {
 904    const {
 905      className: classNameProp,
 906      style: styleProp,
 907      render: renderProp
 908    } = componentProps;
 909    const {
 910      state = EMPTY_OBJECT,
 911      ref,
 912      props,
 913      stateAttributesMapping,
 914      enabled = true
 915    } = params;
 916    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 917    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 918    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
 919    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 920    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 921    if (typeof document !== "undefined") {
 922      if (!enabled) {
 923        void useMergedRefs(null, null);
 924      } else if (Array.isArray(ref)) {
 925        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 926      } else {
 927        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 928      }
 929    }
 930    if (!enabled) {
 931      return EMPTY_OBJECT;
 932    }
 933    if (className !== void 0) {
 934      outProps.className = mergeClassNames(outProps.className, className);
 935    }
 936    if (style !== void 0) {
 937      outProps.style = mergeObjects(outProps.style, style);
 938    }
 939    return outProps;
 940  }
 941  function resolveRenderFunctionProps(props) {
 942    if (Array.isArray(props)) {
 943      return mergePropsN(props);
 944    }
 945    return mergeProps(void 0, props);
 946  }
 947  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 948  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 949  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 950  function evaluateRenderProp(element, render, props, state) {
 951    if (render) {
 952      if (typeof render === "function") {
 953        if (true) {
 954          warnIfRenderPropLooksLikeComponent(render);
 955        }
 956        return render(props, state);
 957      }
 958      const mergedProps = mergeProps(props, render.props);
 959      mergedProps.ref = props.ref;
 960      let newElement = render;
 961      if (newElement?.$$typeof === REACT_LAZY_TYPE) {
 962        const children = React6.Children.toArray(render);
 963        newElement = children[0];
 964      }
 965      if (true) {
 966        if (!/* @__PURE__ */ React6.isValidElement(newElement)) {
 967          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"));
 968        }
 969      }
 970      return /* @__PURE__ */ React6.cloneElement(newElement, mergedProps);
 971    }
 972    if (element) {
 973      if (typeof element === "string") {
 974        return renderTag(element, props);
 975      }
 976    }
 977    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 978  }
 979  function warnIfRenderPropLooksLikeComponent(renderFn) {
 980    const functionName = renderFn.name;
 981    if (functionName.length === 0) {
 982      return;
 983    }
 984    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 985      return;
 986    }
 987    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 988      return;
 989    }
 990    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");
 991  }
 992  function renderTag(Tag, props) {
 993    if (Tag === "button") {
 994      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 995        type: "button",
 996        ...props,
 997        key: props.key
 998      });
 999    }
1000    if (Tag === "img") {
1001      return /* @__PURE__ */ (0, import_react.createElement)("img", {
1002        alt: "",
1003        ...props,
1004        key: props.key
1005      });
1006    }
1007    return /* @__PURE__ */ React6.createElement(Tag, props);
1008  }
1009  
1010  // node_modules/@base-ui/utils/useId.mjs
1011  var React7 = __toESM(require_react(), 1);
1012  var globalId = 0;
1013  function useGlobalId(idOverride, prefix = "mui") {
1014    const [defaultId, setDefaultId] = React7.useState(idOverride);
1015    const id = idOverride || defaultId;
1016    React7.useEffect(() => {
1017      if (defaultId == null) {
1018        globalId += 1;
1019        setDefaultId(`$prefix}-$globalId}`);
1020      }
1021    }, [defaultId, prefix]);
1022    return id;
1023  }
1024  var maybeReactUseId = SafeReact.useId;
1025  function useId(idOverride, prefix) {
1026    if (maybeReactUseId !== void 0) {
1027      const reactId = maybeReactUseId();
1028      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
1029    }
1030    return useGlobalId(idOverride, prefix);
1031  }
1032  
1033  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
1034  function useBaseUiId(idOverride) {
1035    return useId(idOverride, "base-ui");
1036  }
1037  
1038  // node_modules/@base-ui/react/internals/reason-parts.mjs
1039  var reason_parts_exports = {};
1040  __export(reason_parts_exports, {
1041    cancelOpen: () => cancelOpen,
1042    chipRemovePress: () => chipRemovePress,
1043    clearPress: () => clearPress,
1044    closePress: () => closePress,
1045    closeWatcher: () => closeWatcher,
1046    decrementPress: () => decrementPress,
1047    disabled: () => disabled,
1048    drag: () => drag,
1049    escapeKey: () => escapeKey,
1050    focusOut: () => focusOut,
1051    imperativeAction: () => imperativeAction,
1052    incrementPress: () => incrementPress,
1053    initial: () => initial,
1054    inputBlur: () => inputBlur,
1055    inputChange: () => inputChange,
1056    inputClear: () => inputClear,
1057    inputPaste: () => inputPaste,
1058    inputPress: () => inputPress,
1059    itemPress: () => itemPress,
1060    keyboard: () => keyboard,
1061    linkPress: () => linkPress,
1062    listNavigation: () => listNavigation,
1063    missing: () => missing,
1064    none: () => none,
1065    outsidePress: () => outsidePress,
1066    pointer: () => pointer,
1067    scrub: () => scrub,
1068    siblingOpen: () => siblingOpen,
1069    swipe: () => swipe,
1070    trackPress: () => trackPress,
1071    triggerFocus: () => triggerFocus,
1072    triggerHover: () => triggerHover,
1073    triggerPress: () => triggerPress,
1074    wheel: () => wheel,
1075    windowResize: () => windowResize
1076  });
1077  var none = "none";
1078  var triggerPress = "trigger-press";
1079  var triggerHover = "trigger-hover";
1080  var triggerFocus = "trigger-focus";
1081  var outsidePress = "outside-press";
1082  var itemPress = "item-press";
1083  var closePress = "close-press";
1084  var linkPress = "link-press";
1085  var clearPress = "clear-press";
1086  var chipRemovePress = "chip-remove-press";
1087  var trackPress = "track-press";
1088  var incrementPress = "increment-press";
1089  var decrementPress = "decrement-press";
1090  var inputChange = "input-change";
1091  var inputClear = "input-clear";
1092  var inputBlur = "input-blur";
1093  var inputPaste = "input-paste";
1094  var inputPress = "input-press";
1095  var focusOut = "focus-out";
1096  var escapeKey = "escape-key";
1097  var closeWatcher = "close-watcher";
1098  var listNavigation = "list-navigation";
1099  var keyboard = "keyboard";
1100  var pointer = "pointer";
1101  var drag = "drag";
1102  var wheel = "wheel";
1103  var scrub = "scrub";
1104  var cancelOpen = "cancel-open";
1105  var siblingOpen = "sibling-open";
1106  var disabled = "disabled";
1107  var missing = "missing";
1108  var initial = "initial";
1109  var imperativeAction = "imperative-action";
1110  var swipe = "swipe";
1111  var windowResize = "window-resize";
1112  
1113  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
1114  function createChangeEventDetails(reason, event, trigger, customProperties) {
1115    let canceled = false;
1116    let allowPropagation = false;
1117    const custom = customProperties ?? EMPTY_OBJECT;
1118    const details = {
1119      reason,
1120      event: event ?? new Event("base-ui"),
1121      cancel() {
1122        canceled = true;
1123      },
1124      allowPropagation() {
1125        allowPropagation = true;
1126      },
1127      get isCanceled() {
1128        return canceled;
1129      },
1130      get isPropagationAllowed() {
1131        return allowPropagation;
1132      },
1133      trigger,
1134      ...custom
1135    };
1136    return details;
1137  }
1138  
1139  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1140  var React9 = __toESM(require_react(), 1);
1141  
1142  // node_modules/@base-ui/utils/useOnMount.mjs
1143  var React8 = __toESM(require_react(), 1);
1144  function useOnMount(fn) {
1145    React8.useEffect(fn, EMPTY_ARRAY);
1146  }
1147  
1148  // node_modules/@base-ui/utils/useAnimationFrame.mjs
1149  var EMPTY = null;
1150  var LAST_RAF = globalThis.requestAnimationFrame;
1151  var Scheduler = class {
1152    /* This implementation uses an array as a backing data-structure for frame callbacks.
1153     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1154     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1155     * be much more efficient if there is a call pattern that alterns as
1156     * "request-cancel-request-cancel-…".
1157     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1158     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1159    callbacks = [];
1160    callbacksCount = 0;
1161    nextId = 1;
1162    startId = 1;
1163    isScheduled = false;
1164    tick = (timestamp) => {
1165      this.isScheduled = false;
1166      const currentCallbacks = this.callbacks;
1167      const currentCallbacksCount = this.callbacksCount;
1168      this.callbacks = [];
1169      this.callbacksCount = 0;
1170      this.startId = this.nextId;
1171      if (currentCallbacksCount > 0) {
1172        for (let i2 = 0; i2 < currentCallbacks.length; i2 += 1) {
1173          currentCallbacks[i2]?.(timestamp);
1174        }
1175      }
1176    };
1177    request(fn) {
1178      const id = this.nextId;
1179      this.nextId += 1;
1180      this.callbacks.push(fn);
1181      this.callbacksCount += 1;
1182      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1183      if (!this.isScheduled || didRAFChange) {
1184        requestAnimationFrame(this.tick);
1185        this.isScheduled = true;
1186      }
1187      return id;
1188    }
1189    cancel(id) {
1190      const index2 = id - this.startId;
1191      if (index2 < 0 || index2 >= this.callbacks.length) {
1192        return;
1193      }
1194      this.callbacks[index2] = null;
1195      this.callbacksCount -= 1;
1196    }
1197  };
1198  var scheduler = new Scheduler();
1199  var AnimationFrame = class _AnimationFrame {
1200    static create() {
1201      return new _AnimationFrame();
1202    }
1203    static request(fn) {
1204      return scheduler.request(fn);
1205    }
1206    static cancel(id) {
1207      return scheduler.cancel(id);
1208    }
1209    currentId = EMPTY;
1210    /**
1211     * Executes `fn` after `delay`, clearing any previously scheduled call.
1212     */
1213    request(fn) {
1214      this.cancel();
1215      this.currentId = scheduler.request(() => {
1216        this.currentId = EMPTY;
1217        fn();
1218      });
1219    }
1220    cancel = () => {
1221      if (this.currentId !== EMPTY) {
1222        scheduler.cancel(this.currentId);
1223        this.currentId = EMPTY;
1224      }
1225    };
1226    disposeEffect = () => {
1227      return this.cancel;
1228    };
1229  };
1230  function useAnimationFrame() {
1231    const timeout = useRefWithInit(AnimationFrame.create).current;
1232    useOnMount(timeout.disposeEffect);
1233    return timeout;
1234  }
1235  
1236  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1237  function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1238    const [transitionStatus, setTransitionStatus] = React9.useState(open && enableIdleState ? "idle" : void 0);
1239    const [mounted, setMounted] = React9.useState(open);
1240    if (open && !mounted) {
1241      setMounted(true);
1242      setTransitionStatus("starting");
1243    }
1244    if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1245      setTransitionStatus("ending");
1246    }
1247    if (!open && !mounted && transitionStatus === "ending") {
1248      setTransitionStatus(void 0);
1249    }
1250    useIsoLayoutEffect(() => {
1251      if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1252        const frame = AnimationFrame.request(() => {
1253          setTransitionStatus("ending");
1254        });
1255        return () => {
1256          AnimationFrame.cancel(frame);
1257        };
1258      }
1259      return void 0;
1260    }, [open, mounted, transitionStatus, deferEndingState]);
1261    useIsoLayoutEffect(() => {
1262      if (!open || enableIdleState) {
1263        return void 0;
1264      }
1265      const frame = AnimationFrame.request(() => {
1266        setTransitionStatus(void 0);
1267      });
1268      return () => {
1269        AnimationFrame.cancel(frame);
1270      };
1271    }, [enableIdleState, open]);
1272    useIsoLayoutEffect(() => {
1273      if (!open || !enableIdleState) {
1274        return void 0;
1275      }
1276      if (open && mounted && transitionStatus !== "idle") {
1277        setTransitionStatus("starting");
1278      }
1279      const frame = AnimationFrame.request(() => {
1280        setTransitionStatus("idle");
1281      });
1282      return () => {
1283        AnimationFrame.cancel(frame);
1284      };
1285    }, [enableIdleState, open, mounted, transitionStatus]);
1286    return {
1287      mounted,
1288      setMounted,
1289      transitionStatus
1290    };
1291  }
1292  
1293  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1294  var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1295    TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1296    TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1297    return TransitionStatusDataAttributes2;
1298  })({});
1299  var STARTING_HOOK = {
1300    "data-starting-style": ""
1301  };
1302  var ENDING_HOOK = {
1303    "data-ending-style": ""
1304  };
1305  var transitionStatusMapping = {
1306    transitionStatus(value) {
1307      if (value === "starting") {
1308        return STARTING_HOOK;
1309      }
1310      if (value === "ending") {
1311        return ENDING_HOOK;
1312      }
1313      return null;
1314    }
1315  };
1316  
1317  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1318  function hasWindow() {
1319    return typeof window !== "undefined";
1320  }
1321  function getNodeName(node) {
1322    if (isNode(node)) {
1323      return (node.nodeName || "").toLowerCase();
1324    }
1325    return "#document";
1326  }
1327  function getWindow(node) {
1328    var _node$ownerDocument;
1329    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1330  }
1331  function getDocumentElement(node) {
1332    var _ref;
1333    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1334  }
1335  function isNode(value) {
1336    if (!hasWindow()) {
1337      return false;
1338    }
1339    return value instanceof Node || value instanceof getWindow(value).Node;
1340  }
1341  function isElement(value) {
1342    if (!hasWindow()) {
1343      return false;
1344    }
1345    return value instanceof Element || value instanceof getWindow(value).Element;
1346  }
1347  function isHTMLElement(value) {
1348    if (!hasWindow()) {
1349      return false;
1350    }
1351    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1352  }
1353  function isShadowRoot(value) {
1354    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1355      return false;
1356    }
1357    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1358  }
1359  function isOverflowElement(element) {
1360    const {
1361      overflow,
1362      overflowX,
1363      overflowY,
1364      display
1365    } = getComputedStyle2(element);
1366    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1367  }
1368  function isTableElement(element) {
1369    return /^(table|td|th)$/.test(getNodeName(element));
1370  }
1371  function isTopLayer(element) {
1372    try {
1373      if (element.matches(":popover-open")) {
1374        return true;
1375      }
1376    } catch (_e) {
1377    }
1378    try {
1379      return element.matches(":modal");
1380    } catch (_e) {
1381      return false;
1382    }
1383  }
1384  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1385  var containRe = /paint|layout|strict|content/;
1386  var isNotNone = (value) => !!value && value !== "none";
1387  var isWebKitValue;
1388  function isContainingBlock(elementOrCss) {
1389    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1390    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 || "");
1391  }
1392  function getContainingBlock(element) {
1393    let currentNode = getParentNode(element);
1394    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1395      if (isContainingBlock(currentNode)) {
1396        return currentNode;
1397      } else if (isTopLayer(currentNode)) {
1398        return null;
1399      }
1400      currentNode = getParentNode(currentNode);
1401    }
1402    return null;
1403  }
1404  function isWebKit() {
1405    if (isWebKitValue == null) {
1406      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1407    }
1408    return isWebKitValue;
1409  }
1410  function isLastTraversableNode(node) {
1411    return /^(html|body|#document)$/.test(getNodeName(node));
1412  }
1413  function getComputedStyle2(element) {
1414    return getWindow(element).getComputedStyle(element);
1415  }
1416  function getNodeScroll(element) {
1417    if (isElement(element)) {
1418      return {
1419        scrollLeft: element.scrollLeft,
1420        scrollTop: element.scrollTop
1421      };
1422    }
1423    return {
1424      scrollLeft: element.scrollX,
1425      scrollTop: element.scrollY
1426    };
1427  }
1428  function getParentNode(node) {
1429    if (getNodeName(node) === "html") {
1430      return node;
1431    }
1432    const result = (
1433      // Step into the shadow DOM of the parent of a slotted node.
1434      node.assignedSlot || // DOM Element detected.
1435      node.parentNode || // ShadowRoot detected.
1436      isShadowRoot(node) && node.host || // Fallback.
1437      getDocumentElement(node)
1438    );
1439    return isShadowRoot(result) ? result.host : result;
1440  }
1441  function getNearestOverflowAncestor(node) {
1442    const parentNode = getParentNode(node);
1443    if (isLastTraversableNode(parentNode)) {
1444      return (node.ownerDocument || node).body;
1445    }
1446    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1447      return parentNode;
1448    }
1449    return getNearestOverflowAncestor(parentNode);
1450  }
1451  function getOverflowAncestors(node, list, traverseIframes) {
1452    var _node$ownerDocument2;
1453    if (list === void 0) {
1454      list = [];
1455    }
1456    if (traverseIframes === void 0) {
1457      traverseIframes = true;
1458    }
1459    const scrollableAncestor = getNearestOverflowAncestor(node);
1460    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1461    const win = getWindow(scrollableAncestor);
1462    if (isBody) {
1463      const frameElement = getFrameElement(win);
1464      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1465    } else {
1466      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1467    }
1468  }
1469  function getFrameElement(win) {
1470    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1471  }
1472  
1473  // node_modules/@base-ui/utils/owner.mjs
1474  function ownerDocument(node) {
1475    return node?.ownerDocument || document;
1476  }
1477  
1478  // node_modules/@base-ui/utils/addEventListener.mjs
1479  function addEventListener(target, type, listener, options) {
1480    target.addEventListener(type, listener, options);
1481    return () => {
1482      target.removeEventListener(type, listener, options);
1483    };
1484  }
1485  
1486  // node_modules/@base-ui/utils/useValueAsRef.mjs
1487  function useValueAsRef(value) {
1488    const latest = useRefWithInit(createLatestRef, value).current;
1489    latest.next = value;
1490    useIsoLayoutEffect(latest.effect);
1491    return latest;
1492  }
1493  function createLatestRef(value) {
1494    const latest = {
1495      current: value,
1496      next: value,
1497      effect: () => {
1498        latest.current = latest.next;
1499      }
1500    };
1501    return latest;
1502  }
1503  
1504  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1505  var React10 = __toESM(require_react(), 1);
1506  
1507  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1508  var ReactDOM = __toESM(require_react_dom(), 1);
1509  
1510  // node_modules/@base-ui/react/utils/resolveRef.mjs
1511  function resolveRef(maybeRef) {
1512    if (maybeRef == null) {
1513      return maybeRef;
1514    }
1515    return "current" in maybeRef ? maybeRef.current : maybeRef;
1516  }
1517  
1518  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1519  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false) {
1520    const frame = useAnimationFrame();
1521    return useStableCallback((fnToExecute, signal = null) => {
1522      frame.cancel();
1523      const element = resolveRef(elementOrRef);
1524      if (element == null) {
1525        return;
1526      }
1527      const resolvedElement = element;
1528      const done = () => {
1529        ReactDOM.flushSync(fnToExecute);
1530      };
1531      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1532        fnToExecute();
1533        return;
1534      }
1535      function exec() {
1536        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1537          if (!signal?.aborted) {
1538            done();
1539          }
1540        }, () => {
1541          if (signal?.aborted) {
1542            return;
1543          }
1544          const currentAnimations = resolvedElement.getAnimations();
1545          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1546            exec();
1547            return;
1548          }
1549          done();
1550        });
1551      }
1552      if (waitForStartingStyleRemoved) {
1553        const startingStyleAttribute = "data-starting-style";
1554        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1555          frame.request(exec);
1556          return;
1557        }
1558        const attributeObserver = new MutationObserver(() => {
1559          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1560            attributeObserver.disconnect();
1561            exec();
1562          }
1563        });
1564        attributeObserver.observe(resolvedElement, {
1565          attributes: true,
1566          attributeFilter: [startingStyleAttribute]
1567        });
1568        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1569          once: true
1570        });
1571        return;
1572      }
1573      frame.request(exec);
1574    });
1575  }
1576  
1577  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1578  function useOpenChangeComplete(parameters) {
1579    const {
1580      enabled = true,
1581      open,
1582      ref,
1583      onComplete: onCompleteParam
1584    } = parameters;
1585    const onComplete = useStableCallback(onCompleteParam);
1586    const runOnceAnimationsFinish = useAnimationsFinished(ref, open);
1587    React10.useEffect(() => {
1588      if (!enabled) {
1589        return void 0;
1590      }
1591      const abortController = new AbortController();
1592      runOnceAnimationsFinish(onComplete, abortController.signal);
1593      return () => {
1594        abortController.abort();
1595      };
1596    }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1597  }
1598  
1599  // node_modules/@base-ui/utils/platform/parts.mjs
1600  var parts_exports = {};
1601  __export(parts_exports, {
1602    engine: () => engine_exports,
1603    env: () => env_exports,
1604    os: () => os_exports,
1605    screenReader: () => screen_reader_exports
1606  });
1607  
1608  // node_modules/@base-ui/utils/platform/os.mjs
1609  var os_exports = {};
1610  __export(os_exports, {
1611    android: () => android,
1612    apple: () => apple,
1613    ios: () => ios,
1614    linux: () => linux,
1615    mac: () => mac,
1616    windows: () => windows
1617  });
1618  
1619  // node_modules/@base-ui/utils/platform/shared.mjs
1620  function readRawData() {
1621    if (typeof navigator === "undefined") {
1622      return {
1623        userAgent: "",
1624        platform: "",
1625        maxTouchPoints: 0
1626      };
1627    }
1628    if (true) {
1629      const uaData = navigator.userAgentData;
1630      if (uaData && Array.isArray(uaData.brands)) {
1631        return {
1632          userAgent: uaData.brands.map(({
1633            brand,
1634            version: version2
1635          }) => `$brand}/$version2}`).join(" "),
1636          platform: uaData.platform ?? navigator.platform ?? "",
1637          maxTouchPoints: navigator.maxTouchPoints ?? 0
1638        };
1639      }
1640    }
1641    return {
1642      userAgent: navigator.userAgent,
1643      platform: navigator.platform ?? "",
1644      maxTouchPoints: navigator.maxTouchPoints ?? 0
1645    };
1646  }
1647  var {
1648    userAgent,
1649    platform,
1650    maxTouchPoints
1651  } = readRawData();
1652  var lowerUserAgent = userAgent.toLowerCase();
1653  var lowerPlatform = platform.toLowerCase();
1654  
1655  // node_modules/@base-ui/utils/platform/os.mjs
1656  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1657  var ANDROID_STRING = "android";
1658  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1659  var mac = !ios && lowerPlatform.startsWith("mac");
1660  var windows = lowerPlatform.startsWith("win");
1661  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1662  var apple = mac || ios;
1663  
1664  // node_modules/@base-ui/utils/platform/engine.mjs
1665  var engine_exports = {};
1666  __export(engine_exports, {
1667    blink: () => blink,
1668    gecko: () => gecko,
1669    webkit: () => webkit
1670  });
1671  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1672  var gecko = !webkit && lowerUserAgent.includes("firefox");
1673  var blink = !webkit && lowerUserAgent.includes("chrom");
1674  
1675  // node_modules/@base-ui/utils/platform/screen-reader.mjs
1676  var screen_reader_exports = {};
1677  __export(screen_reader_exports, {
1678    voiceOver: () => voiceOver
1679  });
1680  var voiceOver = apple;
1681  
1682  // node_modules/@base-ui/utils/platform/env.mjs
1683  var env_exports = {};
1684  __export(env_exports, {
1685    jsdom: () => jsdom
1686  });
1687  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1688  
1689  // node_modules/@base-ui/utils/useTimeout.mjs
1690  var EMPTY2 = 0;
1691  var Timeout = class _Timeout {
1692    static create() {
1693      return new _Timeout();
1694    }
1695    currentId = EMPTY2;
1696    /**
1697     * Executes `fn` after `delay`, clearing any previously scheduled call.
1698     */
1699    start(delay, fn) {
1700      this.clear();
1701      this.currentId = setTimeout(() => {
1702        this.currentId = EMPTY2;
1703        fn();
1704      }, delay);
1705    }
1706    isStarted() {
1707      return this.currentId !== EMPTY2;
1708    }
1709    clear = () => {
1710      if (this.currentId !== EMPTY2) {
1711        clearTimeout(this.currentId);
1712        this.currentId = EMPTY2;
1713      }
1714    };
1715    disposeEffect = () => {
1716      return this.clear;
1717    };
1718  };
1719  function useTimeout() {
1720    const timeout = useRefWithInit(Timeout.create).current;
1721    useOnMount(timeout.disposeEffect);
1722    return timeout;
1723  }
1724  
1725  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1726  var React11 = __toESM(require_react(), 1);
1727  
1728  // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1729  function isReactEvent(event) {
1730    return "nativeEvent" in event;
1731  }
1732  function isMouseLikePointerType(pointerType, strict) {
1733    const values = ["mouse", "pen"];
1734    if (!strict) {
1735      values.push("", void 0);
1736    }
1737    return values.includes(pointerType);
1738  }
1739  function isClickLikeEvent(event) {
1740    const type = event.type;
1741    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1742  }
1743  
1744  // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1745  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1746  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1747  
1748  // node_modules/@base-ui/react/internals/shadowDom.mjs
1749  function activeElement(doc) {
1750    let element = doc.activeElement;
1751    while (element?.shadowRoot?.activeElement != null) {
1752      element = element.shadowRoot.activeElement;
1753    }
1754    return element;
1755  }
1756  function contains(parent, child) {
1757    if (!parent || !child) {
1758      return false;
1759    }
1760    const rootNode = child.getRootNode?.();
1761    if (parent.contains(child)) {
1762      return true;
1763    }
1764    if (rootNode && isShadowRoot(rootNode)) {
1765      let next = child;
1766      while (next) {
1767        if (parent === next) {
1768          return true;
1769        }
1770        next = next.parentNode || next.host;
1771      }
1772    }
1773    return false;
1774  }
1775  function getTarget(event) {
1776    if ("composedPath" in event) {
1777      return event.composedPath()[0];
1778    }
1779    return event.target;
1780  }
1781  
1782  // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1783  function isTargetInsideEnabledTrigger(target, triggerElements) {
1784    if (!isElement(target)) {
1785      return false;
1786    }
1787    const targetElement = target;
1788    if (triggerElements.hasElement(targetElement)) {
1789      return !targetElement.hasAttribute("data-trigger-disabled");
1790    }
1791    for (const [, trigger] of triggerElements.entries()) {
1792      if (contains(trigger, targetElement)) {
1793        return !trigger.hasAttribute("data-trigger-disabled");
1794      }
1795    }
1796    return false;
1797  }
1798  function isEventTargetWithin(event, node) {
1799    if (node == null) {
1800      return false;
1801    }
1802    if ("composedPath" in event) {
1803      return event.composedPath().includes(node);
1804    }
1805    const eventAgain = event;
1806    return eventAgain.target != null && node.contains(eventAgain.target);
1807  }
1808  function isRootElement(element) {
1809    return element.matches("html,body");
1810  }
1811  function isTypeableElement(element) {
1812    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1813  }
1814  function isInteractiveElement(element) {
1815    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1816  }
1817  function matchesFocusVisible(element) {
1818    if (!element || parts_exports.env.jsdom) {
1819      return true;
1820    }
1821    try {
1822      return element.matches(":focus-visible");
1823    } catch (_e) {
1824      return true;
1825    }
1826  }
1827  
1828  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1829  function resolveValue(value, pointerType) {
1830    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1831      return 0;
1832    }
1833    if (typeof value === "function") {
1834      return value();
1835    }
1836    return value;
1837  }
1838  function getDelay(value, prop, pointerType) {
1839    const result = resolveValue(value, pointerType);
1840    if (typeof result === "number") {
1841      return result;
1842    }
1843    return result?.[prop];
1844  }
1845  function getRestMs(value) {
1846    if (typeof value === "function") {
1847      return value();
1848    }
1849    return value;
1850  }
1851  function isClickLikeOpenEvent(openEventType, interactedInside) {
1852    return interactedInside || openEventType === "click" || openEventType === "mousedown";
1853  }
1854  function isHoverOpenEvent(openEventType) {
1855    return openEventType?.includes("mouse") && openEventType !== "mousedown";
1856  }
1857  
1858  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1859  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1860  var FloatingDelayGroupContext = /* @__PURE__ */ React11.createContext({
1861    hasProvider: false,
1862    timeoutMs: 0,
1863    delayRef: {
1864      current: 0
1865    },
1866    initialDelayRef: {
1867      current: 0
1868    },
1869    timeout: new Timeout(),
1870    currentIdRef: {
1871      current: null
1872    },
1873    currentContextRef: {
1874      current: null
1875    }
1876  });
1877  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1878  function resetDelayRef(delayRef, initialDelayRef) {
1879    delayRef.current = initialDelayRef.current;
1880  }
1881  function FloatingDelayGroup(props) {
1882    const {
1883      children,
1884      delay,
1885      timeoutMs = 0
1886    } = props;
1887    const delayRef = React11.useRef(delay);
1888    const initialDelayRef = React11.useRef(delay);
1889    const currentIdRef = React11.useRef(null);
1890    const currentContextRef = React11.useRef(null);
1891    const timeout = useTimeout();
1892    useIsoLayoutEffect(() => {
1893      initialDelayRef.current = delay;
1894      if (!currentIdRef.current) {
1895        delayRef.current = delay;
1896        return;
1897      }
1898      delayRef.current = {
1899        open: getDelay(delayRef.current, "open"),
1900        close: getDelay(delay, "close")
1901      };
1902    }, [delay, currentIdRef, delayRef, initialDelayRef]);
1903    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
1904      value: React11.useMemo(() => ({
1905        hasProvider: true,
1906        delayRef,
1907        initialDelayRef,
1908        currentIdRef,
1909        timeoutMs,
1910        currentContextRef,
1911        timeout
1912      }), [timeoutMs, timeout]),
1913      children
1914    });
1915  }
1916  function useDelayGroup(context, options = {
1917    open: false
1918  }) {
1919    const {
1920      open
1921    } = options;
1922    const store = "rootStore" in context ? context.rootStore : context;
1923    const floatingId = store.useState("floatingId");
1924    const groupContext = React11.useContext(FloatingDelayGroupContext);
1925    const {
1926      currentIdRef,
1927      delayRef,
1928      timeoutMs,
1929      initialDelayRef,
1930      currentContextRef,
1931      hasProvider,
1932      timeout
1933    } = groupContext;
1934    const [isInstantPhase, setIsInstantPhase] = React11.useState(false);
1935    const openRef = React11.useRef(open);
1936    useIsoLayoutEffect(() => {
1937      openRef.current = open;
1938    }, [open]);
1939    useIsoLayoutEffect(() => {
1940      function unset() {
1941        currentContextRef.current?.setIsInstantPhase(false);
1942        currentIdRef.current = null;
1943        currentContextRef.current = null;
1944        delayRef.current = initialDelayRef.current;
1945        timeout.clear();
1946      }
1947      if (!currentIdRef.current) {
1948        return void 0;
1949      }
1950      if (!open && currentIdRef.current === floatingId) {
1951        setIsInstantPhase(false);
1952        if (timeoutMs) {
1953          const closingId = floatingId;
1954          timeout.start(timeoutMs, () => {
1955            if (store.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
1956              return;
1957            }
1958            unset();
1959          });
1960          return () => {
1961            if (openRef.current || currentIdRef.current !== closingId) {
1962              timeout.clear();
1963            }
1964          };
1965        }
1966        unset();
1967      }
1968      return void 0;
1969    }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]);
1970    useIsoLayoutEffect(() => {
1971      if (!open) {
1972        return;
1973      }
1974      const prevContext = currentContextRef.current;
1975      const prevId = currentIdRef.current;
1976      timeout.clear();
1977      currentContextRef.current = {
1978        onOpenChange: store.setOpen,
1979        setIsInstantPhase
1980      };
1981      currentIdRef.current = floatingId;
1982      delayRef.current = {
1983        open: 0,
1984        close: getDelay(initialDelayRef.current, "close")
1985      };
1986      if (prevId !== null && prevId !== floatingId) {
1987        setIsInstantPhase(true);
1988        prevContext?.setIsInstantPhase(true);
1989        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
1990      } else {
1991        setIsInstantPhase(false);
1992        prevContext?.setIsInstantPhase(false);
1993      }
1994    }, [open, floatingId, store, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
1995    useIsoLayoutEffect(() => {
1996      return () => {
1997        if (currentIdRef.current === floatingId) {
1998          currentContextRef.current = null;
1999          if (!openRef.current) {
2000            return;
2001          }
2002          currentIdRef.current = null;
2003          resetDelayRef(delayRef, initialDelayRef);
2004          timeout.clear();
2005        }
2006      };
2007    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2008    return React11.useMemo(() => ({
2009      hasProvider,
2010      delayRef,
2011      isInstantPhase
2012    }), [hasProvider, delayRef, isInstantPhase]);
2013  }
2014  
2015  // node_modules/@base-ui/utils/mergeCleanups.mjs
2016  function mergeCleanups(...cleanups) {
2017    return () => {
2018      for (let i2 = 0; i2 < cleanups.length; i2 += 1) {
2019        const cleanup = cleanups[i2];
2020        if (cleanup) {
2021          cleanup();
2022        }
2023      }
2024    };
2025  }
2026  
2027  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2028  var React12 = __toESM(require_react(), 1);
2029  
2030  // node_modules/@base-ui/utils/visuallyHidden.mjs
2031  var visuallyHiddenBase = {
2032    clipPath: "inset(50%)",
2033    overflow: "hidden",
2034    whiteSpace: "nowrap",
2035    border: 0,
2036    padding: 0,
2037    width: 1,
2038    height: 1,
2039    margin: -1
2040  };
2041  var visuallyHidden = {
2042    ...visuallyHiddenBase,
2043    position: "fixed",
2044    top: 0,
2045    left: 0
2046  };
2047  var visuallyHiddenInput = {
2048    ...visuallyHiddenBase,
2049    position: "absolute"
2050  };
2051  
2052  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2053  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2054  var FocusGuard = /* @__PURE__ */ React12.forwardRef(function FocusGuard2(props, ref) {
2055    const [role, setRole] = React12.useState();
2056    useIsoLayoutEffect(() => {
2057      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2058        setRole("button");
2059      }
2060    }, []);
2061    const restProps = {
2062      tabIndex: 0,
2063      // Role is only for VoiceOver
2064      role
2065    };
2066    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2067      ...props,
2068      ref,
2069      style: visuallyHidden,
2070      "aria-hidden": role ? void 0 : true,
2071      ...restProps,
2072      "data-base-ui-focus-guard": ""
2073    });
2074  });
2075  if (true) FocusGuard.displayName = "FocusGuard";
2076  
2077  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2078  var min = Math.min;
2079  var max = Math.max;
2080  var round = Math.round;
2081  var floor = Math.floor;
2082  var createCoords = (v2) => ({
2083    x: v2,
2084    y: v2
2085  });
2086  var oppositeSideMap = {
2087    left: "right",
2088    right: "left",
2089    bottom: "top",
2090    top: "bottom"
2091  };
2092  function clamp(start, value, end) {
2093    return max(start, min(value, end));
2094  }
2095  function evaluate(value, param) {
2096    return typeof value === "function" ? value(param) : value;
2097  }
2098  function getSide(placement) {
2099    return placement.split("-")[0];
2100  }
2101  function getAlignment(placement) {
2102    return placement.split("-")[1];
2103  }
2104  function getOppositeAxis(axis) {
2105    return axis === "x" ? "y" : "x";
2106  }
2107  function getAxisLength(axis) {
2108    return axis === "y" ? "height" : "width";
2109  }
2110  function getSideAxis(placement) {
2111    const firstChar = placement[0];
2112    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2113  }
2114  function getAlignmentAxis(placement) {
2115    return getOppositeAxis(getSideAxis(placement));
2116  }
2117  function getAlignmentSides(placement, rects, rtl) {
2118    if (rtl === void 0) {
2119      rtl = false;
2120    }
2121    const alignment = getAlignment(placement);
2122    const alignmentAxis = getAlignmentAxis(placement);
2123    const length = getAxisLength(alignmentAxis);
2124    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2125    if (rects.reference[length] > rects.floating[length]) {
2126      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2127    }
2128    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2129  }
2130  function getExpandedPlacements(placement) {
2131    const oppositePlacement = getOppositePlacement(placement);
2132    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2133  }
2134  function getOppositeAlignmentPlacement(placement) {
2135    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2136  }
2137  var lrPlacement = ["left", "right"];
2138  var rlPlacement = ["right", "left"];
2139  var tbPlacement = ["top", "bottom"];
2140  var btPlacement = ["bottom", "top"];
2141  function getSideList(side, isStart, rtl) {
2142    switch (side) {
2143      case "top":
2144      case "bottom":
2145        if (rtl) return isStart ? rlPlacement : lrPlacement;
2146        return isStart ? lrPlacement : rlPlacement;
2147      case "left":
2148      case "right":
2149        return isStart ? tbPlacement : btPlacement;
2150      default:
2151        return [];
2152    }
2153  }
2154  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2155    const alignment = getAlignment(placement);
2156    let list = getSideList(getSide(placement), direction === "start", rtl);
2157    if (alignment) {
2158      list = list.map((side) => side + "-" + alignment);
2159      if (flipAlignment) {
2160        list = list.concat(list.map(getOppositeAlignmentPlacement));
2161      }
2162    }
2163    return list;
2164  }
2165  function getOppositePlacement(placement) {
2166    const side = getSide(placement);
2167    return oppositeSideMap[side] + placement.slice(side.length);
2168  }
2169  function expandPaddingObject(padding) {
2170    var _padding$top, _padding$right, _padding$bottom, _padding$left;
2171    return {
2172      top: (_padding$top = padding.top) != null ? _padding$top : 0,
2173      right: (_padding$right = padding.right) != null ? _padding$right : 0,
2174      bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2175      left: (_padding$left = padding.left) != null ? _padding$left : 0
2176    };
2177  }
2178  function getPaddingObject(padding) {
2179    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2180      top: padding,
2181      right: padding,
2182      bottom: padding,
2183      left: padding
2184    };
2185  }
2186  function rectToClientRect(rect) {
2187    const {
2188      x: x2,
2189      y: y2,
2190      width,
2191      height
2192    } = rect;
2193    return {
2194      width,
2195      height,
2196      top: y2,
2197      left: x2,
2198      right: x2 + width,
2199      bottom: y2 + height,
2200      x: x2,
2201      y: y2
2202    };
2203  }
2204  
2205  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2206  function isHiddenByStyles(styles) {
2207    return styles.visibility === "hidden" || styles.visibility === "collapse";
2208  }
2209  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2210    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2211      return false;
2212    }
2213    if (typeof element.checkVisibility === "function") {
2214      return element.checkVisibility();
2215    }
2216    return styles.display !== "none" && styles.display !== "contents";
2217  }
2218  
2219  // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2220  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2221  function getParentElement(element) {
2222    const assignedSlot = element.assignedSlot;
2223    if (assignedSlot) {
2224      return assignedSlot;
2225    }
2226    if (element.parentElement) {
2227      return element.parentElement;
2228    }
2229    const rootNode = element.getRootNode();
2230    return isShadowRoot(rootNode) ? rootNode.host : null;
2231  }
2232  function getDetailsSummary(details) {
2233    for (const child of Array.from(details.children)) {
2234      if (getNodeName(child) === "summary") {
2235        return child;
2236      }
2237    }
2238    return null;
2239  }
2240  function isWithinOpenDetailsSummary(element, details) {
2241    const summary = getDetailsSummary(details);
2242    return !!summary && (element === summary || contains(summary, element));
2243  }
2244  function isFocusableCandidate(element) {
2245    const nodeName = element ? getNodeName(element) : "";
2246    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");
2247  }
2248  function isFocusableElement(element) {
2249    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2250      return false;
2251    }
2252    for (let current = element; current; current = getParentElement(current)) {
2253      const isAncestor = current !== element;
2254      const isSlot = getNodeName(current) === "slot";
2255      if (current.hasAttribute("inert")) {
2256        return false;
2257      }
2258      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2259        return false;
2260      }
2261    }
2262    return true;
2263  }
2264  function isVisibleInTabbableTree(element, isAncestor) {
2265    const styles = getComputedStyle2(element);
2266    if (!isAncestor) {
2267      return isElementVisible(element, styles);
2268    }
2269    return styles.display !== "none";
2270  }
2271  function getTabIndex(element) {
2272    const tabIndex = element.tabIndex;
2273    if (tabIndex < 0) {
2274      const nodeName = getNodeName(element);
2275      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2276        return 0;
2277      }
2278    }
2279    return tabIndex;
2280  }
2281  function getNamedRadioInput(element) {
2282    if (getNodeName(element) !== "input") {
2283      return null;
2284    }
2285    const input = element;
2286    return input.type === "radio" && input.name !== "" ? input : null;
2287  }
2288  function isTabbableRadio(element, candidates) {
2289    const input = getNamedRadioInput(element);
2290    if (!input) {
2291      return true;
2292    }
2293    const checkedRadio = candidates.find((candidate) => {
2294      const radio = getNamedRadioInput(candidate);
2295      return radio?.name === input.name && radio.form === input.form && radio.checked;
2296    });
2297    if (checkedRadio) {
2298      return checkedRadio === input;
2299    }
2300    return candidates.find((candidate) => {
2301      const radio = getNamedRadioInput(candidate);
2302      return radio?.name === input.name && radio.form === input.form;
2303    }) === input;
2304  }
2305  function getComposedChildren(container) {
2306    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2307      const assignedElements = container.assignedElements({
2308        flatten: true
2309      });
2310      if (assignedElements.length > 0) {
2311        return assignedElements;
2312      }
2313    }
2314    if (isHTMLElement(container) && container.shadowRoot) {
2315      return Array.from(container.shadowRoot.children);
2316    }
2317    return Array.from(container.children);
2318  }
2319  function appendCandidates(container, list) {
2320    getComposedChildren(container).forEach((child) => {
2321      if (isFocusableCandidate(child)) {
2322        list.push(child);
2323      }
2324      appendCandidates(child, list);
2325    });
2326  }
2327  function appendMatchingElements(container, selector, list) {
2328    getComposedChildren(container).forEach((child) => {
2329      if (isHTMLElement(child) && child.matches(selector)) {
2330        list.push(child);
2331      }
2332      appendMatchingElements(child, selector, list);
2333    });
2334  }
2335  function focusable(container) {
2336    const candidates = [];
2337    appendCandidates(container, candidates);
2338    return candidates.filter(isFocusableElement);
2339  }
2340  function tabbable(container) {
2341    const candidates = focusable(container);
2342    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2343  }
2344  function getTabbableIn(container, dir) {
2345    const list = tabbable(container);
2346    const len = list.length;
2347    if (len === 0) {
2348      return void 0;
2349    }
2350    const active = activeElement(ownerDocument(container));
2351    const index2 = list.indexOf(active);
2352    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2353    return list[nextIndex];
2354  }
2355  function getNextTabbable(referenceElement) {
2356    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2357  }
2358  function getPreviousTabbable(referenceElement) {
2359    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2360  }
2361  function isOutsideEvent(event, container) {
2362    const containerElement = container || event.currentTarget;
2363    const relatedTarget = event.relatedTarget;
2364    return !relatedTarget || !contains(containerElement, relatedTarget);
2365  }
2366  function disableFocusInside(container) {
2367    const tabbableElements = tabbable(container);
2368    tabbableElements.forEach((element) => {
2369      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2370      element.setAttribute("tabindex", "-1");
2371    });
2372  }
2373  function enableFocusInside(container) {
2374    const elements2 = [];
2375    appendMatchingElements(container, "[data-tabindex]", elements2);
2376    elements2.forEach((element) => {
2377      const tabindex = element.dataset.tabindex;
2378      delete element.dataset.tabindex;
2379      if (tabindex) {
2380        element.setAttribute("tabindex", tabindex);
2381      } else {
2382        element.removeAttribute("tabindex");
2383      }
2384    });
2385  }
2386  
2387  // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2388  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2389    const directChildren = nodes.filter((node) => node.parentId === id);
2390    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2391  }
2392  
2393  // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2394  function createAttribute(name2) {
2395    return `data-base-ui-$name2}`;
2396  }
2397  
2398  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2399  var React13 = __toESM(require_react(), 1);
2400  var ReactDOM2 = __toESM(require_react_dom(), 1);
2401  
2402  // node_modules/@base-ui/react/internals/constants.mjs
2403  var DISABLED_TRANSITIONS_STYLE = {
2404    style: {
2405      transition: "none"
2406    }
2407  };
2408  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2409  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2410  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2411  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2412  var POPUP_COLLISION_AVOIDANCE = {
2413    fallbackAxisSide: "end"
2414  };
2415  var ownerVisuallyHidden = {
2416    clipPath: "inset(50%)",
2417    position: "fixed",
2418    top: 0,
2419    left: 0
2420  };
2421  
2422  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2423  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2424  var PortalContext = /* @__PURE__ */ React13.createContext(null);
2425  if (true) PortalContext.displayName = "PortalContext";
2426  var usePortalContext = () => React13.useContext(PortalContext);
2427  var attr = createAttribute("portal");
2428  function useFloatingPortalNode(props = {}) {
2429    const {
2430      ref,
2431      container: containerProp,
2432      componentProps = EMPTY_OBJECT,
2433      elementProps
2434    } = props;
2435    const uniqueId = useId();
2436    const portalContext = usePortalContext();
2437    const parentPortalNode = portalContext?.portalNode;
2438    const [containerElement, setContainerElement] = React13.useState(null);
2439    const [portalNode, setPortalNode] = React13.useState(null);
2440    const setPortalNodeRef = useStableCallback((node) => {
2441      if (node !== null) {
2442        setPortalNode(node);
2443      }
2444    });
2445    const containerRef = React13.useRef(null);
2446    useIsoLayoutEffect(() => {
2447      if (containerProp === null) {
2448        if (containerRef.current) {
2449          containerRef.current = null;
2450          setPortalNode(null);
2451          setContainerElement(null);
2452        }
2453        return;
2454      }
2455      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2456      if (resolvedContainer == null) {
2457        if (containerRef.current) {
2458          containerRef.current = null;
2459          setPortalNode(null);
2460          setContainerElement(null);
2461        }
2462        return;
2463      }
2464      if (containerRef.current !== resolvedContainer) {
2465        containerRef.current = resolvedContainer;
2466        setPortalNode(null);
2467        setContainerElement(resolvedContainer);
2468      }
2469    }, [containerProp, parentPortalNode]);
2470    const portalElement = useRenderElement("div", componentProps, {
2471      ref: [ref, setPortalNodeRef],
2472      props: [{
2473        id: uniqueId,
2474        [attr]: ""
2475      }, elementProps]
2476    });
2477    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2478    return {
2479      node: portalNode,
2480      // `id` and `render` props can override or remove the generated ID. Use the exact
2481      // rendered value so `aria-owns` never points at an ID absent from the DOM.
2482      nodeId: /* @__PURE__ */ React13.isValidElement(portalElement) ? portalElement.props.id : void 0,
2483      subtree: portalSubtree
2484    };
2485  }
2486  var FloatingPortal = /* @__PURE__ */ React13.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2487    const {
2488      render,
2489      className,
2490      style,
2491      children,
2492      container,
2493      ...elementProps
2494    } = componentProps;
2495    const {
2496      node: portalNode,
2497      nodeId: portalNodeId,
2498      subtree: portalSubtree
2499    } = useFloatingPortalNode({
2500      container,
2501      ref: forwardedRef,
2502      componentProps,
2503      elementProps
2504    });
2505    const beforeOutsideRef = React13.useRef(null);
2506    const afterOutsideRef = React13.useRef(null);
2507    const beforeInsideRef = React13.useRef(null);
2508    const afterInsideRef = React13.useRef(null);
2509    const [focusManagerState, setFocusManagerState] = React13.useState(null);
2510    const focusInsideDisabledRef = React13.useRef(false);
2511    const modal = focusManagerState?.modal;
2512    const open = focusManagerState?.open;
2513    const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2514    React13.useEffect(() => {
2515      if (!portalNode || modal) {
2516        return void 0;
2517      }
2518      function onFocus(event) {
2519        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2520          if (event.type === "focusin") {
2521            if (focusInsideDisabledRef.current) {
2522              enableFocusInside(portalNode);
2523              focusInsideDisabledRef.current = false;
2524            }
2525          } else {
2526            disableFocusInside(portalNode);
2527            focusInsideDisabledRef.current = true;
2528          }
2529        }
2530      }
2531      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2532    }, [portalNode, modal]);
2533    useIsoLayoutEffect(() => {
2534      if (!portalNode || open !== true || !focusInsideDisabledRef.current) {
2535        return;
2536      }
2537      enableFocusInside(portalNode);
2538      focusInsideDisabledRef.current = false;
2539    }, [open, portalNode]);
2540    const portalContextValue = React13.useMemo(() => ({
2541      beforeOutsideRef,
2542      afterOutsideRef,
2543      beforeInsideRef,
2544      afterInsideRef,
2545      portalNode,
2546      setFocusManagerState
2547    }), [portalNode]);
2548    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React13.Fragment, {
2549      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2550        value: portalContextValue,
2551        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2552          "data-type": "outside",
2553          ref: beforeOutsideRef,
2554          onFocus: (event) => {
2555            if (isOutsideEvent(event, portalNode)) {
2556              beforeInsideRef.current?.focus();
2557            } else {
2558              const domReference = focusManagerState ? focusManagerState.domReference : null;
2559              const prevTabbable = getPreviousTabbable(domReference);
2560              prevTabbable?.focus();
2561            }
2562          }
2563        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2564          "aria-owns": portalNodeId,
2565          style: ownerVisuallyHidden
2566        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2567          "data-type": "outside",
2568          ref: afterOutsideRef,
2569          onFocus: (event) => {
2570            if (isOutsideEvent(event, portalNode)) {
2571              afterInsideRef.current?.focus();
2572            } else {
2573              const domReference = focusManagerState ? focusManagerState.domReference : null;
2574              const nextTabbable = getNextTabbable(domReference);
2575              nextTabbable?.focus();
2576              if (focusManagerState?.closeOnFocusOut) {
2577                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2578              }
2579            }
2580          }
2581        })]
2582      })]
2583    });
2584  });
2585  if (true) FloatingPortal.displayName = "FloatingPortal";
2586  
2587  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2588  var React14 = __toESM(require_react(), 1);
2589  
2590  // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2591  function createEventEmitter() {
2592    const map = /* @__PURE__ */ new Map();
2593    return {
2594      emit(event, data) {
2595        map.get(event)?.forEach((listener) => listener(data));
2596      },
2597      on(event, listener) {
2598        if (!map.has(event)) {
2599          map.set(event, /* @__PURE__ */ new Set());
2600        }
2601        map.get(event).add(listener);
2602      },
2603      off(event, listener) {
2604        map.get(event)?.delete(listener);
2605      }
2606    };
2607  }
2608  
2609  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2610  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2611  var FloatingNodeContext = /* @__PURE__ */ React14.createContext(null);
2612  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2613  var FloatingTreeContext = /* @__PURE__ */ React14.createContext(null);
2614  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2615  var useFloatingParentNodeId = () => React14.useContext(FloatingNodeContext)?.id || null;
2616  var useFloatingTree = (externalTree) => {
2617    const contextTree = React14.useContext(FloatingTreeContext);
2618    return externalTree ?? contextTree;
2619  };
2620  
2621  // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2622  var React15 = __toESM(require_react(), 1);
2623  function createVirtualElement(domElement, data) {
2624    let offsetX = null;
2625    let offsetY = null;
2626    let isAutoUpdateEvent = false;
2627    return {
2628      contextElement: domElement || void 0,
2629      getBoundingClientRect() {
2630        const domRect = domElement?.getBoundingClientRect() || {
2631          width: 0,
2632          height: 0,
2633          x: 0,
2634          y: 0
2635        };
2636        const isXAxis = data.axis === "x" || data.axis === "both";
2637        const isYAxis = data.axis === "y" || data.axis === "both";
2638        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2639        let width = domRect.width;
2640        let height = domRect.height;
2641        let x2 = domRect.x;
2642        let y2 = domRect.y;
2643        if (offsetX == null && data.x && isXAxis) {
2644          offsetX = domRect.x - data.x;
2645        }
2646        if (offsetY == null && data.y && isYAxis) {
2647          offsetY = domRect.y - data.y;
2648        }
2649        x2 -= offsetX || 0;
2650        y2 -= offsetY || 0;
2651        width = 0;
2652        height = 0;
2653        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2654          width = data.axis === "y" ? domRect.width : 0;
2655          height = data.axis === "x" ? domRect.height : 0;
2656          x2 = isXAxis && data.x != null ? data.x : x2;
2657          y2 = isYAxis && data.y != null ? data.y : y2;
2658        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2659          height = data.axis === "x" ? domRect.height : height;
2660          width = data.axis === "y" ? domRect.width : width;
2661        }
2662        isAutoUpdateEvent = true;
2663        return {
2664          width,
2665          height,
2666          x: x2,
2667          y: y2,
2668          top: y2,
2669          right: x2 + width,
2670          bottom: y2 + height,
2671          left: x2
2672        };
2673      }
2674    };
2675  }
2676  function isMouseBasedEvent(event) {
2677    return event != null && event.clientX != null;
2678  }
2679  function useClientPoint(context, props = {}) {
2680    const {
2681      enabled = true,
2682      axis = "both"
2683    } = props;
2684    const store = "rootStore" in context ? context.rootStore : context;
2685    const open = store.useState("open");
2686    const floating = store.useState("floatingElement");
2687    const domReference = store.useState("domReferenceElement");
2688    const dataRef = store.context.dataRef;
2689    const initialRef = React15.useRef(false);
2690    const cleanupListenerRef = React15.useRef(null);
2691    const [pointerType, setPointerType] = React15.useState();
2692    const [reactive, setReactive] = React15.useState([]);
2693    const resetReference = useStableCallback((reference2) => {
2694      store.set("positionReference", reference2);
2695    });
2696    const setReference = useStableCallback((newX, newY, referenceElement) => {
2697      if (initialRef.current) {
2698        return;
2699      }
2700      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2701        return;
2702      }
2703      store.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2704        x: newX,
2705        y: newY,
2706        axis,
2707        dataRef,
2708        pointerType
2709      }));
2710    });
2711    const handleReferenceEnterOrMove = useStableCallback((event) => {
2712      if (!open) {
2713        setReference(event.clientX, event.clientY, event.currentTarget);
2714      } else if (!cleanupListenerRef.current) {
2715        setReference(event.clientX, event.clientY, event.currentTarget);
2716        setReactive([]);
2717      }
2718    });
2719    const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
2720    React15.useEffect(() => {
2721      if (!enabled) {
2722        resetReference(domReference);
2723        return void 0;
2724      }
2725      if (!openCheck) {
2726        return void 0;
2727      }
2728      function cleanupListener() {
2729        cleanupListenerRef.current?.();
2730        cleanupListenerRef.current = null;
2731      }
2732      const win = getWindow(floating);
2733      function handleMouseMove(event) {
2734        const target = getTarget(event);
2735        if (!contains(floating, target)) {
2736          setReference(event.clientX, event.clientY);
2737        } else {
2738          cleanupListener();
2739        }
2740      }
2741      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2742        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2743      } else {
2744        resetReference(domReference);
2745      }
2746      return cleanupListener;
2747    }, [openCheck, enabled, floating, dataRef, domReference, store, setReference, resetReference, reactive]);
2748    React15.useEffect(() => () => {
2749      store.set("positionReference", null);
2750    }, [store]);
2751    React15.useEffect(() => {
2752      if (enabled && !floating) {
2753        initialRef.current = false;
2754      }
2755    }, [enabled, floating]);
2756    React15.useEffect(() => {
2757      if (!enabled && open) {
2758        initialRef.current = true;
2759      }
2760    }, [enabled, open]);
2761    const reference = React15.useMemo(() => {
2762      function setPointerTypeRef(event) {
2763        setPointerType(event.pointerType);
2764      }
2765      return {
2766        onPointerDown: setPointerTypeRef,
2767        onPointerEnter: setPointerTypeRef,
2768        onMouseMove: handleReferenceEnterOrMove,
2769        onMouseEnter: handleReferenceEnterOrMove
2770      };
2771    }, [handleReferenceEnterOrMove]);
2772    return React15.useMemo(() => enabled ? {
2773      reference,
2774      trigger: reference
2775    } : {}, [enabled, reference]);
2776  }
2777  
2778  // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2779  var React16 = __toESM(require_react(), 1);
2780  function alwaysFalse() {
2781    return false;
2782  }
2783  function normalizeProp(normalizable) {
2784    return {
2785      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2786      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2787    };
2788  }
2789  function useDismiss(context, props = {}) {
2790    const {
2791      enabled = true,
2792      escapeKey: escapeKey2 = true,
2793      outsidePress: outsidePressProp = true,
2794      outsidePressEvent = "sloppy",
2795      referencePress = alwaysFalse,
2796      bubbles,
2797      externalTree
2798    } = props;
2799    const store = "rootStore" in context ? context.rootStore : context;
2800    const open = store.useState("open");
2801    const floatingElement = store.useState("floatingElement");
2802    const {
2803      dataRef
2804    } = store.context;
2805    const tree = useFloatingTree(externalTree);
2806    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2807    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2808    const outsidePressEnabled = outsidePress2 !== false;
2809    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2810    const {
2811      escapeKey: escapeKeyBubbles,
2812      outsidePress: outsidePressBubbles
2813    } = normalizeProp(bubbles);
2814    const pressStartedInsideRef = React16.useRef(false);
2815    const pressStartPreventedRef = React16.useRef(false);
2816    const suppressNextOutsideClickRef = React16.useRef(false);
2817    const isComposingRef = React16.useRef(false);
2818    const currentPointerTypeRef = React16.useRef("");
2819    const touchStateRef = React16.useRef(null);
2820    const cancelDismissOnEndTimeout = useTimeout();
2821    const clearInsideReactTreeTimeout = useTimeout();
2822    const clearInsideReactTree = useStableCallback(() => {
2823      clearInsideReactTreeTimeout.clear();
2824      dataRef.current.insideReactTree = false;
2825    });
2826    const hasBlockingChild = useStableCallback((bubbleKey) => {
2827      const nodeId = dataRef.current.floatingContext?.nodeId;
2828      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2829      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2830    });
2831    const isEventWithinOwnElements = useStableCallback((event) => {
2832      return isEventTargetWithin(event, store.select("floatingElement")) || isEventTargetWithin(event, store.select("domReferenceElement"));
2833    });
2834    const closeOnReferencePress = useStableCallback((event) => {
2835      if (!referencePress()) {
2836        return;
2837      }
2838      store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2839    });
2840    const closeOnEscapeKeyDown = useStableCallback((event) => {
2841      if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
2842        return;
2843      }
2844      if (isComposingRef.current) {
2845        return;
2846      }
2847      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2848        return;
2849      }
2850      const native = isReactEvent(event) ? event.nativeEvent : event;
2851      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2852      store.setOpen(false, eventDetails);
2853      if (!eventDetails.isCanceled) {
2854        event.preventDefault();
2855      }
2856      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2857        event.stopPropagation();
2858      }
2859    });
2860    const markInsideReactTree = useStableCallback(() => {
2861      dataRef.current.insideReactTree = true;
2862      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2863    });
2864    const markPressStartedInsideReactTree = useStableCallback((event) => {
2865      if (!open || !enabled || event.button !== 0) {
2866        return;
2867      }
2868      const target = getTarget(event.nativeEvent);
2869      if (!contains(store.select("floatingElement"), target)) {
2870        return;
2871      }
2872      if (!pressStartedInsideRef.current) {
2873        pressStartedInsideRef.current = true;
2874        pressStartPreventedRef.current = false;
2875      }
2876    });
2877    const markInsidePressStartPrevented = useStableCallback((event) => {
2878      if (!open || !enabled) {
2879        return;
2880      }
2881      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2882        return;
2883      }
2884      if (pressStartedInsideRef.current) {
2885        pressStartPreventedRef.current = true;
2886      }
2887    });
2888    React16.useEffect(() => {
2889      if (!open || !enabled) {
2890        return clearInsideReactTree;
2891      }
2892      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2893      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2894      const compositionTimeout = new Timeout();
2895      const preventedPressSuppressionTimeout = new Timeout();
2896      function handleCompositionStart() {
2897        compositionTimeout.clear();
2898        isComposingRef.current = true;
2899      }
2900      function handleCompositionEnd() {
2901        compositionTimeout.start(
2902          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2903          // Only apply to WebKit for the test to remain 0ms.
2904          parts_exports.engine.webkit ? 5 : 0,
2905          () => {
2906            isComposingRef.current = false;
2907          }
2908        );
2909      }
2910      function suppressImmediateOutsideClickAfterPreventedStart() {
2911        suppressNextOutsideClickRef.current = true;
2912        preventedPressSuppressionTimeout.start(0, () => {
2913          suppressNextOutsideClickRef.current = false;
2914        });
2915      }
2916      function resetPressStartState() {
2917        pressStartedInsideRef.current = false;
2918        pressStartPreventedRef.current = false;
2919      }
2920      function getOutsidePressEvent() {
2921        const type = currentPointerTypeRef.current;
2922        const computedType = type === "pen" || !type ? "mouse" : type;
2923        const outsidePressEventValue = getOutsidePressEventProp();
2924        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2925        if (typeof resolved === "string") {
2926          return resolved;
2927        }
2928        return resolved[computedType];
2929      }
2930      function shouldIgnoreEvent(event) {
2931        const computedOutsidePressEvent = getOutsidePressEvent();
2932        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2933      }
2934      function isEventWithinFloatingTree(event) {
2935        const nodeId = dataRef.current.floatingContext?.nodeId;
2936        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2937        return isEventWithinOwnElements(event) || targetIsInsideChildren;
2938      }
2939      function closeOnPressOutside(event) {
2940        if (shouldIgnoreEvent(event)) {
2941          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2942            preventedPressSuppressionTimeout.clear();
2943            suppressNextOutsideClickRef.current = false;
2944          }
2945          clearInsideReactTree();
2946          return;
2947        }
2948        if (dataRef.current.insideReactTree) {
2949          clearInsideReactTree();
2950          return;
2951        }
2952        const target = getTarget(event);
2953        const inertSelector = `[$createAttribute("inert")}]`;
2954        const targetRoot = isElement(target) ? target.getRootNode() : null;
2955        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select("floatingElement"))).querySelectorAll(inertSelector));
2956        const triggers = store.context.triggerElements;
2957        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
2958          return;
2959        }
2960        let targetRootAncestor = isElement(target) ? target : null;
2961        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
2962          const nextParent = getParentNode(targetRootAncestor);
2963          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
2964            break;
2965          }
2966          targetRootAncestor = nextParent;
2967        }
2968        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2969        !contains(target, store.select("floatingElement")) && // If the target root element contains none of the markers, then the
2970        // element was injected after the floating element rendered.
2971        markers.every((marker) => !contains(targetRootAncestor, marker))) {
2972          return;
2973        }
2974        if (isHTMLElement(target) && !("touches" in event)) {
2975          const lastTraversableNode = isLastTraversableNode(target);
2976          const style = getComputedStyle2(target);
2977          const scrollRe = /auto|scroll/;
2978          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
2979          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
2980          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
2981          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
2982          const isRTL12 = style.direction === "rtl";
2983          const pressedVerticalScrollbar = canScrollY && (isRTL12 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
2984          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
2985          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
2986            return;
2987          }
2988        }
2989        if (isEventWithinFloatingTree(event)) {
2990          return;
2991        }
2992        if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
2993          preventedPressSuppressionTimeout.clear();
2994          suppressNextOutsideClickRef.current = false;
2995          return;
2996        }
2997        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
2998          return;
2999        }
3000        if (hasBlockingChild("__outsidePressBubbles")) {
3001          return;
3002        }
3003        store.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3004        clearInsideReactTree();
3005      }
3006      function handlePointerDown(event) {
3007        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3008          return;
3009        }
3010        closeOnPressOutside(event);
3011      }
3012      function handleTouchStart(event) {
3013        if (getOutsidePressEvent() !== "sloppy" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3014          return;
3015        }
3016        const touch = event.touches[0];
3017        if (touch) {
3018          touchStateRef.current = {
3019            startTime: Date.now(),
3020            startX: touch.clientX,
3021            startY: touch.clientY,
3022            dismissOnTouchEnd: false,
3023            dismissOnMouseDown: true
3024          };
3025          cancelDismissOnEndTimeout.start(1e3, () => {
3026            if (touchStateRef.current) {
3027              touchStateRef.current.dismissOnTouchEnd = false;
3028              touchStateRef.current.dismissOnMouseDown = false;
3029            }
3030          });
3031        }
3032      }
3033      function addTargetEventListenerOnce(event, listener) {
3034        const target = getTarget(event);
3035        if (!target) {
3036          return;
3037        }
3038        const unsubscribe2 = addEventListener(target, event.type, () => {
3039          listener(event);
3040          unsubscribe2();
3041        });
3042      }
3043      function handleTouchStartCapture(event) {
3044        currentPointerTypeRef.current = "touch";
3045        addTargetEventListenerOnce(event, handleTouchStart);
3046      }
3047      function closeOnPressOutsideCapture(event) {
3048        cancelDismissOnEndTimeout.clear();
3049        if (event.type === "pointerdown") {
3050          currentPointerTypeRef.current = event.pointerType;
3051        }
3052        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3053          return;
3054        }
3055        addTargetEventListenerOnce(event, (targetEvent) => {
3056          if (targetEvent.type === "pointerdown") {
3057            handlePointerDown(targetEvent);
3058          } else {
3059            closeOnPressOutside(targetEvent);
3060          }
3061        });
3062      }
3063      function handlePressEndCapture(event) {
3064        if (!pressStartedInsideRef.current) {
3065          return;
3066        }
3067        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3068        resetPressStartState();
3069        if (getOutsidePressEvent() !== "intentional") {
3070          return;
3071        }
3072        if (event.type === "pointercancel") {
3073          if (pressStartedInsideDefaultPrevented) {
3074            suppressImmediateOutsideClickAfterPreventedStart();
3075          }
3076          return;
3077        }
3078        if (isEventWithinFloatingTree(event)) {
3079          return;
3080        }
3081        if (pressStartedInsideDefaultPrevented) {
3082          suppressImmediateOutsideClickAfterPreventedStart();
3083          return;
3084        }
3085        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3086          return;
3087        }
3088        preventedPressSuppressionTimeout.clear();
3089        suppressNextOutsideClickRef.current = true;
3090        clearInsideReactTree();
3091      }
3092      function handleTouchMove(event) {
3093        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3094          return;
3095        }
3096        const touch = event.touches[0];
3097        if (!touch) {
3098          return;
3099        }
3100        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3101        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3102        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3103        if (distance > 5) {
3104          touchStateRef.current.dismissOnTouchEnd = true;
3105        }
3106        if (distance > 10) {
3107          closeOnPressOutside(event);
3108          cancelDismissOnEndTimeout.clear();
3109          touchStateRef.current = null;
3110        }
3111      }
3112      function handleTouchMoveCapture(event) {
3113        addTargetEventListenerOnce(event, handleTouchMove);
3114      }
3115      function handleTouchEnd(event) {
3116        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3117          return;
3118        }
3119        if (touchStateRef.current.dismissOnTouchEnd) {
3120          closeOnPressOutside(event);
3121        }
3122        cancelDismissOnEndTimeout.clear();
3123        touchStateRef.current = null;
3124      }
3125      function handleTouchEndCapture(event) {
3126        addTargetEventListenerOnce(event, handleTouchEnd);
3127      }
3128      const doc = ownerDocument(floatingElement);
3129      const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, true), addEventListener(doc, "touchmove", handleTouchMoveCapture, true), addEventListener(doc, "touchend", handleTouchEndCapture, true)));
3130      return () => {
3131        unsubscribe();
3132        compositionTimeout.clear();
3133        preventedPressSuppressionTimeout.clear();
3134        resetPressStartState();
3135        suppressNextOutsideClickRef.current = false;
3136        clearInsideReactTree();
3137      };
3138    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout]);
3139    const reference = React16.useMemo(() => ({
3140      onKeyDown: closeOnEscapeKeyDown,
3141      onPointerDown: closeOnReferencePress,
3142      onClick: closeOnReferencePress
3143    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3144    const floating = React16.useMemo(() => ({
3145      onKeyDown: closeOnEscapeKeyDown,
3146      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3147      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3148      // See https://github.com/mui/base-ui/pull/3379
3149      onPointerDown: markInsidePressStartPrevented,
3150      onMouseDown: markInsidePressStartPrevented,
3151      onClickCapture: markInsideReactTree,
3152      onMouseDownCapture(event) {
3153        markInsideReactTree();
3154        markPressStartedInsideReactTree(event);
3155      },
3156      onPointerDownCapture(event) {
3157        markInsideReactTree();
3158        markPressStartedInsideReactTree(event);
3159      },
3160      onMouseUpCapture: markInsideReactTree,
3161      onTouchEndCapture: markInsideReactTree,
3162      onTouchMoveCapture: markInsideReactTree
3163    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3164    return React16.useMemo(() => enabled ? {
3165      reference,
3166      floating,
3167      trigger: reference
3168    } : {}, [enabled, reference, floating]);
3169  }
3170  
3171  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3172  var React24 = __toESM(require_react(), 1);
3173  
3174  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3175  function computeCoordsFromPlacement(_ref, placement, rtl) {
3176    let {
3177      reference,
3178      floating
3179    } = _ref;
3180    const sideAxis = getSideAxis(placement);
3181    const alignmentAxis = getAlignmentAxis(placement);
3182    const alignLength = getAxisLength(alignmentAxis);
3183    const side = getSide(placement);
3184    const isVertical = sideAxis === "y";
3185    const commonX = reference.x + reference.width / 2 - floating.width / 2;
3186    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3187    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3188    let coords;
3189    switch (side) {
3190      case "top":
3191        coords = {
3192          x: commonX,
3193          y: reference.y - floating.height
3194        };
3195        break;
3196      case "bottom":
3197        coords = {
3198          x: commonX,
3199          y: reference.y + reference.height
3200        };
3201        break;
3202      case "right":
3203        coords = {
3204          x: reference.x + reference.width,
3205          y: commonY
3206        };
3207        break;
3208      case "left":
3209        coords = {
3210          x: reference.x - floating.width,
3211          y: commonY
3212        };
3213        break;
3214      default:
3215        coords = {
3216          x: reference.x,
3217          y: reference.y
3218        };
3219    }
3220    const alignment = getAlignment(placement);
3221    if (alignment) {
3222      coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3223    }
3224    return coords;
3225  }
3226  async function detectOverflow(state, options) {
3227    var _await$platform$isEle;
3228    if (options === void 0) {
3229      options = {};
3230    }
3231    const {
3232      x: x2,
3233      y: y2,
3234      platform: platform3,
3235      rects,
3236      elements: elements2,
3237      strategy
3238    } = state;
3239    const {
3240      boundary = "clippingAncestors",
3241      rootBoundary = "viewport",
3242      elementContext = "floating",
3243      altBoundary = false,
3244      padding = 0
3245    } = evaluate(options, state);
3246    const paddingObject = getPaddingObject(padding);
3247    const altContext = elementContext === "floating" ? "reference" : "floating";
3248    const element = elements2[altBoundary ? altContext : elementContext];
3249    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3250      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(elements2.floating)),
3251      boundary,
3252      rootBoundary,
3253      strategy
3254    }));
3255    const rect = elementContext === "floating" ? {
3256      x: x2,
3257      y: y2,
3258      width: rects.floating.width,
3259      height: rects.floating.height
3260    } : rects.reference;
3261    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements2.floating));
3262    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3263      x: 1,
3264      y: 1
3265    };
3266    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3267      elements: elements2,
3268      rect,
3269      offsetParent,
3270      strategy
3271    }) : rect);
3272    return {
3273      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3274      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3275      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3276      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3277    };
3278  }
3279  var MAX_RESET_COUNT = 50;
3280  var computePosition = async (reference, floating, config) => {
3281    const {
3282      placement = "bottom",
3283      strategy = "absolute",
3284      middleware = [],
3285      platform: platform3
3286    } = config;
3287    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3288      ...platform3,
3289      detectOverflow
3290    };
3291    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3292    let rects = await platform3.getElementRects({
3293      reference,
3294      floating,
3295      strategy
3296    });
3297    let {
3298      x: x2,
3299      y: y2
3300    } = computeCoordsFromPlacement(rects, placement, rtl);
3301    let statefulPlacement = placement;
3302    let resetCount = 0;
3303    const middlewareData = {};
3304    for (let i2 = 0; i2 < middleware.length; i2++) {
3305      const currentMiddleware = middleware[i2];
3306      if (!currentMiddleware) {
3307        continue;
3308      }
3309      const {
3310        name: name2,
3311        fn
3312      } = currentMiddleware;
3313      const {
3314        x: nextX,
3315        y: nextY,
3316        data,
3317        reset
3318      } = await fn({
3319        x: x2,
3320        y: y2,
3321        initialPlacement: placement,
3322        placement: statefulPlacement,
3323        strategy,
3324        middlewareData,
3325        rects,
3326        platform: platformWithDetectOverflow,
3327        elements: {
3328          reference,
3329          floating
3330        }
3331      });
3332      x2 = nextX != null ? nextX : x2;
3333      y2 = nextY != null ? nextY : y2;
3334      middlewareData[name2] = {
3335        ...middlewareData[name2],
3336        ...data
3337      };
3338      if (reset && resetCount < MAX_RESET_COUNT) {
3339        resetCount++;
3340        if (typeof reset === "object") {
3341          if (reset.placement) {
3342            statefulPlacement = reset.placement;
3343          }
3344          if (reset.rects) {
3345            rects = reset.rects === true ? await platform3.getElementRects({
3346              reference,
3347              floating,
3348              strategy
3349            }) : reset.rects;
3350          }
3351          ({
3352            x: x2,
3353            y: y2
3354          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3355        }
3356        i2 = -1;
3357      }
3358    }
3359    return {
3360      x: x2,
3361      y: y2,
3362      placement: statefulPlacement,
3363      strategy,
3364      middlewareData
3365    };
3366  };
3367  var flip = function(options) {
3368    if (options === void 0) {
3369      options = {};
3370    }
3371    return {
3372      name: "flip",
3373      options,
3374      async fn(state) {
3375        var _middlewareData$arrow, _middlewareData$flip;
3376        const {
3377          placement,
3378          middlewareData,
3379          rects,
3380          initialPlacement,
3381          platform: platform3,
3382          elements: elements2
3383        } = state;
3384        const {
3385          mainAxis: checkMainAxis = true,
3386          crossAxis: checkCrossAxis = true,
3387          fallbackPlacements: specifiedFallbackPlacements,
3388          fallbackStrategy = "bestFit",
3389          fallbackAxisSideDirection = "none",
3390          flipAlignment = true,
3391          ...detectOverflowOptions
3392        } = evaluate(options, state);
3393        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3394          return {};
3395        }
3396        const side = getSide(placement);
3397        const initialSideAxis = getSideAxis(initialPlacement);
3398        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3399        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3400        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3401        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3402        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3403          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3404        }
3405        const placements2 = [initialPlacement, ...fallbackPlacements];
3406        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3407        const overflows = [];
3408        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3409        if (checkMainAxis) {
3410          overflows.push(overflow[side]);
3411        }
3412        if (checkCrossAxis) {
3413          const sides2 = getAlignmentSides(placement, rects, rtl);
3414          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3415        }
3416        overflowsData = [...overflowsData, {
3417          placement,
3418          overflows
3419        }];
3420        if (!overflows.every((side2) => side2 <= 0)) {
3421          var _middlewareData$flip2, _overflowsData$filter;
3422          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3423          const nextPlacement = placements2[nextIndex];
3424          if (nextPlacement) {
3425            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3426            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3427            // overflows the main axis.
3428            overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) {
3429              return {
3430                data: {
3431                  index: nextIndex,
3432                  overflows: overflowsData
3433                },
3434                reset: {
3435                  placement: nextPlacement
3436                }
3437              };
3438            }
3439          }
3440          let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3441          if (!resetPlacement) {
3442            switch (fallbackStrategy) {
3443              case "bestFit": {
3444                var _overflowsData$filter2;
3445                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
3446                  if (hasFallbackAxisSideDirection) {
3447                    const currentSideAxis = getSideAxis(d2.placement);
3448                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3449                    // reading directions favoring greater width.
3450                    currentSideAxis === "y";
3451                  }
3452                  return true;
3453                }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
3454                if (placement2) {
3455                  resetPlacement = placement2;
3456                }
3457                break;
3458              }
3459              case "initialPlacement":
3460                resetPlacement = initialPlacement;
3461                break;
3462            }
3463          }
3464          if (placement !== resetPlacement) {
3465            return {
3466              reset: {
3467                placement: resetPlacement
3468              }
3469            };
3470          }
3471        }
3472        return {};
3473      }
3474    };
3475  };
3476  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3477  async function convertValueToCoords(state, options) {
3478    const {
3479      placement,
3480      platform: platform3,
3481      elements: elements2
3482    } = state;
3483    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3484    const side = getSide(placement);
3485    const alignment = getAlignment(placement);
3486    const isVertical = getSideAxis(placement) === "y";
3487    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3488    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3489    const rawValue = evaluate(options, state);
3490    let {
3491      mainAxis,
3492      crossAxis,
3493      alignmentAxis
3494    } = typeof rawValue === "number" ? {
3495      mainAxis: rawValue,
3496      crossAxis: 0,
3497      alignmentAxis: null
3498    } : {
3499      mainAxis: rawValue.mainAxis || 0,
3500      crossAxis: rawValue.crossAxis || 0,
3501      alignmentAxis: rawValue.alignmentAxis
3502    };
3503    if (alignment && typeof alignmentAxis === "number") {
3504      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3505    }
3506    return isVertical ? {
3507      x: crossAxis * crossAxisMulti,
3508      y: mainAxis * mainAxisMulti
3509    } : {
3510      x: mainAxis * mainAxisMulti,
3511      y: crossAxis * crossAxisMulti
3512    };
3513  }
3514  var offset = function(options) {
3515    if (options === void 0) {
3516      options = 0;
3517    }
3518    return {
3519      name: "offset",
3520      options,
3521      async fn(state) {
3522        var _middlewareData$offse, _middlewareData$arrow;
3523        const {
3524          x: x2,
3525          y: y2,
3526          placement,
3527          middlewareData
3528        } = state;
3529        const diffCoords = await convertValueToCoords(state, options);
3530        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3531          return {};
3532        }
3533        return {
3534          x: x2 + diffCoords.x,
3535          y: y2 + diffCoords.y,
3536          data: {
3537            ...diffCoords,
3538            placement
3539          }
3540        };
3541      }
3542    };
3543  };
3544  var shift = function(options) {
3545    if (options === void 0) {
3546      options = {};
3547    }
3548    return {
3549      name: "shift",
3550      options,
3551      async fn(state) {
3552        const {
3553          x: x2,
3554          y: y2,
3555          placement,
3556          platform: platform3
3557        } = state;
3558        const {
3559          mainAxis: checkMainAxis = true,
3560          crossAxis: checkCrossAxis = false,
3561          limiter = {
3562            fn: (_ref) => {
3563              let {
3564                x: x3,
3565                y: y3
3566              } = _ref;
3567              return {
3568                x: x3,
3569                y: y3
3570              };
3571            }
3572          },
3573          ...detectOverflowOptions
3574        } = evaluate(options, state);
3575        const coords = {
3576          x: x2,
3577          y: y2
3578        };
3579        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3580        const crossAxis = getSideAxis(placement);
3581        const mainAxis = getOppositeAxis(crossAxis);
3582        let mainAxisCoord = coords[mainAxis];
3583        let crossAxisCoord = coords[crossAxis];
3584        const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3585        if (checkMainAxis) {
3586          mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3587        }
3588        if (checkCrossAxis) {
3589          crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3590        }
3591        const limitedCoords = limiter.fn({
3592          ...state,
3593          [mainAxis]: mainAxisCoord,
3594          [crossAxis]: crossAxisCoord
3595        });
3596        return {
3597          ...limitedCoords,
3598          data: {
3599            x: limitedCoords.x - x2,
3600            y: limitedCoords.y - y2,
3601            enabled: {
3602              [mainAxis]: checkMainAxis,
3603              [crossAxis]: checkCrossAxis
3604            }
3605          }
3606        };
3607      }
3608    };
3609  };
3610  var limitShift = function(options) {
3611    if (options === void 0) {
3612      options = {};
3613    }
3614    return {
3615      options,
3616      fn(state) {
3617        var _rawOffset$mainAxis, _rawOffset$crossAxis;
3618        const {
3619          x: x2,
3620          y: y2,
3621          placement,
3622          rects,
3623          middlewareData
3624        } = state;
3625        const {
3626          offset: offset4 = 0,
3627          mainAxis: checkMainAxis = true,
3628          crossAxis: checkCrossAxis = true
3629        } = evaluate(options, state);
3630        const coords = {
3631          x: x2,
3632          y: y2
3633        };
3634        const crossAxis = getSideAxis(placement);
3635        const mainAxis = getOppositeAxis(crossAxis);
3636        let mainAxisCoord = coords[mainAxis];
3637        let crossAxisCoord = coords[crossAxis];
3638        const rawOffset = evaluate(offset4, state);
3639        const computedOffset = typeof rawOffset === "number" ? {
3640          mainAxis: rawOffset,
3641          crossAxis: 0
3642        } : {
3643          mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3644          crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3645        };
3646        if (checkMainAxis) {
3647          const len = mainAxis === "y" ? "height" : "width";
3648          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3649          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3650          if (mainAxisCoord < limitMin) {
3651            mainAxisCoord = limitMin;
3652          } else if (mainAxisCoord > limitMax) {
3653            mainAxisCoord = limitMax;
3654          }
3655        }
3656        if (checkCrossAxis) {
3657          var _middlewareData$offse, _middlewareData$offse2;
3658          const len = mainAxis === "y" ? "width" : "height";
3659          const isOriginSide = originSides.has(getSide(placement));
3660          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);
3661          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);
3662          if (crossAxisCoord < limitMin) {
3663            crossAxisCoord = limitMin;
3664          } else if (crossAxisCoord > limitMax) {
3665            crossAxisCoord = limitMax;
3666          }
3667        }
3668        return {
3669          [mainAxis]: mainAxisCoord,
3670          [crossAxis]: crossAxisCoord
3671        };
3672      }
3673    };
3674  };
3675  var size = function(options) {
3676    if (options === void 0) {
3677      options = {};
3678    }
3679    return {
3680      name: "size",
3681      options,
3682      async fn(state) {
3683        const {
3684          placement,
3685          rects,
3686          platform: platform3,
3687          elements: elements2
3688        } = state;
3689        const {
3690          apply = () => {
3691          },
3692          ...detectOverflowOptions
3693        } = evaluate(options, state);
3694        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3695        const side = getSide(placement);
3696        const alignment = getAlignment(placement);
3697        const isYAxis = getSideAxis(placement) === "y";
3698        const {
3699          width,
3700          height
3701        } = rects.floating;
3702        let heightSide;
3703        let widthSide;
3704        if (side === "top" || side === "bottom") {
3705          heightSide = side;
3706          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating)) ? "start" : "end") ? "left" : "right";
3707        } else {
3708          widthSide = side;
3709          heightSide = alignment === "end" ? "top" : "bottom";
3710        }
3711        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3712        const maximumClippingWidth = width - overflow.left - overflow.right;
3713        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3714        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3715        const shiftData = state.middlewareData.shift;
3716        const noShift = !shiftData;
3717        let availableHeight = overflowAvailableHeight;
3718        let availableWidth = overflowAvailableWidth;
3719        if (shiftData != null && shiftData.enabled.x) {
3720          availableWidth = maximumClippingWidth;
3721        }
3722        if (shiftData != null && shiftData.enabled.y) {
3723          availableHeight = maximumClippingHeight;
3724        }
3725        if (noShift && !alignment) {
3726          if (isYAxis) {
3727            availableWidth = width - 2 * max(overflow.left, overflow.right);
3728          } else {
3729            availableHeight = height - 2 * max(overflow.top, overflow.bottom);
3730          }
3731        }
3732        await apply({
3733          ...state,
3734          availableWidth,
3735          availableHeight
3736        });
3737        const nextDimensions = await platform3.getDimensions(elements2.floating);
3738        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3739          return {
3740            reset: {
3741              rects: true
3742            }
3743          };
3744        }
3745        return {};
3746      }
3747    };
3748  };
3749  
3750  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3751  function getCssDimensions(element) {
3752    const css = getComputedStyle2(element);
3753    let width = parseFloat(css.width) || 0;
3754    let height = parseFloat(css.height) || 0;
3755    const hasOffset = isHTMLElement(element);
3756    const offsetWidth = hasOffset ? element.offsetWidth : width;
3757    const offsetHeight = hasOffset ? element.offsetHeight : height;
3758    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3759    if (shouldFallback) {
3760      width = offsetWidth;
3761      height = offsetHeight;
3762    }
3763    return {
3764      width,
3765      height,
3766      $: shouldFallback
3767    };
3768  }
3769  function unwrapElement(element) {
3770    return !isElement(element) ? element.contextElement : element;
3771  }
3772  function getScale(element) {
3773    const domElement = unwrapElement(element);
3774    if (!isHTMLElement(domElement)) {
3775      return createCoords(1);
3776    }
3777    const rect = domElement.getBoundingClientRect();
3778    const {
3779      width,
3780      height,
3781      $: $2
3782    } = getCssDimensions(domElement);
3783    let x2 = ($2 ? round(rect.width) : rect.width) / width;
3784    let y2 = ($2 ? round(rect.height) : rect.height) / height;
3785    if (!x2 || !Number.isFinite(x2)) {
3786      x2 = 1;
3787    }
3788    if (!y2 || !Number.isFinite(y2)) {
3789      y2 = 1;
3790    }
3791    return {
3792      x: x2,
3793      y: y2
3794    };
3795  }
3796  var noOffsets = /* @__PURE__ */ createCoords(0);
3797  function getVisualOffsets(element) {
3798    const win = getWindow(element);
3799    if (!isWebKit() || !win.visualViewport) {
3800      return noOffsets;
3801    }
3802    return {
3803      x: win.visualViewport.offsetLeft,
3804      y: win.visualViewport.offsetTop
3805    };
3806  }
3807  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3808    if (isFixed === void 0) {
3809      isFixed = false;
3810    }
3811    return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
3812  }
3813  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3814    if (includeScale === void 0) {
3815      includeScale = false;
3816    }
3817    if (isFixedStrategy === void 0) {
3818      isFixedStrategy = false;
3819    }
3820    const clientRect = element.getBoundingClientRect();
3821    const domElement = unwrapElement(element);
3822    let scale = createCoords(1);
3823    if (includeScale) {
3824      if (offsetParent) {
3825        if (isElement(offsetParent)) {
3826          scale = getScale(offsetParent);
3827        }
3828      } else {
3829        scale = getScale(element);
3830      }
3831    }
3832    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3833    let x2 = (clientRect.left + visualOffsets.x) / scale.x;
3834    let y2 = (clientRect.top + visualOffsets.y) / scale.y;
3835    let width = clientRect.width / scale.x;
3836    let height = clientRect.height / scale.y;
3837    if (domElement && offsetParent) {
3838      const win = getWindow(domElement);
3839      const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
3840      let currentWin = win;
3841      let currentIFrame = getFrameElement(currentWin);
3842      while (currentIFrame && offsetWin !== currentWin) {
3843        const iframeScale = getScale(currentIFrame);
3844        const iframeRect = currentIFrame.getBoundingClientRect();
3845        const css = getComputedStyle2(currentIFrame);
3846        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
3847        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
3848        x2 *= iframeScale.x;
3849        y2 *= iframeScale.y;
3850        width *= iframeScale.x;
3851        height *= iframeScale.y;
3852        x2 += left;
3853        y2 += top;
3854        currentWin = getWindow(currentIFrame);
3855        currentIFrame = getFrameElement(currentWin);
3856      }
3857    }
3858    return rectToClientRect({
3859      width,
3860      height,
3861      x: x2,
3862      y: y2
3863    });
3864  }
3865  function getWindowScrollBarX(element, rect) {
3866    const leftScroll = getNodeScroll(element).scrollLeft;
3867    if (!rect) {
3868      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
3869    }
3870    return rect.left + leftScroll;
3871  }
3872  function getHTMLOffset(documentElement, scroll) {
3873    const htmlRect = documentElement.getBoundingClientRect();
3874    const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
3875    const y2 = htmlRect.top + scroll.scrollTop;
3876    return {
3877      x: x2,
3878      y: y2
3879    };
3880  }
3881  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3882    let {
3883      elements: elements2,
3884      rect,
3885      offsetParent,
3886      strategy
3887    } = _ref;
3888    const isFixed = strategy === "fixed";
3889    const documentElement = getDocumentElement(offsetParent);
3890    const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
3891    if (offsetParent === documentElement || topLayer && isFixed) {
3892      return rect;
3893    }
3894    let scroll = {
3895      scrollLeft: 0,
3896      scrollTop: 0
3897    };
3898    let scale = createCoords(1);
3899    const offsets = createCoords(0);
3900    const isOffsetParentAnElement = isHTMLElement(offsetParent);
3901    if (isOffsetParentAnElement || !isFixed) {
3902      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
3903        scroll = getNodeScroll(offsetParent);
3904      }
3905      if (isOffsetParentAnElement) {
3906        const offsetRect = getBoundingClientRect(offsetParent);
3907        scale = getScale(offsetParent);
3908        offsets.x = offsetRect.x + offsetParent.clientLeft;
3909        offsets.y = offsetRect.y + offsetParent.clientTop;
3910      }
3911    }
3912    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
3913    return {
3914      width: rect.width * scale.x,
3915      height: rect.height * scale.y,
3916      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
3917      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
3918    };
3919  }
3920  function getClientRects(element) {
3921    return element.getClientRects ? Array.from(element.getClientRects()) : [];
3922  }
3923  function getDocumentRect(html) {
3924    const scroll = getNodeScroll(html);
3925    const body = html.ownerDocument.body;
3926    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
3927    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
3928    let x2 = -scroll.scrollLeft + getWindowScrollBarX(html);
3929    const y2 = -scroll.scrollTop;
3930    if (getComputedStyle2(body).direction === "rtl") {
3931      x2 += max(html.clientWidth, body.clientWidth) - width;
3932    }
3933    return {
3934      width,
3935      height,
3936      x: x2,
3937      y: y2
3938    };
3939  }
3940  var SCROLLBAR_MAX = 25;
3941  function getViewportRect(element, strategy, rootBoundary) {
3942    if (rootBoundary === void 0) {
3943      rootBoundary = "viewport";
3944    }
3945    const isLayoutViewport = rootBoundary === "layoutViewport";
3946    const win = getWindow(element);
3947    const html = getDocumentElement(element);
3948    const visualViewport = win.visualViewport;
3949    let width = html.clientWidth;
3950    let height = html.clientHeight;
3951    let x2 = 0;
3952    let y2 = 0;
3953    if (visualViewport) {
3954      const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
3955      if (isLayoutViewport) {
3956        if (!layoutRelativeClientCoords) {
3957          x2 = -visualViewport.offsetLeft;
3958          y2 = -visualViewport.offsetTop;
3959        }
3960      } else {
3961        width = visualViewport.width;
3962        height = visualViewport.height;
3963        if (layoutRelativeClientCoords) {
3964          x2 = visualViewport.offsetLeft;
3965          y2 = visualViewport.offsetTop;
3966        }
3967      }
3968    }
3969    const windowScrollbarX = getWindowScrollBarX(html);
3970    if (windowScrollbarX <= 0) {
3971      const doc = html.ownerDocument;
3972      const body = doc.body;
3973      const bodyStyles = getComputedStyle(body);
3974      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
3975      const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
3976      const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
3977      if (gutter <= SCROLLBAR_MAX) {
3978        width -= gutter;
3979      }
3980    }
3981    return {
3982      width,
3983      height,
3984      x: x2,
3985      y: y2
3986    };
3987  }
3988  function getInnerBoundingClientRect(element, strategy) {
3989    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
3990    const top = clientRect.top + element.clientTop;
3991    const left = clientRect.left + element.clientLeft;
3992    const scale = getScale(element);
3993    const width = element.clientWidth * scale.x;
3994    const height = element.clientHeight * scale.y;
3995    const x2 = left * scale.x;
3996    const y2 = top * scale.y;
3997    return {
3998      width,
3999      height,
4000      x: x2,
4001      y: y2
4002    };
4003  }
4004  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4005    let rect;
4006    if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4007      rect = getViewportRect(element, strategy, clippingAncestor);
4008    } else if (clippingAncestor === "document") {
4009      rect = getDocumentRect(getDocumentElement(element));
4010    } else if (isElement(clippingAncestor)) {
4011      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4012    } else {
4013      const visualOffsets = getVisualOffsets(element);
4014      rect = {
4015        x: clippingAncestor.x - visualOffsets.x,
4016        y: clippingAncestor.y - visualOffsets.y,
4017        width: clippingAncestor.width,
4018        height: clippingAncestor.height
4019      };
4020    }
4021    return rectToClientRect(rect);
4022  }
4023  function getClippingElementAncestors(element, cache) {
4024    const cachedResult = cache.get(element);
4025    if (cachedResult) {
4026      return cachedResult;
4027    }
4028    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4029    let lastKeptComputedStyle = null;
4030    const elementIsFixed = getComputedStyle2(element).position === "fixed";
4031    let currentNode = elementIsFixed ? getParentNode(element) : element;
4032    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4033      const computedStyle = getComputedStyle2(currentNode);
4034      const currentNodeIsContaining = isContainingBlock(currentNode);
4035      const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4036      const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4037      if (shouldDropCurrentNode) {
4038        result = result.filter((ancestor) => ancestor !== currentNode);
4039      } else {
4040        lastKeptComputedStyle = computedStyle;
4041      }
4042      currentNode = getParentNode(currentNode);
4043    }
4044    cache.set(element, result);
4045    return result;
4046  }
4047  function getClippingRect(_ref) {
4048    let {
4049      element,
4050      boundary,
4051      rootBoundary,
4052      strategy
4053    } = _ref;
4054    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4055    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4056    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4057    let top = firstRect.top;
4058    let right = firstRect.right;
4059    let bottom = firstRect.bottom;
4060    let left = firstRect.left;
4061    for (let i2 = 1; i2 < clippingAncestors.length; i2++) {
4062      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i2], strategy);
4063      top = max(rect.top, top);
4064      right = min(rect.right, right);
4065      bottom = min(rect.bottom, bottom);
4066      left = max(rect.left, left);
4067    }
4068    return {
4069      width: right - left,
4070      height: bottom - top,
4071      x: left,
4072      y: top
4073    };
4074  }
4075  function getDimensions(element) {
4076    const {
4077      width,
4078      height
4079    } = getCssDimensions(element);
4080    return {
4081      width,
4082      height
4083    };
4084  }
4085  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4086    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4087    const documentElement = getDocumentElement(offsetParent);
4088    const isFixed = strategy === "fixed";
4089    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4090    let scroll = {
4091      scrollLeft: 0,
4092      scrollTop: 0
4093    };
4094    const offsets = createCoords(0);
4095    if (isOffsetParentAnElement || !isFixed) {
4096      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4097        scroll = getNodeScroll(offsetParent);
4098      }
4099      if (isOffsetParentAnElement) {
4100        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4101        offsets.x = offsetRect.x + offsetParent.clientLeft;
4102        offsets.y = offsetRect.y + offsetParent.clientTop;
4103      }
4104    }
4105    if (!isOffsetParentAnElement && documentElement) {
4106      offsets.x = getWindowScrollBarX(documentElement);
4107    }
4108    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4109    const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4110    const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4111    return {
4112      x: x2,
4113      y: y2,
4114      width: rect.width,
4115      height: rect.height
4116    };
4117  }
4118  function isStaticPositioned(element) {
4119    return getComputedStyle2(element).position === "static";
4120  }
4121  function getTrueOffsetParent(element, polyfill) {
4122    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4123      return null;
4124    }
4125    if (polyfill) {
4126      return polyfill(element);
4127    }
4128    let rawOffsetParent = element.offsetParent;
4129    if (getDocumentElement(element) === rawOffsetParent) {
4130      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4131    }
4132    return rawOffsetParent;
4133  }
4134  function getOffsetParent(element, polyfill) {
4135    const win = getWindow(element);
4136    if (isTopLayer(element)) {
4137      return win;
4138    }
4139    if (!isHTMLElement(element)) {
4140      let svgOffsetParent = getParentNode(element);
4141      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4142        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4143          return svgOffsetParent;
4144        }
4145        svgOffsetParent = getParentNode(svgOffsetParent);
4146      }
4147      return win;
4148    }
4149    let offsetParent = getTrueOffsetParent(element, polyfill);
4150    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4151      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4152    }
4153    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4154      return win;
4155    }
4156    return offsetParent || getContainingBlock(element) || win;
4157  }
4158  var getElementRects = async function(data) {
4159    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4160    const getDimensionsFn = this.getDimensions;
4161    const floatingDimensions = await getDimensionsFn(data.floating);
4162    return {
4163      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4164      floating: {
4165        x: 0,
4166        y: 0,
4167        width: floatingDimensions.width,
4168        height: floatingDimensions.height
4169      }
4170    };
4171  };
4172  function isRTL(element) {
4173    return getComputedStyle2(element).direction === "rtl";
4174  }
4175  var platform2 = {
4176    convertOffsetParentRelativeRectToViewportRelativeRect,
4177    getDocumentElement,
4178    getClippingRect,
4179    getOffsetParent,
4180    getElementRects,
4181    getClientRects,
4182    getDimensions,
4183    getScale,
4184    isElement,
4185    isRTL
4186  };
4187  function rectsAreEqual(a2, b2) {
4188    return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
4189  }
4190  function observeMove(element, onMove, ancestorResize) {
4191    let io = null;
4192    let timeoutId;
4193    const root = getDocumentElement(element);
4194    function cleanup() {
4195      var _io;
4196      clearTimeout(timeoutId);
4197      (_io = io) == null || _io.disconnect();
4198      io = null;
4199    }
4200    function refresh(skip, threshold) {
4201      if (skip === void 0) {
4202        skip = false;
4203      }
4204      if (threshold === void 0) {
4205        threshold = 1;
4206      }
4207      cleanup();
4208      const elementRectForRootMargin = element.getBoundingClientRect();
4209      const {
4210        left,
4211        top,
4212        width,
4213        height
4214      } = elementRectForRootMargin;
4215      if (!skip) {
4216        onMove();
4217      }
4218      if (!width || !height) {
4219        return;
4220      }
4221      const insetTop = floor(top);
4222      const insetRight = floor(root.clientWidth - (left + width));
4223      const insetBottom = floor(root.clientHeight - (top + height));
4224      const insetLeft = floor(left);
4225      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4226      const options = {
4227        rootMargin,
4228        threshold: max(0, min(1, threshold)) || 1
4229      };
4230      let isFirstUpdate = true;
4231      function handleObserve(entries) {
4232        const ratio = entries[0].intersectionRatio;
4233        if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4234          return refresh();
4235        }
4236        if (ratio !== threshold) {
4237          if (!isFirstUpdate) {
4238            return refresh();
4239          }
4240          if (!ratio) {
4241            timeoutId = setTimeout(() => {
4242              refresh(false, 1e-7);
4243            }, 1e3);
4244          } else {
4245            refresh(false, ratio);
4246          }
4247        }
4248        isFirstUpdate = false;
4249      }
4250      try {
4251        io = new IntersectionObserver(handleObserve, {
4252          ...options,
4253          // Handle <iframe>s
4254          root: root.ownerDocument
4255        });
4256      } catch (_e) {
4257        io = new IntersectionObserver(handleObserve, options);
4258      }
4259      io.observe(element);
4260    }
4261    const win = getWindow(element);
4262    const handleResize = () => refresh(ancestorResize);
4263    win.addEventListener("resize", handleResize);
4264    refresh(true);
4265    return () => {
4266      win.removeEventListener("resize", handleResize);
4267      cleanup();
4268    };
4269  }
4270  function autoUpdate(reference, floating, update2, options) {
4271    if (options === void 0) {
4272      options = {};
4273    }
4274    const {
4275      ancestorScroll = true,
4276      ancestorResize = true,
4277      elementResize = typeof ResizeObserver === "function",
4278      layoutShift = typeof IntersectionObserver === "function",
4279      animationFrame = false
4280    } = options;
4281    const referenceEl = unwrapElement(reference);
4282    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4283    ancestors.forEach((ancestor) => {
4284      ancestorScroll && ancestor.addEventListener("scroll", update2);
4285      ancestorResize && ancestor.addEventListener("resize", update2);
4286    });
4287    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4288    let reobserveFrame = -1;
4289    let resizeObserver = null;
4290    if (elementResize) {
4291      resizeObserver = new ResizeObserver((_ref) => {
4292        let [firstEntry] = _ref;
4293        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4294          resizeObserver.unobserve(floating);
4295          cancelAnimationFrame(reobserveFrame);
4296          reobserveFrame = requestAnimationFrame(() => {
4297            var _resizeObserver;
4298            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4299          });
4300        }
4301        update2();
4302      });
4303      if (referenceEl && !animationFrame) {
4304        resizeObserver.observe(referenceEl);
4305      }
4306      if (floating) {
4307        resizeObserver.observe(floating);
4308      }
4309    }
4310    let frameId;
4311    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4312    if (animationFrame) {
4313      frameLoop();
4314    }
4315    function frameLoop() {
4316      const nextRefRect = getBoundingClientRect(reference);
4317      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4318        update2();
4319      }
4320      prevRefRect = nextRefRect;
4321      frameId = requestAnimationFrame(frameLoop);
4322    }
4323    update2();
4324    return () => {
4325      var _resizeObserver2;
4326      ancestors.forEach((ancestor) => {
4327        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4328        ancestorResize && ancestor.removeEventListener("resize", update2);
4329      });
4330      cleanupIo == null || cleanupIo();
4331      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4332      resizeObserver = null;
4333      if (animationFrame) {
4334        cancelAnimationFrame(frameId);
4335      }
4336    };
4337  }
4338  var offset2 = offset;
4339  var shift2 = shift;
4340  var flip2 = flip;
4341  var size2 = size;
4342  var limitShift2 = limitShift;
4343  var computePosition2 = (reference, floating, options) => {
4344    const cache = /* @__PURE__ */ new Map();
4345    const mergedOptions = options != null ? options : {};
4346    const platformWithCache = {
4347      ...platform2,
4348      ...mergedOptions.platform,
4349      _c: cache
4350    };
4351    return computePosition(reference, floating, {
4352      ...mergedOptions,
4353      platform: platformWithCache
4354    });
4355  };
4356  
4357  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4358  var React17 = __toESM(require_react(), 1);
4359  var import_react2 = __toESM(require_react(), 1);
4360  var ReactDOM3 = __toESM(require_react_dom(), 1);
4361  var isClient = typeof document !== "undefined";
4362  var noop2 = function noop3() {
4363  };
4364  var index = isClient ? import_react2.useLayoutEffect : noop2;
4365  function deepEqual(a2, b2) {
4366    if (a2 === b2) {
4367      return true;
4368    }
4369    if (typeof a2 !== typeof b2) {
4370      return false;
4371    }
4372    if (typeof a2 === "function" && a2.toString() === b2.toString()) {
4373      return true;
4374    }
4375    let length;
4376    let i2;
4377    let keys;
4378    if (a2 && b2 && typeof a2 === "object") {
4379      if (Array.isArray(a2)) {
4380        length = a2.length;
4381        if (length !== b2.length) return false;
4382        for (i2 = length; i2-- !== 0; ) {
4383          if (!deepEqual(a2[i2], b2[i2])) {
4384            return false;
4385          }
4386        }
4387        return true;
4388      }
4389      keys = Object.keys(a2);
4390      length = keys.length;
4391      if (length !== Object.keys(b2).length) {
4392        return false;
4393      }
4394      for (i2 = length; i2-- !== 0; ) {
4395        if (!{}.hasOwnProperty.call(b2, keys[i2])) {
4396          return false;
4397        }
4398      }
4399      for (i2 = length; i2-- !== 0; ) {
4400        const key = keys[i2];
4401        if (key === "_owner" && a2.$$typeof) {
4402          continue;
4403        }
4404        if (!deepEqual(a2[key], b2[key])) {
4405          return false;
4406        }
4407      }
4408      return true;
4409    }
4410    return a2 !== a2 && b2 !== b2;
4411  }
4412  function getDPR(element) {
4413    if (typeof window === "undefined") {
4414      return 1;
4415    }
4416    const win = element.ownerDocument.defaultView || window;
4417    return win.devicePixelRatio || 1;
4418  }
4419  function roundByDPR(element, value) {
4420    const dpr = getDPR(element);
4421    return Math.round(value * dpr) / dpr;
4422  }
4423  function useLatestRef(value) {
4424    const ref = React17.useRef(value);
4425    index(() => {
4426      ref.current = value;
4427    });
4428    return ref;
4429  }
4430  function useFloating(options) {
4431    if (options === void 0) {
4432      options = {};
4433    }
4434    const {
4435      placement = "bottom",
4436      strategy = "absolute",
4437      middleware = [],
4438      platform: platform3,
4439      elements: {
4440        reference: externalReference,
4441        floating: externalFloating
4442      } = {},
4443      transform = true,
4444      whileElementsMounted,
4445      open
4446    } = options;
4447    const [data, setData] = React17.useState({
4448      x: 0,
4449      y: 0,
4450      strategy,
4451      placement,
4452      middlewareData: {},
4453      isPositioned: false
4454    });
4455    const [latestMiddleware, setLatestMiddleware] = React17.useState(middleware);
4456    if (!deepEqual(latestMiddleware, middleware)) {
4457      setLatestMiddleware(middleware);
4458    }
4459    const [_reference, _setReference] = React17.useState(null);
4460    const [_floating, _setFloating] = React17.useState(null);
4461    const setReference = React17.useCallback((node) => {
4462      if (node !== referenceRef.current) {
4463        referenceRef.current = node;
4464        _setReference(node);
4465      }
4466    }, []);
4467    const setFloating = React17.useCallback((node) => {
4468      if (node !== floatingRef.current) {
4469        floatingRef.current = node;
4470        _setFloating(node);
4471      }
4472    }, []);
4473    const referenceEl = externalReference || _reference;
4474    const floatingEl = externalFloating || _floating;
4475    const referenceRef = React17.useRef(null);
4476    const floatingRef = React17.useRef(null);
4477    const dataRef = React17.useRef(data);
4478    const hasWhileElementsMounted = whileElementsMounted != null;
4479    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4480    const platformRef = useLatestRef(platform3);
4481    const openRef = useLatestRef(open);
4482    const update2 = React17.useCallback(() => {
4483      if (!referenceRef.current || !floatingRef.current) {
4484        return;
4485      }
4486      const config = {
4487        placement,
4488        strategy,
4489        middleware: latestMiddleware
4490      };
4491      if (platformRef.current) {
4492        config.platform = platformRef.current;
4493      }
4494      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4495        const fullData = {
4496          ...data2,
4497          // The floating element's position may be recomputed while it's closed
4498          // but still mounted (such as when transitioning out). To ensure
4499          // `isPositioned` will be `false` initially on the next open, avoid
4500          // setting it to `true` when `open === false` (must be specified).
4501          isPositioned: openRef.current !== false
4502        };
4503        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4504          dataRef.current = fullData;
4505          ReactDOM3.flushSync(() => {
4506            setData(fullData);
4507          });
4508        }
4509      });
4510    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4511    index(() => {
4512      if (open === false && dataRef.current.isPositioned) {
4513        dataRef.current.isPositioned = false;
4514        setData((data2) => ({
4515          ...data2,
4516          isPositioned: false
4517        }));
4518      }
4519    }, [open]);
4520    const isMountedRef = React17.useRef(false);
4521    index(() => {
4522      isMountedRef.current = true;
4523      return () => {
4524        isMountedRef.current = false;
4525      };
4526    }, []);
4527    index(() => {
4528      if (referenceEl) referenceRef.current = referenceEl;
4529      if (floatingEl) floatingRef.current = floatingEl;
4530      if (referenceEl && floatingEl) {
4531        if (whileElementsMountedRef.current) {
4532          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4533        }
4534        update2();
4535      }
4536    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4537    const refs = React17.useMemo(() => ({
4538      reference: referenceRef,
4539      floating: floatingRef,
4540      setReference,
4541      setFloating
4542    }), [setReference, setFloating]);
4543    const elements2 = React17.useMemo(() => ({
4544      reference: referenceEl,
4545      floating: floatingEl
4546    }), [referenceEl, floatingEl]);
4547    const floatingStyles = React17.useMemo(() => {
4548      const initialStyles = {
4549        position: strategy,
4550        left: 0,
4551        top: 0
4552      };
4553      if (!elements2.floating) {
4554        return initialStyles;
4555      }
4556      const x2 = roundByDPR(elements2.floating, data.x);
4557      const y2 = roundByDPR(elements2.floating, data.y);
4558      if (transform) {
4559        return {
4560          ...initialStyles,
4561          transform: "translate(" + x2 + "px, " + y2 + "px)",
4562          ...getDPR(elements2.floating) >= 1.5 && {
4563            willChange: "transform"
4564          }
4565        };
4566      }
4567      return {
4568        position: strategy,
4569        left: x2,
4570        top: y2
4571      };
4572    }, [strategy, transform, elements2.floating, data.x, data.y]);
4573    return React17.useMemo(() => ({
4574      ...data,
4575      update: update2,
4576      refs,
4577      elements: elements2,
4578      floatingStyles
4579    }), [data, update2, refs, elements2, floatingStyles]);
4580  }
4581  var offset3 = (options, deps) => {
4582    const result = offset2(options);
4583    return {
4584      name: result.name,
4585      fn: result.fn,
4586      options: [options, deps]
4587    };
4588  };
4589  var shift3 = (options, deps) => {
4590    const result = shift2(options);
4591    return {
4592      name: result.name,
4593      fn: result.fn,
4594      options: [options, deps]
4595    };
4596  };
4597  var limitShift3 = (options, deps) => {
4598    const result = limitShift2(options);
4599    return {
4600      fn: result.fn,
4601      options: [options, deps]
4602    };
4603  };
4604  var flip3 = (options, deps) => {
4605    const result = flip2(options);
4606    return {
4607      name: result.name,
4608      fn: result.fn,
4609      options: [options, deps]
4610    };
4611  };
4612  var size3 = (options, deps) => {
4613    const result = size2(options);
4614    return {
4615      name: result.name,
4616      fn: result.fn,
4617      options: [options, deps]
4618    };
4619  };
4620  
4621  // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4622  var BasePopupHandle = class {
4623    /**
4624     * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4625     * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4626     * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4627     * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4628     */
4629    attachedStores = [];
4630    /**
4631     * Store of the root that currently controls the handle: the most recently attached one still
4632     * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4633     */
4634    attachedStoreValue = null;
4635    /**
4636     * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4637     */
4638    storeListeners = /* @__PURE__ */ new Set();
4639    /**
4640     * Creates a handle backed by the store used while no root is attached.
4641     *
4642     * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4643     * so they can render and register without a mounted root. Triggers register into whichever store
4644     * `store` currently resolves to, so while detached they live in this store's trigger map and
4645     * migrate themselves to the root's store (and back) as it attaches/detaches.
4646     * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4647     * `MenuHandle.open()` in warning text.
4648     * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4649     * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4650     * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4651     */
4652    constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4653      this.fallbackStore = fallbackStore;
4654      this.componentName = componentName;
4655      this.throwOnMissingTrigger = throwOnMissingTrigger;
4656    }
4657    get attachedStore() {
4658      return this.attachedStoreValue;
4659    }
4660    /**
4661     * Store that detached triggers read from: the attached root's store, or an inert fallback store
4662     * used while no root is attached.
4663     * @internal
4664     */
4665    get store() {
4666      return this.attachedStoreValue ?? this.fallbackStore;
4667    }
4668    /**
4669     * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4670     * the handle during render because a handle can be shared by concurrent server-rendered requests.
4671     * @internal
4672     */
4673    get serverStore() {
4674      return this.fallbackStore;
4675    }
4676    /**
4677     * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4678     * when a root attaches or detaches. Returns a function that removes the listener.
4679     * @internal
4680     */
4681    subscribeStore(listener) {
4682      this.storeListeners.add(listener);
4683      return () => {
4684        this.storeListeners.delete(listener);
4685      };
4686    }
4687    /**
4688     * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4689     * re-register into it (their registration ref re-fires on the store-pointer change). Returns a
4690     * cleanup function that detaches the store again.
4691     * @internal
4692     */
4693    attachStore(newStore) {
4694      this.attachedStores.push(newStore);
4695      this.setActiveStore(newStore);
4696      if (true) {
4697        if (this.attachedStores.length > 1) {
4698          const dev = this;
4699          (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4700            if (this.attachedStores.length > 1) {
4701              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.");
4702            }
4703          });
4704        }
4705      }
4706      return () => {
4707        const index2 = this.attachedStores.lastIndexOf(newStore);
4708        if (index2 !== -1) {
4709          this.attachedStores.splice(index2, 1);
4710        }
4711        this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4712      };
4713    }
4714    /**
4715     * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4716     * detached triggers re-render and migrate their registration to the new store.
4717     */
4718    setActiveStore(store) {
4719      if (this.attachedStoreValue !== store) {
4720        this.attachedStoreValue = store;
4721        this.storeListeners.forEach((listener) => {
4722          listener();
4723        });
4724      }
4725    }
4726    /**
4727     * Opens the attached root's store and associates it with the trigger with the given id, or a
4728     * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4729     * `open()` method, which only narrows the parameter type.
4730     *
4731     * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4732     * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4733     *
4734     * This method should only be called in an event handler or an effect (not during rendering).
4735     *
4736     * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4737     * without associating any trigger.
4738     */
4739    openByTrigger(triggerId) {
4740      const attachedStore = this.attachedStore;
4741      if (attachedStore === null) {
4742        if (true) {
4743          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.`);
4744        }
4745        return;
4746      }
4747      let triggerElement;
4748      if (triggerId) {
4749        for (let i2 = this.attachedStores.length - 1; i2 >= 0 && !triggerElement; i2 -= 1) {
4750          triggerElement = this.attachedStores[i2].context.triggerElements.getById(triggerId);
4751        }
4752        triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4753      }
4754      if (triggerId && !triggerElement) {
4755        if (this.throwOnMissingTrigger) {
4756          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));
4757        }
4758        if (true) {
4759          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.`);
4760        }
4761      }
4762      attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4763    }
4764    /**
4765     * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4766     * while no root is attached. Shared by every concrete handle's public `close()` method.
4767     *
4768     * This method should only be called in an event handler or an effect (not during rendering).
4769     */
4770    closePopup() {
4771      const attachedStore = this.attachedStore;
4772      if (attachedStore === null) {
4773        if (true) {
4774          console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4775        }
4776        return;
4777      }
4778      attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4779    }
4780  };
4781  
4782  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4783  var React22 = __toESM(require_react(), 1);
4784  var ReactDOM4 = __toESM(require_react_dom(), 1);
4785  
4786  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4787  var React21 = __toESM(require_react(), 1);
4788  
4789  // node_modules/@base-ui/utils/store/useStore.mjs
4790  var React19 = __toESM(require_react(), 1);
4791  var import_shim = __toESM(require_shim(), 1);
4792  var import_with_selector = __toESM(require_with_selector(), 1);
4793  
4794  // node_modules/@base-ui/utils/fastHooks.mjs
4795  var React18 = __toESM(require_react(), 1);
4796  var hooks = [];
4797  var currentInstance = void 0;
4798  function getInstance() {
4799    return currentInstance;
4800  }
4801  function register(hook) {
4802    hooks.push(hook);
4803  }
4804  function fastComponent(fn) {
4805    const FastComponent = (props, forwardedRef) => {
4806      const instance = useRefWithInit(createInstance).current;
4807      let result;
4808      try {
4809        currentInstance = instance;
4810        for (const hook of hooks) {
4811          hook.before(instance);
4812        }
4813        result = fn(props, forwardedRef);
4814        for (const hook of hooks) {
4815          hook.after(instance);
4816        }
4817        instance.didInitialize = true;
4818      } finally {
4819        currentInstance = void 0;
4820      }
4821      return result;
4822    };
4823    FastComponent.displayName = fn.displayName || fn.name;
4824    return FastComponent;
4825  }
4826  function fastComponentRef(fn) {
4827    return /* @__PURE__ */ React18.forwardRef(fastComponent(fn));
4828  }
4829  function createInstance() {
4830    return {
4831      didInitialize: false
4832    };
4833  }
4834  
4835  // node_modules/@base-ui/utils/store/useStore.mjs
4836  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4837  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4838  function useStore(store, selector, a1, a2, a3) {
4839    return useStoreImplementation(store, selector, a1, a2, a3);
4840  }
4841  function useStoreR19(store, selector, a1, a2, a3) {
4842    const getSelection = React19.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);
4843    return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
4844  }
4845  register({
4846    before(instance) {
4847      instance.syncIndex = 0;
4848      if (!instance.didInitialize) {
4849        instance.syncTick = 1;
4850        instance.syncHooks = [];
4851        instance.didChangeStore = true;
4852        instance.getSnapshot = () => {
4853          let didChange2 = false;
4854          for (let i2 = 0; i2 < instance.syncHooks.length; i2 += 1) {
4855            const hook = instance.syncHooks[i2];
4856            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
4857            if (!Object.is(hook.value, value)) {
4858              didChange2 = true;
4859              hook.value = value;
4860            }
4861          }
4862          if (didChange2) {
4863            instance.syncTick += 1;
4864          }
4865          return instance.syncTick;
4866        };
4867      }
4868    },
4869    after(instance) {
4870      if (instance.syncHooks.length > 0) {
4871        if (instance.didChangeStore) {
4872          instance.didChangeStore = false;
4873          instance.subscribe = (onStoreChange) => {
4874            const stores = /* @__PURE__ */ new Set();
4875            for (const hook of instance.syncHooks) {
4876              stores.add(hook.store);
4877            }
4878            const unsubscribes = [];
4879            for (const store of stores) {
4880              unsubscribes.push(store.subscribe(onStoreChange));
4881            }
4882            return () => {
4883              for (const unsubscribe of unsubscribes) {
4884                unsubscribe();
4885              }
4886            };
4887          };
4888        }
4889        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
4890      }
4891    }
4892  });
4893  function useStoreFast(store, selector, a1, a2, a3) {
4894    const instance = getInstance();
4895    if (!instance) {
4896      return useStoreR19(store, selector, a1, a2, a3);
4897    }
4898    const index2 = instance.syncIndex;
4899    instance.syncIndex += 1;
4900    let hook;
4901    if (!instance.didInitialize) {
4902      hook = {
4903        store,
4904        selector,
4905        a1,
4906        a2,
4907        a3,
4908        value: selector(store.getSnapshot(), a1, a2, a3)
4909      };
4910      instance.syncHooks.push(hook);
4911    } else {
4912      hook = instance.syncHooks[index2];
4913      if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
4914        if (hook.store !== store) {
4915          instance.didChangeStore = true;
4916        }
4917        hook.store = store;
4918        hook.selector = selector;
4919        hook.a1 = a1;
4920        hook.a2 = a2;
4921        hook.a3 = a3;
4922        hook.value = selector(store.getSnapshot(), a1, a2, a3);
4923      }
4924    }
4925    return hook.value;
4926  }
4927  function useStoreLegacy(store, selector, a1, a2, a3) {
4928    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
4929  }
4930  
4931  // node_modules/@base-ui/utils/store/Store.mjs
4932  var Store = class {
4933    /**
4934     * The current state of the store.
4935     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
4936     * 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).
4937     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
4938     *
4939     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
4940     */
4941    // Internal state to handle recursive `setState()` calls
4942    constructor(state) {
4943      this.state = state;
4944      this.listeners = /* @__PURE__ */ new Set();
4945      this.updateTick = 0;
4946    }
4947    /**
4948     * Registers a listener that will be called whenever the store's state changes.
4949     *
4950     * @param fn The listener function to be called on state changes.
4951     * @returns A function to unsubscribe the listener.
4952     */
4953    subscribe = (fn) => {
4954      this.listeners.add(fn);
4955      return () => {
4956        this.listeners.delete(fn);
4957      };
4958    };
4959    /**
4960     * Returns the current state of the store.
4961     */
4962    getSnapshot = () => {
4963      return this.state;
4964    };
4965    /**
4966     * Updates the entire store's state and notifies all registered listeners.
4967     *
4968     * @param newState The new state to set for the store.
4969     */
4970    setState(newState) {
4971      if (this.state === newState) {
4972        return;
4973      }
4974      this.state = newState;
4975      this.updateTick += 1;
4976      const currentTick = this.updateTick;
4977      for (const listener of this.listeners) {
4978        if (currentTick !== this.updateTick) {
4979          return;
4980        }
4981        listener(newState);
4982      }
4983    }
4984    /**
4985     * Merges the provided changes into the current state and notifies listeners if there are changes.
4986     *
4987     * @param changes An object containing the changes to apply to the current state.
4988     */
4989    update(changes) {
4990      for (const key in changes) {
4991        if (!Object.is(this.state[key], changes[key])) {
4992          this.setState({
4993            ...this.state,
4994            ...changes
4995          });
4996          return;
4997        }
4998      }
4999    }
5000    /**
5001     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5002     *
5003     * @param key The key in the store's state to update.
5004     * @param value The new value to set for the specified key.
5005     */
5006    set(key, value) {
5007      if (!Object.is(this.state[key], value)) {
5008        this.setState({
5009          ...this.state,
5010          [key]: value
5011        });
5012      }
5013    }
5014    /**
5015     * Gives the state a new reference and updates all registered listeners.
5016     */
5017    notifyAll() {
5018      const newState = {
5019        ...this.state
5020      };
5021      this.setState(newState);
5022    }
5023    use(selector, a1, a2, a3) {
5024      return useStore(this, selector, a1, a2, a3);
5025    }
5026  };
5027  
5028  // node_modules/@base-ui/utils/store/ReactStore.mjs
5029  var React20 = __toESM(require_react(), 1);
5030  var ReactStore = class extends Store {
5031    /**
5032     * Creates a new ReactStore instance.
5033     *
5034     * @param state Initial state of the store.
5035     * @param context Non-reactive context values.
5036     * @param selectors Optional selectors for use with `useState`.
5037     */
5038    constructor(state, context = {}, selectors3) {
5039      super(state);
5040      this.context = context;
5041      this.selectors = selectors3;
5042    }
5043    /**
5044     * Non-reactive values such as refs, callbacks, etc.
5045     */
5046    /**
5047     * Synchronizes a single external value into the store.
5048     *
5049     * Note that the while the value in `state` is updated immediately, the value returned
5050     * by `useState` is updated before the next render (similarly to React's `useState`).
5051     */
5052    useSyncedValue(key, value) {
5053      React20.useDebugValue(key);
5054      const store = this;
5055      useIsoLayoutEffect(() => {
5056        if (store.state[key] !== value) {
5057          store.set(key, value);
5058        }
5059      }, [store, key, value]);
5060    }
5061    /**
5062     * Synchronizes a single external value into the store and
5063     * cleans it up (sets to `undefined`) on unmount.
5064     *
5065     * Note that the while the value in `state` is updated immediately, the value returned
5066     * by `useState` is updated before the next render (similarly to React's `useState`).
5067     */
5068    useSyncedValueWithCleanup(key, value) {
5069      const store = this;
5070      useIsoLayoutEffect(() => {
5071        if (store.state[key] !== value) {
5072          store.set(key, value);
5073        }
5074        return () => {
5075          store.set(key, void 0);
5076        };
5077      }, [store, key, value]);
5078    }
5079    /**
5080     * Synchronizes multiple external values into the store.
5081     *
5082     * Note that the while the values in `state` are updated immediately, the values returned
5083     * by `useState` are updated before the next render (similarly to React's `useState`).
5084     */
5085    useSyncedValues(statePart) {
5086      const store = this;
5087      if (true) {
5088        React20.useDebugValue(statePart, (p3) => Object.keys(p3));
5089        const keys = React20.useRef(Object.keys(statePart)).current;
5090        const nextKeys = Object.keys(statePart);
5091        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5092          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5093        }
5094      }
5095      const dependencies = Object.values(statePart);
5096      useIsoLayoutEffect(() => {
5097        store.update(statePart);
5098      }, [store, ...dependencies]);
5099    }
5100    /**
5101     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5102     * is non-undefined, the store's state at `key` is updated to match `controlled`.
5103     */
5104    useControlledProp(key, controlled) {
5105      React20.useDebugValue(key);
5106      const store = this;
5107      const isControlled = controlled !== void 0;
5108      useIsoLayoutEffect(() => {
5109        if (isControlled && !Object.is(store.state[key], controlled)) {
5110          store.setState({
5111            ...store.state,
5112            [key]: controlled
5113          });
5114        }
5115      }, [store, key, controlled, isControlled]);
5116      if (true) {
5117        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5118        if (!cache.has(key)) {
5119          cache.set(key, isControlled);
5120        }
5121        const previouslyControlled = cache.get(key);
5122        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5123          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).`);
5124        }
5125      }
5126    }
5127    /** Gets the current value from the store using a selector with the provided key.
5128     *
5129     * @param key Key of the selector to use.
5130     */
5131    select(key, a1, a2, a3) {
5132      const selector = this.selectors[key];
5133      return selector(this.state, a1, a2, a3);
5134    }
5135    /**
5136     * Returns a value from the store's state using a selector function.
5137     * Used to subscribe to specific parts of the state.
5138     * This methods causes a rerender whenever the selected state changes.
5139     *
5140     * @param key Key of the selector to use.
5141     */
5142    useState(key, a1, a2, a3) {
5143      React20.useDebugValue(key);
5144      return useStore(this, this.selectors[key], a1, a2, a3);
5145    }
5146    /**
5147     * Wraps a function with `useStableCallback` to ensure it has a stable reference
5148     * and assigns it to the context.
5149     *
5150     * @param key Key of the event callback. Must be a function in the context.
5151     * @param fn Function to assign.
5152     */
5153    useContextCallback(key, fn) {
5154      React20.useDebugValue(key);
5155      const stableFunction = useStableCallback(fn ?? NOOP);
5156      this.context[key] = stableFunction;
5157    }
5158    /**
5159     * Returns a stable setter function for a specific key in the store's state.
5160     * It's commonly used to pass as a ref callback to React elements.
5161     *
5162     * @param key Key of the state to set.
5163     */
5164    useStateSetter(key) {
5165      const ref = React20.useRef(void 0);
5166      if (ref.current === void 0) {
5167        ref.current = (value) => {
5168          this.set(key, value);
5169        };
5170      }
5171      return ref.current;
5172    }
5173    /**
5174     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5175     *
5176     * @param key Key of the selector to observe.
5177     * @param listener Listener function called when the selector result changes.
5178     */
5179    observe(selector, listener) {
5180      let selectFn;
5181      if (typeof selector === "function") {
5182        selectFn = selector;
5183      } else {
5184        selectFn = this.selectors[selector];
5185      }
5186      let prevValue = selectFn(this.state);
5187      listener(prevValue, prevValue, this);
5188      return this.subscribe((nextState) => {
5189        const nextValue = selectFn(nextState);
5190        if (!Object.is(prevValue, nextValue)) {
5191          const oldValue = prevValue;
5192          prevValue = nextValue;
5193          listener(nextValue, oldValue, this);
5194        }
5195      });
5196    }
5197  };
5198  
5199  // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5200  var selectors = {
5201    open: (state) => state.open,
5202    transitionStatus: (state) => state.transitionStatus,
5203    domReferenceElement: (state) => state.domReferenceElement,
5204    referenceElement: (state) => state.positionReference ?? state.referenceElement,
5205    floatingElement: (state) => state.floatingElement,
5206    floatingId: (state) => state.floatingId
5207  };
5208  var FloatingRootStore = class extends ReactStore {
5209    constructor(options) {
5210      const {
5211        syncOnly,
5212        nested,
5213        onOpenChange,
5214        triggerElements,
5215        ...initialState
5216      } = options;
5217      super({
5218        ...initialState,
5219        positionReference: initialState.referenceElement,
5220        domReferenceElement: initialState.referenceElement
5221      }, {
5222        onOpenChange,
5223        dataRef: {
5224          current: {}
5225        },
5226        events: createEventEmitter(),
5227        nested,
5228        triggerElements
5229      }, selectors);
5230      this.syncOnly = syncOnly;
5231    }
5232    /**
5233     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5234     */
5235    syncOpenEvent = (newOpen, event) => {
5236      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5237      // click events to upgrade a hover-open.
5238      event != null && isClickLikeEvent(event)) {
5239        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5240      }
5241    };
5242    /**
5243     * Runs the root-owned side effects for an open state change.
5244     */
5245    dispatchOpenChange = (newOpen, eventDetails) => {
5246      this.syncOpenEvent(newOpen, eventDetails.event);
5247      const details = {
5248        open: newOpen,
5249        reason: eventDetails.reason,
5250        nativeEvent: eventDetails.event,
5251        nested: this.context.nested,
5252        triggerElement: eventDetails.trigger
5253      };
5254      this.context.events.emit("openchange", details);
5255    };
5256    /**
5257     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5258     *
5259     * @param newOpen The new open state.
5260     * @param eventDetails Details about the event that triggered the open state change.
5261     */
5262    setOpen = (newOpen, eventDetails) => {
5263      if (this.syncOnly) {
5264        this.context.onOpenChange?.(newOpen, eventDetails);
5265        return;
5266      }
5267      this.dispatchOpenChange(newOpen, eventDetails);
5268      this.context.onOpenChange?.(newOpen, eventDetails);
5269    };
5270  };
5271  
5272  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5273  function useSyncedFloatingRootContext(options) {
5274    const {
5275      popupStore,
5276      treatPopupAsFloatingElement = false,
5277      floatingRootContext: floatingRootContextProp,
5278      floatingId,
5279      nested,
5280      onOpenChange
5281    } = options;
5282    const open = popupStore.useState("open");
5283    const referenceElement = popupStore.useState("activeTriggerElement");
5284    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5285    const triggerElements = popupStore.context.triggerElements;
5286    const handleOpenChange = onOpenChange;
5287    const internalStoreRef = React21.useRef(null);
5288    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5289      internalStoreRef.current = new FloatingRootStore({
5290        open,
5291        transitionStatus: void 0,
5292        referenceElement,
5293        floatingElement,
5294        triggerElements,
5295        onOpenChange: handleOpenChange,
5296        floatingId,
5297        syncOnly: true,
5298        nested
5299      });
5300    }
5301    const store = floatingRootContextProp ?? internalStoreRef.current;
5302    popupStore.useSyncedValue("floatingId", floatingId);
5303    useIsoLayoutEffect(() => {
5304      const valuesToSync = {
5305        open,
5306        floatingId,
5307        referenceElement,
5308        floatingElement
5309      };
5310      if (isElement(referenceElement)) {
5311        valuesToSync.domReferenceElement = referenceElement;
5312      }
5313      if (store.state.positionReference === store.state.referenceElement) {
5314        valuesToSync.positionReference = referenceElement;
5315      }
5316      store.update(valuesToSync);
5317    }, [open, floatingId, referenceElement, floatingElement, store]);
5318    store.context.onOpenChange = handleOpenChange;
5319    store.context.nested = nested;
5320    return store;
5321  }
5322  
5323  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5324  var FOCUSABLE_POPUP_PROPS = {
5325    tabIndex: -1,
5326    [FOCUSABLE_ATTRIBUTE]: ""
5327  };
5328  function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5329    const floatingId = useId();
5330    const nested = useFloatingParentNodeId() != null;
5331    const store = useRefWithInit(() => createStore(floatingId, nested)).current;
5332    useSyncedFloatingRootContext({
5333      popupStore: store,
5334      treatPopupAsFloatingElement,
5335      floatingRootContext: store.state.floatingRootContext,
5336      floatingId,
5337      nested,
5338      onOpenChange: store.setOpen
5339    });
5340    return store;
5341  }
5342  function PopupHandleAttachment({
5343    handle,
5344    store
5345  }) {
5346    useIsoLayoutEffect(() => {
5347      return handle.attachStore(store);
5348    }, [handle, store]);
5349    return null;
5350  }
5351  function useTriggerRegistration(id, store) {
5352    const registeredElementIdRef = React22.useRef(null);
5353    const registeredElementRef = React22.useRef(null);
5354    return React22.useCallback((element) => {
5355      if (id === void 0) {
5356        return;
5357      }
5358      let shouldSyncTriggerCount = false;
5359      if (registeredElementIdRef.current !== null) {
5360        const registeredId = registeredElementIdRef.current;
5361        const registeredElement = registeredElementRef.current;
5362        const currentElement = store.context.triggerElements.getById(registeredId);
5363        if (registeredElement && currentElement === registeredElement) {
5364          store.context.triggerElements.delete(registeredId);
5365          shouldSyncTriggerCount = true;
5366        }
5367        registeredElementIdRef.current = null;
5368        registeredElementRef.current = null;
5369      }
5370      if (element !== null) {
5371        registeredElementIdRef.current = id;
5372        registeredElementRef.current = element;
5373        store.context.triggerElements.add(id, element);
5374        shouldSyncTriggerCount = true;
5375      }
5376      if (shouldSyncTriggerCount) {
5377        const triggerCount = store.context.triggerElements.size;
5378        if (store.select("open") && store.state.triggerCount !== triggerCount) {
5379          store.set("triggerCount", triggerCount);
5380        }
5381      }
5382    }, [store, id]);
5383  }
5384  function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {
5385    if (open) {
5386      state.preventUnmountingOnClose = false;
5387    } else if (preventUnmountOnClose) {
5388      state.preventUnmountingOnClose = true;
5389    }
5390    const triggerId = trigger?.id ?? null;
5391    if (triggerId || open) {
5392      state.activeTriggerId = triggerId;
5393      state.activeTriggerElement = trigger ?? null;
5394    }
5395  }
5396  function attachPreventUnmountOnClose(eventDetails) {
5397    let preventUnmountOnClose = false;
5398    eventDetails.preventUnmountOnClose = () => {
5399      preventUnmountOnClose = true;
5400    };
5401    return () => preventUnmountOnClose;
5402  }
5403  function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {
5404    const reason = eventDetails.reason;
5405    const isHover = reason === reason_parts_exports.triggerHover;
5406    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5407    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5408    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5409    store.context.onOpenChange?.(nextOpen, eventDetails);
5410    if (eventDetails.isCanceled) {
5411      return;
5412    }
5413    options.onBeforeDispatch?.();
5414    store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5415    const changeState = () => {
5416      const updatedState = {
5417        ...options.extraState,
5418        open: nextOpen
5419      };
5420      if (isFocusOpen) {
5421        updatedState.instantType = "focus";
5422      } else if (isDismissClose) {
5423        updatedState.instantType = "dismiss";
5424      } else if (isHover) {
5425        updatedState.instantType = void 0;
5426      }
5427      setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5428      store.update(updatedState);
5429    };
5430    if (isHover) {
5431      ReactDOM4.flushSync(changeState);
5432    } else {
5433      changeState();
5434    }
5435  }
5436  function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {
5437    const isMountedByThisTrigger = store.useState("isMountedByTrigger", triggerId);
5438    const baseRegisterTrigger = useTriggerRegistration(triggerId, store);
5439    const applyTriggerData = useStableCallback((element) => {
5440      const open = store.select("open");
5441      const activeTriggerId = store.select("activeTriggerId");
5442      if (activeTriggerId === triggerId) {
5443        store.update({
5444          activeTriggerElement: element,
5445          ...open ? stateUpdates : null
5446        });
5447        return;
5448      }
5449      if (activeTriggerId == null && open) {
5450        store.update({
5451          activeTriggerId: triggerId,
5452          activeTriggerElement: element,
5453          ...stateUpdates
5454        });
5455      }
5456    });
5457    const registerTrigger = React22.useCallback((element) => {
5458      baseRegisterTrigger(element);
5459      if (element) {
5460        applyTriggerData(element);
5461      }
5462    }, [baseRegisterTrigger, applyTriggerData]);
5463    useIsoLayoutEffect(() => {
5464      if (isMountedByThisTrigger) {
5465        store.update({
5466          activeTriggerElement: triggerElementRef.current,
5467          ...stateUpdates
5468        });
5469      }
5470    }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);
5471    return {
5472      registerTrigger,
5473      isMountedByThisTrigger
5474    };
5475  }
5476  function useImplicitActiveTrigger(store, options = {}) {
5477    const {
5478      closeOnActiveTriggerUnmount = false
5479    } = options;
5480    const resolvedActiveTriggerIdRef = React22.useRef(null);
5481    const open = store.useState("open");
5482    const reactiveTriggerCount = store.useState("triggerCount");
5483    const activeTriggerId = store.useState("activeTriggerId");
5484    const reactiveActiveTriggerElement = store.useState("activeTriggerElement");
5485    useIsoLayoutEffect(() => {
5486      if (!open) {
5487        resolvedActiveTriggerIdRef.current = null;
5488        if (store.state.triggerCount !== 0) {
5489          store.set("triggerCount", 0);
5490        }
5491        return;
5492      }
5493      const triggerCount = store.context.triggerElements.size;
5494      const stateUpdates = {};
5495      if (store.state.triggerCount !== triggerCount) {
5496        stateUpdates.triggerCount = triggerCount;
5497      }
5498      const currentActiveTriggerId = store.select("activeTriggerId");
5499      let lostActiveTriggerId = null;
5500      if (currentActiveTriggerId) {
5501        const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);
5502        if (!activeTriggerElement) {
5503          for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {
5504            if (triggerElement === store.state.activeTriggerElement) {
5505              stateUpdates.activeTriggerId = triggerId;
5506              stateUpdates.activeTriggerElement = triggerElement;
5507              resolvedActiveTriggerIdRef.current = triggerId;
5508              break;
5509            }
5510          }
5511          if (stateUpdates.activeTriggerId === void 0) {
5512            if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5513              lostActiveTriggerId = currentActiveTriggerId;
5514            } else {
5515              resolvedActiveTriggerIdRef.current = null;
5516            }
5517          }
5518        } else {
5519          resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5520          if (activeTriggerElement !== store.state.activeTriggerElement) {
5521            stateUpdates.activeTriggerElement = activeTriggerElement;
5522          }
5523        }
5524      } else {
5525        resolvedActiveTriggerIdRef.current = null;
5526      }
5527      if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5528        const iteratorResult = store.context.triggerElements.entries().next();
5529        if (!iteratorResult.done) {
5530          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5531          stateUpdates.activeTriggerId = implicitTriggerId;
5532          stateUpdates.activeTriggerElement = implicitTriggerElement;
5533          resolvedActiveTriggerIdRef.current = implicitTriggerId;
5534        }
5535      }
5536      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5537        store.update(stateUpdates);
5538      }
5539      if (lostActiveTriggerId) {
5540        if (closeOnActiveTriggerUnmount) {
5541          queueMicrotask(() => {
5542            if (store.select("open") && store.select("activeTriggerId") === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {
5543              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5544              store.setOpen(false, eventDetails);
5545              if (!eventDetails.isCanceled) {
5546                store.update({
5547                  activeTriggerId: null,
5548                  activeTriggerElement: null
5549                });
5550              }
5551            }
5552          });
5553        }
5554      }
5555    }, [open, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5556  }
5557  function useOpenStateTransitions(open, store, onUnmount) {
5558    const {
5559      mounted,
5560      setMounted,
5561      transitionStatus
5562    } = useTransitionStatus(open);
5563    const preventUnmountingOnClose = store.useState("preventUnmountingOnClose");
5564    const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;
5565    store.useSyncedValues({
5566      mounted,
5567      transitionStatus,
5568      preventUnmountingOnClose: syncedPreventUnmountingOnClose
5569    });
5570    const forceUnmount = useStableCallback(() => {
5571      setMounted(false);
5572      store.update({
5573        activeTriggerId: null,
5574        activeTriggerElement: null,
5575        mounted: false,
5576        preventUnmountingOnClose: false
5577      });
5578      onUnmount?.();
5579      store.context.onOpenChangeComplete?.(false);
5580    });
5581    useOpenChangeComplete({
5582      enabled: mounted && !open && !syncedPreventUnmountingOnClose,
5583      open,
5584      ref: store.context.popupRef,
5585      onComplete() {
5586        if (!open) {
5587          forceUnmount();
5588        }
5589      }
5590    });
5591    return {
5592      forceUnmount,
5593      transitionStatus
5594    };
5595  }
5596  function usePopupInteractionProps(store, statePart) {
5597    store.useSyncedValues(statePart);
5598    useIsoLayoutEffect(() => () => {
5599      store.update({
5600        activeTriggerProps: EMPTY_OBJECT,
5601        inactiveTriggerProps: EMPTY_OBJECT,
5602        popupProps: EMPTY_OBJECT
5603      });
5604    }, [store]);
5605  }
5606  
5607  // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5608  var devElementIdsByMap;
5609  function getDevElementIds(map) {
5610    devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5611    let elementIds = devElementIdsByMap.get(map);
5612    if (!elementIds) {
5613      elementIds = /* @__PURE__ */ new WeakMap();
5614      devElementIdsByMap.set(map, elementIds);
5615    }
5616    return elementIds;
5617  }
5618  var PopupTriggerMap = class {
5619    constructor() {
5620      this.idMap = /* @__PURE__ */ new Map();
5621    }
5622    /**
5623     * Adds a trigger element with the given ID.
5624     *
5625     * Note: The provided element is assumed to not be registered under multiple IDs.
5626     */
5627    add(id, element) {
5628      if (true) {
5629        const elementIds = getDevElementIds(this);
5630        const existingId = elementIds.get(element);
5631        if (existingId !== void 0 && existingId !== id) {
5632          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5633        }
5634        const previousElement = this.idMap.get(id);
5635        if (previousElement !== void 0 && previousElement !== element) {
5636          elementIds.delete(previousElement);
5637        }
5638        elementIds.set(element, id);
5639      }
5640      this.idMap.set(id, element);
5641    }
5642    /**
5643     * Removes the trigger element with the given ID.
5644     */
5645    delete(id) {
5646      if (true) {
5647        const element = this.idMap.get(id);
5648        if (element !== void 0) {
5649          devElementIdsByMap?.get(this)?.delete(element);
5650        }
5651      }
5652      this.idMap.delete(id);
5653    }
5654    /**
5655     * Whether the given element is registered as a trigger.
5656     */
5657    hasElement(element) {
5658      for (const registered of this.idMap.values()) {
5659        if (registered === element) {
5660          return true;
5661        }
5662      }
5663      return false;
5664    }
5665    /**
5666     * Whether there is a registered trigger element matching the given predicate.
5667     */
5668    hasMatchingElement(predicate) {
5669      for (const element of this.idMap.values()) {
5670        if (predicate(element)) {
5671          return true;
5672        }
5673      }
5674      return false;
5675    }
5676    /**
5677     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5678     */
5679    getById(id) {
5680      return this.idMap.get(id);
5681    }
5682    /**
5683     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5684     */
5685    entries() {
5686      return this.idMap.entries();
5687    }
5688    /**
5689     * Returns an iterable of all registered trigger elements.
5690     */
5691    elements() {
5692      return this.idMap.values();
5693    }
5694    /**
5695     * Returns the number of registered trigger elements.
5696     */
5697    get size() {
5698      return this.idMap.size;
5699    }
5700  };
5701  
5702  // node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
5703  function getEmptyRootContext() {
5704    return new FloatingRootStore({
5705      open: false,
5706      transitionStatus: void 0,
5707      floatingElement: null,
5708      referenceElement: null,
5709      triggerElements: new PopupTriggerMap(),
5710      floatingId: void 0,
5711      syncOnly: false,
5712      nested: false,
5713      onOpenChange: void 0
5714    });
5715  }
5716  
5717  // node_modules/@base-ui/react/utils/popups/store.mjs
5718  function createInitialPopupStoreState() {
5719    return {
5720      open: false,
5721      openProp: void 0,
5722      mounted: false,
5723      transitionStatus: void 0,
5724      floatingRootContext: getEmptyRootContext(),
5725      floatingId: void 0,
5726      triggerCount: 0,
5727      preventUnmountingOnClose: false,
5728      payload: void 0,
5729      activeTriggerId: null,
5730      activeTriggerElement: null,
5731      triggerIdProp: void 0,
5732      popupElement: null,
5733      positionerElement: null,
5734      activeTriggerProps: EMPTY_OBJECT,
5735      inactiveTriggerProps: EMPTY_OBJECT,
5736      popupProps: EMPTY_OBJECT
5737    };
5738  }
5739  function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
5740    return new FloatingRootStore({
5741      open: false,
5742      transitionStatus: void 0,
5743      floatingElement: null,
5744      referenceElement: null,
5745      triggerElements,
5746      floatingId,
5747      syncOnly: true,
5748      nested,
5749      onOpenChange: void 0
5750    });
5751  }
5752  var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5753  var openSelector = (state) => state.openProp ?? state.open;
5754  var popupIdSelector = (state) => {
5755    const popupId = state.popupElement?.id ?? state.floatingId;
5756    return popupId || void 0;
5757  };
5758  function triggerOwnsOpenPopup(state, triggerId) {
5759    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5760  }
5761  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5762    if (triggerOwnsOpenPopup(state, triggerId)) {
5763      return true;
5764    }
5765    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5766  }
5767  var popupStoreSelectors = {
5768    open: openSelector,
5769    mounted: (state) => state.mounted,
5770    transitionStatus: (state) => state.transitionStatus,
5771    floatingRootContext: (state) => state.floatingRootContext,
5772    triggerCount: (state) => state.triggerCount,
5773    preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5774    payload: (state) => state.payload,
5775    activeTriggerId: activeTriggerIdSelector,
5776    activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5777    popupId: popupIdSelector,
5778    /**
5779     * Whether the trigger with the given ID was used to open the popup.
5780     */
5781    isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5782    /**
5783     * Whether the popup is open and was activated by a trigger with the given ID.
5784     */
5785    isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5786    /**
5787     * Whether the popup is mounted and was activated by a trigger with the given ID.
5788     */
5789    isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5790    triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5791    /**
5792     * Popup id for the trigger that currently owns the open popup.
5793     */
5794    triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5795    popupProps: (state) => state.popupProps,
5796    popupElement: (state) => state.popupElement,
5797    positionerElement: (state) => state.positionerElement
5798  };
5799  
5800  // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
5801  var React23 = __toESM(require_react(), 1);
5802  var import_shim2 = __toESM(require_shim(), 1);
5803  function usePopupHandleStore(handle) {
5804    const subscribe = React23.useCallback((listener) => {
5805      if (handle === void 0) {
5806        return NOOP;
5807      }
5808      return handle.subscribeStore(listener);
5809    }, [handle]);
5810    const getSnapshot = React23.useCallback(() => {
5811      return handle === void 0 ? void 0 : handle.store;
5812    }, [handle]);
5813    return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
5814  }
5815  
5816  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
5817  function useBaseUIFloating(options) {
5818    return useFloatingWithStore(options, options.rootContext);
5819  }
5820  function useFloatingWithStore(options, store) {
5821    const {
5822      nodeId,
5823      externalTree
5824    } = options;
5825    const referenceElement = store.useState("referenceElement");
5826    const floatingElement = store.useState("floatingElement");
5827    const domReferenceElement = store.useState("domReferenceElement");
5828    const open = store.useState("open");
5829    const floatingId = store.useState("floatingId");
5830    const [positionReference, setPositionReferenceRaw] = React24.useState(null);
5831    const [localDomReference, setLocalDomReference] = React24.useState(void 0);
5832    const [localFloatingElement, setLocalFloatingElement] = React24.useState(void 0);
5833    const domReferenceRef = React24.useRef(null);
5834    const tree = useFloatingTree(externalTree);
5835    const storeElements = React24.useMemo(() => ({
5836      reference: referenceElement,
5837      floating: floatingElement,
5838      domReference: domReferenceElement
5839    }), [referenceElement, floatingElement, domReferenceElement]);
5840    const position = useFloating({
5841      ...options,
5842      elements: {
5843        ...storeElements,
5844        ...positionReference && {
5845          reference: positionReference
5846        }
5847      }
5848    });
5849    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
5850    const syncedFloatingElement = localFloatingElement === void 0 ? store.state.floatingElement : localFloatingElement;
5851    store.useSyncedValue("referenceElement", localDomReference ?? null);
5852    store.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
5853    store.useSyncedValue("floatingElement", syncedFloatingElement);
5854    const setPositionReference = React24.useCallback((node) => {
5855      const computedPositionReference = isElement(node) ? {
5856        getBoundingClientRect: () => node.getBoundingClientRect(),
5857        getClientRects: () => node.getClientRects(),
5858        contextElement: node
5859      } : node;
5860      setPositionReferenceRaw(computedPositionReference);
5861      position.refs.setReference(computedPositionReference);
5862    }, [position.refs]);
5863    const setReference = React24.useCallback((node) => {
5864      if (isElement(node) || node === null) {
5865        domReferenceRef.current = node;
5866        setLocalDomReference(node);
5867      }
5868      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
5869      // `null` to support `positionReference` + an unstable `reference`
5870      // callback ref.
5871      node !== null && !isElement(node)) {
5872        position.refs.setReference(node);
5873      }
5874    }, [position.refs, setLocalDomReference]);
5875    const setFloating = React24.useCallback((node) => {
5876      setLocalFloatingElement(node);
5877      position.refs.setFloating(node);
5878    }, [position.refs]);
5879    const refs = React24.useMemo(() => ({
5880      ...position.refs,
5881      setReference,
5882      setFloating,
5883      setPositionReference,
5884      domReference: domReferenceRef
5885    }), [position.refs, setReference, setFloating, setPositionReference]);
5886    const elements2 = React24.useMemo(() => ({
5887      ...position.elements,
5888      domReference: domReferenceElement
5889    }), [position.elements, domReferenceElement]);
5890    const context = React24.useMemo(() => ({
5891      ...position,
5892      dataRef: store.context.dataRef,
5893      open,
5894      onOpenChange: store.setOpen,
5895      events: store.context.events,
5896      floatingId,
5897      refs,
5898      elements: elements2,
5899      nodeId,
5900      rootStore: store
5901    }), [position, refs, elements2, nodeId, store, open, floatingId]);
5902    useIsoLayoutEffect(() => {
5903      if (domReferenceElement) {
5904        domReferenceRef.current = domReferenceElement;
5905      }
5906    }, [domReferenceElement]);
5907    useIsoLayoutEffect(() => {
5908      store.context.dataRef.current.floatingContext = context;
5909      const node = tree?.nodesRef.current.find((n2) => n2.id === nodeId);
5910      if (node) {
5911        node.context = context;
5912      }
5913    });
5914    return React24.useMemo(() => ({
5915      ...position,
5916      context,
5917      refs,
5918      elements: elements2,
5919      rootStore: store
5920    }), [position, refs, elements2, context, store]);
5921  }
5922  
5923  // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
5924  var React25 = __toESM(require_react(), 1);
5925  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
5926  function useFocus(context, props = {}) {
5927    const {
5928      enabled = true,
5929      delay
5930    } = props;
5931    const store = "rootStore" in context ? context.rootStore : context;
5932    const {
5933      events,
5934      dataRef
5935    } = store.context;
5936    const blockFocusRef = React25.useRef(false);
5937    const blockedReferenceRef = React25.useRef(null);
5938    const keyboardModalityRef = React25.useRef(true);
5939    const timeout = useTimeout();
5940    React25.useEffect(() => {
5941      const domReference = store.select("domReferenceElement");
5942      if (!enabled) {
5943        return void 0;
5944      }
5945      const win = getWindow(domReference);
5946      function onBlur() {
5947        const currentDomReference = store.select("domReferenceElement");
5948        if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
5949          blockFocusRef.current = true;
5950        }
5951      }
5952      function onKeyDown() {
5953        keyboardModalityRef.current = true;
5954      }
5955      function onPointerDown() {
5956        keyboardModalityRef.current = false;
5957      }
5958      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
5959    }, [store, enabled]);
5960    React25.useEffect(() => {
5961      if (!enabled) {
5962        return void 0;
5963      }
5964      function onOpenChangeLocal(details) {
5965        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
5966          const referenceElement = store.select("domReferenceElement");
5967          if (isElement(referenceElement)) {
5968            blockedReferenceRef.current = referenceElement;
5969            blockFocusRef.current = true;
5970          }
5971        }
5972      }
5973      events.on("openchange", onOpenChangeLocal);
5974      return () => {
5975        events.off("openchange", onOpenChangeLocal);
5976      };
5977    }, [events, enabled, store]);
5978    const reference = React25.useMemo(() => {
5979      function resetBlockedFocus() {
5980        blockFocusRef.current = false;
5981        blockedReferenceRef.current = null;
5982      }
5983      return {
5984        onMouseLeave() {
5985          resetBlockedFocus();
5986        },
5987        onFocus(event) {
5988          const focusTarget = event.currentTarget;
5989          if (blockFocusRef.current) {
5990            if (blockedReferenceRef.current === focusTarget) {
5991              return;
5992            }
5993            resetBlockedFocus();
5994          }
5995          const target = getTarget(event.nativeEvent);
5996          if (isElement(target)) {
5997            if (isMacSafari && !event.relatedTarget) {
5998              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
5999                return;
6000              }
6001            } else if (!matchesFocusVisible(target)) {
6002              return;
6003            }
6004          }
6005          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);
6006          const {
6007            nativeEvent,
6008            currentTarget
6009          } = event;
6010          const delayValue = typeof delay === "function" ? delay() : delay;
6011          if (store.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6012            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6013            return;
6014          }
6015          timeout.start(delayValue, () => {
6016            if (blockFocusRef.current) {
6017              return;
6018            }
6019            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6020          });
6021        },
6022        onBlur(event) {
6023          resetBlockedFocus();
6024          const relatedTarget = event.relatedTarget;
6025          const nativeEvent = event.nativeEvent;
6026          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6027          timeout.start(0, () => {
6028            const domReference = store.select("domReferenceElement");
6029            const activeEl = activeElement(ownerDocument(domReference));
6030            if (!relatedTarget && activeEl === domReference) {
6031              return;
6032            }
6033            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6034              return;
6035            }
6036            const nextFocusedElement = relatedTarget ?? activeEl;
6037            if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {
6038              return;
6039            }
6040            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6041          });
6042        }
6043      };
6044    }, [dataRef, delay, store, timeout]);
6045    return React25.useMemo(() => enabled ? {
6046      reference,
6047      trigger: reference
6048    } : {}, [enabled, reference]);
6049  }
6050  
6051  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6052  var React26 = __toESM(require_react(), 1);
6053  
6054  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6055  var HoverInteraction = class _HoverInteraction {
6056    constructor() {
6057      this.pointerType = void 0;
6058      this.interactedInside = false;
6059      this.handler = void 0;
6060      this.blockMouseMove = true;
6061      this.performedPointerEventsMutation = false;
6062      this.pointerEventsScopeElement = null;
6063      this.pointerEventsReferenceElement = null;
6064      this.pointerEventsFloatingElement = null;
6065      this.restTimeoutPending = false;
6066      this.openChangeTimeout = new Timeout();
6067      this.restTimeout = new Timeout();
6068      this.handleCloseOptions = void 0;
6069    }
6070    static create() {
6071      return new _HoverInteraction();
6072    }
6073    dispose = () => {
6074      this.openChangeTimeout.clear();
6075      this.restTimeout.clear();
6076    };
6077    disposeEffect = () => {
6078      return this.dispose;
6079    };
6080  };
6081  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6082  function clearSafePolygonPointerEventsMutation(instance) {
6083    if (!instance.performedPointerEventsMutation) {
6084      return;
6085    }
6086    const scopeElement = instance.pointerEventsScopeElement;
6087    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6088      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6089      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6090      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6091      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6092    }
6093    instance.performedPointerEventsMutation = false;
6094    instance.pointerEventsScopeElement = null;
6095    instance.pointerEventsReferenceElement = null;
6096    instance.pointerEventsFloatingElement = null;
6097  }
6098  function applySafePolygonPointerEventsMutation(instance, options) {
6099    const {
6100      scopeElement,
6101      referenceElement,
6102      floatingElement
6103    } = options;
6104    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6105    if (existingOwner && existingOwner !== instance) {
6106      clearSafePolygonPointerEventsMutation(existingOwner);
6107    }
6108    clearSafePolygonPointerEventsMutation(instance);
6109    instance.performedPointerEventsMutation = true;
6110    instance.pointerEventsScopeElement = scopeElement;
6111    instance.pointerEventsReferenceElement = referenceElement;
6112    instance.pointerEventsFloatingElement = floatingElement;
6113    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6114    scopeElement.style.pointerEvents = "none";
6115    referenceElement.style.pointerEvents = "auto";
6116    floatingElement.style.pointerEvents = "auto";
6117  }
6118  function useHoverInteractionSharedState(store) {
6119    const data = store.context.dataRef.current;
6120    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6121    if (!data.hoverInteractionState) {
6122      data.hoverInteractionState = instance;
6123    }
6124    useOnMount(data.hoverInteractionState.disposeEffect);
6125    return data.hoverInteractionState;
6126  }
6127  
6128  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6129  function useHoverFloatingInteraction(context, parameters = {}) {
6130    const {
6131      enabled = true,
6132      closeDelay: closeDelayProp = 0,
6133      nodeId: nodeIdProp
6134    } = parameters;
6135    const store = "rootStore" in context ? context.rootStore : context;
6136    const open = store.useState("open");
6137    const floatingElement = store.useState("floatingElement");
6138    const domReferenceElement = store.useState("domReferenceElement");
6139    const {
6140      dataRef
6141    } = store.context;
6142    const tree = useFloatingTree();
6143    const parentId = useFloatingParentNodeId();
6144    const instance = useHoverInteractionSharedState(store);
6145    const childClosedTimeout = useTimeout();
6146    const isClickLikeOpenEvent2 = useStableCallback(() => {
6147      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6148    });
6149    const isHoverOpen = useStableCallback(() => {
6150      return isHoverOpenEvent(dataRef.current.openEvent?.type);
6151    });
6152    const clearPointerEvents = useStableCallback(() => {
6153      clearSafePolygonPointerEventsMutation(instance);
6154    });
6155    useIsoLayoutEffect(() => {
6156      if (!open) {
6157        instance.pointerType = void 0;
6158        instance.restTimeoutPending = false;
6159        instance.interactedInside = false;
6160        clearPointerEvents();
6161      }
6162    }, [open, instance, clearPointerEvents]);
6163    React26.useEffect(() => {
6164      return clearPointerEvents;
6165    }, [clearPointerEvents]);
6166    useIsoLayoutEffect(() => {
6167      if (!enabled) {
6168        return void 0;
6169      }
6170      if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6171        const ref = domReferenceElement;
6172        const floatingEl = floatingElement;
6173        const doc = ownerDocument(floatingElement);
6174        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6175        if (parentFloating) {
6176          parentFloating.style.pointerEvents = "";
6177        }
6178        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6179        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6180        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6181        applySafePolygonPointerEventsMutation(instance, {
6182          scopeElement,
6183          referenceElement: ref,
6184          floatingElement: floatingEl
6185        });
6186        return () => {
6187          clearPointerEvents();
6188        };
6189      }
6190      return void 0;
6191    }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6192    React26.useEffect(() => {
6193      if (!enabled) {
6194        return void 0;
6195      }
6196      function hasParentChildren() {
6197        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6198      }
6199      function closeWithDelay(event) {
6200        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6201        const close = () => {
6202          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6203          tree?.events.emit("floating.closed", event);
6204        };
6205        if (closeDelay) {
6206          instance.openChangeTimeout.start(closeDelay, close);
6207        } else {
6208          instance.openChangeTimeout.clear();
6209          close();
6210        }
6211      }
6212      function handleInteractInside(event) {
6213        const target = getTarget(event);
6214        if (!isInteractiveElement(target)) {
6215          instance.interactedInside = false;
6216          return;
6217        }
6218        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6219      }
6220      function onFloatingMouseEnter() {
6221        instance.openChangeTimeout.clear();
6222        childClosedTimeout.clear();
6223        tree?.events.off("floating.closed", onNodeClosed);
6224        clearPointerEvents();
6225      }
6226      function onFloatingMouseLeave(event) {
6227        if (hasParentChildren() && tree) {
6228          tree.events.on("floating.closed", onNodeClosed);
6229          return;
6230        }
6231        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6232          return;
6233        }
6234        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6235        const relatedTarget = event.relatedTarget;
6236        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6237        if (isMovingIntoDescendantFloating) {
6238          return;
6239        }
6240        if (instance.handler) {
6241          instance.handler(event);
6242          return;
6243        }
6244        clearPointerEvents();
6245        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6246          closeWithDelay(event);
6247        }
6248      }
6249      function onNodeClosed(event) {
6250        if (!tree || !parentId || hasParentChildren()) {
6251          return;
6252        }
6253        childClosedTimeout.start(0, () => {
6254          tree.events.off("floating.closed", onNodeClosed);
6255          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6256          tree.events.emit("floating.closed", event);
6257        });
6258      }
6259      const floating = floatingElement;
6260      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6261        tree?.events.off("floating.closed", onNodeClosed);
6262      });
6263    }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6264  }
6265  
6266  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6267  var React27 = __toESM(require_react(), 1);
6268  var ReactDOM5 = __toESM(require_react_dom(), 1);
6269  var EMPTY_REF = {
6270    current: null
6271  };
6272  function useHoverReferenceInteraction(context, props = {}) {
6273    const {
6274      enabled = true,
6275      delay = 0,
6276      handleClose = null,
6277      mouseOnly = false,
6278      restMs = 0,
6279      move = true,
6280      triggerElementRef = EMPTY_REF,
6281      externalTree,
6282      isActiveTrigger = true,
6283      getHandleCloseContext,
6284      isClosing,
6285      shouldOpen: shouldOpenProp,
6286      guardStaleOpen = false
6287    } = props;
6288    const store = "rootStore" in context ? context.rootStore : context;
6289    const {
6290      dataRef,
6291      events
6292    } = store.context;
6293    const tree = useFloatingTree(externalTree);
6294    const instance = useHoverInteractionSharedState(store);
6295    const isHoverCloseActiveRef = React27.useRef(false);
6296    const handleCloseRef = useValueAsRef(handleClose);
6297    const delayRef = useValueAsRef(delay);
6298    const restMsRef = useValueAsRef(restMs);
6299    const enabledRef = useValueAsRef(enabled);
6300    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6301    const isClosingRef = useValueAsRef(isClosing);
6302    const isClickLikeOpenEvent2 = useStableCallback(() => {
6303      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6304    });
6305    const checkShouldOpen = useStableCallback(() => {
6306      return shouldOpenRef.current?.() !== false;
6307    });
6308    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6309      const allTriggers = store.context.triggerElements;
6310      if (allTriggers.hasElement(currentTarget)) {
6311        return !currentDomReference || !contains(currentDomReference, currentTarget);
6312      }
6313      if (!isElement(target)) {
6314        return false;
6315      }
6316      const targetElement = target;
6317      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6318    });
6319    const cleanupMouseMoveHandler = useStableCallback(() => {
6320      if (!instance.handler) {
6321        return;
6322      }
6323      const doc = ownerDocument(store.select("domReferenceElement"));
6324      doc.removeEventListener("mousemove", instance.handler);
6325      instance.handler = void 0;
6326    });
6327    const clearPointerEvents = useStableCallback(() => {
6328      clearSafePolygonPointerEventsMutation(instance);
6329    });
6330    if (isActiveTrigger) {
6331      instance.handleCloseOptions = handleCloseRef.current?.__options;
6332    }
6333    React27.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6334    React27.useEffect(() => {
6335      if (!enabled) {
6336        return void 0;
6337      }
6338      function onOpenChangeLocal(details) {
6339        if (!details.open) {
6340          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6341          cleanupMouseMoveHandler();
6342          instance.openChangeTimeout.clear();
6343          instance.restTimeout.clear();
6344          instance.blockMouseMove = true;
6345          instance.restTimeoutPending = false;
6346        } else {
6347          isHoverCloseActiveRef.current = false;
6348        }
6349      }
6350      events.on("openchange", onOpenChangeLocal);
6351      return () => {
6352        events.off("openchange", onOpenChangeLocal);
6353      };
6354    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6355    React27.useEffect(() => {
6356      if (!enabled) {
6357        return void 0;
6358      }
6359      function closeWithDelay(event, runElseBranch = true) {
6360        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6361        if (closeDelay) {
6362          instance.openChangeTimeout.start(closeDelay, () => {
6363            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6364            tree?.events.emit("floating.closed", event);
6365          });
6366        } else if (runElseBranch) {
6367          instance.openChangeTimeout.clear();
6368          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6369          tree?.events.emit("floating.closed", event);
6370        }
6371      }
6372      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select("domReferenceElement") : null);
6373      if (!isElement(trigger)) {
6374        return void 0;
6375      }
6376      function onMouseEnter(event) {
6377        instance.openChangeTimeout.clear();
6378        instance.blockMouseMove = false;
6379        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6380          return;
6381        }
6382        const restMsValue = getRestMs(restMsRef.current);
6383        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6384        const eventTarget = getTarget(event);
6385        const currentTarget = event.currentTarget ?? null;
6386        const currentDomReference = store.select("domReferenceElement");
6387        let triggerNode = currentTarget;
6388        if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {
6389          for (const triggerElement of store.context.triggerElements.elements()) {
6390            if (contains(triggerElement, eventTarget)) {
6391              triggerNode = triggerElement;
6392              break;
6393            }
6394          }
6395        }
6396        if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6397          triggerNode = currentDomReference;
6398        }
6399        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6400        const isOpen = store.select("open");
6401        const isInClosingTransition = isClosingRef.current?.() ?? store.select("transitionStatus") === "ending";
6402        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6403        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6404        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6405        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6406        const shouldOpen = !isOpen || isOverInactive;
6407        if (shouldOpenImmediately) {
6408          if (checkShouldOpen()) {
6409            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6410          }
6411          return;
6412        }
6413        if (isRestOnlyDelay) {
6414          return;
6415        }
6416        if (openDelay) {
6417          instance.openChangeTimeout.start(openDelay, () => {
6418            if (shouldOpen && checkShouldOpen()) {
6419              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6420            }
6421          });
6422        } else if (shouldOpen) {
6423          if (checkShouldOpen()) {
6424            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6425          }
6426        }
6427      }
6428      function onMouseLeave(event) {
6429        if (isClickLikeOpenEvent2()) {
6430          clearPointerEvents();
6431          return;
6432        }
6433        cleanupMouseMoveHandler();
6434        const domReferenceElement = store.select("domReferenceElement");
6435        const doc = ownerDocument(domReferenceElement);
6436        instance.restTimeout.clear();
6437        instance.restTimeoutPending = false;
6438        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6439        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6440          return;
6441        }
6442        if (handleCloseRef.current && handleCloseContextBase) {
6443          if (!store.select("open")) {
6444            instance.openChangeTimeout.clear();
6445          }
6446          const currentTrigger = triggerElementRef.current;
6447          instance.handler = handleCloseRef.current({
6448            ...handleCloseContextBase,
6449            tree,
6450            x: event.clientX,
6451            y: event.clientY,
6452            onClose() {
6453              clearPointerEvents();
6454              cleanupMouseMoveHandler();
6455              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store.select("domReferenceElement")) {
6456                closeWithDelay(event, true);
6457              }
6458            }
6459          });
6460          doc.addEventListener("mousemove", instance.handler);
6461          instance.handler(event);
6462          return;
6463        }
6464        const shouldClose = instance.pointerType === "touch" ? !contains(store.select("floatingElement"), event.relatedTarget) : true;
6465        if (shouldClose) {
6466          closeWithDelay(event);
6467        }
6468      }
6469      function onMouseOut(event) {
6470        if (contains(trigger, event.relatedTarget)) {
6471          return;
6472        }
6473        instance.openChangeTimeout.clear();
6474        instance.restTimeout.clear();
6475        instance.restTimeoutPending = false;
6476      }
6477      const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6478      if (move) {
6479        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6480          once: true
6481        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6482      }
6483      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6484    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6485    return React27.useMemo(() => {
6486      if (!enabled) {
6487        return void 0;
6488      }
6489      function setPointerRef(event) {
6490        instance.pointerType = event.pointerType;
6491      }
6492      return {
6493        onPointerDown: setPointerRef,
6494        onPointerEnter: setPointerRef,
6495        onMouseMove(event) {
6496          const {
6497            nativeEvent
6498          } = event;
6499          const trigger = event.currentTarget;
6500          const currentDomReference = store.select("domReferenceElement");
6501          const currentOpen = store.select("open");
6502          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6503          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6504            return;
6505          }
6506          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6507            const floatingElement = store.select("floatingElement");
6508            if (floatingElement) {
6509              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6510              applySafePolygonPointerEventsMutation(instance, {
6511                scopeElement,
6512                referenceElement: trigger,
6513                floatingElement
6514              });
6515            }
6516          }
6517          const restMsValue = getRestMs(restMsRef.current);
6518          if (currentOpen && !isOverInactive || restMsValue === 0) {
6519            return;
6520          }
6521          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6522            return;
6523          }
6524          instance.restTimeout.clear();
6525          function handleMouseMove() {
6526            instance.restTimeoutPending = false;
6527            if (isClickLikeOpenEvent2()) {
6528              return;
6529            }
6530            const latestOpen = store.select("open");
6531            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6532              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6533            }
6534          }
6535          if (instance.pointerType === "touch") {
6536            ReactDOM5.flushSync(() => {
6537              handleMouseMove();
6538            });
6539          } else if (isOverInactive && currentOpen) {
6540            handleMouseMove();
6541          } else {
6542            instance.restTimeoutPending = true;
6543            instance.restTimeout.start(restMsValue, handleMouseMove);
6544          }
6545        }
6546      };
6547    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);
6548  }
6549  
6550  // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6551  var CURSOR_SPEED_THRESHOLD = 0.1;
6552  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6553  var POLYGON_BUFFER = 0.5;
6554  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6555    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6556  }
6557  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6558    let isInsideValue = false;
6559    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6560      isInsideValue = !isInsideValue;
6561    }
6562    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6563      isInsideValue = !isInsideValue;
6564    }
6565    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6566      isInsideValue = !isInsideValue;
6567    }
6568    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6569      isInsideValue = !isInsideValue;
6570    }
6571    return isInsideValue;
6572  }
6573  function isInsideRect(pointX, pointY, rect) {
6574    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6575  }
6576  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6577    const minX = Math.min(x1, x2);
6578    const maxX = Math.max(x1, x2);
6579    const minY = Math.min(y1, y2);
6580    const maxY = Math.max(y1, y2);
6581    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6582  }
6583  function safePolygon(options = {}) {
6584    const {
6585      blockPointerEvents = false
6586    } = options;
6587    const timeout = new Timeout();
6588    const fn = ({
6589      x: x2,
6590      y: y2,
6591      placement,
6592      elements: elements2,
6593      onClose,
6594      nodeId,
6595      tree
6596    }) => {
6597      const side = placement?.split("-")[0];
6598      let hasLanded = false;
6599      let lastX = null;
6600      let lastY = null;
6601      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6602      function isCursorMovingSlowly(nextX, nextY) {
6603        const currentTime = performance.now();
6604        const elapsedTime = currentTime - lastCursorTime;
6605        if (lastX === null || lastY === null || elapsedTime === 0) {
6606          lastX = nextX;
6607          lastY = nextY;
6608          lastCursorTime = currentTime;
6609          return false;
6610        }
6611        const deltaX = nextX - lastX;
6612        const deltaY = nextY - lastY;
6613        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6614        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6615        lastX = nextX;
6616        lastY = nextY;
6617        lastCursorTime = currentTime;
6618        return distanceSquared < thresholdSquared;
6619      }
6620      function close() {
6621        timeout.clear();
6622        onClose();
6623      }
6624      return function onMouseMove(event) {
6625        timeout.clear();
6626        const domReference = elements2.domReference;
6627        const floating = elements2.floating;
6628        if (!domReference || !floating || side == null || x2 == null || y2 == null) {
6629          return void 0;
6630        }
6631        const {
6632          clientX,
6633          clientY
6634        } = event;
6635        const target = getTarget(event);
6636        const isLeave = event.type === "mouseleave";
6637        const isOverFloatingEl = contains(floating, target);
6638        const isOverReferenceEl = contains(domReference, target);
6639        if (isOverFloatingEl) {
6640          hasLanded = true;
6641          if (!isLeave) {
6642            return void 0;
6643          }
6644        }
6645        if (isOverReferenceEl) {
6646          hasLanded = false;
6647          if (!isLeave) {
6648            hasLanded = true;
6649            return void 0;
6650          }
6651        }
6652        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6653          return void 0;
6654        }
6655        function hasOpenChildNode() {
6656          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6657        }
6658        function closeIfNoOpenChild() {
6659          if (!hasOpenChildNode()) {
6660            close();
6661          }
6662        }
6663        if (hasOpenChildNode()) {
6664          return void 0;
6665        }
6666        const refRect = domReference.getBoundingClientRect();
6667        const rect = floating.getBoundingClientRect();
6668        const cursorLeaveFromRight = x2 > rect.right - rect.width / 2;
6669        const cursorLeaveFromBottom = y2 > rect.bottom - rect.height / 2;
6670        const isFloatingWider = rect.width > refRect.width;
6671        const isFloatingTaller = rect.height > refRect.height;
6672        const left = (isFloatingWider ? refRect : rect).left;
6673        const right = (isFloatingWider ? refRect : rect).right;
6674        const top = (isFloatingTaller ? refRect : rect).top;
6675        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6676        if (side === "top" && y2 >= refRect.bottom - 1 || side === "bottom" && y2 <= refRect.top + 1 || side === "left" && x2 >= refRect.right - 1 || side === "right" && x2 <= refRect.left + 1) {
6677          closeIfNoOpenChild();
6678          return void 0;
6679        }
6680        let isInsideTroughRect = false;
6681        switch (side) {
6682          case "top":
6683            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6684            break;
6685          case "bottom":
6686            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6687            break;
6688          case "left":
6689            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6690            break;
6691          case "right":
6692            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6693            break;
6694          default:
6695        }
6696        if (isInsideTroughRect) {
6697          return void 0;
6698        }
6699        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6700          closeIfNoOpenChild();
6701          return void 0;
6702        }
6703        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6704          closeIfNoOpenChild();
6705          return void 0;
6706        }
6707        let isInsidePolygon = false;
6708        switch (side) {
6709          case "top": {
6710            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6711            const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6712            const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6713            const cursorPointY = y2 + POLYGON_BUFFER + 1;
6714            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6715            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6716            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6717            break;
6718          }
6719          case "bottom": {
6720            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6721            const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6722            const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6723            const cursorPointY = y2 - POLYGON_BUFFER;
6724            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6725            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6726            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6727            break;
6728          }
6729          case "left": {
6730            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6731            const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6732            const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6733            const cursorPointX = x2 + POLYGON_BUFFER + 1;
6734            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6735            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6736            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6737            break;
6738          }
6739          case "right": {
6740            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6741            const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6742            const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6743            const cursorPointX = x2 - POLYGON_BUFFER;
6744            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6745            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6746            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6747            break;
6748          }
6749          default:
6750        }
6751        if (!isInsidePolygon) {
6752          closeIfNoOpenChild();
6753        } else if (!hasLanded) {
6754          timeout.start(40, closeIfNoOpenChild);
6755        }
6756        return void 0;
6757      };
6758    };
6759    fn.__options = {
6760      ...options,
6761      blockPointerEvents
6762    };
6763    return fn;
6764  }
6765  
6766  // node_modules/@base-ui/react/utils/NullStore.mjs
6767  var NullStore = class extends ReactStore {
6768    // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6769    // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6770    // inert even if a future base-class change stops routing a mutator through `setState`.
6771    setState(_newState) {
6772    }
6773    update(_changes) {
6774    }
6775    set(_key, _value) {
6776    }
6777    notifyAll() {
6778    }
6779  };
6780  
6781  // node_modules/@base-ui/react/utils/popupStateMapping.mjs
6782  var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
6783    CommonPopupDataAttributes2["open"] = "data-open";
6784    CommonPopupDataAttributes2["closed"] = "data-closed";
6785    CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
6786    CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
6787    CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
6788    CommonPopupDataAttributes2["side"] = "data-side";
6789    CommonPopupDataAttributes2["align"] = "data-align";
6790    return CommonPopupDataAttributes2;
6791  })({});
6792  var TRIGGER_HOOK = {
6793    "data-popup-open": ""
6794  };
6795  var POPUP_OPEN_HOOK = {
6796    "data-open": ""
6797  };
6798  var POPUP_CLOSED_HOOK = {
6799    "data-closed": ""
6800  };
6801  var ANCHOR_HIDDEN_HOOK = {
6802    "data-anchor-hidden": ""
6803  };
6804  var triggerOpenStateMapping = {
6805    open(value) {
6806      if (value) {
6807        return TRIGGER_HOOK;
6808      }
6809      return null;
6810    }
6811  };
6812  var popupStateMapping = {
6813    open(value) {
6814      if (value) {
6815        return POPUP_OPEN_HOOK;
6816      }
6817      return POPUP_CLOSED_HOOK;
6818    },
6819    anchorHidden(value) {
6820      if (value) {
6821        return ANCHOR_HIDDEN_HOOK;
6822      }
6823      return null;
6824    }
6825  };
6826  var popupTransitionStateMapping = {
6827    ...popupStateMapping,
6828    ...transitionStatusMapping
6829  };
6830  
6831  // node_modules/@base-ui/utils/inertValue.mjs
6832  function inertValue(value) {
6833    if (isReactVersionAtLeast(19)) {
6834      return value;
6835    }
6836    return value ? "true" : void 0;
6837  }
6838  
6839  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6840  var React28 = __toESM(require_react(), 1);
6841  var DirectionContext = /* @__PURE__ */ React28.createContext(void 0);
6842  if (true) DirectionContext.displayName = "DirectionContext";
6843  function useDirection() {
6844    const context = React28.useContext(DirectionContext);
6845    return context?.direction ?? "ltr";
6846  }
6847  
6848  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6849  var React29 = __toESM(require_react(), 1);
6850  
6851  // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6852  var baseArrow = (options) => ({
6853    name: "arrow",
6854    options,
6855    async fn(state) {
6856      const {
6857        x: x2,
6858        y: y2,
6859        placement,
6860        rects,
6861        platform: platform3,
6862        elements: elements2,
6863        middlewareData
6864      } = state;
6865      const {
6866        element,
6867        padding = 0,
6868        offsetParent = "real"
6869      } = evaluate(options, state) || {};
6870      if (element == null) {
6871        return {};
6872      }
6873      const paddingObject = getPaddingObject(padding);
6874      const coords = {
6875        x: x2,
6876        y: y2
6877      };
6878      const axis = getAlignmentAxis(placement);
6879      const length = getAxisLength(axis);
6880      const arrowDimensions = await platform3.getDimensions(element);
6881      const isYAxis = axis === "y";
6882      const minProp = isYAxis ? "top" : "left";
6883      const maxProp = isYAxis ? "bottom" : "right";
6884      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6885      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6886      const startDiff = coords[axis] - rects.reference[axis];
6887      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements2.floating;
6888      let clientSize = elements2.floating[clientProp] || rects.floating[length];
6889      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
6890        clientSize = elements2.floating[clientProp] || rects.floating[length];
6891      }
6892      const centerToReference = endDiff / 2 - startDiff / 2;
6893      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6894      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6895      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6896      const min2 = minPadding;
6897      const max2 = clientSize - arrowDimensions[length] - maxPadding;
6898      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6899      const offset4 = clamp(min2, center, max2);
6900      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6901      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6902      return {
6903        [axis]: coords[axis] + alignmentOffset,
6904        data: {
6905          [axis]: offset4,
6906          centerOffset: center - offset4 - alignmentOffset,
6907          ...shouldAddOffset && {
6908            alignmentOffset
6909          }
6910        },
6911        reset: shouldAddOffset
6912      };
6913    }
6914  });
6915  var arrow4 = (options, deps) => ({
6916    ...baseArrow(options),
6917    options: [options, deps]
6918  });
6919  
6920  // node_modules/@base-ui/react/utils/hideMiddleware.mjs
6921  var hide4 = {
6922    name: "hide",
6923    async fn(state) {
6924      const {
6925        width,
6926        height,
6927        x: x2,
6928        y: y2
6929      } = state.rects.reference;
6930      const anchorHidden = width === 0 && height === 0 && x2 === 0 && y2 === 0;
6931      const overflow = await state.platform.detectOverflow(state, {
6932        elementContext: "reference"
6933      });
6934      const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
6935      return {
6936        data: {
6937          referenceHidden: referenceHidden || anchorHidden
6938        }
6939      };
6940    }
6941  };
6942  
6943  // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
6944  var DEFAULT_SIDES = {
6945    sideX: "left",
6946    sideY: "top"
6947  };
6948  
6949  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6950  var AVAILABLE_WIDTH_VAR = "--available-width";
6951  var AVAILABLE_HEIGHT_VAR = "--available-height";
6952  function getLogicalSide(sideParam, renderedSide, isRtl) {
6953    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
6954    const logicalRight = isRtl ? "inline-start" : "inline-end";
6955    const logicalLeft = isRtl ? "inline-end" : "inline-start";
6956    return {
6957      top: "top",
6958      right: isLogicalSideParam ? logicalRight : "right",
6959      bottom: "bottom",
6960      left: isLogicalSideParam ? logicalLeft : "left"
6961    }[renderedSide];
6962  }
6963  function getOffsetData(state, sideParam, isRtl) {
6964    const {
6965      rects,
6966      placement
6967    } = state;
6968    const data = {
6969      side: getLogicalSide(sideParam, getSide(placement), isRtl),
6970      align: getAlignment(placement) || "center",
6971      anchor: {
6972        width: rects.reference.width,
6973        height: rects.reference.height
6974      },
6975      positioner: {
6976        width: rects.floating.width,
6977        height: rects.floating.height
6978      }
6979    };
6980    return data;
6981  }
6982  function useAnchorPositioning(params) {
6983    return useAnchorPositioningWithHook(params, useBaseUIFloating);
6984  }
6985  function useAnchorPositioningWithHook(params, useFloatingHook) {
6986    const {
6987      // Public parameters
6988      anchor,
6989      positionMethod = "absolute",
6990      side: sideParam = "bottom",
6991      sideOffset = 0,
6992      align = "center",
6993      alignOffset = 0,
6994      collisionBoundary,
6995      collisionPadding: collisionPaddingParam = 5,
6996      sticky = false,
6997      arrowPadding = 5,
6998      disableAnchorTracking = false,
6999      inline: inlineMiddleware,
7000      // Private parameters
7001      keepMounted = false,
7002      floatingRootContext,
7003      mounted,
7004      collisionAvoidance,
7005      shift: shift4,
7006      nodeId,
7007      adaptiveOrigin: adaptiveOrigin2,
7008      lazyFlip = false,
7009      externalTree
7010    } = params;
7011    const [mountSide, setMountSide] = React29.useState(null);
7012    if (!mounted && mountSide !== null) {
7013      setMountSide(null);
7014    }
7015    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7016    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7017    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7018    const shiftCrossAxis = shift4?.crossAxis ?? false;
7019    const shiftRootBoundary = shift4?.rootBoundary;
7020    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7021    const anchorFnCallback = useStableCallback(anchorFn);
7022    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7023    const anchorValueRef = useValueAsRef(anchor);
7024    const mountedRef = useValueAsRef(mounted);
7025    const direction = useDirection();
7026    const isRtl = direction === "rtl";
7027    const side = mountSide || {
7028      top: "top",
7029      right: "right",
7030      bottom: "bottom",
7031      left: "left",
7032      "inline-end": isRtl ? "left" : "right",
7033      "inline-start": isRtl ? "right" : "left"
7034    }[sideParam];
7035    const placement = align === "center" ? side : `$side}-$align}`;
7036    let collisionPadding = collisionPaddingParam;
7037    if (typeof collisionPadding === "number") {
7038      collisionPadding = {
7039        top: collisionPadding,
7040        right: collisionPadding,
7041        bottom: collisionPadding,
7042        left: collisionPadding
7043      };
7044    } else if (collisionPadding) {
7045      collisionPadding = {
7046        top: collisionPadding.top || 0,
7047        right: collisionPadding.right || 0,
7048        bottom: collisionPadding.bottom || 0,
7049        left: collisionPadding.left || 0
7050      };
7051    }
7052    const bias = 1;
7053    const biasTop = sideParam === "bottom" ? bias : 0;
7054    const biasBottom = sideParam === "top" ? bias : 0;
7055    const biasLeft = sideParam === "right" ? bias : 0;
7056    const biasRight = sideParam === "left" ? bias : 0;
7057    const commonCollisionProps = {
7058      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7059      padding: collisionPadding
7060    };
7061    const arrowRef = React29.useRef(null);
7062    const sideOffsetRef = useValueAsRef(sideOffset);
7063    const alignOffsetRef = useValueAsRef(alignOffset);
7064    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7065    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7066    const middleware = [];
7067    if (inlineMiddleware) {
7068      middleware.push(inlineMiddleware);
7069    }
7070    middleware.push(offset3((state) => {
7071      const data = getOffsetData(state, sideParam, isRtl);
7072      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7073      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7074      return {
7075        mainAxis: sideAxis,
7076        crossAxis: alignAxis,
7077        alignmentAxis: alignAxis
7078      };
7079    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7080    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7081    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7082    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7083      ...commonCollisionProps,
7084      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7085      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7086      padding: {
7087        top: collisionPadding.top + bias + biasTop,
7088        right: collisionPadding.right + bias + biasRight,
7089        bottom: collisionPadding.bottom + bias + biasBottom,
7090        left: collisionPadding.left + bias + biasLeft
7091      },
7092      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7093      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7094      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7095    });
7096    const shiftMiddleware = shiftDisabled ? null : shift3({
7097      ...commonCollisionProps,
7098      // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7099      rootBoundary: shiftRootBoundary,
7100      mainAxis: collisionAvoidanceAlign !== "none",
7101      crossAxis: crossAxisShiftEnabled,
7102      limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7103        if (!arrowRef.current) {
7104          return {};
7105        }
7106        const {
7107          width,
7108          height
7109        } = arrowRef.current.getBoundingClientRect();
7110        const sideAxis = getSideAxis(getSide(limitData.placement));
7111        const arrowSize = sideAxis === "y" ? width : height;
7112        const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7113        return {
7114          offset: arrowSize / 2 + offsetAmount / 2
7115        };
7116      })
7117    }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7118    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7119      middleware.push(shiftMiddleware, flipMiddleware);
7120    } else {
7121      middleware.push(flipMiddleware, shiftMiddleware);
7122    }
7123    middleware.push(size3({
7124      ...commonCollisionProps,
7125      apply({
7126        elements: {
7127          floating
7128        },
7129        availableWidth,
7130        availableHeight,
7131        rects
7132      }) {
7133        if (!mountedRef.current) {
7134          return;
7135        }
7136        const floatingStyle = floating.style;
7137        floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth}px`);
7138        floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight}px`);
7139        const dpr = getWindow(floating).devicePixelRatio || 1;
7140        const {
7141          x: x3,
7142          y: y3,
7143          width,
7144          height
7145        } = rects.reference;
7146        const anchorWidth = (Math.round((x3 + width) * dpr) - Math.round(x3 * dpr)) / dpr;
7147        const anchorHeight = (Math.round((y3 + height) * dpr) - Math.round(y3 * dpr)) / dpr;
7148        floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
7149        floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
7150      }
7151    }), arrow4((state) => ({
7152      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7153      // we'll create a fake element.
7154      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7155      padding: arrowPadding,
7156      offsetParent: "floating"
7157    }), [arrowPadding]), {
7158      name: "transformOrigin",
7159      fn(state) {
7160        const {
7161          elements: elements3,
7162          middlewareData: middlewareData2,
7163          placement: renderedPlacement2,
7164          rects,
7165          y: y3
7166        } = state;
7167        const currentRenderedSide = getSide(renderedPlacement2);
7168        const currentRenderedAxis = getSideAxis(currentRenderedSide);
7169        const arrowEl = arrowRef.current;
7170        const arrowX = middlewareData2.arrow?.x || 0;
7171        const arrowY = middlewareData2.arrow?.y || 0;
7172        const arrowWidth = arrowEl?.clientWidth || 0;
7173        const arrowHeight = arrowEl?.clientHeight || 0;
7174        const transformX = arrowX + arrowWidth / 2;
7175        const transformY = arrowY + arrowHeight / 2;
7176        const shiftY = Math.abs(middlewareData2.shift?.y || 0);
7177        const halfAnchorHeight = rects.reference.height / 2;
7178        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7179        const isOverlappingAnchor = shiftY > sideOffsetValue;
7180        const adjacentTransformOrigin = {
7181          top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
7182          bottom: `$transformX}px ${-sideOffsetValue}px`,
7183          left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
7184          right: `${-sideOffsetValue}px $transformY}px`
7185        }[currentRenderedSide];
7186        const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y3}px`;
7187        elements3.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
7188        return {};
7189      }
7190    }, hide4, adaptiveOrigin2);
7191    useIsoLayoutEffect(() => {
7192      if (!mounted && floatingRootContext) {
7193        floatingRootContext.update({
7194          referenceElement: null,
7195          floatingElement: null,
7196          domReferenceElement: null,
7197          positionReference: null
7198        });
7199      }
7200    }, [mounted, floatingRootContext]);
7201    const autoUpdateOptions = React29.useMemo(() => ({
7202      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7203      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7204    }), [disableAnchorTracking]);
7205    const {
7206      refs,
7207      elements: elements2,
7208      x: x2,
7209      y: y2,
7210      middlewareData,
7211      update: update2,
7212      placement: renderedPlacement,
7213      context,
7214      isPositioned,
7215      floatingStyles: originalFloatingStyles
7216    } = useFloatingHook({
7217      rootContext: floatingRootContext,
7218      open: keepMounted ? mounted : void 0,
7219      placement,
7220      middleware,
7221      strategy: positionMethod,
7222      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7223      nodeId,
7224      externalTree
7225    });
7226    const {
7227      sideX,
7228      sideY
7229    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7230    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7231    const floatingStyles = React29.useMemo(() => {
7232      let base;
7233      if (!isPositioned) {
7234        base = {
7235          position: resolvedPosition,
7236          top: 0,
7237          left: 0
7238        };
7239      } else if (adaptiveOrigin2) {
7240        base = {
7241          position: resolvedPosition,
7242          [sideX]: x2,
7243          [sideY]: y2
7244        };
7245      } else {
7246        base = {
7247          ...originalFloatingStyles,
7248          position: resolvedPosition
7249        };
7250      }
7251      base[AVAILABLE_WIDTH_VAR] = "100vw";
7252      base[AVAILABLE_HEIGHT_VAR] = "100vh";
7253      if (!isPositioned) {
7254        base.opacity = 0;
7255      }
7256      return base;
7257    }, [adaptiveOrigin2, resolvedPosition, sideX, x2, sideY, y2, originalFloatingStyles, isPositioned]);
7258    const registeredPositionReferenceRef = React29.useRef(null);
7259    useIsoLayoutEffect(() => {
7260      if (!mounted) {
7261        return;
7262      }
7263      const anchorValue = anchorValueRef.current;
7264      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7265      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7266      const finalAnchor = unwrappedElement || null;
7267      if (finalAnchor !== registeredPositionReferenceRef.current) {
7268        refs.setPositionReference(finalAnchor);
7269        registeredPositionReferenceRef.current = finalAnchor;
7270      }
7271    }, [mounted, refs, anchorDep, anchorValueRef]);
7272    React29.useEffect(() => {
7273      if (!mounted) {
7274        return;
7275      }
7276      const anchorValue = anchorValueRef.current;
7277      if (typeof anchorValue === "function") {
7278        return;
7279      }
7280      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7281        refs.setPositionReference(anchorValue.current);
7282        registeredPositionReferenceRef.current = anchorValue.current;
7283      }
7284    }, [mounted, refs, anchorDep, anchorValueRef]);
7285    React29.useEffect(() => {
7286      if (keepMounted && mounted && elements2.reference && elements2.floating) {
7287        return autoUpdate(elements2.reference, elements2.floating, update2, autoUpdateOptions);
7288      }
7289      return void 0;
7290    }, [keepMounted, mounted, elements2, update2, autoUpdateOptions]);
7291    const renderedSide = getSide(renderedPlacement);
7292    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7293    const renderedAlign = getAlignment(renderedPlacement) || "center";
7294    const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
7295    useIsoLayoutEffect(() => {
7296      if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7297        setMountSide(renderedSide);
7298      }
7299    }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7300    const arrowStyles = React29.useMemo(() => ({
7301      position: "absolute",
7302      top: middlewareData.arrow?.y,
7303      left: middlewareData.arrow?.x
7304    }), [middlewareData.arrow]);
7305    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7306    return React29.useMemo(() => ({
7307      positionerStyles: floatingStyles,
7308      arrowStyles,
7309      arrowRef,
7310      arrowUncentered,
7311      side: logicalRenderedSide,
7312      align: renderedAlign,
7313      physicalSide: renderedSide,
7314      anchorHidden,
7315      refs,
7316      context,
7317      isPositioned,
7318      update: update2
7319    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
7320  }
7321  function isRef(param) {
7322    return param != null && "current" in param;
7323  }
7324  
7325  // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7326  function getDisabledMountTransitionStyles(transitionStatus) {
7327    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7328  }
7329  
7330  // node_modules/@base-ui/react/utils/usePositioner.mjs
7331  function usePositioner(componentProps, state, {
7332    styles,
7333    transitionStatus,
7334    props,
7335    refs,
7336    hidden,
7337    inert = false
7338  }) {
7339    const style = {
7340      ...styles
7341    };
7342    if (inert) {
7343      style.pointerEvents = "none";
7344    }
7345    return useRenderElement("div", componentProps, {
7346      state,
7347      ref: refs,
7348      props: [{
7349        role: "presentation",
7350        hidden,
7351        style
7352      }, getDisabledMountTransitionStyles(transitionStatus), props],
7353      stateAttributesMapping: popupStateMapping
7354    });
7355  }
7356  
7357  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7358  var React33 = __toESM(require_react(), 1);
7359  var ReactDOM6 = __toESM(require_react_dom(), 1);
7360  
7361  // node_modules/@base-ui/utils/usePreviousValue.mjs
7362  var React30 = __toESM(require_react(), 1);
7363  function usePreviousValue(value) {
7364    const [state, setState] = React30.useState({
7365      current: value,
7366      previous: null
7367    });
7368    if (!Object.is(value, state.current)) {
7369      setState({
7370        current: value,
7371        previous: state.current
7372      });
7373    }
7374    return state.previous;
7375  }
7376  
7377  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7378  var React31 = __toESM(require_react(), 1);
7379  
7380  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
7381  function getCssDimensions2(element) {
7382    const css = getComputedStyle2(element);
7383    let width = parseFloat(css.width) || 0;
7384    let height = parseFloat(css.height) || 0;
7385    const hasOffset = isHTMLElement(element);
7386    const offsetWidth = hasOffset ? element.offsetWidth : width;
7387    const offsetHeight = hasOffset ? element.offsetHeight : height;
7388    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7389    if (shouldFallback) {
7390      width = offsetWidth;
7391      height = offsetHeight;
7392    }
7393    return {
7394      width,
7395      height
7396    };
7397  }
7398  
7399  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7400  function usePopupAutoResize(parameters) {
7401    const {
7402      popupElement,
7403      positionerElement,
7404      content,
7405      mounted,
7406      onMeasureLayout: onMeasureLayoutParam,
7407      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7408      side,
7409      direction
7410    } = parameters;
7411    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7412    const animationFrame = useAnimationFrame();
7413    const committedDimensionsRef = React31.useRef(null);
7414    const isInitialRenderRef = React31.useRef(true);
7415    const restoreAnchoringStylesRef = React31.useRef(NOOP);
7416    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7417    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7418    const anchoringStyles = React31.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7419    useIsoLayoutEffect(() => {
7420      if (!mounted) {
7421        restoreAnchoringStylesRef.current = NOOP;
7422        isInitialRenderRef.current = true;
7423        committedDimensionsRef.current = null;
7424        return void 0;
7425      }
7426      if (!popupElement || !positionerElement) {
7427        return void 0;
7428      }
7429      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7430      setPopupCssSize(popupElement, "auto");
7431      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7432      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7433      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7434      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7435        "--available-width": "max-content",
7436        "--available-height": "max-content"
7437      });
7438      function restoreMeasurementOverrides() {
7439        restorePopupPosition();
7440        restorePopupTransform();
7441        restorePositionerAvailableSize();
7442      }
7443      function restoreMeasurementOverridesIncludingScale() {
7444        restoreMeasurementOverrides();
7445        restorePopupScale();
7446      }
7447      onMeasureLayout?.();
7448      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7449        setPositionerCssSize(positionerElement, "max-content");
7450        const dimensions = getCssDimensions2(popupElement);
7451        committedDimensionsRef.current = dimensions;
7452        setPositionerCssSize(positionerElement, dimensions);
7453        restoreMeasurementOverridesIncludingScale();
7454        onMeasureLayoutComplete?.(null, dimensions);
7455        isInitialRenderRef.current = false;
7456        return () => {
7457          restoreAnchoringStylesRef.current();
7458          restoreAnchoringStylesRef.current = NOOP;
7459        };
7460      }
7461      setPositionerCssSize(positionerElement, "max-content");
7462      const previousDimensions = committedDimensionsRef.current;
7463      const newDimensions = getCssDimensions2(popupElement);
7464      committedDimensionsRef.current = newDimensions;
7465      setPopupCssSize(popupElement, previousDimensions);
7466      restoreMeasurementOverridesIncludingScale();
7467      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7468      setPositionerCssSize(positionerElement, newDimensions);
7469      const abortController = new AbortController();
7470      animationFrame.request(() => {
7471        setPopupCssSize(popupElement, newDimensions);
7472        runOnceAnimationsFinish(() => {
7473          popupElement.style.setProperty("--popup-width", "auto");
7474          popupElement.style.setProperty("--popup-height", "auto");
7475        }, abortController.signal);
7476      });
7477      return () => {
7478        abortController.abort();
7479        animationFrame.cancel();
7480        restoreAnchoringStylesRef.current();
7481        restoreAnchoringStylesRef.current = NOOP;
7482      };
7483    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7484  }
7485  function getPopupAnchoringStyles(side, direction) {
7486    const isPhysicalTop = side === "top";
7487    const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7488    if (!isPhysicalTop && !isPhysicalLeft) {
7489      return EMPTY_OBJECT;
7490    }
7491    return {
7492      position: "absolute",
7493      [isPhysicalTop ? "bottom" : "top"]: "0",
7494      [isPhysicalLeft ? "right" : "left"]: "0"
7495    };
7496  }
7497  function overrideElementStyle(element, property, value) {
7498    const originalValue = element.style.getPropertyValue(property);
7499    element.style.setProperty(property, value);
7500    return () => {
7501      element.style.setProperty(property, originalValue);
7502    };
7503  }
7504  function applyElementStyles(element, styles) {
7505    const restorers = [];
7506    for (const [key, value] of Object.entries(styles)) {
7507      restorers.push(overrideElementStyle(element, key, value));
7508    }
7509    return restorers.length ? () => {
7510      restorers.forEach((restore) => restore());
7511    } : NOOP;
7512  }
7513  function setPopupCssSize(popupElement, size4) {
7514    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7515    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7516    popupElement.style.setProperty("--popup-width", width);
7517    popupElement.style.setProperty("--popup-height", height);
7518  }
7519  function setPositionerCssSize(positionerElement, size4) {
7520    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7521    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7522    positionerElement.style.setProperty("--positioner-width", width);
7523    positionerElement.style.setProperty("--positioner-height", height);
7524  }
7525  
7526  // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7527  var React32 = __toESM(require_react(), 1);
7528  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7529  var DirectionProvider = function DirectionProvider2(props) {
7530    const {
7531      direction = "ltr"
7532    } = props;
7533    const contextValue = React32.useMemo(() => ({
7534      direction
7535    }), [direction]);
7536    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7537      value: contextValue,
7538      children: props.children
7539    });
7540  };
7541  if (true) DirectionProvider.displayName = "DirectionProvider";
7542  
7543  // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7544  var adaptiveOrigin = {
7545    name: "adaptiveOrigin",
7546    async fn(state) {
7547      const {
7548        x: rawX,
7549        y: rawY,
7550        rects: {
7551          floating: floatRect
7552        },
7553        elements: {
7554          floating
7555        },
7556        platform: platform3,
7557        strategy,
7558        placement
7559      } = state;
7560      const win = getWindow(floating);
7561      const styles = win.getComputedStyle(floating);
7562      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7563      if (!hasTransition) {
7564        return {
7565          x: rawX,
7566          y: rawY,
7567          data: DEFAULT_SIDES
7568        };
7569      }
7570      const offsetParent = await platform3.getOffsetParent?.(floating);
7571      let offsetDimensions = {
7572        width: 0,
7573        height: 0
7574      };
7575      if (strategy === "fixed" && win?.visualViewport) {
7576        offsetDimensions = {
7577          width: win.visualViewport.width,
7578          height: win.visualViewport.height
7579        };
7580      } else if (offsetParent === win) {
7581        const doc = ownerDocument(floating);
7582        offsetDimensions = {
7583          width: doc.documentElement.clientWidth,
7584          height: doc.documentElement.clientHeight
7585        };
7586      } else if (await platform3.isElement?.(offsetParent)) {
7587        offsetDimensions = await platform3.getDimensions(offsetParent);
7588      }
7589      const currentSide = getSide(placement);
7590      let x2 = rawX;
7591      let y2 = rawY;
7592      if (currentSide === "left") {
7593        x2 = offsetDimensions.width - (rawX + floatRect.width);
7594      }
7595      if (currentSide === "top") {
7596        y2 = offsetDimensions.height - (rawY + floatRect.height);
7597      }
7598      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7599      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7600      return {
7601        x: x2,
7602        y: y2,
7603        data: {
7604          sideX,
7605          sideY
7606        }
7607      };
7608    }
7609  };
7610  
7611  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7612  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7613  var popupViewportStateMapping = {
7614    activationDirection: (value) => value ? {
7615      "data-activation-direction": value
7616    } : null
7617  };
7618  function usePopupViewport(parameters) {
7619    const {
7620      store,
7621      side,
7622      children
7623    } = parameters;
7624    const direction = useDirection();
7625    const activeTrigger = store.useState("activeTriggerElement");
7626    const activeTriggerId = store.useState("activeTriggerId");
7627    const open = store.useState("open");
7628    const payload = store.useState("payload");
7629    const mounted = store.useState("mounted");
7630    const popupElement = store.useState("popupElement");
7631    const positionerElement = store.useState("positionerElement");
7632    const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
7633    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7634    const capturedNodeRef = React33.useRef(null);
7635    const [previousContentNode, setPreviousContentNode] = React33.useState(null);
7636    const [newTriggerOffset, setNewTriggerOffset] = React33.useState(null);
7637    const currentContainerRef = React33.useRef(null);
7638    const previousContainerRef = React33.useRef(null);
7639    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7640    const cleanupFrame = useAnimationFrame();
7641    const cleanupControllerRef = React33.useRef(null);
7642    const [previousContentDimensions, setPreviousContentDimensions] = React33.useState(null);
7643    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React33.useState(false);
7644    useIsoLayoutEffect(() => {
7645      store.set("adaptiveOrigin", adaptiveOrigin);
7646      return () => {
7647        store.set("adaptiveOrigin", void 0);
7648      };
7649    }, [store]);
7650    const handleMeasureLayout = useStableCallback(() => {
7651      currentContainerRef.current?.style.setProperty("animation", "none");
7652      currentContainerRef.current?.style.setProperty("transition", "none");
7653      previousContainerRef.current?.style.setProperty("display", "none");
7654    });
7655    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7656      currentContainerRef.current?.style.removeProperty("animation");
7657      currentContainerRef.current?.style.removeProperty("transition");
7658      previousContainerRef.current?.style.removeProperty("display");
7659      if (previousDimensions) {
7660        setPreviousContentDimensions(previousDimensions);
7661      }
7662    });
7663    const armViewportCleanup = useStableCallback(() => {
7664      cleanupControllerRef.current?.abort();
7665      const controller = new AbortController();
7666      cleanupControllerRef.current = controller;
7667      onAnimationsFinished(() => {
7668        setPreviousContentNode(null);
7669        setPreviousContentDimensions(null);
7670        capturedNodeRef.current = null;
7671      }, controller.signal);
7672    });
7673    const lastHandledTriggerRef = React33.useRef(null);
7674    useIsoLayoutEffect(() => {
7675      if (!open || !mounted) {
7676        lastHandledTriggerRef.current = null;
7677      }
7678    }, [open, mounted]);
7679    useIsoLayoutEffect(() => {
7680      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7681        setPreviousContentNode(capturedNodeRef.current);
7682        setShowStartingStyleAttribute(true);
7683        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7684        setNewTriggerOffset(offset4);
7685        lastHandledTriggerRef.current = activeTrigger;
7686      }
7687    }, [activeTrigger, previousActiveTrigger]);
7688    useIsoLayoutEffect(() => {
7689      if (previousContentNode == null) {
7690        return;
7691      }
7692      cleanupControllerRef.current?.abort();
7693      setShowStartingStyleAttribute(true);
7694      cleanupFrame.request(() => {
7695        ReactDOM6.flushSync(() => {
7696          setShowStartingStyleAttribute(false);
7697        });
7698        armViewportCleanup();
7699      });
7700    }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7701    useIsoLayoutEffect(() => {
7702      const source = currentContainerRef.current;
7703      if (!source) {
7704        return;
7705      }
7706      const wrapper = ownerDocument(source).createElement("div");
7707      for (const child of Array.from(source.childNodes)) {
7708        wrapper.appendChild(child.cloneNode(true));
7709      }
7710      capturedNodeRef.current = wrapper;
7711    });
7712    const isTransitioning = previousContentNode != null;
7713    let childrenToRender;
7714    if (!isTransitioning) {
7715      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7716        "data-current": true,
7717        ref: currentContainerRef,
7718        children
7719      }, currentContentKey);
7720    } else {
7721      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React33.Fragment, {
7722        children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7723          "data-previous": true,
7724          inert: inertValue(true),
7725          ref: previousContainerRef,
7726          style: {
7727            ...previousContentDimensions ? {
7728              "--popup-width": `$previousContentDimensions.width}px`,
7729              "--popup-height": `$previousContentDimensions.height}px`
7730            } : null,
7731            position: "absolute"
7732          },
7733          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7734        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7735          "data-current": true,
7736          ref: currentContainerRef,
7737          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7738          children
7739        }, currentContentKey)]
7740      });
7741    }
7742    useIsoLayoutEffect(() => {
7743      const container = previousContainerRef.current;
7744      if (!container || !previousContentNode) {
7745        return;
7746      }
7747      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7748    }, [previousContentNode]);
7749    usePopupAutoResize({
7750      popupElement,
7751      positionerElement,
7752      mounted,
7753      content: payload,
7754      onMeasureLayout: handleMeasureLayout,
7755      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7756      side,
7757      direction
7758    });
7759    const state = {
7760      activationDirection: getActivationDirection(newTriggerOffset),
7761      transitioning: isTransitioning
7762    };
7763    return {
7764      children: childrenToRender,
7765      state
7766    };
7767  }
7768  function getActivationDirection(offset4) {
7769    if (!offset4) {
7770      return void 0;
7771    }
7772    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7773  }
7774  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7775    if (value > tolerance) {
7776      return positiveLabel;
7777    }
7778    if (value < -tolerance) {
7779      return negativeLabel;
7780    }
7781    return "";
7782  }
7783  function calculateRelativePosition(from, to) {
7784    const fromRect = from.getBoundingClientRect();
7785    const toRect = to.getBoundingClientRect();
7786    const fromCenter = {
7787      x: fromRect.left + fromRect.width / 2,
7788      y: fromRect.top + fromRect.height / 2
7789    };
7790    const toCenter = {
7791      x: toRect.left + toRect.width / 2,
7792      y: toRect.top + toRect.height / 2
7793    };
7794    return {
7795      horizontal: toCenter.x - fromCenter.x,
7796      vertical: toCenter.y - fromCenter.y
7797    };
7798  }
7799  function usePopupContentKey(activeTriggerId, payload) {
7800    const [contentKey, setContentKey] = React33.useState(0);
7801    const previousActiveTriggerIdRef = React33.useRef(activeTriggerId);
7802    const previousPayloadRef = React33.useRef(payload);
7803    const pendingPayloadUpdateRef = React33.useRef(false);
7804    useIsoLayoutEffect(() => {
7805      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7806      const previousPayload = previousPayloadRef.current;
7807      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7808      const payloadChanged = payload !== previousPayload;
7809      if (triggerIdChanged) {
7810        setContentKey((value) => value + 1);
7811        pendingPayloadUpdateRef.current = !payloadChanged;
7812      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7813        setContentKey((value) => value + 1);
7814        pendingPayloadUpdateRef.current = false;
7815      }
7816      previousActiveTriggerIdRef.current = activeTriggerId;
7817      previousPayloadRef.current = payload;
7818    }, [activeTriggerId, payload]);
7819    return `$activeTriggerId ?? "current"}-$contentKey}`;
7820  }
7821  
7822  // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7823  var React34 = __toESM(require_react(), 1);
7824  var ReactDOM7 = __toESM(require_react_dom(), 1);
7825  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7826  var FloatingPortalLite = /* @__PURE__ */ React34.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7827    const {
7828      children,
7829      container,
7830      className,
7831      render,
7832      style,
7833      ...elementProps
7834    } = componentProps;
7835    const {
7836      node: portalNode,
7837      subtree: portalSubtree
7838    } = useFloatingPortalNode({
7839      container,
7840      ref: forwardedRef,
7841      componentProps,
7842      elementProps
7843    });
7844    if (!portalSubtree && !portalNode) {
7845      return null;
7846    }
7847    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React34.Fragment, {
7848      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7849    });
7850  });
7851  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7852  
7853  // node_modules/@base-ui/react/tooltip/index.parts.mjs
7854  var index_parts_exports = {};
7855  __export(index_parts_exports, {
7856    Arrow: () => TooltipArrow,
7857    Handle: () => TooltipHandle,
7858    Popup: () => TooltipPopup,
7859    Portal: () => TooltipPortal,
7860    Positioner: () => TooltipPositioner,
7861    Provider: () => TooltipProvider,
7862    Root: () => TooltipRoot,
7863    Trigger: () => TooltipTrigger,
7864    Viewport: () => TooltipViewport,
7865    createHandle: () => createTooltipHandle
7866  });
7867  
7868  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7869  var React37 = __toESM(require_react(), 1);
7870  
7871  // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
7872  var React35 = __toESM(require_react(), 1);
7873  var TooltipRootContext = /* @__PURE__ */ React35.createContext(void 0);
7874  if (true) TooltipRootContext.displayName = "TooltipRootContext";
7875  function useTooltipRootContext(optional) {
7876    const context = React35.useContext(TooltipRootContext);
7877    if (context === void 0 && !optional) {
7878      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7879    }
7880    return context;
7881  }
7882  
7883  // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
7884  var React36 = __toESM(require_react(), 1);
7885  var selectors2 = {
7886    ...popupStoreSelectors,
7887    disabled: (state) => state.disabled,
7888    instantType: (state) => state.instantType,
7889    isInstantPhase: (state) => state.isInstantPhase,
7890    trackCursorAxis: (state) => state.trackCursorAxis,
7891    disableHoverablePopup: (state) => state.disableHoverablePopup,
7892    lastOpenChangeReason: (state) => state.openChangeReason,
7893    closeOnClick: (state) => state.closeOnClick,
7894    closeDelay: (state) => state.closeDelay,
7895    adaptiveOrigin: (state) => state.adaptiveOrigin
7896  };
7897  var TooltipStore = class extends ReactStore {
7898    constructor(initialState, floatingId, nested) {
7899      const triggerElements = new PopupTriggerMap();
7900      super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
7901    }
7902    setOpen = (nextOpen, eventDetails) => {
7903      applyPopupOpenChange(this, nextOpen, eventDetails, {
7904        extraState: {
7905          openChangeReason: eventDetails.reason
7906        }
7907      });
7908    };
7909    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7910    cancelPendingOpen(event) {
7911      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7912    }
7913  };
7914  function createNullTooltipStore() {
7915    const triggerElements = new PopupTriggerMap();
7916    const store = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
7917    return Object.assign(store, {
7918      setOpen: NOOP,
7919      cancelPendingOpen: NOOP
7920    });
7921  }
7922  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
7923    const state = {
7924      ...createInitialPopupStoreState(),
7925      disabled: false,
7926      instantType: void 0,
7927      isInstantPhase: false,
7928      trackCursorAxis: "none",
7929      disableHoverablePopup: false,
7930      openChangeReason: null,
7931      closeOnClick: true,
7932      closeDelay: 0,
7933      adaptiveOrigin: void 0,
7934      ...initialState
7935    };
7936    state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
7937    return state;
7938  }
7939  function createInitialContext(triggerElements) {
7940    return {
7941      popupRef: /* @__PURE__ */ React36.createRef(),
7942      onOpenChange: void 0,
7943      onOpenChangeComplete: void 0,
7944      triggerElements
7945    };
7946  }
7947  
7948  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7949  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
7950  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
7951    const {
7952      disabled: disabled2 = false,
7953      defaultOpen = false,
7954      open: openProp,
7955      disableHoverablePopup = false,
7956      trackCursorAxis = "none",
7957      actionsRef,
7958      onOpenChange,
7959      onOpenChangeComplete,
7960      handle,
7961      triggerId: triggerIdProp,
7962      defaultTriggerId: defaultTriggerIdProp = null,
7963      children
7964    } = props;
7965    const store = usePopupRootStore((floatingId, nested) => new TooltipStore({
7966      open: defaultOpen,
7967      openProp,
7968      activeTriggerId: defaultTriggerIdProp,
7969      triggerIdProp
7970    }, floatingId, nested));
7971    store.useControlledProp("openProp", openProp);
7972    store.useControlledProp("triggerIdProp", triggerIdProp);
7973    store.useContextCallback("onOpenChange", onOpenChange);
7974    store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
7975    const openState = store.useState("open");
7976    const open = !disabled2 && openState;
7977    const activeTriggerId = store.useState("activeTriggerId");
7978    const mounted = store.useState("mounted");
7979    const payload = store.useState("payload");
7980    store.useSyncedValues({
7981      trackCursorAxis,
7982      disableHoverablePopup,
7983      disabled: disabled2
7984    });
7985    useImplicitActiveTrigger(store, {
7986      closeOnActiveTriggerUnmount: true
7987    });
7988    const {
7989      forceUnmount,
7990      transitionStatus
7991    } = useOpenStateTransitions(open, store);
7992    const isInstantPhase = store.useState("isInstantPhase");
7993    const instantType = store.useState("instantType");
7994    const lastOpenChangeReason = store.useState("lastOpenChangeReason");
7995    const previousInstantTypeRef = React37.useRef(null);
7996    useIsoLayoutEffect(() => {
7997      if (openState && disabled2) {
7998        store.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
7999      }
8000    }, [openState, disabled2, store]);
8001    useIsoLayoutEffect(() => {
8002      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8003        if (instantType !== "delay") {
8004          previousInstantTypeRef.current = instantType;
8005        }
8006        store.set("instantType", "delay");
8007      } else if (previousInstantTypeRef.current !== null) {
8008        store.set("instantType", previousInstantTypeRef.current);
8009        previousInstantTypeRef.current = null;
8010      }
8011    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]);
8012    useIsoLayoutEffect(() => {
8013      if (open) {
8014        if (activeTriggerId == null) {
8015          store.set("payload", void 0);
8016        }
8017      }
8018    }, [store, activeTriggerId, open]);
8019    React37.useImperativeHandle(actionsRef, () => ({
8020      unmount: forceUnmount,
8021      close: () => store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8022    }), [forceUnmount, store]);
8023    const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
8024    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8025      value: store,
8026      children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8027        handle,
8028        store
8029      }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8030        store,
8031        disabled: disabled2,
8032        trackCursorAxis
8033      }), typeof children === "function" ? children({
8034        payload
8035      }) : children]
8036    });
8037  });
8038  if (true) TooltipRoot.displayName = "TooltipRoot";
8039  function TooltipInteractions({
8040    store,
8041    disabled: disabled2,
8042    trackCursorAxis
8043  }) {
8044    const floatingRootContext = store.useState("floatingRootContext");
8045    const dismiss = useDismiss(floatingRootContext, {
8046      enabled: !disabled2,
8047      referencePress: () => store.select("closeOnClick")
8048    });
8049    const clientPoint = useClientPoint(floatingRootContext, {
8050      enabled: !disabled2 && trackCursorAxis !== "none",
8051      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8052    });
8053    const triggerProps = React37.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8054    usePopupInteractionProps(store, {
8055      activeTriggerProps: triggerProps,
8056      inactiveTriggerProps: triggerProps,
8057      popupProps: dismiss.floating ?? EMPTY_OBJECT
8058    });
8059    return null;
8060  }
8061  
8062  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8063  var React39 = __toESM(require_react(), 1);
8064  
8065  // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8066  var React38 = __toESM(require_react(), 1);
8067  var TooltipProviderContext = /* @__PURE__ */ React38.createContext(void 0);
8068  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8069  function useTooltipProviderContext() {
8070    return React38.useContext(TooltipProviderContext);
8071  }
8072  
8073  // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8074  var OPEN_DELAY = 600;
8075  
8076  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8077  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8078  function getTargetElement(event) {
8079    if ("composedPath" in event) {
8080      const path = event.composedPath();
8081      for (let i2 = 0; i2 < path.length; i2 += 1) {
8082        const element = path[i2];
8083        if (isElement(element)) {
8084          return element;
8085        }
8086      }
8087    }
8088    const target = event.target;
8089    if (isElement(target)) {
8090      return target;
8091    }
8092    return null;
8093  }
8094  function closestEnabledTooltipTrigger(element) {
8095    let current = element;
8096    while (current) {
8097      const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8098      if (trigger) {
8099        return trigger;
8100      }
8101      const root = current.getRootNode();
8102      current = "host" in root && isElement(root.host) ? root.host : null;
8103    }
8104    return null;
8105  }
8106  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8107    const {
8108      render,
8109      className,
8110      style,
8111      handle,
8112      payload,
8113      disabled: disabledProp,
8114      delay,
8115      closeOnClick = true,
8116      closeDelay,
8117      id: idProp,
8118      ...elementProps
8119    } = componentProps;
8120    const rootContext = useTooltipRootContext(true);
8121    const handleStore = usePopupHandleStore(handle);
8122    const store = handleStore ?? rootContext;
8123    if (!store) {
8124      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));
8125    }
8126    const thisTriggerId = useBaseUiId(idProp);
8127    const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
8128    const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
8129    const floatingRootContext = store.useState("floatingRootContext");
8130    const triggerElementRef = React39.useRef(null);
8131    const delayWithDefault = delay ?? OPEN_DELAY;
8132    const closeDelayWithDefault = closeDelay ?? 0;
8133    const {
8134      registerTrigger,
8135      isMountedByThisTrigger
8136    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
8137      payload,
8138      closeOnClick,
8139      closeDelay: closeDelayWithDefault
8140    });
8141    const providerDelay = useTooltipProviderContext();
8142    const {
8143      delayRef,
8144      isInstantPhase,
8145      hasProvider
8146    } = useDelayGroup(floatingRootContext, {
8147      open: isOpenedByThisTrigger
8148    });
8149    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8150    store.useSyncedValue("isInstantPhase", isInstantPhase);
8151    const rootDisabled = store.useState("disabled");
8152    const disabled2 = disabledProp ?? rootDisabled;
8153    const disabledRef = useValueAsRef(disabled2);
8154    const trackCursorAxis = store.useState("trackCursorAxis");
8155    const disableHoverablePopup = store.useState("disableHoverablePopup");
8156    const isNestedTriggerHoveredRef = React39.useRef(false);
8157    const nestedTriggerOpenTimeout = useTimeout();
8158    const pointerTypeRef = React39.useRef(void 0);
8159    function getOpenDelay() {
8160      if (!hasProvider) {
8161        return delayWithDefault;
8162      }
8163      return getDelay(delayRef.current, "open") === 0 ? 0 : delay ?? providerDelay ?? OPEN_DELAY;
8164    }
8165    function isEnabledNestedTriggerTarget(target) {
8166      const triggerEl = triggerElementRef.current;
8167      if (!triggerEl || !target) {
8168        return false;
8169      }
8170      const nearestTrigger = closestEnabledTooltipTrigger(target);
8171      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8172    }
8173    function detectNestedTriggerHover(target) {
8174      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8175      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8176      if (nestedTriggerHovered) {
8177        hoverInteraction.openChangeTimeout.clear();
8178        hoverInteraction.restTimeout.clear();
8179        hoverInteraction.restTimeoutPending = false;
8180        nestedTriggerOpenTimeout.clear();
8181      }
8182      return nestedTriggerHovered;
8183    }
8184    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8185      enabled: !disabled2,
8186      mouseOnly: true,
8187      move: false,
8188      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8189      restMs: getOpenDelay,
8190      delay() {
8191        if (closeDelay == null && hasProvider) {
8192          return {
8193            close: getDelay(delayRef.current, "close")
8194          };
8195        }
8196        return {
8197          close: closeDelayWithDefault
8198        };
8199      },
8200      triggerElementRef,
8201      isActiveTrigger: isTriggerActive,
8202      isClosing: () => store.select("transitionStatus") === "ending",
8203      shouldOpen() {
8204        return !isNestedTriggerHoveredRef.current;
8205      }
8206    });
8207    const focusProps = useFocus(floatingRootContext, {
8208      enabled: !disabled2
8209    }).reference;
8210    const handleNestedTriggerHover = (event) => {
8211      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8212      const target = getTargetElement(event);
8213      const nestedTriggerHovered = detectNestedTriggerHover(target);
8214      const triggerEl = triggerElementRef.current;
8215      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8216      if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8217        store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8218        return;
8219      }
8220      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8221      isMouseLikePointerType(pointerTypeRef.current)) {
8222        const open = () => {
8223          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) {
8224            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8225          }
8226        };
8227        const openDelay = getOpenDelay();
8228        if (openDelay === 0) {
8229          nestedTriggerOpenTimeout.clear();
8230          open();
8231        } else {
8232          nestedTriggerOpenTimeout.start(openDelay, open);
8233        }
8234      }
8235    };
8236    const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
8237    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8238    const state = {
8239      open: isOpenedByThisTrigger
8240    };
8241    const element = useRenderElement("button", componentProps, {
8242      state,
8243      ref: [forwardedRef, registerTrigger, triggerElementRef],
8244      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8245        onMouseOver(event) {
8246          handleNestedTriggerHover(event.nativeEvent);
8247        },
8248        onFocus(event) {
8249          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8250            event.preventBaseUIHandler();
8251          }
8252        },
8253        onMouseLeave() {
8254          isNestedTriggerHoveredRef.current = false;
8255          nestedTriggerOpenTimeout.clear();
8256          pointerTypeRef.current = void 0;
8257        },
8258        onPointerEnter(event) {
8259          pointerTypeRef.current = event.pointerType;
8260        },
8261        onPointerDown(event) {
8262          pointerTypeRef.current = event.pointerType;
8263          store.set("closeOnClick", closeOnClick);
8264          if (closeOnClick && !store.select("open")) {
8265            store.cancelPendingOpen(event.nativeEvent);
8266          }
8267        },
8268        onClick(event) {
8269          if (closeOnClick && !store.select("open")) {
8270            store.cancelPendingOpen(event.nativeEvent);
8271          }
8272        },
8273        id: thisTriggerId,
8274        "data-trigger-disabled": disabled2 ? "" : void 0,
8275        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8276      }, elementProps],
8277      stateAttributesMapping: triggerOpenStateMapping
8278    });
8279    return element;
8280  });
8281  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8282  
8283  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8284  var React41 = __toESM(require_react(), 1);
8285  
8286  // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8287  var React40 = __toESM(require_react(), 1);
8288  var TooltipPortalContext = /* @__PURE__ */ React40.createContext(void 0);
8289  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8290  function useTooltipPortalContext() {
8291    const value = React40.useContext(TooltipPortalContext);
8292    if (value === void 0) {
8293      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8294    }
8295    return value;
8296  }
8297  
8298  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8299  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8300  var TooltipPortal = /* @__PURE__ */ React41.forwardRef(function TooltipPortal2(props, forwardedRef) {
8301    const {
8302      keepMounted = false,
8303      ...portalProps
8304    } = props;
8305    const store = useTooltipRootContext();
8306    const mounted = store.useState("mounted");
8307    const shouldRender = mounted || keepMounted;
8308    if (!shouldRender) {
8309      return null;
8310    }
8311    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8312      value: keepMounted,
8313      children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8314        ref: forwardedRef,
8315        ...portalProps
8316      })
8317    });
8318  });
8319  if (true) TooltipPortal.displayName = "TooltipPortal";
8320  
8321  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8322  var React43 = __toESM(require_react(), 1);
8323  
8324  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8325  var React42 = __toESM(require_react(), 1);
8326  var TooltipPositionerContext = /* @__PURE__ */ React42.createContext(void 0);
8327  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8328  function useTooltipPositionerContext() {
8329    const context = React42.useContext(TooltipPositionerContext);
8330    if (context === void 0) {
8331      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8332    }
8333    return context;
8334  }
8335  
8336  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8337  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8338  var TooltipPositioner = /* @__PURE__ */ React43.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8339    const {
8340      render,
8341      className,
8342      anchor,
8343      positionMethod = "absolute",
8344      side = "top",
8345      align = "center",
8346      sideOffset = 0,
8347      alignOffset = 0,
8348      collisionBoundary = "clipping-ancestors",
8349      collisionPadding = 5,
8350      arrowPadding = 5,
8351      sticky = false,
8352      disableAnchorTracking = false,
8353      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8354      style,
8355      ...elementProps
8356    } = componentProps;
8357    const store = useTooltipRootContext();
8358    const keepMounted = useTooltipPortalContext();
8359    const open = store.useState("open");
8360    const mounted = store.useState("mounted");
8361    const trackCursorAxis = store.useState("trackCursorAxis");
8362    const disableHoverablePopup = store.useState("disableHoverablePopup");
8363    const floatingRootContext = store.useState("floatingRootContext");
8364    const instantType = store.useState("instantType");
8365    const transitionStatus = store.useState("transitionStatus");
8366    const adaptiveOrigin2 = store.useState("adaptiveOrigin");
8367    const positioning = useAnchorPositioning({
8368      anchor,
8369      positionMethod,
8370      floatingRootContext,
8371      mounted,
8372      side,
8373      sideOffset,
8374      align,
8375      alignOffset,
8376      collisionBoundary,
8377      collisionPadding,
8378      sticky,
8379      arrowPadding,
8380      disableAnchorTracking,
8381      keepMounted,
8382      collisionAvoidance,
8383      adaptiveOrigin: adaptiveOrigin2
8384    });
8385    const state = React43.useMemo(() => ({
8386      open,
8387      side: positioning.side,
8388      align: positioning.align,
8389      anchorHidden: positioning.anchorHidden,
8390      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8391    }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8392    const element = usePositioner(componentProps, state, {
8393      styles: positioning.positionerStyles,
8394      transitionStatus,
8395      props: elementProps,
8396      refs: [forwardedRef, store.useStateSetter("positionerElement")],
8397      hidden: !mounted,
8398      inert: !open || trackCursorAxis === "both" || disableHoverablePopup
8399    });
8400    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8401      value: positioning,
8402      children: element
8403    });
8404  });
8405  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8406  
8407  // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8408  var React44 = __toESM(require_react(), 1);
8409  var TooltipPopup = /* @__PURE__ */ React44.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8410    const {
8411      render,
8412      className,
8413      style,
8414      ...elementProps
8415    } = componentProps;
8416    const store = useTooltipRootContext();
8417    const {
8418      side,
8419      align
8420    } = useTooltipPositionerContext();
8421    const open = store.useState("open");
8422    const instantType = store.useState("instantType");
8423    const transitionStatus = store.useState("transitionStatus");
8424    const popupProps = store.useState("popupProps");
8425    const floatingContext = store.useState("floatingRootContext");
8426    const disabled2 = store.useState("disabled");
8427    const closeDelay = store.useState("closeDelay");
8428    useOpenChangeComplete({
8429      open,
8430      ref: store.context.popupRef,
8431      onComplete() {
8432        if (open) {
8433          store.context.onOpenChangeComplete?.(true);
8434        }
8435      }
8436    });
8437    useHoverFloatingInteraction(floatingContext, {
8438      enabled: !disabled2,
8439      closeDelay
8440    });
8441    const setPopupElement = store.useStateSetter("popupElement");
8442    const state = {
8443      open,
8444      side,
8445      align,
8446      instant: instantType,
8447      transitionStatus
8448    };
8449    const element = useRenderElement("div", componentProps, {
8450      state,
8451      ref: [forwardedRef, store.context.popupRef, setPopupElement],
8452      props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8453      stateAttributesMapping: popupTransitionStateMapping
8454    });
8455    return element;
8456  });
8457  if (true) TooltipPopup.displayName = "TooltipPopup";
8458  
8459  // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8460  var React45 = __toESM(require_react(), 1);
8461  var TooltipArrow = /* @__PURE__ */ React45.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8462    const {
8463      render,
8464      className,
8465      style,
8466      ...elementProps
8467    } = componentProps;
8468    const store = useTooltipRootContext();
8469    const {
8470      arrowRef,
8471      side,
8472      align,
8473      arrowUncentered,
8474      arrowStyles
8475    } = useTooltipPositionerContext();
8476    const open = store.useState("open");
8477    const instantType = store.useState("instantType");
8478    const state = {
8479      open,
8480      side,
8481      align,
8482      uncentered: arrowUncentered,
8483      instant: instantType
8484    };
8485    const element = useRenderElement("div", componentProps, {
8486      state,
8487      ref: [forwardedRef, arrowRef],
8488      props: [{
8489        style: arrowStyles,
8490        "aria-hidden": true
8491      }, elementProps],
8492      stateAttributesMapping: popupStateMapping
8493    });
8494    return element;
8495  });
8496  if (true) TooltipArrow.displayName = "TooltipArrow";
8497  
8498  // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8499  var React46 = __toESM(require_react(), 1);
8500  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8501  var TooltipProvider = function TooltipProvider2(props) {
8502    const {
8503      delay,
8504      closeDelay,
8505      timeout = 400
8506    } = props;
8507    const delayValue = React46.useMemo(() => ({
8508      open: delay,
8509      close: closeDelay
8510    }), [delay, closeDelay]);
8511    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8512      value: delay,
8513      children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8514        delay: delayValue,
8515        timeoutMs: timeout,
8516        children: props.children
8517      })
8518    });
8519  };
8520  if (true) TooltipProvider.displayName = "TooltipProvider";
8521  
8522  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8523  var React47 = __toESM(require_react(), 1);
8524  var TooltipViewport = /* @__PURE__ */ React47.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8525    const {
8526      render,
8527      className,
8528      style,
8529      children,
8530      ...elementProps
8531    } = componentProps;
8532    const store = useTooltipRootContext();
8533    const positioner = useTooltipPositionerContext();
8534    const instantType = store.useState("instantType");
8535    const {
8536      children: childrenToRender,
8537      state: viewportState
8538    } = usePopupViewport({
8539      store,
8540      side: positioner.side,
8541      children
8542    });
8543    const state = {
8544      activationDirection: viewportState.activationDirection,
8545      transitioning: viewportState.transitioning,
8546      instant: instantType
8547    };
8548    return useRenderElement("div", componentProps, {
8549      state,
8550      ref: forwardedRef,
8551      props: [elementProps, {
8552        children: childrenToRender
8553      }],
8554      stateAttributesMapping: popupViewportStateMapping
8555    });
8556  });
8557  if (true) TooltipViewport.displayName = "TooltipViewport";
8558  
8559  // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8560  var TooltipHandle = class extends BasePopupHandle {
8561    constructor() {
8562      super(createNullTooltipStore(), "Tooltip");
8563    }
8564    /**
8565     * Opens the tooltip and associates it with the trigger with the given id.
8566     *
8567     * This method should only be called in an event handler or an effect (not during rendering).
8568     *
8569     * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8570     * `Tooltip.Trigger` with this handle passed as a prop.
8571     */
8572    open(triggerId) {
8573      this.openByTrigger(triggerId);
8574    }
8575    /**
8576     * Closes the tooltip.
8577     *
8578     * This method should only be called in an event handler or an effect (not during rendering).
8579     */
8580    close() {
8581      this.closePopup();
8582    }
8583    /**
8584     * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8585     */
8586    get isOpen() {
8587      return this.attachedStore?.select("open") ?? false;
8588    }
8589  };
8590  function createTooltipHandle() {
8591    return new TooltipHandle();
8592  }
8593  
8594  // node_modules/@base-ui/react/use-render/useRender.mjs
8595  function useRender(params) {
8596    return useRenderElement(params.defaultTagName ?? "div", params, params);
8597  }
8598  
8599  // packages/ui/build-module/text/text.mjs
8600  var import_element10 = __toESM(require_element(), 1);
8601  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8602  function getRuntime() {
8603    const globalScope = globalThis;
8604    if (globalScope.__wpStyleRuntime) {
8605      return globalScope.__wpStyleRuntime;
8606    }
8607    globalScope.__wpStyleRuntime = {
8608      documents: /* @__PURE__ */ new Map(),
8609      styles: /* @__PURE__ */ new Map(),
8610      injectedStyles: /* @__PURE__ */ new WeakMap()
8611    };
8612    if (typeof document !== "undefined") {
8613      registerDocument(document);
8614    }
8615    return globalScope.__wpStyleRuntime;
8616  }
8617  function documentContainsStyleHash(targetDocument, hash) {
8618    if (!targetDocument.head) {
8619      return false;
8620    }
8621    for (const style of targetDocument.head.querySelectorAll(
8622      `style[$STYLE_HASH_ATTRIBUTE}]`
8623    )) {
8624      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8625        return true;
8626      }
8627    }
8628    return false;
8629  }
8630  function injectStyle(targetDocument, hash, css) {
8631    if (!targetDocument.head) {
8632      return;
8633    }
8634    const runtime = getRuntime();
8635    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8636    if (!injectedStyles) {
8637      injectedStyles = /* @__PURE__ */ new Set();
8638      runtime.injectedStyles.set(targetDocument, injectedStyles);
8639    }
8640    if (injectedStyles.has(hash)) {
8641      return;
8642    }
8643    if (documentContainsStyleHash(targetDocument, hash)) {
8644      injectedStyles.add(hash);
8645      return;
8646    }
8647    const style = targetDocument.createElement("style");
8648    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8649    style.appendChild(targetDocument.createTextNode(css));
8650    targetDocument.head.appendChild(style);
8651    injectedStyles.add(hash);
8652  }
8653  function registerDocument(targetDocument) {
8654    const runtime = getRuntime();
8655    runtime.documents.set(
8656      targetDocument,
8657      (runtime.documents.get(targetDocument) ?? 0) + 1
8658    );
8659    for (const [hash, css] of runtime.styles) {
8660      injectStyle(targetDocument, hash, css);
8661    }
8662    return () => {
8663      const count = runtime.documents.get(targetDocument);
8664      if (count === void 0) {
8665        return;
8666      }
8667      if (count <= 1) {
8668        runtime.documents.delete(targetDocument);
8669        return;
8670      }
8671      runtime.documents.set(targetDocument, count - 1);
8672    };
8673  }
8674  function registerStyle(hash, css) {
8675    const runtime = getRuntime();
8676    runtime.styles.set(hash, css);
8677    for (const targetDocument of runtime.documents.keys()) {
8678      injectStyle(targetDocument, hash, css);
8679    }
8680  }
8681  if (typeof process === "undefined" || true) {
8682    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)}}}');
8683  }
8684  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" };
8685  if (typeof process === "undefined" || true) {
8686    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)}");
8687  }
8688  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" };
8689  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8690    const element = useRender({
8691      render,
8692      defaultTagName: "span",
8693      ref,
8694      props: mergeProps(props, {
8695        className: clsx_default(
8696          style_default.text,
8697          global_css_defense_default.heading,
8698          global_css_defense_default.p,
8699          style_default[variant],
8700          className
8701        )
8702      })
8703    });
8704    return element;
8705  });
8706  
8707  // packages/ui/build-module/tooltip/index.mjs
8708  var tooltip_exports = {};
8709  __export(tooltip_exports, {
8710    Popup: () => Popup,
8711    Portal: () => Portal,
8712    Positioner: () => Positioner,
8713    Provider: () => Provider,
8714    Root: () => Root,
8715    Trigger: () => Trigger
8716  });
8717  
8718  // packages/ui/build-module/tooltip/popup.mjs
8719  var import_element14 = __toESM(require_element(), 1);
8720  
8721  // packages/ui/build-module/tooltip/portal.mjs
8722  var import_element11 = __toESM(require_element(), 1);
8723  
8724  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8725  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8726  function getRuntime2() {
8727    const globalScope = globalThis;
8728    if (globalScope.__wpStyleRuntime) {
8729      return globalScope.__wpStyleRuntime;
8730    }
8731    globalScope.__wpStyleRuntime = {
8732      documents: /* @__PURE__ */ new Map(),
8733      styles: /* @__PURE__ */ new Map(),
8734      injectedStyles: /* @__PURE__ */ new WeakMap()
8735    };
8736    if (typeof document !== "undefined") {
8737      registerDocument2(document);
8738    }
8739    return globalScope.__wpStyleRuntime;
8740  }
8741  function documentContainsStyleHash2(targetDocument, hash) {
8742    if (!targetDocument.head) {
8743      return false;
8744    }
8745    for (const style of targetDocument.head.querySelectorAll(
8746      `style[$STYLE_HASH_ATTRIBUTE2}]`
8747    )) {
8748      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8749        return true;
8750      }
8751    }
8752    return false;
8753  }
8754  function injectStyle2(targetDocument, hash, css) {
8755    if (!targetDocument.head) {
8756      return;
8757    }
8758    const runtime = getRuntime2();
8759    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8760    if (!injectedStyles) {
8761      injectedStyles = /* @__PURE__ */ new Set();
8762      runtime.injectedStyles.set(targetDocument, injectedStyles);
8763    }
8764    if (injectedStyles.has(hash)) {
8765      return;
8766    }
8767    if (documentContainsStyleHash2(targetDocument, hash)) {
8768      injectedStyles.add(hash);
8769      return;
8770    }
8771    const style = targetDocument.createElement("style");
8772    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8773    style.appendChild(targetDocument.createTextNode(css));
8774    targetDocument.head.appendChild(style);
8775    injectedStyles.add(hash);
8776  }
8777  function registerDocument2(targetDocument) {
8778    const runtime = getRuntime2();
8779    runtime.documents.set(
8780      targetDocument,
8781      (runtime.documents.get(targetDocument) ?? 0) + 1
8782    );
8783    for (const [hash, css] of runtime.styles) {
8784      injectStyle2(targetDocument, hash, css);
8785    }
8786    return () => {
8787      const count = runtime.documents.get(targetDocument);
8788      if (count === void 0) {
8789        return;
8790      }
8791      if (count <= 1) {
8792        runtime.documents.delete(targetDocument);
8793        return;
8794      }
8795      runtime.documents.set(targetDocument, count - 1);
8796    };
8797  }
8798  function registerStyle2(hash, css) {
8799    const runtime = getRuntime2();
8800    runtime.styles.set(hash, css);
8801    for (const targetDocument of runtime.documents.keys()) {
8802      injectStyle2(targetDocument, hash, css);
8803    }
8804  }
8805  if (typeof process === "undefined" || true) {
8806    registerStyle2("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}}}");
8807  }
8808  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8809  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8810  function resolveOwnerDocument() {
8811    return typeof document === "undefined" ? null : document;
8812  }
8813  function isInWordPressEnvironment() {
8814    let topWp;
8815    try {
8816      topWp = window.top?.wp;
8817    } catch {
8818    }
8819    const wp = topWp ?? window.wp;
8820    return typeof wp?.components === "object" && wp.components !== null;
8821  }
8822  var cachedSlot = null;
8823  function ensureSlotIsAccessible(element) {
8824    element.setAttribute("aria-hidden", "false");
8825    return element;
8826  }
8827  function createSlot(ownerDocument2) {
8828    const element = ownerDocument2.createElement("div");
8829    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8830    if (wp_compat_overlay_slot_default.slot) {
8831      element.classList.add(wp_compat_overlay_slot_default.slot);
8832    }
8833    ownerDocument2.body.appendChild(element);
8834    return element;
8835  }
8836  function getWpCompatOverlaySlot() {
8837    if (typeof window === "undefined") {
8838      return void 0;
8839    }
8840    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
8841      return void 0;
8842    }
8843    const ownerDocument2 = resolveOwnerDocument();
8844    if (!ownerDocument2 || !ownerDocument2.body) {
8845      return void 0;
8846    }
8847    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
8848      return ensureSlotIsAccessible(cachedSlot);
8849    }
8850    const existing = ownerDocument2.querySelector(
8851      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
8852    );
8853    if (existing instanceof HTMLDivElement) {
8854      cachedSlot = ensureSlotIsAccessible(existing);
8855      return cachedSlot;
8856    }
8857    if (cachedSlot?.isConnected) {
8858      cachedSlot.remove();
8859    }
8860    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
8861    return cachedSlot;
8862  }
8863  
8864  // packages/ui/build-module/tooltip/portal.mjs
8865  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8866  var Portal = (0, import_element11.forwardRef)(
8867    function TooltipPortal3({ container, ...restProps }, ref) {
8868      return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8869        index_parts_exports.Portal,
8870        {
8871          container: container ?? getWpCompatOverlaySlot(),
8872          ...restProps,
8873          ref
8874        }
8875      );
8876    }
8877  );
8878  
8879  // packages/ui/build-module/tooltip/positioner.mjs
8880  var import_element12 = __toESM(require_element(), 1);
8881  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
8882  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8883  function getRuntime3() {
8884    const globalScope = globalThis;
8885    if (globalScope.__wpStyleRuntime) {
8886      return globalScope.__wpStyleRuntime;
8887    }
8888    globalScope.__wpStyleRuntime = {
8889      documents: /* @__PURE__ */ new Map(),
8890      styles: /* @__PURE__ */ new Map(),
8891      injectedStyles: /* @__PURE__ */ new WeakMap()
8892    };
8893    if (typeof document !== "undefined") {
8894      registerDocument3(document);
8895    }
8896    return globalScope.__wpStyleRuntime;
8897  }
8898  function documentContainsStyleHash3(targetDocument, hash) {
8899    if (!targetDocument.head) {
8900      return false;
8901    }
8902    for (const style of targetDocument.head.querySelectorAll(
8903      `style[$STYLE_HASH_ATTRIBUTE3}]`
8904    )) {
8905      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8906        return true;
8907      }
8908    }
8909    return false;
8910  }
8911  function injectStyle3(targetDocument, hash, css) {
8912    if (!targetDocument.head) {
8913      return;
8914    }
8915    const runtime = getRuntime3();
8916    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8917    if (!injectedStyles) {
8918      injectedStyles = /* @__PURE__ */ new Set();
8919      runtime.injectedStyles.set(targetDocument, injectedStyles);
8920    }
8921    if (injectedStyles.has(hash)) {
8922      return;
8923    }
8924    if (documentContainsStyleHash3(targetDocument, hash)) {
8925      injectedStyles.add(hash);
8926      return;
8927    }
8928    const style = targetDocument.createElement("style");
8929    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8930    style.appendChild(targetDocument.createTextNode(css));
8931    targetDocument.head.appendChild(style);
8932    injectedStyles.add(hash);
8933  }
8934  function registerDocument3(targetDocument) {
8935    const runtime = getRuntime3();
8936    runtime.documents.set(
8937      targetDocument,
8938      (runtime.documents.get(targetDocument) ?? 0) + 1
8939    );
8940    for (const [hash, css] of runtime.styles) {
8941      injectStyle3(targetDocument, hash, css);
8942    }
8943    return () => {
8944      const count = runtime.documents.get(targetDocument);
8945      if (count === void 0) {
8946        return;
8947      }
8948      if (count <= 1) {
8949        runtime.documents.delete(targetDocument);
8950        return;
8951      }
8952      runtime.documents.set(targetDocument, count - 1);
8953    };
8954  }
8955  function registerStyle3(hash, css) {
8956    const runtime = getRuntime3();
8957    runtime.styles.set(hash, css);
8958    for (const targetDocument of runtime.documents.keys()) {
8959      injectStyle3(targetDocument, hash, css);
8960    }
8961  }
8962  if (typeof process === "undefined" || true) {
8963    registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
8964  }
8965  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
8966  if (typeof process === "undefined" || true) {
8967    registerStyle3("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}}}}');
8968  }
8969  var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
8970  var Positioner = (0, import_element12.forwardRef)(
8971    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
8972      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8973        index_parts_exports.Positioner,
8974        {
8975          ref,
8976          align,
8977          side,
8978          sideOffset,
8979          ...props,
8980          className: clsx_default(
8981            resets_default["box-sizing"],
8982            style_default2.positioner,
8983            className
8984          )
8985        }
8986      );
8987    }
8988  );
8989  
8990  // packages/ui/build-module/utils/render-slot-with-children.mjs
8991  var import_element13 = __toESM(require_element(), 1);
8992  function renderSlotWithChildren(slot, defaultSlot, children) {
8993    return (0, import_element13.cloneElement)(slot ?? defaultSlot, { children });
8994  }
8995  
8996  // packages/ui/build-module/utils/theme-provider.mjs
8997  var theme = __toESM(require_theme(), 1);
8998  
8999  // packages/ui/build-module/lock-unlock.mjs
9000  var import_private_apis = __toESM(require_private_apis(), 1);
9001  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9002    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9003    "@wordpress/ui"
9004  );
9005  
9006  // packages/ui/build-module/utils/theme-provider.mjs
9007  function getThemeProvider() {
9008    const themePackage = theme;
9009    if (themePackage.ThemeProvider) {
9010      return themePackage.ThemeProvider;
9011    }
9012    if (!themePackage.privateApis) {
9013      throw new Error(
9014        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9015      );
9016    }
9017    return unlock(
9018      themePackage.privateApis
9019    ).ThemeProvider;
9020  }
9021  var ThemeProvider = getThemeProvider();
9022  
9023  // packages/ui/build-module/tooltip/popup.mjs
9024  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9025  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9026  function getRuntime4() {
9027    const globalScope = globalThis;
9028    if (globalScope.__wpStyleRuntime) {
9029      return globalScope.__wpStyleRuntime;
9030    }
9031    globalScope.__wpStyleRuntime = {
9032      documents: /* @__PURE__ */ new Map(),
9033      styles: /* @__PURE__ */ new Map(),
9034      injectedStyles: /* @__PURE__ */ new WeakMap()
9035    };
9036    if (typeof document !== "undefined") {
9037      registerDocument4(document);
9038    }
9039    return globalScope.__wpStyleRuntime;
9040  }
9041  function documentContainsStyleHash4(targetDocument, hash) {
9042    if (!targetDocument.head) {
9043      return false;
9044    }
9045    for (const style of targetDocument.head.querySelectorAll(
9046      `style[$STYLE_HASH_ATTRIBUTE4}]`
9047    )) {
9048      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9049        return true;
9050      }
9051    }
9052    return false;
9053  }
9054  function injectStyle4(targetDocument, hash, css) {
9055    if (!targetDocument.head) {
9056      return;
9057    }
9058    const runtime = getRuntime4();
9059    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9060    if (!injectedStyles) {
9061      injectedStyles = /* @__PURE__ */ new Set();
9062      runtime.injectedStyles.set(targetDocument, injectedStyles);
9063    }
9064    if (injectedStyles.has(hash)) {
9065      return;
9066    }
9067    if (documentContainsStyleHash4(targetDocument, hash)) {
9068      injectedStyles.add(hash);
9069      return;
9070    }
9071    const style = targetDocument.createElement("style");
9072    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9073    style.appendChild(targetDocument.createTextNode(css));
9074    targetDocument.head.appendChild(style);
9075    injectedStyles.add(hash);
9076  }
9077  function registerDocument4(targetDocument) {
9078    const runtime = getRuntime4();
9079    runtime.documents.set(
9080      targetDocument,
9081      (runtime.documents.get(targetDocument) ?? 0) + 1
9082    );
9083    for (const [hash, css] of runtime.styles) {
9084      injectStyle4(targetDocument, hash, css);
9085    }
9086    return () => {
9087      const count = runtime.documents.get(targetDocument);
9088      if (count === void 0) {
9089        return;
9090      }
9091      if (count <= 1) {
9092        runtime.documents.delete(targetDocument);
9093        return;
9094      }
9095      runtime.documents.set(targetDocument, count - 1);
9096    };
9097  }
9098  function registerStyle4(hash, css) {
9099    const runtime = getRuntime4();
9100    runtime.styles.set(hash, css);
9101    for (const targetDocument of runtime.documents.keys()) {
9102      injectStyle4(targetDocument, hash, css);
9103    }
9104  }
9105  if (typeof process === "undefined" || true) {
9106    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}}}}');
9107  }
9108  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9109  var POPUP_COLOR = { background: "#1e1e1e" };
9110  var Popup = (0, import_element14.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9111    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9112      index_parts_exports.Popup,
9113      {
9114        ref,
9115        className: clsx_default(style_default3.popup, className),
9116        ...props,
9117        children
9118      }
9119    ) });
9120    const positionedPopup = renderSlotWithChildren(
9121      positioner,
9122      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Positioner, {}),
9123      popupContent
9124    );
9125    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, {}), positionedPopup);
9126  });
9127  
9128  // packages/ui/build-module/tooltip/trigger.mjs
9129  var import_element15 = __toESM(require_element(), 1);
9130  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9131  var Trigger = (0, import_element15.forwardRef)(
9132    function TooltipTrigger3(props, ref) {
9133      return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(index_parts_exports.Trigger, { ref, ...props });
9134    }
9135  );
9136  
9137  // packages/ui/build-module/utils/direction-provider.mjs
9138  var import_i18n = __toESM(require_i18n(), 1);
9139  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9140  function DirectionProvider3({ children }) {
9141    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9142  }
9143  
9144  // packages/ui/build-module/tooltip/root.mjs
9145  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9146  function Root(props) {
9147    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(index_parts_exports.Root, { ...props }) });
9148  }
9149  
9150  // packages/ui/build-module/tooltip/provider.mjs
9151  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9152  function Provider({ ...props }) {
9153    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Provider, { ...props });
9154  }
9155  
9156  // packages/ui/build-module/link/link.mjs
9157  var import_element16 = __toESM(require_element(), 1);
9158  var import_i18n2 = __toESM(require_i18n(), 1);
9159  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9160  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9161  function getRuntime5() {
9162    const globalScope = globalThis;
9163    if (globalScope.__wpStyleRuntime) {
9164      return globalScope.__wpStyleRuntime;
9165    }
9166    globalScope.__wpStyleRuntime = {
9167      documents: /* @__PURE__ */ new Map(),
9168      styles: /* @__PURE__ */ new Map(),
9169      injectedStyles: /* @__PURE__ */ new WeakMap()
9170    };
9171    if (typeof document !== "undefined") {
9172      registerDocument5(document);
9173    }
9174    return globalScope.__wpStyleRuntime;
9175  }
9176  function documentContainsStyleHash5(targetDocument, hash) {
9177    if (!targetDocument.head) {
9178      return false;
9179    }
9180    for (const style of targetDocument.head.querySelectorAll(
9181      `style[$STYLE_HASH_ATTRIBUTE5}]`
9182    )) {
9183      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9184        return true;
9185      }
9186    }
9187    return false;
9188  }
9189  function injectStyle5(targetDocument, hash, css) {
9190    if (!targetDocument.head) {
9191      return;
9192    }
9193    const runtime = getRuntime5();
9194    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9195    if (!injectedStyles) {
9196      injectedStyles = /* @__PURE__ */ new Set();
9197      runtime.injectedStyles.set(targetDocument, injectedStyles);
9198    }
9199    if (injectedStyles.has(hash)) {
9200      return;
9201    }
9202    if (documentContainsStyleHash5(targetDocument, hash)) {
9203      injectedStyles.add(hash);
9204      return;
9205    }
9206    const style = targetDocument.createElement("style");
9207    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9208    style.appendChild(targetDocument.createTextNode(css));
9209    targetDocument.head.appendChild(style);
9210    injectedStyles.add(hash);
9211  }
9212  function registerDocument5(targetDocument) {
9213    const runtime = getRuntime5();
9214    runtime.documents.set(
9215      targetDocument,
9216      (runtime.documents.get(targetDocument) ?? 0) + 1
9217    );
9218    for (const [hash, css] of runtime.styles) {
9219      injectStyle5(targetDocument, hash, css);
9220    }
9221    return () => {
9222      const count = runtime.documents.get(targetDocument);
9223      if (count === void 0) {
9224        return;
9225      }
9226      if (count <= 1) {
9227        runtime.documents.delete(targetDocument);
9228        return;
9229      }
9230      runtime.documents.set(targetDocument, count - 1);
9231    };
9232  }
9233  function registerStyle5(hash, css) {
9234    const runtime = getRuntime5();
9235    runtime.styles.set(hash, css);
9236    for (const targetDocument of runtime.documents.keys()) {
9237      injectStyle5(targetDocument, hash, css);
9238    }
9239  }
9240  if (typeof process === "undefined" || true) {
9241    registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9242  }
9243  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9244  if (typeof process === "undefined" || true) {
9245    registerStyle5("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))}}}");
9246  }
9247  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" };
9248  if (typeof process === "undefined" || true) {
9249    registerStyle5("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"}}}');
9250  }
9251  var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9252  if (typeof process === "undefined" || true) {
9253    registerStyle5("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)}");
9254  }
9255  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" };
9256  var Link = (0, import_element16.forwardRef)(function Link2({
9257    children,
9258    variant = "default",
9259    tone = "brand",
9260    openInNewTab = false,
9261    target,
9262    render,
9263    className,
9264    ...props
9265  }, ref) {
9266    const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9267    const element = useRender({
9268      render,
9269      defaultTagName: "a",
9270      ref,
9271      props: mergeProps(props, {
9272        className: clsx_default(
9273          global_css_defense_default2.a,
9274          resets_default2["box-sizing"],
9275          focus_module_default["outset-ring--focus-except-active"],
9276          variant !== "unstyled" && style_default4.link,
9277          variant !== "unstyled" && style_default4[`is-$tone}`],
9278          variant === "unstyled" && style_default4["is-unstyled"],
9279          className
9280        ),
9281        target: target ?? (openInNewTab ? "_blank" : void 0),
9282        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9283          children,
9284          shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9285            "span",
9286            {
9287              className: style_default4["link-icon"],
9288              role: "img",
9289              "aria-label": (
9290                /* translators: accessibility text appended to link text */
9291                (0, import_i18n2.__)("(opens in a new tab)")
9292              )
9293            }
9294          )
9295        ] })
9296      })
9297    });
9298    return element;
9299  });
9300  
9301  // packages/icons/build-module/icon/index.mjs
9302  var import_element17 = __toESM(require_element(), 1);
9303  var icon_default = (0, import_element17.forwardRef)(
9304    ({ icon, size: size4 = 24, style, ...props }, ref) => {
9305      const intrinsicStyle = icon.props.style;
9306      const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
9307      return (0, import_element17.cloneElement)(icon, {
9308        width: size4,
9309        height: size4,
9310        ...props,
9311        // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
9312        // stroke-based icons) is preserved unless the consumer overrides
9313        // the same property explicitly.
9314        ...mergedStyle ? { style: mergedStyle } : {},
9315        ref
9316      });
9317    }
9318  );
9319  
9320  // packages/icons/build-module/library/chevron-left.mjs
9321  var import_primitives = __toESM(require_primitives(), 1);
9322  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9323  var chevron_left_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: "M14 6.5L9 12L14 17.5", vectorEffect: "non-scaling-stroke" }) });
9324  
9325  // packages/icons/build-module/library/chevron-right.mjs
9326  var import_primitives2 = __toESM(require_primitives(), 1);
9327  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9328  var chevron_right_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: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });
9329  
9330  // packages/icons/build-module/library/more-vertical.mjs
9331  var import_primitives3 = __toESM(require_primitives(), 1);
9332  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9333  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
9334  
9335  // packages/icons/build-module/library/next.mjs
9336  var import_primitives4 = __toESM(require_primitives(), 1);
9337  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9338  var next_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: "M7 17.5L12 12L7 6.5M13 17.5L18 12L13 6.5", vectorEffect: "non-scaling-stroke" }) });
9339  
9340  // packages/icons/build-module/library/previous.mjs
9341  var import_primitives5 = __toESM(require_primitives(), 1);
9342  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9343  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.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_runtime24.jsx)(import_primitives5.Path, { d: "M17 6.5L12 12L17 17.5M11 6.5L6 12L11 17.5", vectorEffect: "non-scaling-stroke" }) });
9344  
9345  // packages/ui/build-module/visually-hidden/visually-hidden.mjs
9346  var import_element18 = __toESM(require_element(), 1);
9347  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9348  function getRuntime6() {
9349    const globalScope = globalThis;
9350    if (globalScope.__wpStyleRuntime) {
9351      return globalScope.__wpStyleRuntime;
9352    }
9353    globalScope.__wpStyleRuntime = {
9354      documents: /* @__PURE__ */ new Map(),
9355      styles: /* @__PURE__ */ new Map(),
9356      injectedStyles: /* @__PURE__ */ new WeakMap()
9357    };
9358    if (typeof document !== "undefined") {
9359      registerDocument6(document);
9360    }
9361    return globalScope.__wpStyleRuntime;
9362  }
9363  function documentContainsStyleHash6(targetDocument, hash) {
9364    if (!targetDocument.head) {
9365      return false;
9366    }
9367    for (const style of targetDocument.head.querySelectorAll(
9368      `style[$STYLE_HASH_ATTRIBUTE6}]`
9369    )) {
9370      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9371        return true;
9372      }
9373    }
9374    return false;
9375  }
9376  function injectStyle6(targetDocument, hash, css) {
9377    if (!targetDocument.head) {
9378      return;
9379    }
9380    const runtime = getRuntime6();
9381    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9382    if (!injectedStyles) {
9383      injectedStyles = /* @__PURE__ */ new Set();
9384      runtime.injectedStyles.set(targetDocument, injectedStyles);
9385    }
9386    if (injectedStyles.has(hash)) {
9387      return;
9388    }
9389    if (documentContainsStyleHash6(targetDocument, hash)) {
9390      injectedStyles.add(hash);
9391      return;
9392    }
9393    const style = targetDocument.createElement("style");
9394    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9395    style.appendChild(targetDocument.createTextNode(css));
9396    targetDocument.head.appendChild(style);
9397    injectedStyles.add(hash);
9398  }
9399  function registerDocument6(targetDocument) {
9400    const runtime = getRuntime6();
9401    runtime.documents.set(
9402      targetDocument,
9403      (runtime.documents.get(targetDocument) ?? 0) + 1
9404    );
9405    for (const [hash, css] of runtime.styles) {
9406      injectStyle6(targetDocument, hash, css);
9407    }
9408    return () => {
9409      const count = runtime.documents.get(targetDocument);
9410      if (count === void 0) {
9411        return;
9412      }
9413      if (count <= 1) {
9414        runtime.documents.delete(targetDocument);
9415        return;
9416      }
9417      runtime.documents.set(targetDocument, count - 1);
9418    };
9419  }
9420  function registerStyle6(hash, css) {
9421    const runtime = getRuntime6();
9422    runtime.styles.set(hash, css);
9423    for (const targetDocument of runtime.documents.keys()) {
9424      injectStyle6(targetDocument, hash, css);
9425    }
9426  }
9427  if (typeof process === "undefined" || true) {
9428    registerStyle6("fa606a57ae", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");
9429  }
9430  var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9431  var VisuallyHidden = (0, import_element18.forwardRef)(
9432    function VisuallyHidden2({ render, ...restProps }, ref) {
9433      const element = useRender({
9434        render,
9435        ref,
9436        props: mergeProps(
9437          { className: style_default5["visually-hidden"] },
9438          restProps,
9439          {
9440            // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9441            "data-visually-hidden": ""
9442          }
9443        )
9444      });
9445      return element;
9446    }
9447  );
9448  
9449  // packages/ui/build-module/stack/stack.mjs
9450  var import_element19 = __toESM(require_element(), 1);
9451  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9452  function getRuntime7() {
9453    const globalScope = globalThis;
9454    if (globalScope.__wpStyleRuntime) {
9455      return globalScope.__wpStyleRuntime;
9456    }
9457    globalScope.__wpStyleRuntime = {
9458      documents: /* @__PURE__ */ new Map(),
9459      styles: /* @__PURE__ */ new Map(),
9460      injectedStyles: /* @__PURE__ */ new WeakMap()
9461    };
9462    if (typeof document !== "undefined") {
9463      registerDocument7(document);
9464    }
9465    return globalScope.__wpStyleRuntime;
9466  }
9467  function documentContainsStyleHash7(targetDocument, hash) {
9468    if (!targetDocument.head) {
9469      return false;
9470    }
9471    for (const style of targetDocument.head.querySelectorAll(
9472      `style[$STYLE_HASH_ATTRIBUTE7}]`
9473    )) {
9474      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9475        return true;
9476      }
9477    }
9478    return false;
9479  }
9480  function injectStyle7(targetDocument, hash, css) {
9481    if (!targetDocument.head) {
9482      return;
9483    }
9484    const runtime = getRuntime7();
9485    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9486    if (!injectedStyles) {
9487      injectedStyles = /* @__PURE__ */ new Set();
9488      runtime.injectedStyles.set(targetDocument, injectedStyles);
9489    }
9490    if (injectedStyles.has(hash)) {
9491      return;
9492    }
9493    if (documentContainsStyleHash7(targetDocument, hash)) {
9494      injectedStyles.add(hash);
9495      return;
9496    }
9497    const style = targetDocument.createElement("style");
9498    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9499    style.appendChild(targetDocument.createTextNode(css));
9500    targetDocument.head.appendChild(style);
9501    injectedStyles.add(hash);
9502  }
9503  function registerDocument7(targetDocument) {
9504    const runtime = getRuntime7();
9505    runtime.documents.set(
9506      targetDocument,
9507      (runtime.documents.get(targetDocument) ?? 0) + 1
9508    );
9509    for (const [hash, css] of runtime.styles) {
9510      injectStyle7(targetDocument, hash, css);
9511    }
9512    return () => {
9513      const count = runtime.documents.get(targetDocument);
9514      if (count === void 0) {
9515        return;
9516      }
9517      if (count <= 1) {
9518        runtime.documents.delete(targetDocument);
9519        return;
9520      }
9521      runtime.documents.set(targetDocument, count - 1);
9522    };
9523  }
9524  function registerStyle7(hash, css) {
9525    const runtime = getRuntime7();
9526    runtime.styles.set(hash, css);
9527    for (const targetDocument of runtime.documents.keys()) {
9528      injectStyle7(targetDocument, hash, css);
9529    }
9530  }
9531  if (typeof process === "undefined" || true) {
9532    registerStyle7("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
9533  }
9534  var style_default6 = { "stack": "_19ce0419607e1896__stack" };
9535  var gapTokens = {
9536    xs: "var(--wpds-dimension-gap-xs, 4px)",
9537    sm: "var(--wpds-dimension-gap-sm, 8px)",
9538    md: "var(--wpds-dimension-gap-md, 12px)",
9539    lg: "var(--wpds-dimension-gap-lg, 16px)",
9540    xl: "var(--wpds-dimension-gap-xl, 24px)",
9541    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
9542    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
9543  };
9544  var Stack = (0, import_element19.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9545    const style = {
9546      gap: gap && gapTokens[gap],
9547      alignItems: align,
9548      justifyContent: justify,
9549      flexDirection: direction,
9550      flexWrap: wrap
9551    };
9552    const element = useRender({
9553      render,
9554      ref,
9555      props: mergeProps(props, { style, className: style_default6.stack })
9556    });
9557    return element;
9558  });
9559  
9560  // packages/ui/build-module/skeleton/skeleton.mjs
9561  var import_element20 = __toESM(require_element(), 1);
9562  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9563  function getRuntime8() {
9564    const globalScope = globalThis;
9565    if (globalScope.__wpStyleRuntime) {
9566      return globalScope.__wpStyleRuntime;
9567    }
9568    globalScope.__wpStyleRuntime = {
9569      documents: /* @__PURE__ */ new Map(),
9570      styles: /* @__PURE__ */ new Map(),
9571      injectedStyles: /* @__PURE__ */ new WeakMap()
9572    };
9573    if (typeof document !== "undefined") {
9574      registerDocument8(document);
9575    }
9576    return globalScope.__wpStyleRuntime;
9577  }
9578  function documentContainsStyleHash8(targetDocument, hash) {
9579    if (!targetDocument.head) {
9580      return false;
9581    }
9582    for (const style of targetDocument.head.querySelectorAll(
9583      `style[$STYLE_HASH_ATTRIBUTE8}]`
9584    )) {
9585      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9586        return true;
9587      }
9588    }
9589    return false;
9590  }
9591  function injectStyle8(targetDocument, hash, css) {
9592    if (!targetDocument.head) {
9593      return;
9594    }
9595    const runtime = getRuntime8();
9596    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9597    if (!injectedStyles) {
9598      injectedStyles = /* @__PURE__ */ new Set();
9599      runtime.injectedStyles.set(targetDocument, injectedStyles);
9600    }
9601    if (injectedStyles.has(hash)) {
9602      return;
9603    }
9604    if (documentContainsStyleHash8(targetDocument, hash)) {
9605      injectedStyles.add(hash);
9606      return;
9607    }
9608    const style = targetDocument.createElement("style");
9609    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9610    style.appendChild(targetDocument.createTextNode(css));
9611    targetDocument.head.appendChild(style);
9612    injectedStyles.add(hash);
9613  }
9614  function registerDocument8(targetDocument) {
9615    const runtime = getRuntime8();
9616    runtime.documents.set(
9617      targetDocument,
9618      (runtime.documents.get(targetDocument) ?? 0) + 1
9619    );
9620    for (const [hash, css] of runtime.styles) {
9621      injectStyle8(targetDocument, hash, css);
9622    }
9623    return () => {
9624      const count = runtime.documents.get(targetDocument);
9625      if (count === void 0) {
9626        return;
9627      }
9628      if (count <= 1) {
9629        runtime.documents.delete(targetDocument);
9630        return;
9631      }
9632      runtime.documents.set(targetDocument, count - 1);
9633    };
9634  }
9635  function registerStyle8(hash, css) {
9636    const runtime = getRuntime8();
9637    runtime.styles.set(hash, css);
9638    for (const targetDocument of runtime.documents.keys()) {
9639      injectStyle8(targetDocument, hash, css);
9640    }
9641  }
9642  if (typeof process === "undefined" || true) {
9643    registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9644  }
9645  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9646  if (typeof process === "undefined" || true) {
9647    registerStyle8("ed2c39ec90", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b20cc1690085c2f0__skeleton{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);display:block;@media (forced-colors:active){border:var(--wpds-border-width-xs,1px) solid CanvasText}}._9b143194fdb45f93__pulse{@media not (prefers-reduced-motion){animation:e2b9fe0690281bc8__skeleton-pulse 1.5s ease-in-out infinite}}@keyframes e2b9fe0690281bc8__skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}}}");
9648  }
9649  var style_default7 = { "skeleton": "b20cc1690085c2f0__skeleton", "pulse": "_9b143194fdb45f93__pulse", "skeleton-pulse": "e2b9fe0690281bc8__skeleton-pulse" };
9650  var Skeleton = (0, import_element20.forwardRef)(
9651    function Skeleton2({ render, ...props }, ref) {
9652      return useRender({
9653        render,
9654        ref,
9655        props: mergeProps(
9656          {
9657            className: clsx_default(
9658              style_default7.skeleton,
9659              style_default7.pulse,
9660              resets_default3["box-sizing"]
9661            ),
9662            // Decorative by default; consumers mark the loading
9663            // region with aria-busy / role="status".
9664            "aria-hidden": true
9665          },
9666          props
9667        )
9668      });
9669    }
9670  );
9671  
9672  // packages/admin-ui/build-module/navigable-region/index.mjs
9673  var import_element21 = __toESM(require_element(), 1);
9674  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9675  var NavigableRegion = (0, import_element21.forwardRef)(
9676    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
9677      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9678        Tag,
9679        {
9680          ref,
9681          className: clsx_default("admin-ui-navigable-region", className),
9682          "aria-label": ariaLabel,
9683          role: "region",
9684          tabIndex: "-1",
9685          ...props,
9686          children
9687        }
9688      );
9689    }
9690  );
9691  NavigableRegion.displayName = "NavigableRegion";
9692  var navigable_region_default = NavigableRegion;
9693  
9694  // packages/admin-ui/build-module/navigation/index.mjs
9695  var import_i18n3 = __toESM(require_i18n(), 1);
9696  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9697  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9698  function getRuntime9() {
9699    const globalScope = globalThis;
9700    if (globalScope.__wpStyleRuntime) {
9701      return globalScope.__wpStyleRuntime;
9702    }
9703    globalScope.__wpStyleRuntime = {
9704      documents: /* @__PURE__ */ new Map(),
9705      styles: /* @__PURE__ */ new Map(),
9706      injectedStyles: /* @__PURE__ */ new WeakMap()
9707    };
9708    if (typeof document !== "undefined") {
9709      registerDocument9(document);
9710    }
9711    return globalScope.__wpStyleRuntime;
9712  }
9713  function documentContainsStyleHash9(targetDocument, hash) {
9714    if (!targetDocument.head) {
9715      return false;
9716    }
9717    for (const style of targetDocument.head.querySelectorAll(
9718      `style[$STYLE_HASH_ATTRIBUTE9}]`
9719    )) {
9720      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9721        return true;
9722      }
9723    }
9724    return false;
9725  }
9726  function injectStyle9(targetDocument, hash, css) {
9727    if (!targetDocument.head) {
9728      return;
9729    }
9730    const runtime = getRuntime9();
9731    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9732    if (!injectedStyles) {
9733      injectedStyles = /* @__PURE__ */ new Set();
9734      runtime.injectedStyles.set(targetDocument, injectedStyles);
9735    }
9736    if (injectedStyles.has(hash)) {
9737      return;
9738    }
9739    if (documentContainsStyleHash9(targetDocument, hash)) {
9740      injectedStyles.add(hash);
9741      return;
9742    }
9743    const style = targetDocument.createElement("style");
9744    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9745    style.appendChild(targetDocument.createTextNode(css));
9746    targetDocument.head.appendChild(style);
9747    injectedStyles.add(hash);
9748  }
9749  function registerDocument9(targetDocument) {
9750    const runtime = getRuntime9();
9751    runtime.documents.set(
9752      targetDocument,
9753      (runtime.documents.get(targetDocument) ?? 0) + 1
9754    );
9755    for (const [hash, css] of runtime.styles) {
9756      injectStyle9(targetDocument, hash, css);
9757    }
9758    return () => {
9759      const count = runtime.documents.get(targetDocument);
9760      if (count === void 0) {
9761        return;
9762      }
9763      if (count <= 1) {
9764        runtime.documents.delete(targetDocument);
9765        return;
9766      }
9767      runtime.documents.set(targetDocument, count - 1);
9768    };
9769  }
9770  function registerStyle9(hash, css) {
9771    const runtime = getRuntime9();
9772    runtime.styles.set(hash, css);
9773    for (const targetDocument of runtime.documents.keys()) {
9774      injectStyle9(targetDocument, hash, css);
9775    }
9776  }
9777  if (typeof process === "undefined" || true) {
9778    registerStyle9("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)}");
9779  }
9780  var style_default8 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
9781  var Navigation = ({
9782    items,
9783    currentHref,
9784    ariaLabel = (0, import_i18n3.__)("Sections"),
9785    linkComponent,
9786    className
9787  }) => {
9788    if (!items.length) {
9789      return null;
9790    }
9791    const LinkComponent = linkComponent ?? "a";
9792    if (true) {
9793      const invalidItem = items.find(
9794        (item) => typeof item.href !== "string"
9795      );
9796      if (invalidItem) {
9797        throw new Error(
9798          `Navigation: item "$invalidItem.label}" is missing an \`href\` prop.`
9799        );
9800      }
9801      const duplicate = items.find(
9802        (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
9803      );
9804      if (duplicate) {
9805        throw new Error(
9806          `Navigation: duplicate \`href\` "$duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
9807        );
9808      }
9809    }
9810    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9811      Stack,
9812      {
9813        render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { role: "list" }),
9814        direction: "row",
9815        align: "center",
9816        gap: "md",
9817        className: style_default8.list,
9818        children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { className: style_default8.li, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9819          Text,
9820          {
9821            variant: "body-md",
9822            className: style_default8.item,
9823            render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9824              Link,
9825              {
9826                variant: "unstyled",
9827                "aria-current": item.href === currentHref ? "page" : void 0,
9828                render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LinkComponent, { href: item.href })
9829              }
9830            ),
9831            children: item.label
9832          }
9833        ) }, item.href))
9834      }
9835    ) });
9836  };
9837  var navigation_default = Navigation;
9838  
9839  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
9840  var import_components = __toESM(require_components(), 1);
9841  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
9842  
9843  // packages/admin-ui/build-module/page/header.mjs
9844  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9845  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9846  function getRuntime10() {
9847    const globalScope = globalThis;
9848    if (globalScope.__wpStyleRuntime) {
9849      return globalScope.__wpStyleRuntime;
9850    }
9851    globalScope.__wpStyleRuntime = {
9852      documents: /* @__PURE__ */ new Map(),
9853      styles: /* @__PURE__ */ new Map(),
9854      injectedStyles: /* @__PURE__ */ new WeakMap()
9855    };
9856    if (typeof document !== "undefined") {
9857      registerDocument10(document);
9858    }
9859    return globalScope.__wpStyleRuntime;
9860  }
9861  function documentContainsStyleHash10(targetDocument, hash) {
9862    if (!targetDocument.head) {
9863      return false;
9864    }
9865    for (const style of targetDocument.head.querySelectorAll(
9866      `style[$STYLE_HASH_ATTRIBUTE10}]`
9867    )) {
9868      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
9869        return true;
9870      }
9871    }
9872    return false;
9873  }
9874  function injectStyle10(targetDocument, hash, css) {
9875    if (!targetDocument.head) {
9876      return;
9877    }
9878    const runtime = getRuntime10();
9879    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9880    if (!injectedStyles) {
9881      injectedStyles = /* @__PURE__ */ new Set();
9882      runtime.injectedStyles.set(targetDocument, injectedStyles);
9883    }
9884    if (injectedStyles.has(hash)) {
9885      return;
9886    }
9887    if (documentContainsStyleHash10(targetDocument, hash)) {
9888      injectedStyles.add(hash);
9889      return;
9890    }
9891    const style = targetDocument.createElement("style");
9892    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
9893    style.appendChild(targetDocument.createTextNode(css));
9894    targetDocument.head.appendChild(style);
9895    injectedStyles.add(hash);
9896  }
9897  function registerDocument10(targetDocument) {
9898    const runtime = getRuntime10();
9899    runtime.documents.set(
9900      targetDocument,
9901      (runtime.documents.get(targetDocument) ?? 0) + 1
9902    );
9903    for (const [hash, css] of runtime.styles) {
9904      injectStyle10(targetDocument, hash, css);
9905    }
9906    return () => {
9907      const count = runtime.documents.get(targetDocument);
9908      if (count === void 0) {
9909        return;
9910      }
9911      if (count <= 1) {
9912        runtime.documents.delete(targetDocument);
9913        return;
9914      }
9915      runtime.documents.set(targetDocument, count - 1);
9916    };
9917  }
9918  function registerStyle10(hash, css) {
9919    const runtime = getRuntime10();
9920    runtime.styles.set(hash, css);
9921    for (const targetDocument of runtime.documents.keys()) {
9922      injectStyle10(targetDocument, hash, css);
9923    }
9924  }
9925  if (typeof process === "undefined" || true) {
9926    registerStyle10("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)}}");
9927  }
9928  var style_default9 = { "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" };
9929  function Header({
9930    headingLevel = 1,
9931    breadcrumbs,
9932    badges,
9933    visual,
9934    title,
9935    subTitle,
9936    actions,
9937    navigation,
9938    components,
9939    showSidebarToggle = true
9940  }) {
9941    const HeadingTag = `h$headingLevel}`;
9942    const hasNavigation = !!navigation?.items?.length;
9943    return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
9944      Stack,
9945      {
9946        direction: "column",
9947        className: clsx_default(
9948          style_default9.header,
9949          hasNavigation && style_default9["has-navigation"]
9950        ),
9951        children: [
9952          /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
9953            Stack,
9954            {
9955              className: style_default9["header-content"],
9956              direction: "row",
9957              gap: "sm",
9958              justify: "space-between",
9959              children: [
9960                /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
9961                  Stack,
9962                  {
9963                    direction: "row",
9964                    gap: "sm",
9965                    align: "center",
9966                    justify: "start",
9967                    className: style_default9["header-lockup"],
9968                    children: [
9969                      showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9970                        SidebarToggleSlot,
9971                        {
9972                          bubblesVirtually: true,
9973                          className: style_default9["sidebar-toggle-slot"]
9974                        }
9975                      ),
9976                      visual && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9977                        "div",
9978                        {
9979                          className: style_default9["header-visual"],
9980                          "aria-hidden": "true",
9981                          children: visual
9982                        }
9983                      ),
9984                      title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9985                        Text,
9986                        {
9987                          className: style_default9["header-title"],
9988                          render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HeadingTag, {}),
9989                          variant: "heading-lg",
9990                          children: title
9991                        }
9992                      ),
9993                      breadcrumbs,
9994                      badges
9995                    ]
9996                  }
9997                ),
9998                actions && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9999                  Stack,
10000                  {
10001                    align: "center",
10002                    className: style_default9["header-actions"],
10003                    direction: "row",
10004                    gap: "sm",
10005                    children: actions
10006                  }
10007                )
10008              ]
10009            }
10010          ),
10011          subTitle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10012            Text,
10013            {
10014              render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", {}),
10015              variant: "body-md",
10016              className: style_default9["header-subtitle"],
10017              children: subTitle
10018            }
10019          ),
10020          hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10021            navigation_default,
10022            {
10023              ...navigation,
10024              linkComponent: components?.link,
10025              className: style_default9["header-navigation"]
10026            }
10027          )
10028        ]
10029      }
10030    );
10031  }
10032  
10033  // packages/admin-ui/build-module/page/index.mjs
10034  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
10035  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10036  function getRuntime11() {
10037    const globalScope = globalThis;
10038    if (globalScope.__wpStyleRuntime) {
10039      return globalScope.__wpStyleRuntime;
10040    }
10041    globalScope.__wpStyleRuntime = {
10042      documents: /* @__PURE__ */ new Map(),
10043      styles: /* @__PURE__ */ new Map(),
10044      injectedStyles: /* @__PURE__ */ new WeakMap()
10045    };
10046    if (typeof document !== "undefined") {
10047      registerDocument11(document);
10048    }
10049    return globalScope.__wpStyleRuntime;
10050  }
10051  function documentContainsStyleHash11(targetDocument, hash) {
10052    if (!targetDocument.head) {
10053      return false;
10054    }
10055    for (const style of targetDocument.head.querySelectorAll(
10056      `style[$STYLE_HASH_ATTRIBUTE11}]`
10057    )) {
10058      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10059        return true;
10060      }
10061    }
10062    return false;
10063  }
10064  function injectStyle11(targetDocument, hash, css) {
10065    if (!targetDocument.head) {
10066      return;
10067    }
10068    const runtime = getRuntime11();
10069    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10070    if (!injectedStyles) {
10071      injectedStyles = /* @__PURE__ */ new Set();
10072      runtime.injectedStyles.set(targetDocument, injectedStyles);
10073    }
10074    if (injectedStyles.has(hash)) {
10075      return;
10076    }
10077    if (documentContainsStyleHash11(targetDocument, hash)) {
10078      injectedStyles.add(hash);
10079      return;
10080    }
10081    const style = targetDocument.createElement("style");
10082    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10083    style.appendChild(targetDocument.createTextNode(css));
10084    targetDocument.head.appendChild(style);
10085    injectedStyles.add(hash);
10086  }
10087  function registerDocument11(targetDocument) {
10088    const runtime = getRuntime11();
10089    runtime.documents.set(
10090      targetDocument,
10091      (runtime.documents.get(targetDocument) ?? 0) + 1
10092    );
10093    for (const [hash, css] of runtime.styles) {
10094      injectStyle11(targetDocument, hash, css);
10095    }
10096    return () => {
10097      const count = runtime.documents.get(targetDocument);
10098      if (count === void 0) {
10099        return;
10100      }
10101      if (count <= 1) {
10102        runtime.documents.delete(targetDocument);
10103        return;
10104      }
10105      runtime.documents.set(targetDocument, count - 1);
10106    };
10107  }
10108  function registerStyle11(hash, css) {
10109    const runtime = getRuntime11();
10110    runtime.styles.set(hash, css);
10111    for (const targetDocument of runtime.documents.keys()) {
10112      injectStyle11(targetDocument, hash, css);
10113    }
10114  }
10115  if (typeof process === "undefined" || true) {
10116    registerStyle11("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)}}");
10117  }
10118  var style_default10 = { "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" };
10119  function Page({
10120    headingLevel,
10121    breadcrumbs,
10122    badges,
10123    visual,
10124    title,
10125    subTitle,
10126    children,
10127    className,
10128    actions,
10129    navigation,
10130    components,
10131    ariaLabel,
10132    hasPadding = false,
10133    showSidebarToggle = true
10134  }) {
10135    const classes = clsx_default(style_default10.page, className);
10136    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
10137    return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
10138      (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10139        Header,
10140        {
10141          headingLevel,
10142          breadcrumbs,
10143          badges,
10144          visual,
10145          title,
10146          subTitle,
10147          actions,
10148          navigation,
10149          components,
10150          showSidebarToggle
10151        }
10152      ),
10153      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10154        "div",
10155        {
10156          className: clsx_default(
10157            style_default10.content,
10158            style_default10["has-padding"]
10159          ),
10160          children
10161        }
10162      ) : children
10163    ] });
10164  }
10165  Page.SidebarToggleFill = SidebarToggleFill;
10166  var page_default = Page;
10167  
10168  // routes/font-list/stage.tsx
10169  var import_i18n51 = __toESM(require_i18n());
10170  var import_components58 = __toESM(require_components());
10171  var import_editor = __toESM(require_editor());
10172  var import_core_data12 = __toESM(require_core_data());
10173  var import_data13 = __toESM(require_data());
10174  var import_element54 = __toESM(require_element());
10175  
10176  // packages/global-styles-ui/build-module/global-styles-ui.mjs
10177  var import_components57 = __toESM(require_components(), 1);
10178  var import_blocks5 = __toESM(require_blocks(), 1);
10179  var import_data12 = __toESM(require_data(), 1);
10180  var import_block_editor14 = __toESM(require_block_editor(), 1);
10181  var import_element53 = __toESM(require_element(), 1);
10182  var import_compose7 = __toESM(require_compose(), 1);
10183  
10184  // packages/global-styles-engine/build-module/utils/object.mjs
10185  function setImmutably(object, path, value) {
10186    path = Array.isArray(path) ? [...path] : [path];
10187    object = Array.isArray(object) ? [...object] : { ...object };
10188    const leaf = path.pop();
10189    let prev = object;
10190    for (const key of path) {
10191      const lvl = prev[key];
10192      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
10193    }
10194    prev[leaf] = value;
10195    return object;
10196  }
10197  var getValueFromObjectPath = (object, path, defaultValue) => {
10198    const arrayPath = Array.isArray(path) ? path : path.split(".");
10199    let value = object;
10200    arrayPath.forEach((fieldName) => {
10201      value = value?.[fieldName];
10202    });
10203    return value ?? defaultValue;
10204  };
10205  
10206  // packages/global-styles-engine/build-module/settings/get-setting.mjs
10207  var VALID_SETTINGS = [
10208    "appearanceTools",
10209    "useRootPaddingAwareAlignments",
10210    "background.backgroundImage",
10211    "background.backgroundRepeat",
10212    "background.backgroundSize",
10213    "background.backgroundPosition",
10214    "background.gradient",
10215    "border.color",
10216    "border.radius",
10217    "border.radiusSizes",
10218    "border.style",
10219    "border.width",
10220    "shadow.presets",
10221    "shadow.defaultPresets",
10222    "color.background",
10223    "color.button",
10224    "color.caption",
10225    "color.custom",
10226    "color.customDuotone",
10227    "color.customGradient",
10228    "color.defaultDuotone",
10229    "color.defaultGradients",
10230    "color.defaultPalette",
10231    "color.duotone",
10232    "color.gradients",
10233    "color.heading",
10234    "color.link",
10235    "color.palette",
10236    "color.text",
10237    "custom",
10238    "dimensions.aspectRatio",
10239    "dimensions.height",
10240    "dimensions.minHeight",
10241    "dimensions.minWidth",
10242    "dimensions.width",
10243    "dimensions.dimensionSizes",
10244    "layout.contentSize",
10245    "layout.definitions",
10246    "layout.wideSize",
10247    "lightbox.enabled",
10248    "lightbox.allowEditing",
10249    "position.fixed",
10250    "position.sticky",
10251    "spacing.customSpacingSize",
10252    "spacing.defaultSpacingSizes",
10253    "spacing.spacingSizes",
10254    "spacing.spacingScale",
10255    "spacing.blockGap",
10256    "spacing.margin",
10257    "spacing.padding",
10258    "spacing.units",
10259    "typography.fluid",
10260    "typography.customFontSize",
10261    "typography.defaultFontSizes",
10262    "typography.dropCap",
10263    "typography.fontFamilies",
10264    "typography.fontSizes",
10265    "typography.fontStyle",
10266    "typography.fontWeight",
10267    "typography.letterSpacing",
10268    "typography.lineHeight",
10269    "typography.textAlign",
10270    "typography.textColumns",
10271    "typography.textDecoration",
10272    "typography.textIndent",
10273    "typography.textTransform",
10274    "typography.writingMode",
10275    "viewport.mobile",
10276    "viewport.tablet"
10277  ];
10278  function getSetting(globalStyles, path, blockName) {
10279    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10280    const appendedPropertyPath = path ? "." + path : "";
10281    const contextualPath = `settings$appendedBlockPath}$appendedPropertyPath}`;
10282    const globalPath = `settings$appendedPropertyPath}`;
10283    if (path) {
10284      return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
10285    }
10286    let result = {};
10287    VALID_SETTINGS.forEach((setting) => {
10288      const value = getValueFromObjectPath(
10289        globalStyles,
10290        `settings$appendedBlockPath}.$setting}`
10291      ) ?? getValueFromObjectPath(globalStyles, `settings.$setting}`);
10292      if (value !== void 0) {
10293        result = setImmutably(result, setting.split("."), value);
10294      }
10295    });
10296    return result;
10297  }
10298  
10299  // packages/global-styles-engine/build-module/settings/set-setting.mjs
10300  function setSetting(globalStyles, path, newValue, blockName) {
10301    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10302    const appendedPropertyPath = path ? "." + path : "";
10303    const finalPath = `settings$appendedBlockPath}$appendedPropertyPath}`;
10304    return setImmutably(
10305      globalStyles,
10306      finalPath.split("."),
10307      newValue
10308    );
10309  }
10310  
10311  // packages/global-styles-engine/build-module/utils/common.mjs
10312  var import_style_engine = __toESM(require_style_engine(), 1);
10313  
10314  // packages/global-styles-engine/build-module/utils/fluid.mjs
10315  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
10316  var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
10317  var DEFAULT_SCALE_FACTOR = 1;
10318  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
10319  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
10320  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
10321  function getComputedFluidTypographyValue({
10322    minimumFontSize,
10323    maximumFontSize,
10324    fontSize,
10325    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
10326    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
10327    scaleFactor = DEFAULT_SCALE_FACTOR,
10328    minimumFontSizeLimit
10329  }) {
10330    minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
10331    if (fontSize) {
10332      const fontSizeParsed = getTypographyValueAndUnit(fontSize);
10333      if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
10334        return null;
10335      }
10336      const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
10337        minimumFontSizeLimit,
10338        {
10339          coerceTo: fontSizeParsed.unit
10340        }
10341      );
10342      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
10343        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
10344          return null;
10345        }
10346      }
10347      if (!maximumFontSize) {
10348        maximumFontSize = `$fontSizeParsed.value}$fontSizeParsed.unit}`;
10349      }
10350      if (!minimumFontSize) {
10351        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
10352        const minimumFontSizeFactor = Math.min(
10353          Math.max(
10354            1 - 0.075 * Math.log2(fontSizeValueInPx),
10355            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
10356          ),
10357          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
10358        );
10359        const calculatedMinimumFontSize = roundToPrecision(
10360          fontSizeParsed.value * minimumFontSizeFactor,
10361          3
10362        );
10363        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
10364          minimumFontSize = `$minimumFontSizeLimitParsed.value}$minimumFontSizeLimitParsed.unit}`;
10365        } else {
10366          minimumFontSize = `$calculatedMinimumFontSize}$fontSizeParsed.unit}`;
10367        }
10368      }
10369    }
10370    const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
10371    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
10372    const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
10373      coerceTo: fontSizeUnit
10374    });
10375    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
10376      return null;
10377    }
10378    const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
10379      coerceTo: "rem"
10380    });
10381    const maximumViewportWidthParsed = getTypographyValueAndUnit(
10382      maximumViewportWidth,
10383      { coerceTo: fontSizeUnit }
10384    );
10385    const minimumViewportWidthParsed = getTypographyValueAndUnit(
10386      minimumViewportWidth,
10387      { coerceTo: fontSizeUnit }
10388    );
10389    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
10390      return null;
10391    }
10392    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
10393    if (!linearDenominator) {
10394      return null;
10395    }
10396    const minViewportWidthOffsetValue = roundToPrecision(
10397      minimumViewportWidthParsed.value / 100,
10398      3
10399    );
10400    const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
10401    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
10402    const linearFactorScaled = roundToPrecision(
10403      (linearFactor || 1) * scaleFactor,
10404      3
10405    );
10406    const fluidTargetFontSize = `$minimumFontSizeRem.value}$minimumFontSizeRem.unit} + ((1vw - $viewportWidthOffset}) * $linearFactorScaled})`;
10407    return `clamp($minimumFontSize}, $fluidTargetFontSize}, $maximumFontSize})`;
10408  }
10409  function getTypographyValueAndUnit(rawValue, options = {}) {
10410    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
10411      return null;
10412    }
10413    if (isFinite(rawValue)) {
10414      rawValue = `$rawValue}px`;
10415    }
10416    const { coerceTo, rootSizeValue, acceptableUnits } = {
10417      coerceTo: "",
10418      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
10419      rootSizeValue: 16,
10420      acceptableUnits: ["rem", "px", "em"],
10421      ...options
10422    };
10423    const acceptableUnitsGroup = acceptableUnits?.join("|");
10424    const regexUnits = new RegExp(
10425      `^(\\d*\\.?\\d+)($acceptableUnitsGroup}){1,1}$`
10426    );
10427    const matches = rawValue.toString().match(regexUnits);
10428    if (!matches || matches.length < 3) {
10429      return null;
10430    }
10431    let [, value, unit] = matches;
10432    let returnValue = parseFloat(value);
10433    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
10434      returnValue = returnValue * rootSizeValue;
10435      unit = coerceTo;
10436    }
10437    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
10438      returnValue = returnValue / rootSizeValue;
10439      unit = coerceTo;
10440    }
10441    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
10442      unit = coerceTo;
10443    }
10444    if (!unit) {
10445      return null;
10446    }
10447    return {
10448      value: roundToPrecision(returnValue, 3),
10449      unit
10450    };
10451  }
10452  function roundToPrecision(value, digits = 3) {
10453    const base = Math.pow(10, digits);
10454    return Math.round(value * base) / base;
10455  }
10456  
10457  // packages/global-styles-engine/build-module/utils/typography.mjs
10458  function isFluidTypographyEnabled(typographySettings) {
10459    const fluidSettings = typographySettings?.fluid;
10460    return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
10461  }
10462  function getFluidTypographyOptionsFromSettings(settings) {
10463    const typographySettings = settings?.typography ?? {};
10464    const layoutSettings = settings?.layout;
10465    const defaultMaxViewportWidth = getTypographyValueAndUnit(
10466      layoutSettings?.wideSize
10467    ) ? layoutSettings?.wideSize : null;
10468    return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
10469      fluid: {
10470        maxViewportWidth: defaultMaxViewportWidth,
10471        ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
10472      }
10473    } : {
10474      fluid: typographySettings?.fluid
10475    };
10476  }
10477  function getTypographyFontSizeValue(preset, settings) {
10478    const { size: defaultSize } = preset;
10479    if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
10480      return defaultSize;
10481    }
10482    if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) {
10483      return defaultSize;
10484    }
10485    const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {};
10486    const fluidFontSizeValue = getComputedFluidTypographyValue({
10487      minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
10488      maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
10489      fontSize: defaultSize,
10490      minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
10491      maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
10492      minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
10493    });
10494    if (!!fluidFontSizeValue) {
10495      return fluidFontSizeValue;
10496    }
10497    return defaultSize;
10498  }
10499  
10500  // packages/global-styles-engine/build-module/utils/common.mjs
10501  var PRESET_METADATA = [
10502    {
10503      path: ["color", "palette"],
10504      valueKey: "color",
10505      cssVarInfix: "color",
10506      classes: [
10507        { classSuffix: "color", propertyName: "color" },
10508        {
10509          classSuffix: "background-color",
10510          propertyName: "background-color"
10511        },
10512        {
10513          classSuffix: "border-color",
10514          propertyName: "border-color"
10515        }
10516      ]
10517    },
10518    {
10519      path: ["color", "gradients"],
10520      valueKey: "gradient",
10521      cssVarInfix: "gradient",
10522      classes: [
10523        {
10524          classSuffix: "gradient-background",
10525          propertyName: "background"
10526        }
10527      ]
10528    },
10529    {
10530      path: ["color", "duotone"],
10531      valueKey: "colors",
10532      cssVarInfix: "duotone",
10533      valueFunc: ({ slug }) => `url( '#wp-duotone-$slug}' )`,
10534      classes: []
10535    },
10536    {
10537      path: ["shadow", "presets"],
10538      valueKey: "shadow",
10539      cssVarInfix: "shadow",
10540      classes: []
10541    },
10542    {
10543      path: ["typography", "fontSizes"],
10544      valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings),
10545      valueKey: "size",
10546      cssVarInfix: "font-size",
10547      classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
10548    },
10549    {
10550      path: ["typography", "fontFamilies"],
10551      valueKey: "fontFamily",
10552      cssVarInfix: "font-family",
10553      classes: [
10554        { classSuffix: "font-family", propertyName: "font-family" }
10555      ]
10556    },
10557    {
10558      path: ["spacing", "spacingSizes"],
10559      valueKey: "size",
10560      cssVarInfix: "spacing",
10561      valueFunc: ({ size: size4 }) => size4,
10562      classes: []
10563    },
10564    {
10565      path: ["border", "radiusSizes"],
10566      valueKey: "size",
10567      cssVarInfix: "border-radius",
10568      classes: []
10569    },
10570    {
10571      path: ["dimensions", "dimensionSizes"],
10572      valueKey: "size",
10573      cssVarInfix: "dimension",
10574      classes: []
10575    }
10576  ];
10577  function getResolvedRefValue(ruleValue, tree) {
10578    if (!ruleValue || !tree) {
10579      return ruleValue;
10580    }
10581    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
10582      const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
10583        getValueFromObjectPath(tree, ruleValue.ref)
10584      );
10585      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
10586        return void 0;
10587      }
10588      if (resolvedRuleValue === void 0) {
10589        return ruleValue;
10590      }
10591      return resolvedRuleValue;
10592    }
10593    return ruleValue;
10594  }
10595  function getResolvedThemeFilePath(file, themeFileURIs) {
10596    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
10597      return file;
10598    }
10599    const uri = themeFileURIs.find(
10600      (themeFileUri) => themeFileUri?.name === file
10601    );
10602    if (!uri?.href) {
10603      return file;
10604    }
10605    return uri?.href;
10606  }
10607  function getResolvedValue(ruleValue, tree) {
10608    if (!ruleValue || !tree) {
10609      return ruleValue;
10610    }
10611    const resolvedValue = getResolvedRefValue(ruleValue, tree);
10612    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
10613      return {
10614        ...resolvedValue,
10615        url: getResolvedThemeFilePath(
10616          resolvedValue.url,
10617          tree?._links?.["wp:theme-file"]
10618        )
10619      };
10620    }
10621    return resolvedValue;
10622  }
10623  function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
10624    const orderedPresetsByOrigin = [
10625      blockName ? getValueFromObjectPath(settings, [
10626        "blocks",
10627        blockName,
10628        ...presetPath
10629      ]) : void 0,
10630      getValueFromObjectPath(settings, presetPath)
10631    ].filter(Boolean);
10632    for (const presetByOrigin of orderedPresetsByOrigin) {
10633      if (presetByOrigin) {
10634        const origins = ["custom", "theme", "default"];
10635        for (const origin of origins) {
10636          const presets = presetByOrigin[origin];
10637          if (presets) {
10638            const presetObject = presets.find(
10639              (preset) => preset[presetProperty] === presetValueValue
10640            );
10641            if (presetObject) {
10642              if (presetProperty === "slug") {
10643                return presetObject;
10644              }
10645              const highestPresetObjectWithSameSlug = findInPresetsBy(
10646                settings,
10647                blockName,
10648                presetPath,
10649                "slug",
10650                presetObject.slug
10651              );
10652              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
10653                return presetObject;
10654              }
10655              return void 0;
10656            }
10657          }
10658        }
10659      }
10660    }
10661  }
10662  function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
10663    const metadata = PRESET_METADATA.find(
10664      (data) => data.cssVarInfix === presetType
10665    );
10666    if (!metadata || !features.settings) {
10667      return variable;
10668    }
10669    const presetObject = findInPresetsBy(
10670      features.settings,
10671      blockName,
10672      metadata.path,
10673      "slug",
10674      slug
10675    );
10676    if (presetObject) {
10677      const { valueKey } = metadata;
10678      const result = presetObject[valueKey];
10679      return getValueFromVariable(features, blockName, result);
10680    }
10681    return variable;
10682  }
10683  function getValueFromCustomVariable(features, blockName, variable, path = []) {
10684    const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [
10685      "blocks",
10686      blockName,
10687      "custom",
10688      ...path
10689    ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [
10690      "custom",
10691      ...path
10692    ]);
10693    if (!result) {
10694      return variable;
10695    }
10696    return getValueFromVariable(features, blockName, result);
10697  }
10698  function getValueFromVariable(features, blockName, variable) {
10699    if (!variable || typeof variable !== "string") {
10700      if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
10701        const resolvedVariable = getValueFromObjectPath(
10702          features,
10703          variable.ref
10704        );
10705        if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
10706          return resolvedVariable;
10707        }
10708        variable = resolvedVariable;
10709      } else {
10710        return variable;
10711      }
10712    }
10713    const USER_VALUE_PREFIX = "var:";
10714    const THEME_VALUE_PREFIX = "var(--wp--";
10715    const THEME_VALUE_SUFFIX = ")";
10716    let parsedVar;
10717    if (variable.startsWith(USER_VALUE_PREFIX)) {
10718      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
10719    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
10720      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
10721    } else {
10722      return variable;
10723    }
10724    const [type, ...path] = parsedVar;
10725    if (type === "preset") {
10726      return getValueFromPresetVariable(
10727        features,
10728        blockName,
10729        variable,
10730        path
10731      );
10732    }
10733    if (type === "custom") {
10734      return getValueFromCustomVariable(
10735        features,
10736        blockName,
10737        variable,
10738        path
10739      );
10740    }
10741    return variable;
10742  }
10743  
10744  // packages/global-styles-engine/build-module/style-state-back-compat.mjs
10745  var LEGACY_STYLE_STATE_ALIASES = {
10746    "@mobile": "mobile",
10747    "@tablet": "tablet",
10748    "-current": "@current"
10749  };
10750  function isObjectRecord(value) {
10751    return !!value && typeof value === "object" && !Array.isArray(value);
10752  }
10753  function normalizeStyleStateNode(node) {
10754    if (!isObjectRecord(node)) {
10755      return node;
10756    }
10757    let normalized = node;
10758    Object.entries(LEGACY_STYLE_STATE_ALIASES).forEach(
10759      ([state, legacyState]) => {
10760        if (Object.hasOwn(node, legacyState)) {
10761          if (normalized === node) {
10762            normalized = { ...node };
10763          }
10764          if (!Object.hasOwn(node, state)) {
10765            normalized[state] = node[legacyState];
10766          }
10767          delete normalized[legacyState];
10768        }
10769      }
10770    );
10771    Object.entries(normalized).forEach(([key, value]) => {
10772      if (!isObjectRecord(value)) {
10773        return;
10774      }
10775      const normalizedValue = normalizeStyleStateNode(value);
10776      if (normalizedValue !== value) {
10777        if (normalized === node) {
10778          normalized = { ...node };
10779        }
10780        normalized[key] = normalizedValue;
10781      }
10782    });
10783    return normalized;
10784  }
10785  function normalizeStyleStateAliases(globalStyles) {
10786    if (true) {
10787      return globalStyles;
10788    }
10789    if (!globalStyles?.styles) {
10790      return globalStyles;
10791    }
10792    const styles = normalizeStyleStateNode(globalStyles.styles);
10793    return styles === globalStyles.styles ? globalStyles : { ...globalStyles, styles };
10794  }
10795  function getLegacyStyleStatePath(path) {
10796    if (true) {
10797      return void 0;
10798    }
10799    const pathParts = path.split(".");
10800    const legacyPathParts = pathParts.map(
10801      (part) => LEGACY_STYLE_STATE_ALIASES[part] ?? part
10802    );
10803    return legacyPathParts.some(
10804      (part, index2) => part !== pathParts[index2]
10805    ) ? legacyPathParts.join(".") : void 0;
10806  }
10807  
10808  // packages/global-styles-engine/build-module/settings/get-style.mjs
10809  function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) {
10810    const appendedPath = path ? "." + path : "";
10811    const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`;
10812    if (!globalStyles) {
10813      return void 0;
10814    }
10815    let rawResult = getValueFromObjectPath(globalStyles, finalPath);
10816    const legacyPath = getLegacyStyleStatePath(finalPath);
10817    if (rawResult === void 0 && legacyPath) {
10818      let hasCanonicalPath = true;
10819      let currentValue = globalStyles;
10820      for (const pathPart of finalPath.split(".")) {
10821        if (!currentValue || typeof currentValue !== "object" || !Object.hasOwn(currentValue, pathPart)) {
10822          hasCanonicalPath = false;
10823          break;
10824        }
10825        currentValue = currentValue[pathPart];
10826      }
10827      if (!hasCanonicalPath) {
10828        rawResult = getValueFromObjectPath(globalStyles, legacyPath);
10829      }
10830    }
10831    const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult;
10832    return result;
10833  }
10834  
10835  // packages/global-styles-engine/build-module/settings/set-style.mjs
10836  function setStyle(globalStyles, path, newValue, blockName) {
10837    const appendedPath = path ? "." + path : "";
10838    const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`;
10839    return setImmutably(
10840      normalizeStyleStateAliases(globalStyles),
10841      finalPath.split("."),
10842      newValue
10843    );
10844  }
10845  
10846  // packages/global-styles-engine/build-module/core/equal.mjs
10847  var import_es6 = __toESM(require_es6(), 1);
10848  function areGlobalStylesEqual(original, variation) {
10849    if (typeof original !== "object" || typeof variation !== "object") {
10850      return original === variation;
10851    }
10852    return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
10853  }
10854  
10855  // packages/global-styles-engine/build-module/core/merge.mjs
10856  var import_deepmerge = __toESM(require_cjs(), 1);
10857  
10858  // node_modules/is-plain-object/dist/is-plain-object.mjs
10859  function isObject(o2) {
10860    return Object.prototype.toString.call(o2) === "[object Object]";
10861  }
10862  function isPlainObject(o2) {
10863    var ctor, prot;
10864    if (isObject(o2) === false) return false;
10865    ctor = o2.constructor;
10866    if (ctor === void 0) return true;
10867    prot = ctor.prototype;
10868    if (isObject(prot) === false) return false;
10869    if (prot.hasOwnProperty("isPrototypeOf") === false) {
10870      return false;
10871    }
10872    return true;
10873  }
10874  
10875  // packages/global-styles-engine/build-module/core/merge.mjs
10876  function mergeGlobalStyles(base, user) {
10877    return (0, import_deepmerge.default)(
10878      normalizeStyleStateAliases(base),
10879      normalizeStyleStateAliases(user),
10880      {
10881        /*
10882         * We only pass as arrays the presets,
10883         * in which case we want the new array of values
10884         * to override the old array (no merging).
10885         */
10886        isMergeableObject: isPlainObject,
10887        /*
10888         * Exceptions to the above rule.
10889         * Background images should be replaced, not merged,
10890         * as they themselves are specific object definitions for the style.
10891         */
10892        customMerge: (key) => {
10893          if (key === "backgroundImage") {
10894            return (baseConfig, userConfig) => userConfig ?? baseConfig;
10895          }
10896          return void 0;
10897        }
10898      }
10899    );
10900  }
10901  
10902  // node_modules/colord/index.mjs
10903  var r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
10904  var t = function(r3) {
10905    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
10906  };
10907  var n = function(r3, t2, n2) {
10908    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
10909  };
10910  var e = function(r3, t2, n2) {
10911    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
10912  };
10913  var u = function(r3) {
10914    return (r3 = isFinite(r3) ? r3 % 360 : 0) > 0 ? r3 : r3 + 360;
10915  };
10916  var a = function(r3) {
10917    return { r: e(r3.r, 0, 255), g: e(r3.g, 0, 255), b: e(r3.b, 0, 255), a: e(r3.a) };
10918  };
10919  var o = function(r3) {
10920    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
10921  };
10922  var i = /^#([0-9a-f]{3,8})$/i;
10923  var s = function(r3) {
10924    var t2 = r3.toString(16);
10925    return t2.length < 2 ? "0" + t2 : t2;
10926  };
10927  var h = function(r3) {
10928    var t2 = r3.r, n2 = r3.g, e2 = r3.b, u2 = r3.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
10929    return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
10930  };
10931  var b = function(r3) {
10932    var t2 = r3.h, n2 = r3.s, e2 = r3.v, u2 = r3.a;
10933    t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
10934    var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
10935    return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
10936  };
10937  var g = function(r3) {
10938    return { h: u(r3.h), s: e(r3.s, 0, 100), l: e(r3.l, 0, 100), a: e(r3.a) };
10939  };
10940  var d = function(r3) {
10941    return { h: n(r3.h), s: n(r3.s), l: n(r3.l), a: n(r3.a, 3) };
10942  };
10943  var f = function(r3) {
10944    return b((n2 = (t2 = r3).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
10945    var t2, n2, e2;
10946  };
10947  var c = function(r3) {
10948    return { h: (t2 = h(r3)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
10949    var t2, n2, e2, u2;
10950  };
10951  var l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
10952  var p2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
10953  var v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
10954  var m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i;
10955  var y = { string: [[function(r3) {
10956    var t2 = i.exec(r3);
10957    return t2 ? (r3 = t2[1]).length <= 4 ? { r: parseInt(r3[0] + r3[0], 16), g: parseInt(r3[1] + r3[1], 16), b: parseInt(r3[2] + r3[2], 16), a: 4 === r3.length ? n(parseInt(r3[3] + r3[3], 16) / 255, 2) : 1 } : 6 === r3.length || 8 === r3.length ? { r: parseInt(r3.substr(0, 2), 16), g: parseInt(r3.substr(2, 2), 16), b: parseInt(r3.substr(4, 2), 16), a: 8 === r3.length ? n(parseInt(r3.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
10958  }, "hex"], [function(r3) {
10959    var t2 = v.exec(r3) || m.exec(r3);
10960    return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
10961  }, "rgb"], [function(t2) {
10962    var n2 = l.exec(t2) || p2.exec(t2);
10963    if (!n2) return null;
10964    var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
10965    return f(a2);
10966  }, "hsl"]], object: [[function(r3) {
10967    var n2 = r3.r, e2 = r3.g, u2 = r3.b, o2 = r3.a, i2 = void 0 === o2 ? 1 : o2;
10968    return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
10969  }, "rgb"], [function(r3) {
10970    var n2 = r3.h, e2 = r3.s, u2 = r3.l, a2 = r3.a, o2 = void 0 === a2 ? 1 : a2;
10971    if (!t(n2) || !t(e2) || !t(u2)) return null;
10972    var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
10973    return f(i2);
10974  }, "hsl"], [function(r3) {
10975    var n2 = r3.h, a2 = r3.s, o2 = r3.v, i2 = r3.a, s2 = void 0 === i2 ? 1 : i2;
10976    if (!t(n2) || !t(a2) || !t(o2)) return null;
10977    var h2 = (function(r4) {
10978      return { h: u(r4.h), s: e(r4.s, 0, 100), v: e(r4.v, 0, 100), a: e(r4.a) };
10979    })({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
10980    return b(h2);
10981  }, "hsv"]] };
10982  var N = function(r3, t2) {
10983    for (var n2 = 0; n2 < t2.length; n2++) {
10984      var e2 = t2[n2][0](r3);
10985      if (e2) return [e2, t2[n2][1]];
10986    }
10987    return [null, void 0];
10988  };
10989  var x = function(r3) {
10990    return "string" == typeof r3 ? N(r3.trim(), y.string) : "object" == typeof r3 && null !== r3 ? N(r3, y.object) : [null, void 0];
10991  };
10992  var M = function(r3, t2) {
10993    var n2 = c(r3);
10994    return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
10995  };
10996  var H = function(r3) {
10997    return (299 * r3.r + 587 * r3.g + 114 * r3.b) / 1e3 / 255;
10998  };
10999  var $ = function(r3, t2) {
11000    var n2 = c(r3);
11001    return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
11002  };
11003  var j = (function() {
11004    function r3(r4) {
11005      this.parsed = x(r4)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
11006    }
11007    return r3.prototype.isValid = function() {
11008      return null !== this.parsed;
11009    }, r3.prototype.brightness = function() {
11010      return n(H(this.rgba), 2);
11011    }, r3.prototype.isDark = function() {
11012      return H(this.rgba) < 0.5;
11013    }, r3.prototype.isLight = function() {
11014      return H(this.rgba) >= 0.5;
11015    }, r3.prototype.toHex = function() {
11016      return r4 = o(this.rgba), t2 = r4.r, e2 = r4.g, u2 = r4.b, i2 = (a2 = r4.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
11017      var r4, t2, e2, u2, a2, i2;
11018    }, r3.prototype.toRgb = function() {
11019      return o(this.rgba);
11020    }, r3.prototype.toRgbString = function() {
11021      return r4 = o(this.rgba), t2 = r4.r, n2 = r4.g, e2 = r4.b, (u2 = r4.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
11022      var r4, t2, n2, e2, u2;
11023    }, r3.prototype.toHsl = function() {
11024      return d(c(this.rgba));
11025    }, r3.prototype.toHslString = function() {
11026      return r4 = d(c(this.rgba)), t2 = r4.h, n2 = r4.s, e2 = r4.l, (u2 = r4.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
11027      var r4, t2, n2, e2, u2;
11028    }, r3.prototype.toHsv = function() {
11029      return r4 = h(this.rgba), { h: n(r4.h), s: n(r4.s), v: n(r4.v), a: n(r4.a, 3) };
11030      var r4;
11031    }, r3.prototype.invert = function() {
11032      return w({ r: 255 - (r4 = this.rgba).r, g: 255 - r4.g, b: 255 - r4.b, a: r4.a });
11033      var r4;
11034    }, r3.prototype.saturate = function(r4) {
11035      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, r4));
11036    }, r3.prototype.desaturate = function(r4) {
11037      return void 0 === r4 && (r4 = 0.1), w(M(this.rgba, -r4));
11038    }, r3.prototype.grayscale = function() {
11039      return w(M(this.rgba, -1));
11040    }, r3.prototype.lighten = function(r4) {
11041      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, r4));
11042    }, r3.prototype.darken = function(r4) {
11043      return void 0 === r4 && (r4 = 0.1), w($(this.rgba, -r4));
11044    }, r3.prototype.rotate = function(r4) {
11045      return void 0 === r4 && (r4 = 15), this.hue(this.hue() + r4);
11046    }, r3.prototype.alpha = function(r4) {
11047      return "number" == typeof r4 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r4 }) : n(this.rgba.a, 3);
11048      var t2;
11049    }, r3.prototype.hue = function(r4) {
11050      var t2 = c(this.rgba);
11051      return "number" == typeof r4 ? w({ h: r4, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
11052    }, r3.prototype.isEqual = function(r4) {
11053      return this.toHex() === w(r4).toHex();
11054    }, r3;
11055  })();
11056  var w = function(r3) {
11057    return r3 instanceof j ? r3 : new j(r3);
11058  };
11059  
11060  // packages/global-styles-engine/build-module/utils/duotone.mjs
11061  function getValuesFromColors(colors = []) {
11062    const values = {
11063      r: [],
11064      g: [],
11065      b: [],
11066      a: []
11067    };
11068    colors.forEach((color) => {
11069      const rgbColor = w(color).toRgb();
11070      values.r.push(rgbColor.r / 255);
11071      values.g.push(rgbColor.g / 255);
11072      values.b.push(rgbColor.b / 255);
11073      values.a.push(rgbColor.a);
11074    });
11075    return values;
11076  }
11077  function getDuotoneUnsetStylesheet(selector) {
11078    return `$selector}{filter:none}`;
11079  }
11080  function getDuotoneStylesheet(selector, id) {
11081    return `$selector}{filter:url(#$id})}`;
11082  }
11083  function getDuotoneFilter(id, colors) {
11084    const values = getValuesFromColors(colors);
11085    return `
11086  <svg
11087      xmlns:xlink="http://www.w3.org/1999/xlink"
11088      viewBox="0 0 0 0"
11089      width="0"
11090      height="0"
11091      focusable="false"
11092      role="none"
11093      aria-hidden="true"
11094      style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
11095  >
11096      <defs>
11097          <filter id="$id}">
11098              <!--
11099                  Use sRGB instead of linearRGB so transparency looks correct.
11100                  Use perceptual brightness to convert to grayscale.
11101              -->
11102              <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
11103              <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
11104              <feComponentTransfer color-interpolation-filters="sRGB">
11105                  <feFuncR type="table" tableValues="$values.r.join(" ")}"></feFuncR>
11106                  <feFuncG type="table" tableValues="$values.g.join(" ")}"></feFuncG>
11107                  <feFuncB type="table" tableValues="$values.b.join(" ")}"></feFuncB>
11108                  <feFuncA type="table" tableValues="$values.a.join(" ")}"></feFuncA>
11109              </feComponentTransfer>
11110              <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
11111              <feComposite in2="SourceGraphic" operator="in"></feComposite>
11112          </filter>
11113      </defs>
11114  </svg>`;
11115  }
11116  
11117  // packages/global-styles-engine/build-module/utils/viewport.mjs
11118  var DEFAULT_VIEWPORT_BREAKPOINTS = {
11119    mobile: "480px",
11120    tablet: "782px"
11121  };
11122  var VIEWPORT_SIZE_REGEXP = /^(\d+|\d*\.\d+)(px|em|rem)$/;
11123  var DEFAULT_FONT_SIZE = 16;
11124  function isViewportSettings(configOrSettings) {
11125    return "mobile" in configOrSettings || "tablet" in configOrSettings;
11126  }
11127  function getViewportSettings(configOrSettings) {
11128    if (!configOrSettings || typeof configOrSettings !== "object") {
11129      return {};
11130    }
11131    if (isViewportSettings(configOrSettings)) {
11132      return configOrSettings;
11133    }
11134    return configOrSettings.settings?.viewport ?? {};
11135  }
11136  function isValidViewportSize(value) {
11137    return typeof value === "string" && VIEWPORT_SIZE_REGEXP.test(value.trim());
11138  }
11139  function getViewportBreakpointValueInPixels(value) {
11140    if (typeof value === "number") {
11141      return value;
11142    }
11143    if (typeof value !== "string") {
11144      return void 0;
11145    }
11146    const match2 = value.trim().match(VIEWPORT_SIZE_REGEXP);
11147    if (!match2) {
11148      return void 0;
11149    }
11150    const numericValue = Number.parseFloat(match2[1]);
11151    const unit = match2[2];
11152    return unit === "px" ? numericValue : numericValue * DEFAULT_FONT_SIZE;
11153  }
11154  function getViewportBreakpoints(configOrSettings) {
11155    const viewportSettings = getViewportSettings(configOrSettings);
11156    const breakpoints = {};
11157    const breakpointValuesInPixels = {};
11158    Object.keys(DEFAULT_VIEWPORT_BREAKPOINTS).forEach((breakpoint) => {
11159      const key = breakpoint;
11160      const value = viewportSettings[key];
11161      const px = getViewportBreakpointValueInPixels(value);
11162      if (px !== void 0 && isValidViewportSize(value)) {
11163        breakpoints[key] = value.trim();
11164        breakpointValuesInPixels[key] = px;
11165      }
11166    });
11167    const breakpointNames = Object.keys(breakpoints);
11168    if (!breakpointNames.length) {
11169      return { ...DEFAULT_VIEWPORT_BREAKPOINTS };
11170    }
11171    if (1 === breakpointNames.length) {
11172      return breakpoints;
11173    }
11174    const mobile = breakpoints.mobile;
11175    const tablet = breakpoints.tablet;
11176    if (breakpointValuesInPixels.mobile >= breakpointValuesInPixels.tablet) {
11177      return { mobile };
11178    }
11179    return { mobile, tablet };
11180  }
11181  function getResponsiveMediaQueries(configOrSettings) {
11182    const breakpoints = getViewportBreakpoints(configOrSettings);
11183    const mediaQueries = {};
11184    if (breakpoints.mobile) {
11185      mediaQueries["@mobile"] = `@media (width <= $breakpoints.mobile})`;
11186    }
11187    if (breakpoints.tablet) {
11188      mediaQueries["@tablet"] = breakpoints.mobile ? `@media ($breakpoints.mobile} < width <= $breakpoints.tablet})` : `@media (width <= $breakpoints.tablet})`;
11189    }
11190    return mediaQueries;
11191  }
11192  
11193  // packages/global-styles-engine/build-module/variation.mjs
11194  function getVariationStyle(globalStyles, name2, variation, { resolveRefs = true } = {}) {
11195    if (!globalStyles?.styles?.blocks?.[name2]?.variations?.[variation]) {
11196      return void 0;
11197    }
11198    const replaceRefs = (variationStyles) => {
11199      Object.keys(variationStyles).forEach((key) => {
11200        const value = variationStyles[key];
11201        if (typeof value === "object" && value !== null) {
11202          if (value.ref !== void 0) {
11203            if (typeof value.ref !== "string" || value.ref.trim() === "") {
11204              delete variationStyles[key];
11205            } else {
11206              const refValue = getValueFromObjectPath(
11207                globalStyles,
11208                value.ref
11209              );
11210              if (refValue !== void 0 && refValue !== null) {
11211                variationStyles[key] = refValue;
11212              } else {
11213                delete variationStyles[key];
11214              }
11215            }
11216          } else {
11217            replaceRefs(value);
11218            if (Object.keys(value).length === 0) {
11219              delete variationStyles[key];
11220            }
11221          }
11222        }
11223      });
11224    };
11225    const styles = JSON.parse(
11226      JSON.stringify(
11227        globalStyles.styles.blocks[name2].variations[variation]
11228      )
11229    );
11230    if (resolveRefs) {
11231      replaceRefs(styles);
11232    }
11233    return styles;
11234  }
11235  
11236  // packages/global-styles-engine/build-module/resolve-style.mjs
11237  var DEFAULT_STATE_VALUE = "default";
11238  function isDefaultBlockStyleState(selectedState) {
11239    const viewport = selectedState?.viewport;
11240    const pseudoState = selectedState?.pseudoState;
11241    return (!viewport || viewport === DEFAULT_STATE_VALUE) && (!pseudoState || pseudoState === DEFAULT_STATE_VALUE);
11242  }
11243  function getStyleStatePath(selectedState) {
11244    if (isDefaultBlockStyleState(selectedState)) {
11245      return [];
11246    }
11247    return [selectedState.viewport, selectedState.pseudoState].filter(
11248      (state) => !!state && state !== DEFAULT_STATE_VALUE
11249    );
11250  }
11251  function getStyleForState(style, selectedState) {
11252    const path = getStyleStatePath(selectedState);
11253    if (!path.length) {
11254      return style;
11255    }
11256    return getValueFromObjectPath(style, path);
11257  }
11258  var TREE_STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["blocks", "variations", "css"]);
11259  var EMPTY_INHERITANCE = Object.freeze({
11260    value: {},
11261    sources: {}
11262  });
11263  var SOURCE_DESCRIPTORS = {
11264    root: { layer: "root" },
11265    element: { layer: "element" },
11266    block: { layer: "block" },
11267    blockVariation: { layer: "blockVariation" }
11268  };
11269  function createSourceDescriptor(type) {
11270    const descriptor = SOURCE_DESCRIPTORS[type];
11271    if (!descriptor) {
11272      return null;
11273    }
11274    return { ...descriptor };
11275  }
11276  function createContribution(styles, source) {
11277    if (!styles || !source) {
11278      return null;
11279    }
11280    return { styles, source };
11281  }
11282  function getPathKey(path) {
11283    return path.join(".");
11284  }
11285  function getSourceForPath(source) {
11286    return { ...source };
11287  }
11288  function isExplicitEmpty(value) {
11289    if (value === "" || value === null) {
11290      return true;
11291    }
11292    if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) {
11293      return true;
11294    }
11295    return false;
11296  }
11297  function isRefObject(value) {
11298    return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.ref === "string";
11299  }
11300  function pickLayerRootContribution(layer) {
11301    if (!layer || typeof layer !== "object" || Array.isArray(layer)) {
11302      return null;
11303    }
11304    const contribution = {};
11305    for (const key of Object.keys(layer)) {
11306      if (TREE_STRUCTURAL_KEYS.has(key)) {
11307        continue;
11308      }
11309      if (key === "elements") {
11310        if (layer.elements && typeof layer.elements === "object") {
11311          contribution.elements = layer.elements;
11312        }
11313        continue;
11314      }
11315      if (isExplicitEmpty(layer[key])) {
11316        continue;
11317      }
11318      contribution[key] = layer[key];
11319    }
11320    return Object.keys(contribution).length === 0 ? null : contribution;
11321  }
11322  var ATOMIC_OBJECT_KEYS = /* @__PURE__ */ new Set(["backgroundImage"]);
11323  function deepMergeDroppingEmpties(target, source, globalStyles, sourceMetadata, sources, path = []) {
11324    if (!source || typeof source !== "object" || Array.isArray(source)) {
11325      return target;
11326    }
11327    for (const key of Object.keys(source)) {
11328      let sourceValue = source[key];
11329      if (isExplicitEmpty(sourceValue)) {
11330        continue;
11331      }
11332      if (isRefObject(sourceValue)) {
11333        if (sourceValue.ref.trim() === "") {
11334          continue;
11335        }
11336        const resolved = getValueFromObjectPath(
11337          globalStyles,
11338          sourceValue.ref
11339        );
11340        if (resolved === void 0 || resolved === null || isRefObject(resolved)) {
11341          continue;
11342        }
11343        sourceValue = resolved;
11344      }
11345      const nextPath = [...path, key];
11346      if (!ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && !isRefObject(sourceValue)) {
11347        const existing = target[key] && typeof target[key] === "object" && !Array.isArray(target[key]) ? target[key] : {};
11348        target[key] = deepMergeDroppingEmpties(
11349          { ...existing },
11350          sourceValue,
11351          globalStyles,
11352          sourceMetadata,
11353          sources,
11354          nextPath
11355        );
11356      } else {
11357        target[key] = ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) ? { ...sourceValue } : sourceValue;
11358        if (sourceMetadata && sources) {
11359          sources[getPathKey(nextPath)] = getSourceForPath(sourceMetadata);
11360        }
11361      }
11362    }
11363    return target;
11364  }
11365  function getStateSlice(layerObject, selectedState) {
11366    if (!layerObject) {
11367      return null;
11368    }
11369    const slice = getStyleForState(layerObject, selectedState);
11370    return slice && typeof slice === "object" && !Array.isArray(slice) ? slice : null;
11371  }
11372  var NON_CASCADING_ROOT_PREFIXES = [
11373    "color.background",
11374    "color.gradient",
11375    "background",
11376    "spacing",
11377    "dimensions",
11378    "border",
11379    "shadow",
11380    "filter"
11381  ];
11382  function isNonCascadingRootPath(pathKey) {
11383    if (pathKey.startsWith("elements.")) {
11384      return false;
11385    }
11386    return NON_CASCADING_ROOT_PREFIXES.some(
11387      (prefix) => pathKey === prefix || pathKey.startsWith(`$prefix}.`)
11388    );
11389  }
11390  function deleteAtPath(target, pathSegments) {
11391    if (!target || typeof target !== "object") {
11392      return;
11393    }
11394    const [head2, ...rest] = pathSegments;
11395    if (rest.length === 0) {
11396      delete target[head2];
11397      return;
11398    }
11399    const child = target[head2];
11400    if (child && typeof child === "object") {
11401      deleteAtPath(child, rest);
11402      if (Object.keys(child).length === 0) {
11403        delete target[head2];
11404      }
11405    }
11406  }
11407  function dropNonCascadingRootLeaves(value, sources) {
11408    for (const pathKey of Object.keys(sources)) {
11409      if (sources[pathKey].layer === "root" && isNonCascadingRootPath(pathKey)) {
11410        deleteAtPath(value, pathKey.split("."));
11411        delete sources[pathKey];
11412      }
11413    }
11414  }
11415  function resolveThemeFileBackgroundImage(value, globalStyles, links) {
11416    const image = value?.background?.backgroundImage;
11417    if (!image) {
11418      return;
11419    }
11420    const resolved = getResolvedValue(image, {
11421      ...globalStyles,
11422      _links: links ?? void 0
11423    });
11424    if (resolved !== void 0) {
11425      value.background.backgroundImage = resolved;
11426    }
11427  }
11428  function computeResolvedStyle(globalStyles, {
11429    blockName,
11430    variationName = null,
11431    elements: elements2 = null,
11432    viewport = null,
11433    pseudoState = null
11434  } = {}) {
11435    if (!globalStyles || !globalStyles.styles) {
11436      return EMPTY_INHERITANCE;
11437    }
11438    if (!blockName) {
11439      return EMPTY_INHERITANCE;
11440    }
11441    const styles = globalStyles.styles;
11442    const selectedState = { viewport, pseudoState };
11443    const root = styles;
11444    const block = styles.blocks?.[blockName] ?? null;
11445    const elementLayers = (elements2 ?? []).map((elementName) => styles.elements?.[elementName] ?? null).filter((layer) => !!layer);
11446    const variation = variationName ? getVariationStyle(globalStyles, blockName, variationName) ?? null : null;
11447    const contributions = [
11448      createContribution(
11449        pickLayerRootContribution(root),
11450        createSourceDescriptor("root")
11451      ),
11452      ...elementLayers.map(
11453        (layer) => createContribution(
11454          pickLayerRootContribution(layer),
11455          createSourceDescriptor("element")
11456        )
11457      ),
11458      block ? createContribution(
11459        pickLayerRootContribution(block),
11460        createSourceDescriptor("block")
11461      ) : null,
11462      variation ? createContribution(
11463        pickLayerRootContribution(variation),
11464        createSourceDescriptor("blockVariation")
11465      ) : null
11466    ];
11467    if (!isDefaultBlockStyleState(selectedState)) {
11468      contributions.push(
11469        createContribution(
11470          pickLayerRootContribution(
11471            getStateSlice(root, selectedState)
11472          ),
11473          createSourceDescriptor("root")
11474        ),
11475        ...elementLayers.map(
11476          (layer) => createContribution(
11477            pickLayerRootContribution(
11478              getStateSlice(layer, selectedState)
11479            ),
11480            createSourceDescriptor("element")
11481          )
11482        ),
11483        block ? createContribution(
11484          pickLayerRootContribution(
11485            getStateSlice(block, selectedState)
11486          ),
11487          createSourceDescriptor("block")
11488        ) : null,
11489        variation ? createContribution(
11490          pickLayerRootContribution(
11491            getStateSlice(variation, selectedState)
11492          ),
11493          createSourceDescriptor("blockVariation")
11494        ) : null
11495      );
11496    }
11497    const filteredContributions = contributions.filter(
11498      Boolean
11499    );
11500    if (filteredContributions.length === 0) {
11501      return EMPTY_INHERITANCE;
11502    }
11503    const sources = {};
11504    const value = filteredContributions.reduce(
11505      (mergedValue, contribution) => deepMergeDroppingEmpties(
11506        mergedValue,
11507        contribution.styles,
11508        globalStyles,
11509        contribution.source,
11510        sources
11511      ),
11512      {}
11513    );
11514    dropNonCascadingRootLeaves(value, sources);
11515    resolveThemeFileBackgroundImage(
11516      value,
11517      globalStyles,
11518      globalStyles._links ?? null
11519    );
11520    return { value, sources };
11521  }
11522  var NO_LINKS = {};
11523  var memo = /* @__PURE__ */ new WeakMap();
11524  function resolveStyle2(globalStyles, context = {}) {
11525    const styleData = globalStyles?.styles;
11526    if (!styleData || typeof styleData !== "object") {
11527      return computeResolvedStyle(globalStyles, context);
11528    }
11529    let byLinks = memo.get(styleData);
11530    if (!byLinks) {
11531      byLinks = /* @__PURE__ */ new WeakMap();
11532      memo.set(styleData, byLinks);
11533    }
11534    const linksKey = globalStyles?._links ?? NO_LINKS;
11535    let inner = byLinks.get(linksKey);
11536    if (!inner) {
11537      inner = /* @__PURE__ */ new Map();
11538      byLinks.set(linksKey, inner);
11539    }
11540    const sliceKey = `$context.elements?.join(",") ?? ""}:$context.viewport ?? ""}:$context.pseudoState ?? ""}`;
11541    const key = (context.blockName || "") + "" + (context.variationName || "") + "" + sliceKey;
11542    if (inner.has(key)) {
11543      return inner.get(key);
11544    }
11545    const result = computeResolvedStyle(globalStyles, context);
11546    inner.set(key, result);
11547    return result;
11548  }
11549  
11550  // packages/global-styles-engine/build-module/lock-unlock.mjs
11551  var import_private_apis2 = __toESM(require_private_apis(), 1);
11552  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11553    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11554    "@wordpress/global-styles-engine"
11555  );
11556  
11557  // packages/global-styles-engine/build-module/private-apis.mjs
11558  var privateApis = {};
11559  lock2(privateApis, {
11560    getResponsiveMediaQueries,
11561    getViewportBreakpoints,
11562    getViewportBreakpointValueInPixels,
11563    getDuotoneFilter,
11564    getDuotoneStylesheet,
11565    getDuotoneUnsetStylesheet,
11566    resolveStyle: resolveStyle2,
11567    getVariationStyle
11568  });
11569  
11570  // packages/global-styles-ui/build-module/provider.mjs
11571  var import_element23 = __toESM(require_element(), 1);
11572  
11573  // packages/global-styles-ui/build-module/context.mjs
11574  var import_element22 = __toESM(require_element(), 1);
11575  var GlobalStylesContext = (0, import_element22.createContext)({
11576    user: { styles: {}, settings: {} },
11577    base: { styles: {}, settings: {} },
11578    merged: { styles: {}, settings: {} },
11579    onChange: () => {
11580    },
11581    fontLibraryEnabled: false
11582  });
11583  
11584  // packages/global-styles-ui/build-module/provider.mjs
11585  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
11586  function GlobalStylesProvider({
11587    children,
11588    value,
11589    baseValue,
11590    onChange,
11591    fontLibraryEnabled
11592  }) {
11593    const merged = (0, import_element23.useMemo)(() => {
11594      return mergeGlobalStyles(baseValue, value);
11595    }, [baseValue, value]);
11596    const contextValue = (0, import_element23.useMemo)(
11597      () => ({
11598        user: value,
11599        base: baseValue,
11600        merged,
11601        onChange,
11602        fontLibraryEnabled
11603      }),
11604      [value, baseValue, merged, onChange, fontLibraryEnabled]
11605    );
11606    return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GlobalStylesContext.Provider, { value: contextValue, children });
11607  }
11608  
11609  // packages/global-styles-ui/build-module/screen-root.mjs
11610  var import_components8 = __toESM(require_components(), 1);
11611  var import_i18n8 = __toESM(require_i18n(), 1);
11612  var import_data2 = __toESM(require_data(), 1);
11613  var import_core_data2 = __toESM(require_core_data(), 1);
11614  
11615  // packages/global-styles-ui/build-module/icon-with-current-color.mjs
11616  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
11617  function IconWithCurrentColor({
11618    className,
11619    ...props
11620  }) {
11621    return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11622      icon_default,
11623      {
11624        className: clsx_default(
11625          className,
11626          "global-styles-ui-icon-with-current-color"
11627        ),
11628        ...props
11629      }
11630    );
11631  }
11632  
11633  // packages/global-styles-ui/build-module/navigation-button.mjs
11634  var import_components2 = __toESM(require_components(), 1);
11635  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
11636  function GenericNavigationButton({
11637    icon,
11638    children,
11639    ...props
11640  }) {
11641    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components2.__experimentalItem, { ...props, children: [
11642      icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components2.__experimentalHStack, { justify: "flex-start", children: [
11643        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconWithCurrentColor, { icon, size: 24 }),
11644        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components2.FlexItem, { children })
11645      ] }),
11646      !icon && children
11647    ] });
11648  }
11649  function NavigationButtonAsItem(props) {
11650    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components2.Navigator.Button, { as: GenericNavigationButton, ...props });
11651  }
11652  
11653  // packages/global-styles-ui/build-module/root-menu.mjs
11654  var import_components3 = __toESM(require_components(), 1);
11655  var import_i18n6 = __toESM(require_i18n(), 1);
11656  var import_block_editor = __toESM(require_block_editor(), 1);
11657  
11658  // packages/global-styles-ui/build-module/hooks.mjs
11659  var import_element24 = __toESM(require_element(), 1);
11660  var import_data = __toESM(require_data(), 1);
11661  var import_core_data = __toESM(require_core_data(), 1);
11662  var import_i18n5 = __toESM(require_i18n(), 1);
11663  
11664  // packages/global-styles-ui/build-module/utils.mjs
11665  var import_i18n4 = __toESM(require_i18n(), 1);
11666  
11667  // packages/global-styles-ui/build-module/lock-unlock.mjs
11668  var import_private_apis4 = __toESM(require_private_apis(), 1);
11669  var { lock: lock3, unlock: unlock3 } = (0, import_private_apis4.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11670    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11671    "@wordpress/global-styles-ui"
11672  );
11673  
11674  // packages/global-styles-ui/build-module/utils.mjs
11675  var { getViewportBreakpoints: getViewportBreakpoints2 } = unlock3(privateApis);
11676  var VALID_ELEMENT_STATES = {
11677    link: [
11678      { value: ":link", label: (0, import_i18n4.__)("Link") },
11679      { value: ":any-link", label: (0, import_i18n4.__)("Any Link") },
11680      { value: ":visited", label: (0, import_i18n4.__)("Visited") },
11681      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11682      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11683      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11684      { value: ":active", label: (0, import_i18n4.__)("Active") }
11685    ],
11686    button: [
11687      { value: ":link", label: (0, import_i18n4.__)("Link") },
11688      { value: ":any-link", label: (0, import_i18n4.__)("Any Link") },
11689      { value: ":visited", label: (0, import_i18n4.__)("Visited") },
11690      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11691      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11692      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11693      { value: ":active", label: (0, import_i18n4.__)("Active") }
11694    ]
11695  };
11696  var VALID_BLOCK_STATES = {
11697    "core/button": [
11698      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11699      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11700      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11701      { value: ":active", label: (0, import_i18n4.__)("Active") }
11702    ]
11703  };
11704  var RESPONSIVE_STATES = [
11705    { value: "@tablet", label: (0, import_i18n4.__)("Tablet") },
11706    { value: "@mobile", label: (0, import_i18n4.__)("Mobile") }
11707  ];
11708  function removePropertiesFromObject(object, properties) {
11709    if (!properties?.length) {
11710      return object;
11711    }
11712    if (typeof object !== "object" || !object || !Object.keys(object).length) {
11713      return object;
11714    }
11715    for (const key in object) {
11716      if (properties.includes(key)) {
11717        delete object[key];
11718      } else if (typeof object[key] === "object") {
11719        removePropertiesFromObject(object[key], properties);
11720      }
11721    }
11722    return object;
11723  }
11724  var filterObjectByProperties = (object, properties) => {
11725    if (!object || !properties?.length) {
11726      return {};
11727    }
11728    const newObject = {};
11729    Object.keys(object).forEach((key) => {
11730      if (properties.includes(key)) {
11731        newObject[key] = object[key];
11732      } else if (typeof object[key] === "object") {
11733        const newFilter = filterObjectByProperties(
11734          object[key],
11735          properties
11736        );
11737        if (Object.keys(newFilter).length) {
11738          newObject[key] = newFilter;
11739        }
11740      }
11741    });
11742    return newObject;
11743  };
11744  function isVariationWithProperties(variation, properties) {
11745    const variationWithProperties = filterObjectByProperties(
11746      structuredClone(variation),
11747      properties
11748    );
11749    return areGlobalStylesEqual(variationWithProperties, variation);
11750  }
11751  function getFontFamilyFromSetting(fontFamilies, setting) {
11752    if (!Array.isArray(fontFamilies) || !setting) {
11753      return null;
11754    }
11755    const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
11756    const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
11757    return fontFamilies.find(
11758      (fontFamily) => fontFamily.slug === fontFamilySlug
11759    );
11760  }
11761  function getFontFamilies(themeJson) {
11762    const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
11763    const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
11764    let fontFamilies = [];
11765    if (themeFontFamilies && customFontFamilies) {
11766      fontFamilies = [...themeFontFamilies, ...customFontFamilies];
11767    } else if (themeFontFamilies) {
11768      fontFamilies = themeFontFamilies;
11769    } else if (customFontFamilies) {
11770      fontFamilies = customFontFamilies;
11771    }
11772    const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
11773    const bodyFontFamily = getFontFamilyFromSetting(
11774      fontFamilies,
11775      bodyFontFamilySetting
11776    );
11777    const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
11778    let headingFontFamily;
11779    if (!headingFontFamilySetting) {
11780      headingFontFamily = bodyFontFamily;
11781    } else {
11782      headingFontFamily = getFontFamilyFromSetting(
11783        fontFamilies,
11784        themeJson?.styles?.elements?.heading?.typography?.fontFamily
11785      );
11786    }
11787    return [bodyFontFamily, headingFontFamily];
11788  }
11789  
11790  // packages/global-styles-ui/build-module/hooks.mjs
11791  function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true, state) {
11792    const { user, base, merged, onChange } = (0, import_element24.useContext)(GlobalStylesContext);
11793    const statePathParts = state?.split(".").filter(Boolean) ?? [];
11794    const pseudoSelectorState = statePathParts.find(
11795      (value) => value.startsWith(":")
11796    );
11797    const statePathWithoutPseudo = statePathParts.filter((value) => !value.startsWith(":")).join(".");
11798    const stylePath = [path, statePathWithoutPseudo].filter(Boolean).join(".");
11799    let sourceValue = merged;
11800    if (readFrom === "base") {
11801      sourceValue = base;
11802    } else if (readFrom === "user") {
11803      sourceValue = user;
11804    }
11805    const styleValue = (0, import_element24.useMemo)(() => {
11806      const rawValue = getStyle(
11807        sourceValue,
11808        stylePath,
11809        blockName,
11810        shouldDecodeEncode
11811      );
11812      if (pseudoSelectorState) {
11813        return rawValue?.[pseudoSelectorState] ?? {};
11814      }
11815      return rawValue;
11816    }, [
11817      sourceValue,
11818      stylePath,
11819      blockName,
11820      shouldDecodeEncode,
11821      pseudoSelectorState
11822    ]);
11823    const setStyleValue = (0, import_element24.useCallback)(
11824      (newValue) => {
11825        let valueToSet = newValue;
11826        if (pseudoSelectorState) {
11827          const fullCurrentValue = getStyle(
11828            user,
11829            stylePath,
11830            blockName,
11831            false
11832          );
11833          valueToSet = {
11834            ...fullCurrentValue,
11835            [pseudoSelectorState]: newValue
11836          };
11837        }
11838        const newGlobalStyles = setStyle(
11839          user,
11840          stylePath,
11841          valueToSet,
11842          blockName
11843        );
11844        onChange(newGlobalStyles);
11845      },
11846      [user, onChange, stylePath, blockName, pseudoSelectorState]
11847    );
11848    return [styleValue, setStyleValue];
11849  }
11850  function useSetting(path, blockName, readFrom = "merged") {
11851    const { user, base, merged, onChange } = (0, import_element24.useContext)(GlobalStylesContext);
11852    let sourceValue = merged;
11853    if (readFrom === "base") {
11854      sourceValue = base;
11855    } else if (readFrom === "user") {
11856      sourceValue = user;
11857    }
11858    const settingValue = (0, import_element24.useMemo)(
11859      () => getSetting(sourceValue, path, blockName),
11860      [sourceValue, path, blockName]
11861    );
11862    const setSettingValue = (0, import_element24.useCallback)(
11863      (newValue) => {
11864        const newGlobalStyles = setSetting(
11865          user,
11866          path,
11867          newValue,
11868          blockName
11869        );
11870        onChange(newGlobalStyles);
11871      },
11872      [user, onChange, path, blockName]
11873    );
11874    return [settingValue, setSettingValue];
11875  }
11876  var EMPTY_ARRAY2 = [];
11877  function hasThemeVariation({
11878    title,
11879    settings,
11880    styles
11881  }) {
11882    return title === (0, import_i18n5.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0;
11883  }
11884  function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
11885    const { variationsFromTheme } = (0, import_data.useSelect)((select) => {
11886      const _variationsFromTheme = select(
11887        import_core_data.store
11888      ).__experimentalGetCurrentThemeGlobalStylesVariations?.();
11889      return {
11890        variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY2
11891      };
11892    }, []);
11893    const { user: userVariation } = (0, import_element24.useContext)(GlobalStylesContext);
11894    return (0, import_element24.useMemo)(() => {
11895      const clonedUserVariation = structuredClone(userVariation);
11896      const userVariationWithoutProperties = removePropertiesFromObject(
11897        clonedUserVariation,
11898        properties
11899      );
11900      userVariationWithoutProperties.title = (0, import_i18n5.__)("Default");
11901      const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => {
11902        return isVariationWithProperties(variation, properties);
11903      }).map((variation) => {
11904        return mergeGlobalStyles(
11905          userVariationWithoutProperties,
11906          variation
11907        );
11908      });
11909      const variationsByProperties = [
11910        userVariationWithoutProperties,
11911        ...variationsWithPropertiesAndBase
11912      ];
11913      return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
11914    }, [properties, userVariation, variationsFromTheme]);
11915  }
11916  
11917  // packages/global-styles-ui/build-module/root-menu.mjs
11918  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
11919  var {
11920    useHasDimensionsPanel,
11921    useHasTypographyPanel,
11922    useHasColorPanel,
11923    useSettingsForBlockElement,
11924    useHasBackgroundPanel
11925  } = unlock3(import_block_editor.privateApis);
11926  
11927  // packages/global-styles-ui/build-module/preview-styles.mjs
11928  var import_components7 = __toESM(require_components(), 1);
11929  
11930  // packages/global-styles-ui/build-module/preview-hooks.mjs
11931  function useStylesPreviewColors() {
11932    const [textColor = "black"] = useStyle("color.text");
11933    const [backgroundColor = "white"] = useStyle("color.background");
11934    const [headingColor = textColor] = useStyle(
11935      "elements.h1.color.text"
11936    );
11937    const [linkColor = headingColor] = useStyle(
11938      "elements.link.color.text"
11939    );
11940    const [buttonBackgroundColor = linkColor] = useStyle(
11941      "elements.button.color.background"
11942    );
11943    const [coreColors] = useSetting("color.palette.core") || [];
11944    const [themeColors] = useSetting("color.palette.theme") || [];
11945    const [customColors] = useSetting("color.palette.custom") || [];
11946    const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
11947    const textColorObject = paletteColors.filter(
11948      ({ color }) => color === textColor
11949    );
11950    const buttonBackgroundColorObject = paletteColors.filter(
11951      ({ color }) => color === buttonBackgroundColor
11952    );
11953    const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
11954      // we exclude these background color because it is already visible in the preview.
11955      ({ color }) => color !== backgroundColor
11956    ).slice(0, 2);
11957    return {
11958      paletteColors,
11959      highlightedColors
11960    };
11961  }
11962  
11963  // packages/global-styles-ui/build-module/typography-example.mjs
11964  var import_element25 = __toESM(require_element(), 1);
11965  var import_components4 = __toESM(require_components(), 1);
11966  var import_i18n7 = __toESM(require_i18n(), 1);
11967  
11968  // packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs
11969  function findNearest(input, numbers) {
11970    if (numbers.length === 0) {
11971      return null;
11972    }
11973    numbers.sort((a2, b2) => Math.abs(input - a2) - Math.abs(input - b2));
11974    return numbers[0];
11975  }
11976  var FONT_WEIGHT_KEYWORDS = {
11977    normal: 400,
11978    bold: 700
11979  };
11980  function isValidWeight(weight) {
11981    return weight !== void 0 && Number.isFinite(weight) && weight >= 1 && weight <= 1e3;
11982  }
11983  function resolveFontWeight(fontWeight) {
11984    const weights = String(fontWeight ?? "").trim().toLowerCase().split(/\s+/).filter(Boolean).map((value) => FONT_WEIGHT_KEYWORDS[value] ?? Number(value));
11985    const [start, end] = weights;
11986    if (!isValidWeight(start)) {
11987      return "400";
11988    }
11989    if (weights.length !== 2 || !isValidWeight(end)) {
11990      return String(start);
11991    }
11992    return String(Math.min(Math.max(400, start), end));
11993  }
11994  function formatFontFamily(input) {
11995    const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!var\(\s*--[\w-]+\s*\)$)(?!^[a-zA-Z\-]+$).+/;
11996    const output = input.trim();
11997    const formatItem = (item) => {
11998      item = item.trim();
11999      if (item.match(regex)) {
12000        item = item.replace(/^["']|["']$/g, "");
12001        return `"$item}"`;
12002      }
12003      return item;
12004    };
12005    if (output.includes(",")) {
12006      return output.split(",").map(formatItem).filter((item) => item !== "").join(", ");
12007    }
12008    return formatItem(output);
12009  }
12010  function formatFontFaceName(input) {
12011    if (!input) {
12012      return "";
12013    }
12014    let output = input.trim();
12015    if (output.includes(",")) {
12016      output = (output.split(",").find((item) => item.trim() !== "") ?? "").trim();
12017    }
12018    output = output.replace(/^["']|["']$/g, "");
12019    if (window.navigator.userAgent.toLowerCase().includes("firefox")) {
12020      output = `"$output}"`;
12021    }
12022    return output;
12023  }
12024  function getFamilyPreviewStyle(family) {
12025    const style = {
12026      fontFamily: formatFontFamily(family.fontFamily)
12027    };
12028    if (!("fontFace" in family) || !Array.isArray(family.fontFace)) {
12029      style.fontWeight = "400";
12030      style.fontStyle = "normal";
12031      return style;
12032    }
12033    if (family.fontFace) {
12034      const normalFaces = family.fontFace.filter(
12035        (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal"
12036      );
12037      if (normalFaces.length > 0) {
12038        style.fontStyle = "normal";
12039        const normalWeights = normalFaces.map(
12040          (face) => Number(resolveFontWeight(face.fontWeight))
12041        );
12042        style.fontWeight = String(
12043          findNearest(400, normalWeights) ?? 400
12044        );
12045      } else {
12046        style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal";
12047        style.fontWeight = family.fontFace.length && resolveFontWeight(family.fontFace[0].fontWeight) || "400";
12048      }
12049    }
12050    return style;
12051  }
12052  function getFacePreviewStyle(face) {
12053    return {
12054      fontFamily: formatFontFamily(face.fontFamily),
12055      fontStyle: face.fontStyle || "normal",
12056      fontWeight: resolveFontWeight(face.fontWeight)
12057    };
12058  }
12059  
12060  // packages/global-styles-ui/build-module/typography-example.mjs
12061  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
12062  function PreviewTypography({
12063    fontSize,
12064    variation
12065  }) {
12066    const { base } = (0, import_element25.useContext)(GlobalStylesContext);
12067    let config = base;
12068    if (variation) {
12069      config = { ...base, ...variation };
12070    }
12071    const [textColor] = useStyle("color.text");
12072    const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config);
12073    const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
12074    const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
12075    if (textColor) {
12076      bodyPreviewStyle.color = textColor;
12077      headingPreviewStyle.color = textColor;
12078    }
12079    if (fontSize) {
12080      bodyPreviewStyle.fontSize = fontSize;
12081      headingPreviewStyle.fontSize = fontSize;
12082    }
12083    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12084      import_components4.__unstableMotion.div,
12085      {
12086        animate: {
12087          scale: 1,
12088          opacity: 1
12089        },
12090        initial: {
12091          scale: 0.1,
12092          opacity: 0
12093        },
12094        transition: {
12095          delay: 0.3,
12096          type: "tween"
12097        },
12098        style: {
12099          textAlign: "center",
12100          lineHeight: 1
12101        },
12102        children: [
12103          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n7._x)("A", "Uppercase letter A") }),
12104          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n7._x)("a", "Lowercase letter A") })
12105        ]
12106      }
12107    );
12108  }
12109  
12110  // packages/global-styles-ui/build-module/highlighted-colors.mjs
12111  var import_components5 = __toESM(require_components(), 1);
12112  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
12113  function HighlightedColors({
12114    normalizedColorSwatchSize,
12115    ratio
12116  }) {
12117    const { highlightedColors } = useStylesPreviewColors();
12118    const scaledSwatchSize = normalizedColorSwatchSize * ratio;
12119    return highlightedColors.map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12120      import_components5.__unstableMotion.div,
12121      {
12122        style: {
12123          height: scaledSwatchSize,
12124          width: scaledSwatchSize,
12125          background: color,
12126          borderRadius: scaledSwatchSize / 2
12127        },
12128        animate: {
12129          scale: 1,
12130          opacity: 1
12131        },
12132        initial: {
12133          scale: 0.1,
12134          opacity: 0
12135        },
12136        transition: {
12137          delay: index2 === 1 ? 0.2 : 0.1
12138        }
12139      },
12140      `$slug}-$index2}`
12141    ));
12142  }
12143  
12144  // packages/global-styles-ui/build-module/preview-wrapper.mjs
12145  var import_components6 = __toESM(require_components(), 1);
12146  var import_compose = __toESM(require_compose(), 1);
12147  var import_element26 = __toESM(require_element(), 1);
12148  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
12149  var normalizedWidth = 248;
12150  var normalizedHeight = 152;
12151  var THROTTLE_OPTIONS = {
12152    leading: true,
12153    trailing: true
12154  };
12155  function PreviewWrapper({
12156    children,
12157    label,
12158    isFocused,
12159    withHoverView
12160  }) {
12161    const [backgroundColor = "white"] = useStyle("color.background");
12162    const [gradientValue] = useStyle("color.gradient");
12163    const disableMotion = (0, import_compose.useReducedMotion)();
12164    const [isHovered, setIsHovered] = (0, import_element26.useState)(false);
12165    const [containerResizeListener, { width }] = (0, import_compose.useResizeObserver)();
12166    const [throttledWidth, setThrottledWidthState] = (0, import_element26.useState)(width);
12167    const [ratioState, setRatioState] = (0, import_element26.useState)();
12168    const setThrottledWidth = (0, import_compose.useThrottle)(
12169      setThrottledWidthState,
12170      250,
12171      THROTTLE_OPTIONS
12172    );
12173    (0, import_element26.useLayoutEffect)(() => {
12174      if (width) {
12175        setThrottledWidth(width);
12176      }
12177    }, [width, setThrottledWidth]);
12178    (0, import_element26.useLayoutEffect)(() => {
12179      const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
12180      const ratioDiff = newRatio - (ratioState || 0);
12181      const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
12182      if (isRatioDiffBigEnough || !ratioState) {
12183        setRatioState(newRatio);
12184      }
12185    }, [throttledWidth, ratioState]);
12186    const fallbackRatio = width ? width / normalizedWidth : 1;
12187    const ratio = ratioState ? ratioState : fallbackRatio;
12188    const isReady = !!width;
12189    return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
12190      /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
12191      !isReady && // Match the preview aspect ratio so layout doesn't jump once width is measured.
12192      /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12193        Skeleton,
12194        {
12195          className: "global-styles-ui-preview__wrapper",
12196          style: {
12197            aspectRatio: normalizedWidth / normalizedHeight
12198          }
12199        }
12200      ),
12201      isReady && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12202        "div",
12203        {
12204          className: clsx_default("global-styles-ui-preview__wrapper", {
12205            "is-hoverable": withHoverView
12206          }),
12207          style: {
12208            height: normalizedHeight * ratio
12209          },
12210          onMouseEnter: () => setIsHovered(true),
12211          onMouseLeave: () => setIsHovered(false),
12212          tabIndex: -1,
12213          children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12214            import_components6.__unstableMotion.div,
12215            {
12216              style: {
12217                height: normalizedHeight * ratio,
12218                width: "100%",
12219                background: gradientValue ?? backgroundColor
12220              },
12221              initial: "start",
12222              animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
12223              children: [].concat(children).map(
12224                (child, key) => child({ ratio, key })
12225              )
12226            }
12227          )
12228        }
12229      )
12230    ] });
12231  }
12232  var preview_wrapper_default = PreviewWrapper;
12233  
12234  // packages/global-styles-ui/build-module/preview-styles.mjs
12235  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
12236  var firstFrameVariants = {
12237    start: {
12238      scale: 1,
12239      opacity: 1
12240    },
12241    hover: {
12242      scale: 0,
12243      opacity: 0
12244    }
12245  };
12246  var midFrameVariants = {
12247    hover: {
12248      opacity: 1
12249    },
12250    start: {
12251      opacity: 0.5
12252    }
12253  };
12254  var secondFrameVariants = {
12255    hover: {
12256      scale: 1,
12257      opacity: 1
12258    },
12259    start: {
12260      scale: 0,
12261      opacity: 0
12262    }
12263  };
12264  function PreviewStyles({
12265    label,
12266    isFocused,
12267    withHoverView,
12268    variation
12269  }) {
12270    const [fontWeight] = useStyle("typography.fontWeight");
12271    const [fontFamily = "serif"] = useStyle(
12272      "typography.fontFamily"
12273    );
12274    const [headingFontFamily = fontFamily] = useStyle(
12275      "elements.h1.typography.fontFamily"
12276    );
12277    const [headingFontWeight = fontWeight] = useStyle(
12278      "elements.h1.typography.fontWeight"
12279    );
12280    const [textColor = "black"] = useStyle("color.text");
12281    const [headingColor = textColor] = useStyle(
12282      "elements.h1.color.text"
12283    );
12284    const { paletteColors } = useStylesPreviewColors();
12285    return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12286      preview_wrapper_default,
12287      {
12288        label,
12289        isFocused,
12290        withHoverView,
12291        children: [
12292          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12293            import_components7.__unstableMotion.div,
12294            {
12295              variants: firstFrameVariants,
12296              style: {
12297                height: "100%",
12298                overflow: "hidden"
12299              },
12300              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12301                import_components7.__experimentalHStack,
12302                {
12303                  spacing: 10 * ratio,
12304                  justify: "center",
12305                  style: {
12306                    height: "100%",
12307                    overflow: "hidden"
12308                  },
12309                  children: [
12310                    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12311                      PreviewTypography,
12312                      {
12313                        fontSize: 65 * ratio,
12314                        variation
12315                      }
12316                    ),
12317                    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components7.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12318                      HighlightedColors,
12319                      {
12320                        normalizedColorSwatchSize: 32,
12321                        ratio
12322                      }
12323                    ) })
12324                  ]
12325                }
12326              )
12327            },
12328            key
12329          ),
12330          ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12331            import_components7.__unstableMotion.div,
12332            {
12333              variants: withHoverView ? midFrameVariants : void 0,
12334              style: {
12335                height: "100%",
12336                width: "100%",
12337                position: "absolute",
12338                top: 0,
12339                overflow: "hidden",
12340                filter: "blur(60px)",
12341                opacity: 0.1
12342              },
12343              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12344                import_components7.__experimentalHStack,
12345                {
12346                  spacing: 0,
12347                  justify: "flex-start",
12348                  style: {
12349                    height: "100%",
12350                    overflow: "hidden"
12351                  },
12352                  children: paletteColors.slice(0, 4).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12353                    "div",
12354                    {
12355                      style: {
12356                        height: "100%",
12357                        background: color,
12358                        flexGrow: 1
12359                      }
12360                    },
12361                    index2
12362                  ))
12363                }
12364              )
12365            },
12366            key
12367          ),
12368          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12369            import_components7.__unstableMotion.div,
12370            {
12371              variants: secondFrameVariants,
12372              style: {
12373                height: "100%",
12374                width: "100%",
12375                overflow: "hidden",
12376                position: "absolute",
12377                top: 0
12378              },
12379              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12380                import_components7.__experimentalVStack,
12381                {
12382                  spacing: 3 * ratio,
12383                  justify: "center",
12384                  style: {
12385                    height: "100%",
12386                    overflow: "hidden",
12387                    padding: 10 * ratio,
12388                    boxSizing: "border-box"
12389                  },
12390                  children: label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12391                    "div",
12392                    {
12393                      style: {
12394                        fontSize: 40 * ratio,
12395                        fontFamily: headingFontFamily,
12396                        color: headingColor,
12397                        fontWeight: headingFontWeight,
12398                        lineHeight: "1em",
12399                        textAlign: "center"
12400                      },
12401                      children: label
12402                    }
12403                  )
12404                }
12405              )
12406            },
12407            key
12408          )
12409        ]
12410      }
12411    );
12412  }
12413  var preview_styles_default = PreviewStyles;
12414  
12415  // packages/global-styles-ui/build-module/screen-root.mjs
12416  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
12417  
12418  // packages/global-styles-ui/build-module/screen-block-list.mjs
12419  var import_blocks2 = __toESM(require_blocks(), 1);
12420  var import_i18n10 = __toESM(require_i18n(), 1);
12421  var import_components11 = __toESM(require_components(), 1);
12422  var import_data4 = __toESM(require_data(), 1);
12423  var import_element27 = __toESM(require_element(), 1);
12424  var import_block_editor3 = __toESM(require_block_editor(), 1);
12425  var import_compose2 = __toESM(require_compose(), 1);
12426  import { speak } from "@wordpress/a11y";
12427  
12428  // packages/global-styles-ui/build-module/variations/variations-panel.mjs
12429  var import_blocks = __toESM(require_blocks(), 1);
12430  var import_data3 = __toESM(require_data(), 1);
12431  var import_components9 = __toESM(require_components(), 1);
12432  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
12433  function getFilteredBlockStyles(blockStyles, variations) {
12434    return blockStyles?.filter(
12435      (style) => style.source === "block" || variations.includes(style.name)
12436    ) || [];
12437  }
12438  function useBlockVariations(name2) {
12439    const blockStyles = (0, import_data3.useSelect)(
12440      (select) => {
12441        const { getBlockStyles } = select(import_blocks.store);
12442        return getBlockStyles(name2);
12443      },
12444      [name2]
12445    );
12446    const [variations] = useStyle("variations", name2);
12447    const variationNames = Object.keys(variations ?? {});
12448    return getFilteredBlockStyles(blockStyles, variationNames);
12449  }
12450  
12451  // packages/global-styles-ui/build-module/screen-header.mjs
12452  var import_components10 = __toESM(require_components(), 1);
12453  var import_i18n9 = __toESM(require_i18n(), 1);
12454  var import_block_editor2 = __toESM(require_block_editor(), 1);
12455  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
12456  var { StateControl, StateControlBadges } = unlock3(import_block_editor2.privateApis);
12457  
12458  // packages/global-styles-ui/build-module/screen-block-list.mjs
12459  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
12460  var {
12461    useHasDimensionsPanel: useHasDimensionsPanel2,
12462    useHasTypographyPanel: useHasTypographyPanel2,
12463    useHasBorderPanel,
12464    useSettingsForBlockElement: useSettingsForBlockElement2,
12465    useHasColorPanel: useHasColorPanel2,
12466    useHasBackgroundPanel: useHasBackgroundPanel2
12467  } = unlock3(import_block_editor3.privateApis);
12468  var { Menu } = unlock3(import_components11.privateApis);
12469  function hasAnyValue(value) {
12470    if (value === void 0 || value === null) {
12471      return false;
12472    }
12473    if (Array.isArray(value)) {
12474      return value.length > 0;
12475    }
12476    if (typeof value === "object") {
12477      return Object.values(value).some(hasAnyValue);
12478    }
12479    return true;
12480  }
12481  function hasUserStylesForBlock(user, blockName) {
12482    return hasAnyValue(user?.styles?.blocks?.[blockName]) || hasAnyValue(user?.settings?.blocks?.[blockName]);
12483  }
12484  function useSortedBlockTypes() {
12485    const blockItems = (0, import_data4.useSelect)(
12486      (select) => select(import_blocks2.store).getBlockTypes(),
12487      []
12488    );
12489    const groupByType = (blocks, block) => {
12490      const { core, noncore } = blocks;
12491      const type = block.name.startsWith("core/") ? core : noncore;
12492      type.push(block);
12493      return blocks;
12494    };
12495    const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(
12496      groupByType,
12497      { core: [], noncore: [] }
12498    );
12499    return [...coreItems, ...nonCoreItems];
12500  }
12501  function useBlockHasGlobalStyles(blockName) {
12502    const [rawSettings] = useSetting("", blockName);
12503    const settings = useSettingsForBlockElement2(rawSettings, blockName);
12504    const hasTypographyPanel = useHasTypographyPanel2(settings);
12505    const hasColorPanel = useHasColorPanel2(settings);
12506    const hasBackgroundPanel = useHasBackgroundPanel2(settings);
12507    const hasBorderPanel = useHasBorderPanel(settings);
12508    const hasDimensionsPanel = useHasDimensionsPanel2(settings);
12509    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
12510    const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
12511    const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasBackgroundPanel || hasLayoutPanel || hasVariationsPanel;
12512    return hasGlobalStyles;
12513  }
12514  function BlockMenuItem({ block, isCustomized }) {
12515    const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
12516    if (!hasBlockMenuItem) {
12517      return null;
12518    }
12519    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12520      NavigationButtonAsItem,
12521      {
12522        path: "/blocks/" + encodeURIComponent(block.name),
12523        children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_components11.__experimentalHStack, { justify: "flex-start", spacing: 2, children: [
12524          /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12525            import_block_editor3.BlockIcon,
12526            {
12527              className: "global-styles-ui-block-types-item__icon",
12528              icon: block.icon
12529            }
12530          ),
12531          /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components11.FlexItem, { children: block.title }),
12532          isCustomized && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12533            /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(VisuallyHidden, { children: (0, import_i18n10.__)("Has custom styles") }),
12534            /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12535              "span",
12536              {
12537                "aria-hidden": "true",
12538                className: "global-styles-ui-block-types-item__indicator"
12539              }
12540            )
12541          ] })
12542        ] })
12543      }
12544    );
12545  }
12546  function EmptyBlockList({
12547    filterValue,
12548    styleFilter
12549  }) {
12550    const label = "customized" === styleFilter && !filterValue ? (0, import_i18n10.__)("You haven't customized any blocks yet.") : (0, import_i18n10.__)("No blocks found.");
12551    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12552      import_components11.__experimentalText,
12553      {
12554        align: "center",
12555        as: "p",
12556        className: "global-styles-ui-block-types-item-list__no-results",
12557        children: label
12558      }
12559    );
12560  }
12561  function BlockList({ filterValue, styleFilter }) {
12562    const sortedBlockTypes = useSortedBlockTypes();
12563    const debouncedSpeak = (0, import_compose2.useDebounce)(speak, 500);
12564    const { isMatchingSearchTerm } = (0, import_data4.useSelect)(import_blocks2.store);
12565    const { user } = (0, import_element27.useContext)(GlobalStylesContext);
12566    const customizedBlockNames = (0, import_element27.useMemo)(() => {
12567      const names = /* @__PURE__ */ new Set();
12568      const blockNames = [
12569        ...Object.keys(user?.styles?.blocks ?? {}),
12570        ...Object.keys(user?.settings?.blocks ?? {})
12571      ];
12572      blockNames.forEach((blockName) => {
12573        if (hasUserStylesForBlock(user, blockName)) {
12574          names.add(blockName);
12575        }
12576      });
12577      return names;
12578    }, [user]);
12579    const searchedBlockTypes = !filterValue ? sortedBlockTypes : sortedBlockTypes.filter(
12580      (blockType) => isMatchingSearchTerm(blockType, filterValue)
12581    );
12582    const filteredBlockTypes = styleFilter === "customized" ? searchedBlockTypes.filter(
12583      (blockType) => customizedBlockNames.has(blockType.name)
12584    ) : searchedBlockTypes;
12585    const blockTypesListRef = (0, import_element27.useRef)(null);
12586    const hasResults = filteredBlockTypes.length > 0;
12587    (0, import_element27.useEffect)(() => {
12588      if (!filterValue && styleFilter === "all") {
12589        return;
12590      }
12591      const count = hasResults ? blockTypesListRef.current?.childElementCount || 0 : 0;
12592      const resultsFoundMessage = (0, import_i18n10.sprintf)(
12593        /* translators: %d: number of results. */
12594        (0, import_i18n10._n)("%d result found.", "%d results found.", count),
12595        count
12596      );
12597      debouncedSpeak(resultsFoundMessage, "polite");
12598    }, [filterValue, styleFilter, hasResults, debouncedSpeak]);
12599    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12600      "div",
12601      {
12602        ref: blockTypesListRef,
12603        className: "global-styles-ui-block-types-item-list",
12604        role: "list",
12605        children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12606          EmptyBlockList,
12607          {
12608            filterValue,
12609            styleFilter
12610          }
12611        ) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12612          BlockMenuItem,
12613          {
12614            block,
12615            isCustomized: customizedBlockNames.has(block.name)
12616          },
12617          "menu-itemblock-" + block.name
12618        ))
12619      }
12620    );
12621  }
12622  var MemoizedBlockList = (0, import_element27.memo)(BlockList);
12623  
12624  // packages/global-styles-ui/build-module/screen-block.mjs
12625  var import_blocks4 = __toESM(require_blocks(), 1);
12626  var import_block_editor5 = __toESM(require_block_editor(), 1);
12627  var import_element29 = __toESM(require_element(), 1);
12628  var import_data5 = __toESM(require_data(), 1);
12629  var import_core_data3 = __toESM(require_core_data(), 1);
12630  var import_components14 = __toESM(require_components(), 1);
12631  var import_i18n11 = __toESM(require_i18n(), 1);
12632  
12633  // packages/global-styles-ui/build-module/block-preview-panel.mjs
12634  var import_block_editor4 = __toESM(require_block_editor(), 1);
12635  var import_blocks3 = __toESM(require_blocks(), 1);
12636  var import_components12 = __toESM(require_components(), 1);
12637  var import_element28 = __toESM(require_element(), 1);
12638  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
12639  var { getViewportBreakpoints: getViewportBreakpoints3, getViewportBreakpointValueInPixels: getViewportBreakpointValueInPixels2 } = unlock3(
12640    privateApis
12641  );
12642  
12643  // packages/global-styles-ui/build-module/subtitle.mjs
12644  var import_components13 = __toESM(require_components(), 1);
12645  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
12646  function Subtitle({ children, level = 2 }) {
12647    return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components13.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children });
12648  }
12649  
12650  // packages/global-styles-ui/build-module/screen-block.mjs
12651  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
12652  var {
12653    useHasDimensionsPanel: useHasDimensionsPanel3,
12654    useHasTypographyPanel: useHasTypographyPanel3,
12655    useHasBorderPanel: useHasBorderPanel2,
12656    useSettingsForBlockElement: useSettingsForBlockElement3,
12657    useHasColorPanel: useHasColorPanel3,
12658    useHasFiltersPanel,
12659    useHasImageSettingsPanel,
12660    useHasBackgroundPanel: useHasBackgroundPanel3,
12661    BackgroundPanel: StylesBackgroundPanel,
12662    BorderPanel: StylesBorderPanel,
12663    ColorPanel: StylesColorPanel,
12664    TypographyPanel: StylesTypographyPanel,
12665    DimensionsPanel: StylesDimensionsPanel,
12666    FiltersPanel: StylesFiltersPanel,
12667    ImageSettingsPanel,
12668    AdvancedPanel: StylesAdvancedPanel
12669  } = unlock3(import_block_editor5.privateApis);
12670  
12671  // packages/global-styles-ui/build-module/screen-typography.mjs
12672  var import_i18n25 = __toESM(require_i18n(), 1);
12673  var import_components30 = __toESM(require_components(), 1);
12674  var import_element41 = __toESM(require_element(), 1);
12675  
12676  // packages/global-styles-ui/build-module/screen-body.mjs
12677  var import_components15 = __toESM(require_components(), 1);
12678  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
12679  
12680  // packages/global-styles-ui/build-module/typography-elements.mjs
12681  var import_i18n12 = __toESM(require_i18n(), 1);
12682  var import_components16 = __toESM(require_components(), 1);
12683  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
12684  
12685  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
12686  var import_components18 = __toESM(require_components(), 1);
12687  
12688  // packages/global-styles-ui/build-module/preview-typography.mjs
12689  var import_components17 = __toESM(require_components(), 1);
12690  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
12691  var StylesPreviewTypography = ({
12692    variation,
12693    isFocused,
12694    withHoverView
12695  }) => {
12696    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12697      preview_wrapper_default,
12698      {
12699        label: variation.title,
12700        isFocused,
12701        withHoverView,
12702        children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12703          import_components17.__experimentalHStack,
12704          {
12705            spacing: 10 * ratio,
12706            justify: "center",
12707            style: {
12708              height: "100%",
12709              overflow: "hidden"
12710            },
12711            children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12712              PreviewTypography,
12713              {
12714                variation,
12715                fontSize: 85 * ratio
12716              }
12717            )
12718          },
12719          key
12720        )
12721      }
12722    );
12723  };
12724  var preview_typography_default = StylesPreviewTypography;
12725  
12726  // packages/global-styles-ui/build-module/variations/variation.mjs
12727  var import_element30 = __toESM(require_element(), 1);
12728  var import_keycodes = __toESM(require_keycodes(), 1);
12729  var import_i18n13 = __toESM(require_i18n(), 1);
12730  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
12731  function Variation({
12732    variation,
12733    children,
12734    isPill = false,
12735    properties,
12736    showTooltip = false
12737  }) {
12738    const [isFocused, setIsFocused] = (0, import_element30.useState)(false);
12739    const {
12740      base,
12741      user,
12742      onChange: setUserConfig
12743    } = (0, import_element30.useContext)(GlobalStylesContext);
12744    const context = (0, import_element30.useMemo)(() => {
12745      let merged = mergeGlobalStyles(base, variation);
12746      if (properties) {
12747        merged = filterObjectByProperties(merged, properties);
12748      }
12749      return {
12750        user: variation,
12751        base,
12752        merged,
12753        onChange: () => {
12754        }
12755      };
12756    }, [variation, base, properties]);
12757    const selectVariation = () => setUserConfig(variation);
12758    const selectOnEnter = (event) => {
12759      if (event.keyCode === import_keycodes.ENTER) {
12760        event.preventDefault();
12761        selectVariation();
12762      }
12763    };
12764    const isActive = (0, import_element30.useMemo)(
12765      () => areGlobalStylesEqual(user, variation),
12766      [user, variation]
12767    );
12768    let label = variation?.title;
12769    if (variation?.description) {
12770      label = (0, import_i18n13.sprintf)(
12771        /* translators: 1: variation title. 2: variation description. */
12772        (0, import_i18n13._x)("%1$s (%2$s)", "variation label"),
12773        variation?.title,
12774        variation?.description
12775      );
12776    }
12777    const content = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12778      "div",
12779      {
12780        className: clsx_default("global-styles-ui-variations_item", {
12781          "is-active": isActive
12782        }),
12783        role: "button",
12784        onClick: selectVariation,
12785        onKeyDown: selectOnEnter,
12786        tabIndex: 0,
12787        "aria-label": label,
12788        "aria-current": isActive,
12789        onFocus: () => setIsFocused(true),
12790        onBlur: () => setIsFocused(false),
12791        children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12792          "div",
12793          {
12794            className: clsx_default("global-styles-ui-variations_item-preview", {
12795              "is-pill": isPill
12796            }),
12797            children: children(isFocused)
12798          }
12799        )
12800      }
12801    );
12802    return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(tooltip_exports.Root, { children: [
12803      /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(tooltip_exports.Trigger, { render: content }),
12804      /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(tooltip_exports.Popup, { children: variation?.title })
12805    ] }) : content });
12806  }
12807  
12808  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
12809  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
12810  var propertiesToFilter = ["typography"];
12811  function TypographyVariations({
12812    title,
12813    gap = 2
12814  }) {
12815    const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
12816    if (typographyVariations?.length <= 1) {
12817      return null;
12818    }
12819    return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_components18.__experimentalVStack, { spacing: 3, children: [
12820      title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Subtitle, { level: 3, children: title }),
12821      /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12822        import_components18.__experimentalGrid,
12823        {
12824          columns: 3,
12825          gap,
12826          className: "global-styles-ui-style-variations-container",
12827          children: typographyVariations.map(
12828            (variation, index2) => {
12829              return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12830                Variation,
12831                {
12832                  variation,
12833                  properties: propertiesToFilter,
12834                  showTooltip: true,
12835                  children: () => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12836                    preview_typography_default,
12837                    {
12838                      variation
12839                    }
12840                  )
12841                },
12842                index2
12843              );
12844            }
12845          )
12846        }
12847      )
12848    ] });
12849  }
12850  
12851  // packages/global-styles-ui/build-module/font-families.mjs
12852  var import_i18n23 = __toESM(require_i18n(), 1);
12853  var import_components28 = __toESM(require_components(), 1);
12854  var import_element40 = __toESM(require_element(), 1);
12855  
12856  // packages/global-styles-ui/build-module/font-library/context.mjs
12857  var import_element31 = __toESM(require_element(), 1);
12858  var import_data6 = __toESM(require_data(), 1);
12859  var import_core_data5 = __toESM(require_core_data(), 1);
12860  var import_i18n15 = __toESM(require_i18n(), 1);
12861  
12862  // packages/global-styles-ui/build-module/font-library/api.mjs
12863  var import_api_fetch = __toESM(require_api_fetch(), 1);
12864  var import_core_data4 = __toESM(require_core_data(), 1);
12865  var FONT_FAMILIES_URL = "/wp/v2/font-families";
12866  function invalidateFontFamilyCache(registry) {
12867    const { receiveEntityRecords } = registry.dispatch(import_core_data4.store);
12868    receiveEntityRecords(
12869      "postType",
12870      "wp_font_family",
12871      [],
12872      void 0,
12873      true
12874      // invalidateCache
12875    );
12876  }
12877  async function fetchInstallFontFamily(data, registry) {
12878    const config = {
12879      path: FONT_FAMILIES_URL,
12880      method: "POST",
12881      body: data
12882    };
12883    const response = await (0, import_api_fetch.default)(config);
12884    invalidateFontFamilyCache(registry);
12885    return {
12886      id: response.id,
12887      ...response.font_family_settings,
12888      fontFace: []
12889    };
12890  }
12891  async function fetchInstallFontFace(fontFamilyId, data, registry) {
12892    const config = {
12893      path: `$FONT_FAMILIES_URL}/$fontFamilyId}/font-faces`,
12894      method: "POST",
12895      body: data
12896    };
12897    const response = await (0, import_api_fetch.default)(config);
12898    invalidateFontFamilyCache(registry);
12899    return {
12900      id: response.id,
12901      ...response.font_face_settings
12902    };
12903  }
12904  
12905  // node_modules/tslib/tslib.es6.mjs
12906  var __assign = function() {
12907    __assign = Object.assign || function __assign2(t2) {
12908      for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
12909        s2 = arguments[i2];
12910        for (var p3 in s2) if (Object.prototype.hasOwnProperty.call(s2, p3)) t2[p3] = s2[p3];
12911      }
12912      return t2;
12913    };
12914    return __assign.apply(this, arguments);
12915  };
12916  
12917  // node_modules/lower-case/dist.es2015/index.js
12918  function lowerCase(str) {
12919    return str.toLowerCase();
12920  }
12921  
12922  // node_modules/no-case/dist.es2015/index.js
12923  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
12924  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
12925  function noCase(input, options) {
12926    if (options === void 0) {
12927      options = {};
12928    }
12929    var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
12930    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
12931    var start = 0;
12932    var end = result.length;
12933    while (result.charAt(start) === "\0")
12934      start++;
12935    while (result.charAt(end - 1) === "\0")
12936      end--;
12937    return result.slice(start, end).split("\0").map(transform).join(delimiter);
12938  }
12939  function replace(input, re, value) {
12940    if (re instanceof RegExp)
12941      return input.replace(re, value);
12942    return re.reduce(function(input2, re2) {
12943      return input2.replace(re2, value);
12944    }, input);
12945  }
12946  
12947  // node_modules/dot-case/dist.es2015/index.js
12948  function dotCase(input, options) {
12949    if (options === void 0) {
12950      options = {};
12951    }
12952    return noCase(input, __assign({ delimiter: "." }, options));
12953  }
12954  
12955  // node_modules/param-case/dist.es2015/index.js
12956  function paramCase(input, options) {
12957    if (options === void 0) {
12958      options = {};
12959    }
12960    return dotCase(input, __assign({ delimiter: "-" }, options));
12961  }
12962  
12963  // packages/kebab-case/build-module/index.mjs
12964  function kebabCase(str) {
12965    let input = str?.toString?.() ?? "";
12966    input = input.replace(/['\u2019]/, "");
12967    return paramCase(input, {
12968      splitRegexp: [
12969        /(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
12970        // fooBar => foo-bar, 3Bar => 3-bar
12971        /(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
12972        // 3bar => 3-bar
12973        /([A-Za-z])([0-9])/g,
12974        // Foo3 => foo-3, foo3 => foo-3
12975        /([A-Z])([A-Z][a-z])/g
12976        // FOOBar => foo-bar
12977      ]
12978    });
12979  }
12980  
12981  // packages/global-styles-ui/build-module/font-library/utils/constants.mjs
12982  var import_i18n14 = __toESM(require_i18n(), 1);
12983  var ALLOWED_FILE_EXTENSIONS = ["otf", "ttf", "woff", "woff2"];
12984  var FONT_WEIGHTS = {
12985    100: (0, import_i18n14._x)("Thin", "font weight"),
12986    200: (0, import_i18n14._x)("Extra-light", "font weight"),
12987    300: (0, import_i18n14._x)("Light", "font weight"),
12988    400: (0, import_i18n14._x)("Normal", "font weight"),
12989    500: (0, import_i18n14._x)("Medium", "font weight"),
12990    600: (0, import_i18n14._x)("Semi-bold", "font weight"),
12991    700: (0, import_i18n14._x)("Bold", "font weight"),
12992    800: (0, import_i18n14._x)("Extra-bold", "font weight"),
12993    900: (0, import_i18n14._x)("Black", "font weight")
12994  };
12995  var FONT_STYLES = {
12996    normal: (0, import_i18n14._x)("Normal", "font style"),
12997    italic: (0, import_i18n14._x)("Italic", "font style")
12998  };
12999  
13000  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
13001  var { File } = window;
13002  function setUIValuesNeeded(font2, extraValues = {}) {
13003    if (!font2.name && (font2.fontFamily || font2.slug)) {
13004      font2.name = font2.fontFamily || font2.slug;
13005    }
13006    return {
13007      ...font2,
13008      ...extraValues
13009    };
13010  }
13011  function isUrlEncoded(url) {
13012    if (typeof url !== "string") {
13013      return false;
13014    }
13015    return url !== decodeURIComponent(url);
13016  }
13017  function getFontFaceVariantName(face) {
13018    const weightName = FONT_WEIGHTS[face.fontWeight ?? ""] || face.fontWeight;
13019    const styleName = face.fontStyle === "normal" ? "" : FONT_STYLES[face.fontStyle ?? ""] || face.fontStyle;
13020    return `$weightName} $styleName}`;
13021  }
13022  function mergeFontFaces(existing = [], incoming = []) {
13023    const map = /* @__PURE__ */ new Map();
13024    for (const face of existing) {
13025      map.set(`$face.fontWeight}$face.fontStyle}`, face);
13026    }
13027    for (const face of incoming) {
13028      map.set(`$face.fontWeight}$face.fontStyle}`, face);
13029    }
13030    return Array.from(map.values());
13031  }
13032  function mergeFontFamilies(existing = [], incoming = []) {
13033    const map = /* @__PURE__ */ new Map();
13034    for (const font2 of existing) {
13035      map.set(font2.slug, { ...font2 });
13036    }
13037    for (const font2 of incoming) {
13038      if (map.has(font2.slug)) {
13039        const { fontFace: incomingFontFaces, ...restIncoming } = font2;
13040        const existingFont = map.get(font2.slug);
13041        const mergedFontFaces = mergeFontFaces(
13042          existingFont.fontFace,
13043          incomingFontFaces
13044        );
13045        map.set(font2.slug, {
13046          ...restIncoming,
13047          fontFace: mergedFontFaces
13048        });
13049      } else {
13050        map.set(font2.slug, { ...font2 });
13051      }
13052    }
13053    return Array.from(map.values());
13054  }
13055  async function loadFontFaceInBrowser(fontFace, source, addTo = "all") {
13056    let dataSource;
13057    if (typeof source === "string") {
13058      dataSource = `url($source})`;
13059    } else if (source instanceof File) {
13060      dataSource = await source.arrayBuffer();
13061    } else {
13062      return;
13063    }
13064    const newFont = new window.FontFace(
13065      formatFontFaceName(fontFace.fontFamily),
13066      dataSource,
13067      {
13068        style: fontFace.fontStyle,
13069        weight: String(fontFace.fontWeight)
13070      }
13071    );
13072    const loadedFace = await newFont.load();
13073    if (addTo === "document" || addTo === "all") {
13074      document.fonts.add(loadedFace);
13075    }
13076    if (addTo === "iframe" || addTo === "all") {
13077      const iframe = document.querySelector(
13078        'iframe[name="editor-canvas"]'
13079      );
13080      if (iframe?.contentDocument) {
13081        iframe.contentDocument.fonts.add(loadedFace);
13082      }
13083    }
13084  }
13085  function unloadFontFaceInBrowser(fontFace, removeFrom = "all") {
13086    const unloadFontFace = (fonts) => {
13087      fonts.forEach((f2) => {
13088        if (f2.family === formatFontFaceName(fontFace?.fontFamily) && f2.weight === fontFace?.fontWeight && f2.style === fontFace?.fontStyle) {
13089          fonts.delete(f2);
13090        }
13091      });
13092    };
13093    if (removeFrom === "document" || removeFrom === "all") {
13094      unloadFontFace(document.fonts);
13095    }
13096    if (removeFrom === "iframe" || removeFrom === "all") {
13097      const iframe = document.querySelector(
13098        'iframe[name="editor-canvas"]'
13099      );
13100      if (iframe?.contentDocument) {
13101        unloadFontFace(iframe.contentDocument.fonts);
13102      }
13103    }
13104  }
13105  function getDisplaySrcFromFontFace(input) {
13106    if (!input) {
13107      return;
13108    }
13109    let src;
13110    if (Array.isArray(input)) {
13111      src = input[0];
13112    } else {
13113      src = input;
13114    }
13115    if (src.startsWith("file:.")) {
13116      return;
13117    }
13118    if (!isUrlEncoded(src)) {
13119      src = encodeURI(src);
13120    }
13121    return src;
13122  }
13123  function makeFontFamilyFormData(fontFamily) {
13124    const formData = new FormData();
13125    const { fontFace, category, ...familyWithValidParameters } = fontFamily;
13126    const fontFamilySettings = {
13127      ...familyWithValidParameters,
13128      slug: kebabCase(fontFamily.slug)
13129    };
13130    formData.append(
13131      "font_family_settings",
13132      JSON.stringify(fontFamilySettings)
13133    );
13134    return formData;
13135  }
13136  function makeFontFacesFormData(font2) {
13137    const fontFacesFormData = (font2?.fontFace ?? []).map(
13138      (item, faceIndex) => {
13139        const face = { ...item };
13140        const formData = new FormData();
13141        if (face.file) {
13142          const files = Array.isArray(face.file) ? face.file : [face.file];
13143          const src = [];
13144          files.forEach((file, key) => {
13145            const fileId = `file-$faceIndex}-$key}`;
13146            formData.append(fileId, file, file.name);
13147            src.push(fileId);
13148          });
13149          face.src = src.length === 1 ? src[0] : src;
13150          delete face.file;
13151          formData.append("font_face_settings", JSON.stringify(face));
13152        } else {
13153          formData.append("font_face_settings", JSON.stringify(face));
13154        }
13155        return formData;
13156      }
13157    );
13158    return fontFacesFormData;
13159  }
13160  async function batchInstallFontFaces(fontFamilyId, fontFacesData, registry) {
13161    const responses = [];
13162    for (const faceData of fontFacesData) {
13163      try {
13164        const response = await fetchInstallFontFace(
13165          fontFamilyId,
13166          faceData,
13167          registry
13168        );
13169        responses.push({ status: "fulfilled", value: response });
13170      } catch (error) {
13171        responses.push({ status: "rejected", reason: error });
13172      }
13173    }
13174    const results = {
13175      errors: [],
13176      successes: []
13177    };
13178    responses.forEach((result, index2) => {
13179      if (result.status === "fulfilled" && result.value) {
13180        const response = result.value;
13181        results.successes.push(response);
13182      } else if (result.reason) {
13183        results.errors.push({
13184          data: fontFacesData[index2],
13185          message: result.reason.message
13186        });
13187      }
13188    });
13189    return results;
13190  }
13191  async function downloadFontFaceAssets(src) {
13192    src = Array.isArray(src) ? src : [src];
13193    const files = await Promise.all(
13194      src.map(async (url) => {
13195        return fetch(new Request(url)).then((response) => {
13196          if (!response.ok) {
13197            throw new Error(
13198              `Error downloading font face asset from $url}. Server responded with status: $response.status}`
13199            );
13200          }
13201          return response.blob();
13202        }).then((blob) => {
13203          const filename = url.split("/").pop();
13204          const file = new File([blob], filename, {
13205            type: blob.type
13206          });
13207          return file;
13208        });
13209      })
13210    );
13211    return files.length === 1 ? files[0] : files;
13212  }
13213  function checkFontFaceInstalled(fontFace, collection) {
13214    return -1 !== collection.findIndex((collectionFontFace) => {
13215      return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle;
13216    });
13217  }
13218  
13219  // packages/global-styles-ui/build-module/font-library/utils/set-immutably.mjs
13220  function setImmutably2(object, path, value) {
13221    path = Array.isArray(path) ? [...path] : [path];
13222    object = Array.isArray(object) ? [...object] : { ...object };
13223    const leaf = path.pop();
13224    let prev = object;
13225    for (const key of path) {
13226      const lvl = prev[key];
13227      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
13228    }
13229    prev[leaf] = value;
13230    return object;
13231  }
13232  
13233  // packages/global-styles-ui/build-module/font-library/utils/toggleFont.mjs
13234  function toggleFont(font2, face, initialfonts = []) {
13235    const isFontActivated = (f2) => f2.slug === font2.slug;
13236    const getActivatedFont = (fonts) => fonts.find(isFontActivated);
13237    const toggleEntireFontFamily = (activatedFont2) => {
13238      if (!activatedFont2) {
13239        return [...initialfonts, font2];
13240      }
13241      return initialfonts.filter(
13242        (f2) => !isFontActivated(f2)
13243      );
13244    };
13245    const toggleFontVariant = (activatedFont2) => {
13246      const isFaceActivated = (f2) => f2.fontWeight === face.fontWeight && f2.fontStyle === face.fontStyle;
13247      if (!activatedFont2) {
13248        return [...initialfonts, { ...font2, fontFace: [face] }];
13249      }
13250      let newFontFaces = activatedFont2.fontFace || [];
13251      if (newFontFaces.find(isFaceActivated)) {
13252        newFontFaces = newFontFaces.filter(
13253          (f2) => !isFaceActivated(f2)
13254        );
13255      } else {
13256        newFontFaces = [...newFontFaces, face];
13257      }
13258      if (newFontFaces.length === 0) {
13259        return initialfonts.filter(
13260          (f2) => !isFontActivated(f2)
13261        );
13262      }
13263      return initialfonts.map(
13264        (f2) => isFontActivated(f2) ? { ...f2, fontFace: newFontFaces } : f2
13265      );
13266    };
13267    const activatedFont = getActivatedFont(initialfonts);
13268    if (!face) {
13269      return toggleEntireFontFamily(activatedFont);
13270    }
13271    return toggleFontVariant(activatedFont);
13272  }
13273  
13274  // packages/global-styles-ui/build-module/font-library/context.mjs
13275  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
13276  var FontLibraryContext = (0, import_element31.createContext)(
13277    {}
13278  );
13279  FontLibraryContext.displayName = "FontLibraryContext";
13280  function FontLibraryProvider({ children }) {
13281    const registry = (0, import_data6.useRegistry)();
13282    const { saveEntityRecord, deleteEntityRecord } = (0, import_data6.useDispatch)(import_core_data5.store);
13283    const { globalStylesId } = (0, import_data6.useSelect)((select) => {
13284      const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data5.store);
13285      return { globalStylesId: __experimentalGetCurrentGlobalStylesId() };
13286    }, []);
13287    const globalStyles = (0, import_core_data5.useEntityRecord)(
13288      "root",
13289      "globalStyles",
13290      globalStylesId ?? 0,
13291      { enabled: globalStylesId !== void 0 }
13292    );
13293    const [isInstalling, setIsInstalling] = (0, import_element31.useState)(false);
13294    const { records: libraryPosts = [], isResolving: isResolvingLibrary } = (0, import_core_data5.useEntityRecords)(
13295      "postType",
13296      "wp_font_family",
13297      {
13298        _embed: true
13299      }
13300    );
13301    const libraryFonts = (libraryPosts || []).map((fontFamilyPost) => {
13302      return {
13303        id: fontFamilyPost.id,
13304        ...fontFamilyPost.font_family_settings || {},
13305        fontFace: fontFamilyPost?._embedded?.font_faces?.map(
13306          (face) => face.font_face_settings
13307        ) || []
13308      };
13309    }) || [];
13310    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
13311    const saveFontFamilies = async (fonts) => {
13312      if (!globalStyles.record) {
13313        return;
13314      }
13315      const updatedGlobalStyles = globalStyles.record;
13316      const finalGlobalStyles = setImmutably2(
13317        updatedGlobalStyles ?? {},
13318        ["settings", "typography", "fontFamilies"],
13319        fonts
13320      );
13321      await saveEntityRecord("root", "globalStyles", finalGlobalStyles);
13322    };
13323    const [modalTabOpen, setModalTabOpen] = (0, import_element31.useState)("");
13324    const [libraryFontSelected, setLibraryFontSelected] = (0, import_element31.useState)(void 0);
13325    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : [];
13326    const customFonts = fontFamilies?.custom ? fontFamilies.custom.map((f2) => setUIValuesNeeded(f2, { source: "custom" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : [];
13327    const baseCustomFonts = libraryFonts ? libraryFonts.map((f2) => setUIValuesNeeded(f2, { source: "custom" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : [];
13328    (0, import_element31.useEffect)(() => {
13329      if (!modalTabOpen) {
13330        setLibraryFontSelected(void 0);
13331      }
13332    }, [modalTabOpen]);
13333    const handleSetLibraryFontSelected = (font2) => {
13334      if (!font2) {
13335        setLibraryFontSelected(void 0);
13336        return;
13337      }
13338      const fonts = font2.source === "theme" ? themeFonts : baseCustomFonts;
13339      const fontSelected = fonts.find((f2) => f2.slug === font2.slug);
13340      setLibraryFontSelected({
13341        ...fontSelected || font2,
13342        source: font2.source
13343      });
13344    };
13345    const [loadedFontUrls] = (0, import_element31.useState)(/* @__PURE__ */ new Set());
13346    const getAvailableFontsOutline = (availableFontFamilies) => {
13347      const outline = availableFontFamilies.reduce(
13348        (acc, font2) => {
13349          const availableFontFaces = font2?.fontFace && font2.fontFace?.length > 0 ? font2?.fontFace.map(
13350            (face) => `$face.fontStyle ?? ""}$face.fontWeight ?? ""}`
13351          ) : ["normal400"];
13352          acc[font2.slug] = availableFontFaces;
13353          return acc;
13354        },
13355        {}
13356      );
13357      return outline;
13358    };
13359    const getActivatedFontsOutline = (source) => {
13360      switch (source) {
13361        case "theme":
13362          return getAvailableFontsOutline(themeFonts);
13363        case "custom":
13364        default:
13365          return getAvailableFontsOutline(customFonts);
13366      }
13367    };
13368    const isFontActivated = (slug, style, weight, source) => {
13369      if (!style && !weight) {
13370        return !!getActivatedFontsOutline(source)[slug];
13371      }
13372      return !!getActivatedFontsOutline(source)[slug]?.includes(
13373        (style ?? "") + (weight ?? "")
13374      );
13375    };
13376    const getFontFacesActivated = (slug, source) => {
13377      return getActivatedFontsOutline(source)[slug] || [];
13378    };
13379    async function installFonts(fontFamiliesToInstall) {
13380      setIsInstalling(true);
13381      try {
13382        const fontFamiliesToActivate = [];
13383        let installationErrors = [];
13384        for (const fontFamilyToInstall of fontFamiliesToInstall) {
13385          let isANewFontFamily = false;
13386          const fontFamilyRecords = await (0, import_data6.resolveSelect)(
13387            import_core_data5.store
13388          ).getEntityRecords(
13389            "postType",
13390            "wp_font_family",
13391            {
13392              slug: fontFamilyToInstall.slug,
13393              per_page: 1,
13394              _embed: true
13395            }
13396          );
13397          const fontFamilyPost = fontFamilyRecords && fontFamilyRecords.length > 0 ? fontFamilyRecords[0] : null;
13398          let installedFontFamily = fontFamilyPost ? {
13399            id: fontFamilyPost.id,
13400            ...fontFamilyPost.font_family_settings,
13401            fontFace: (fontFamilyPost?._embedded?.font_faces ?? []).map(
13402              (face) => face.font_face_settings
13403            ) || []
13404          } : null;
13405          if (!installedFontFamily) {
13406            isANewFontFamily = true;
13407            installedFontFamily = await fetchInstallFontFamily(
13408              makeFontFamilyFormData(fontFamilyToInstall),
13409              registry
13410            );
13411          }
13412          const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter(
13413            (fontFaceToInstall) => fontFaceToInstall && fontFamilyToInstall.fontFace && checkFontFaceInstalled(
13414              fontFaceToInstall,
13415              fontFamilyToInstall.fontFace
13416            )
13417          ) : [];
13418          if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) {
13419            fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter(
13420              (fontFaceToInstall) => !checkFontFaceInstalled(
13421                fontFaceToInstall,
13422                installedFontFamily.fontFace
13423              )
13424            );
13425          }
13426          let successfullyInstalledFontFaces = [];
13427          let unsuccessfullyInstalledFontFaces = [];
13428          if (fontFamilyToInstall?.fontFace?.length ?? 0 > 0) {
13429            const response = await batchInstallFontFaces(
13430              // @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string.
13431              installedFontFamily.id,
13432              makeFontFacesFormData(
13433                fontFamilyToInstall
13434              ),
13435              registry
13436            );
13437            successfullyInstalledFontFaces = response?.successes;
13438            unsuccessfullyInstalledFontFaces = response?.errors;
13439          }
13440          if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) {
13441            installedFontFamily.fontFace = [
13442              ...successfullyInstalledFontFaces
13443            ];
13444            fontFamiliesToActivate.push(installedFontFamily);
13445          }
13446          if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) {
13447            fontFamiliesToActivate.push(installedFontFamily);
13448          }
13449          if (isANewFontFamily && (fontFamilyToInstall?.fontFace?.length ?? 0) > 0 && successfullyInstalledFontFaces?.length === 0) {
13450            await deleteEntityRecord(
13451              "postType",
13452              "wp_font_family",
13453              installedFontFamily.id,
13454              { force: true }
13455            );
13456          }
13457          installationErrors = installationErrors.concat(
13458            unsuccessfullyInstalledFontFaces
13459          );
13460        }
13461        const installationErrorMessages = installationErrors.reduce(
13462          (unique, item) => unique.includes(item.message) ? unique : [...unique, item.message],
13463          []
13464        );
13465        if (fontFamiliesToActivate.length > 0) {
13466          const activeFonts = activateCustomFontFamilies(
13467            // @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined.
13468            fontFamiliesToActivate
13469          );
13470          await saveFontFamilies(activeFonts);
13471        }
13472        if (installationErrorMessages.length > 0) {
13473          const installError = new Error((0, import_i18n15.__)("There was an error installing fonts."));
13474          installError.installationErrors = installationErrorMessages;
13475          throw installError;
13476        }
13477      } finally {
13478        setIsInstalling(false);
13479      }
13480    }
13481    async function uninstallFontFamily(fontFamilyToUninstall) {
13482      if (!fontFamilyToUninstall?.id) {
13483        throw new Error((0, import_i18n15.__)("Font family to uninstall is not defined."));
13484      }
13485      try {
13486        await deleteEntityRecord(
13487          "postType",
13488          "wp_font_family",
13489          fontFamilyToUninstall.id,
13490          { force: true }
13491        );
13492        const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
13493        await saveFontFamilies(activeFonts);
13494        return { deleted: true };
13495      } catch (error) {
13496        console.error(
13497          `There was an error uninstalling the font family:`,
13498          error
13499        );
13500        throw error;
13501      }
13502    }
13503    const deactivateFontFamily = (font2) => {
13504      const initialCustomFonts = fontFamilies?.[font2.source ?? ""] ?? [];
13505      const newCustomFonts = initialCustomFonts.filter(
13506        (f2) => f2.slug !== font2.slug
13507      );
13508      const activeFonts = {
13509        ...fontFamilies,
13510        [font2.source ?? ""]: newCustomFonts
13511      };
13512      setFontFamilies(activeFonts);
13513      if (font2.fontFace) {
13514        font2.fontFace.forEach((face) => {
13515          unloadFontFaceInBrowser(face, "all");
13516        });
13517      }
13518      return activeFonts;
13519    };
13520    const activateCustomFontFamilies = (fontsToAdd) => {
13521      const fontsToActivate = cleanFontsForSave(fontsToAdd);
13522      const activeFonts = {
13523        ...fontFamilies,
13524        // Merge the existing custom fonts with the new fonts.
13525        custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
13526      };
13527      setFontFamilies(activeFonts);
13528      loadFontsInBrowser(fontsToActivate);
13529      return activeFonts;
13530    };
13531    const cleanFontsForSave = (fonts) => {
13532      return fonts.map(({ id: _familyDbId, fontFace, ...font2 }) => ({
13533        ...font2,
13534        ...fontFace && fontFace.length > 0 ? {
13535          fontFace: fontFace.map(
13536            ({ id: _faceDbId, ...face }) => face
13537          )
13538        } : {}
13539      }));
13540    };
13541    const loadFontsInBrowser = (fonts) => {
13542      fonts.forEach((font2) => {
13543        if (font2.fontFace) {
13544          font2.fontFace.forEach((face) => {
13545            const displaySrc = getDisplaySrcFromFontFace(
13546              face?.src ?? ""
13547            );
13548            if (displaySrc) {
13549              loadFontFaceInBrowser(face, displaySrc, "all");
13550            }
13551          });
13552        }
13553      });
13554    };
13555    const toggleActivateFont = (font2, face) => {
13556      const initialFonts = fontFamilies?.[font2.source ?? ""] ?? [];
13557      const newFonts = toggleFont(font2, face, initialFonts);
13558      setFontFamilies({
13559        ...fontFamilies,
13560        [font2.source ?? ""]: newFonts
13561      });
13562      const isFaceActivated = isFontActivated(
13563        font2.slug,
13564        face?.fontStyle ?? "",
13565        face?.fontWeight ?? "",
13566        font2.source ?? "custom"
13567      );
13568      if (face && isFaceActivated) {
13569        unloadFontFaceInBrowser(face, "all");
13570      } else {
13571        const displaySrc = getDisplaySrcFromFontFace(face?.src ?? "");
13572        if (face && displaySrc) {
13573          loadFontFaceInBrowser(face, displaySrc, "all");
13574        }
13575      }
13576    };
13577    const loadFontFaceAsset = async (fontFace) => {
13578      if (!fontFace.src) {
13579        return;
13580      }
13581      const src = getDisplaySrcFromFontFace(fontFace.src);
13582      if (!src || loadedFontUrls.has(src)) {
13583        return;
13584      }
13585      loadFontFaceInBrowser(fontFace, src, "document");
13586      loadedFontUrls.add(src);
13587    };
13588    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13589      FontLibraryContext.Provider,
13590      {
13591        value: {
13592          libraryFontSelected,
13593          handleSetLibraryFontSelected,
13594          fontFamilies: fontFamilies ?? {},
13595          baseCustomFonts,
13596          isFontActivated,
13597          getFontFacesActivated,
13598          loadFontFaceAsset,
13599          installFonts,
13600          uninstallFontFamily,
13601          toggleActivateFont,
13602          getAvailableFontsOutline,
13603          modalTabOpen,
13604          setModalTabOpen,
13605          saveFontFamilies,
13606          isResolvingLibrary,
13607          isInstalling
13608        },
13609        children
13610      }
13611    );
13612  }
13613  var context_default = FontLibraryProvider;
13614  
13615  // packages/global-styles-ui/build-module/font-library/modal.mjs
13616  var import_i18n21 = __toESM(require_i18n(), 1);
13617  var import_components26 = __toESM(require_components(), 1);
13618  var import_core_data8 = __toESM(require_core_data(), 1);
13619  var import_data8 = __toESM(require_data(), 1);
13620  
13621  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
13622  var import_components21 = __toESM(require_components(), 1);
13623  var import_core_data6 = __toESM(require_core_data(), 1);
13624  var import_data7 = __toESM(require_data(), 1);
13625  var import_element35 = __toESM(require_element(), 1);
13626  var import_i18n17 = __toESM(require_i18n(), 1);
13627  
13628  // packages/global-styles-ui/build-module/font-library/font-card.mjs
13629  var import_i18n16 = __toESM(require_i18n(), 1);
13630  var import_element33 = __toESM(require_element(), 1);
13631  var import_components19 = __toESM(require_components(), 1);
13632  
13633  // packages/global-styles-ui/build-module/font-library/font-demo.mjs
13634  var import_element32 = __toESM(require_element(), 1);
13635  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
13636  var loadedPreviews = /* @__PURE__ */ new Set();
13637  function getPreviewUrl(fontFace) {
13638    if (fontFace.preview) {
13639      return fontFace.preview;
13640    }
13641    if (fontFace.src) {
13642      return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src;
13643    }
13644    return void 0;
13645  }
13646  function getDisplayFontFace(font2) {
13647    if ("fontStyle" in font2 && font2.fontStyle || "fontWeight" in font2 && font2.fontWeight) {
13648      return font2;
13649    }
13650    if ("fontFace" in font2 && font2.fontFace && font2.fontFace.length) {
13651      return font2.fontFace.find(
13652        (face) => face.fontStyle === "normal" && face.fontWeight === "400"
13653      ) || font2.fontFace[0];
13654    }
13655    return {
13656      fontStyle: "normal",
13657      fontWeight: "400",
13658      fontFamily: font2.fontFamily
13659    };
13660  }
13661  function FontDemo({ font: font2, text }) {
13662    const ref = (0, import_element32.useRef)(null);
13663    const fontFace = getDisplayFontFace(font2);
13664    const style = getFamilyPreviewStyle(font2);
13665    text = text || ("name" in font2 ? font2.name : "");
13666    const customPreviewUrl = font2.preview;
13667    const previewUrl = customPreviewUrl ?? getPreviewUrl(fontFace);
13668    const isPreviewImage = Boolean(
13669      previewUrl && /\.(png|jpg|jpeg|gif|svg)$/i.test(previewUrl)
13670    );
13671    const [isIntersecting, setIsIntersecting] = (0, import_element32.useState)(false);
13672    const [isFontLoaded, setIsFontLoaded] = (0, import_element32.useState)(false);
13673    const [resolvedUrl, setResolvedUrl] = (0, import_element32.useState)();
13674    const { loadFontFaceAsset } = (0, import_element32.useContext)(FontLibraryContext);
13675    const isAssetLoaded = isPreviewImage ? !!previewUrl && (loadedPreviews.has(previewUrl) || resolvedUrl === previewUrl) : isFontLoaded;
13676    const estimatedImageWidth = Math.min(
13677      Math.max(text.length * 12, 48),
13678      300
13679    );
13680    const faceStyles = getFacePreviewStyle(fontFace);
13681    const textDemoStyle = {
13682      fontSize: "18px",
13683      lineHeight: 1,
13684      opacity: isAssetLoaded ? "1" : "0",
13685      ...style,
13686      ...faceStyles
13687    };
13688    (0, import_element32.useEffect)(() => {
13689      if (isPreviewImage) {
13690        return;
13691      }
13692      const observer = new window.IntersectionObserver(([entry]) => {
13693        setIsIntersecting(entry.isIntersecting);
13694      }, {});
13695      if (ref.current) {
13696        observer.observe(ref.current);
13697      }
13698      return () => observer.disconnect();
13699    }, [isPreviewImage]);
13700    (0, import_element32.useEffect)(() => {
13701      const loadAsset = async () => {
13702        if (isIntersecting && !isPreviewImage) {
13703          if (fontFace.src) {
13704            await loadFontFaceAsset(fontFace);
13705          }
13706          setIsFontLoaded(true);
13707        }
13708      };
13709      loadAsset();
13710    }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]);
13711    return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref, className: "font-library__font-demo", children: isPreviewImage ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
13712      !isAssetLoaded && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13713        Skeleton,
13714        {
13715          className: "font-library__font-variant-demo-skeleton",
13716          style: { width: estimatedImageWidth }
13717        }
13718      ),
13719      /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13720        "img",
13721        {
13722          src: previewUrl,
13723          loading: "lazy",
13724          alt: text,
13725          onLoad: () => {
13726            if (previewUrl) {
13727              loadedPreviews.add(previewUrl);
13728            }
13729            setResolvedUrl(previewUrl);
13730          },
13731          onError: () => setResolvedUrl(previewUrl),
13732          className: clsx_default(
13733            "font-library__font-variant_demo-image",
13734            { "is-loading": !isAssetLoaded }
13735          )
13736        }
13737      )
13738    ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13739      "span",
13740      {
13741        style: textDemoStyle,
13742        className: "font-library__font-variant_demo-text",
13743        children: text
13744      }
13745    ) });
13746  }
13747  var font_demo_default = FontDemo;
13748  
13749  // packages/global-styles-ui/build-module/font-library/font-card.mjs
13750  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
13751  function FontCard({
13752    font: font2,
13753    onClick,
13754    variantsText,
13755    navigatorPath,
13756    shouldFocus
13757  }) {
13758    const variantsCount = font2.fontFace?.length || 1;
13759    const style = {
13760      cursor: !!onClick ? "pointer" : "default"
13761    };
13762    const navigator2 = (0, import_components19.useNavigator)();
13763    const ref = (0, import_element33.useRef)(null);
13764    (0, import_element33.useEffect)(() => {
13765      if (shouldFocus) {
13766        ref.current?.focus();
13767      }
13768    }, [shouldFocus]);
13769    return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13770      import_components19.Button,
13771      {
13772        ref,
13773        __next40pxDefaultSize: true,
13774        onClick: () => {
13775          onClick();
13776          if (navigatorPath) {
13777            navigator2.goTo(navigatorPath);
13778          }
13779        },
13780        style,
13781        className: "font-library__font-card",
13782        children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_components19.Flex, { justify: "space-between", wrap: false, children: [
13783          /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(font_demo_default, { font: font2 }),
13784          /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_components19.Flex, { justify: "flex-end", children: [
13785            /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.__experimentalText, { className: "font-library__font-card__count", children: variantsText || (0, import_i18n16.sprintf)(
13786              /* translators: %d: Number of font variants. */
13787              (0, import_i18n16._n)(
13788                "%d variant",
13789                "%d variants",
13790                variantsCount
13791              ),
13792              variantsCount
13793            ) }) }),
13794            /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(icon_default, { icon: (0, import_i18n16.isRTL)() ? chevron_left_default : chevron_right_default }) })
13795          ] })
13796        ] })
13797      }
13798    );
13799  }
13800  var font_card_default = FontCard;
13801  
13802  // packages/global-styles-ui/build-module/font-library/library-font-variant.mjs
13803  var import_element34 = __toESM(require_element(), 1);
13804  var import_components20 = __toESM(require_components(), 1);
13805  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
13806  function LibraryFontVariant({
13807    face,
13808    font: font2
13809  }) {
13810    const { isFontActivated, toggleActivateFont } = (0, import_element34.useContext)(FontLibraryContext);
13811    const isInstalled = (font2?.fontFace?.length ?? 0) > 0 ? isFontActivated(
13812      font2.slug,
13813      face.fontStyle,
13814      face.fontWeight,
13815      font2.source
13816    ) : isFontActivated(font2.slug, void 0, void 0, font2.source);
13817    const handleToggleActivation = () => {
13818      if ((font2?.fontFace?.length ?? 0) > 0) {
13819        toggleActivateFont(font2, face);
13820        return;
13821      }
13822      toggleActivateFont(font2);
13823    };
13824    const displayName = font2.name + " " + getFontFaceVariantName(face);
13825    const checkboxId = (0, import_element34.useId)();
13826    return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_components20.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
13827      /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13828        import_components20.CheckboxControl,
13829        {
13830          checked: isInstalled,
13831          onChange: handleToggleActivation,
13832          id: checkboxId
13833        }
13834      ),
13835      /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13836        font_demo_default,
13837        {
13838          font: face,
13839          text: displayName,
13840          onClick: handleToggleActivation
13841        }
13842      ) })
13843    ] }) });
13844  }
13845  var library_font_variant_default = LibraryFontVariant;
13846  
13847  // packages/global-styles-ui/build-module/font-library/utils/sort-font-faces.mjs
13848  function getNumericFontWeight(value) {
13849    switch (value) {
13850      case "normal":
13851        return 400;
13852      case "bold":
13853        return 700;
13854      case "bolder":
13855        return 500;
13856      case "lighter":
13857        return 300;
13858      default:
13859        return parseInt(value, 10);
13860    }
13861  }
13862  function sortFontFaces(faces) {
13863    return faces.sort((a2, b2) => {
13864      if (a2.fontStyle === "normal" && b2.fontStyle !== "normal") {
13865        return -1;
13866      }
13867      if (b2.fontStyle === "normal" && a2.fontStyle !== "normal") {
13868        return 1;
13869      }
13870      if (a2.fontStyle === b2.fontStyle) {
13871        return getNumericFontWeight(a2.fontWeight?.toString() ?? "normal") - getNumericFontWeight(b2.fontWeight?.toString() ?? "normal");
13872      }
13873      if (!a2.fontStyle || !b2.fontStyle) {
13874        return !a2.fontStyle ? 1 : -1;
13875      }
13876      return a2.fontStyle.localeCompare(b2.fontStyle);
13877    });
13878  }
13879  
13880  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
13881  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
13882  function getFontFamiliesKey(fontFamilies) {
13883    if (!fontFamilies) {
13884      return "";
13885    }
13886    const normalized = {};
13887    for (const source of Object.keys(fontFamilies).sort()) {
13888      normalized[source] = (fontFamilies[source] ?? []).map((family) => ({
13889        slug: family.slug,
13890        fontFace: (family.fontFace ?? []).map(
13891          (face) => `$face.fontStyle}-$face.fontWeight}`
13892        ).sort()
13893      })).sort((a2, b2) => a2.slug.localeCompare(b2.slug));
13894    }
13895    return JSON.stringify(normalized);
13896  }
13897  function InstalledFonts() {
13898    const {
13899      baseCustomFonts,
13900      libraryFontSelected,
13901      handleSetLibraryFontSelected,
13902      uninstallFontFamily,
13903      isResolvingLibrary,
13904      isInstalling,
13905      saveFontFamilies,
13906      getFontFacesActivated
13907    } = (0, import_element35.useContext)(FontLibraryContext);
13908    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
13909    const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element35.useState)(void 0);
13910    const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0, import_element35.useState)(false);
13911    const [notice, setNotice] = (0, import_element35.useState)(null);
13912    const [baseFontFamilies] = useSetting("typography.fontFamilies", void 0, "base");
13913    const globalStylesId = (0, import_data7.useSelect)((select) => {
13914      const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data6.store);
13915      return __experimentalGetCurrentGlobalStylesId();
13916    }, []);
13917    const globalStyles = (0, import_core_data6.useEntityRecord)(
13918      "root",
13919      "globalStyles",
13920      globalStylesId ?? 0,
13921      { enabled: globalStylesId !== void 0 }
13922    );
13923    const editedFontFamilies = globalStyles?.edits?.settings?.typography?.fontFamilies;
13924    const savedFontFamilies = globalStyles?.record?.settings?.typography?.fontFamilies;
13925    const fontFamiliesHasChanges = (0, import_element35.useMemo)(() => {
13926      if (editedFontFamilies === void 0) {
13927        return false;
13928      }
13929      return getFontFamiliesKey(editedFontFamilies) !== getFontFamiliesKey(savedFontFamilies);
13930    }, [editedFontFamilies, savedFontFamilies]);
13931    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name)) : [];
13932    const themeFontsSlugs = new Set(themeFonts.map((f2) => f2.slug));
13933    const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat(
13934      baseFontFamilies.theme.filter((f2) => !themeFontsSlugs.has(f2.slug)).map((f2) => setUIValuesNeeded(f2, { source: "theme" })).sort((a2, b2) => a2.name.localeCompare(b2.name))
13935    ) : [];
13936    const customFontFamilyId = libraryFontSelected?.source === "custom" && libraryFontSelected?.id;
13937    const canUserDelete = (0, import_data7.useSelect)(
13938      (select) => {
13939        const { canUser } = select(import_core_data6.store);
13940        return customFontFamilyId && canUser("delete", {
13941          kind: "postType",
13942          name: "wp_font_family",
13943          id: customFontFamilyId
13944        });
13945      },
13946      [customFontFamilyId]
13947    );
13948    const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== "theme" && canUserDelete;
13949    const handleUninstallClick = () => {
13950      setIsConfirmDeleteOpen(true);
13951    };
13952    const handleUpdate = async () => {
13953      setNotice(null);
13954      try {
13955        await saveFontFamilies(fontFamilies);
13956        setNotice({
13957          type: "success",
13958          message: (0, import_i18n17.__)("Font family updated successfully.")
13959        });
13960      } catch (error) {
13961        setNotice({
13962          type: "error",
13963          message: (0, import_i18n17.sprintf)(
13964            /* translators: %s: error message */
13965            (0, import_i18n17.__)("There was an error updating the font family. %s"),
13966            error.message
13967          )
13968        });
13969      }
13970    };
13971    const getFontFacesToDisplay = (font2) => {
13972      if (!font2) {
13973        return [];
13974      }
13975      if (!font2.fontFace || !font2.fontFace.length) {
13976        return [
13977          {
13978            fontFamily: font2.fontFamily,
13979            fontStyle: "normal",
13980            fontWeight: "400"
13981          }
13982        ];
13983      }
13984      return sortFontFaces(font2.fontFace);
13985    };
13986    const getFontCardVariantsText = (font2) => {
13987      const variantsInstalled = font2?.fontFace && (font2?.fontFace?.length ?? 0) > 0 ? font2.fontFace.length : 1;
13988      const variantsActive = getFontFacesActivated(
13989        font2.slug,
13990        font2.source
13991      ).length;
13992      return (0, import_i18n17.sprintf)(
13993        /* translators: 1: Active font variants, 2: Total font variants. */
13994        (0, import_i18n17.__)("%1$d of %2$d active"),
13995        variantsActive,
13996        variantsInstalled
13997      );
13998    };
13999    (0, import_element35.useEffect)(() => {
14000      handleSetLibraryFontSelected(libraryFontSelected);
14001    }, []);
14002    const activeFontsCount = libraryFontSelected ? getFontFacesActivated(
14003      libraryFontSelected.slug,
14004      libraryFontSelected.source
14005    ).length : 0;
14006    const selectedFontsCount = libraryFontSelected?.fontFace?.length ?? (libraryFontSelected?.fontFamily ? 1 : 0);
14007    const isIndeterminate = activeFontsCount > 0 && activeFontsCount !== selectedFontsCount;
14008    const isSelectAllChecked = activeFontsCount === selectedFontsCount;
14009    const toggleSelectAll = () => {
14010      if (!libraryFontSelected || !libraryFontSelected?.source) {
14011        return;
14012      }
14013      const initialFonts = fontFamilies?.[libraryFontSelected.source]?.filter(
14014        (f2) => f2.slug !== libraryFontSelected.slug
14015      ) ?? [];
14016      const newFonts = isSelectAllChecked ? initialFonts : [...initialFonts, libraryFontSelected];
14017      setFontFamilies({
14018        ...fontFamilies,
14019        [libraryFontSelected.source]: newFonts
14020      });
14021      if (libraryFontSelected.fontFace) {
14022        libraryFontSelected.fontFace.forEach((face) => {
14023          if (isSelectAllChecked) {
14024            unloadFontFaceInBrowser(face, "all");
14025          } else {
14026            const displaySrc = getDisplaySrcFromFontFace(
14027              face?.src ?? ""
14028            );
14029            if (displaySrc) {
14030              loadFontFaceInBrowser(face, displaySrc, "all");
14031            }
14032          }
14033        });
14034      }
14035    };
14036    const hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0;
14037    return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
14038      isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.ProgressBar, {}) }),
14039      !isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
14040        /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
14041          import_components21.Navigator,
14042          {
14043            initialPath: libraryFontSelected ? "/fontFamily" : "/",
14044            children: [
14045              /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { spacing: "8", children: [
14046                notice && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14047                  import_components21.Notice,
14048                  {
14049                    status: notice.type,
14050                    onRemove: () => setNotice(null),
14051                    children: notice.message
14052                  }
14053                ),
14054                !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalText, { as: "p", children: (0, import_i18n17.__)("No fonts installed.") }),
14055                baseThemeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { children: [
14056                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", {
14057                    className: "font-library__fonts-title",
14058                    /* translators: Heading for a list of fonts provided by the theme. */
14059                    children: (0, import_i18n17._x)("Theme", "font source")
14060                  }),
14061                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14062                    "ul",
14063                    {
14064                      role: "list",
14065                      className: "font-library__fonts-list",
14066                      children: baseThemeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14067                        "li",
14068                        {
14069                          className: "font-library__fonts-list-item",
14070                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14071                            font_card_default,
14072                            {
14073                              font: font2,
14074                              navigatorPath: "/fontFamily",
14075                              variantsText: getFontCardVariantsText(
14076                                font2
14077                              ),
14078                              shouldFocus: font2.slug === lastSelectedFontSlug,
14079                              onClick: () => {
14080                                setNotice(null);
14081                                handleSetLibraryFontSelected(
14082                                  font2
14083                                );
14084                              }
14085                            }
14086                          )
14087                        },
14088                        font2.slug
14089                      ))
14090                    }
14091                  )
14092                ] }),
14093                baseCustomFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { children: [
14094                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", {
14095                    className: "font-library__fonts-title",
14096                    /* translators: Heading for a list of fonts installed by the user. */
14097                    children: (0, import_i18n17._x)("Custom", "font source")
14098                  }),
14099                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14100                    "ul",
14101                    {
14102                      role: "list",
14103                      className: "font-library__fonts-list",
14104                      children: baseCustomFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14105                        "li",
14106                        {
14107                          className: "font-library__fonts-list-item",
14108                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14109                            font_card_default,
14110                            {
14111                              font: font2,
14112                              navigatorPath: "/fontFamily",
14113                              variantsText: getFontCardVariantsText(
14114                                font2
14115                              ),
14116                              shouldFocus: font2.slug === lastSelectedFontSlug,
14117                              onClick: () => {
14118                                setNotice(null);
14119                                handleSetLibraryFontSelected(
14120                                  font2
14121                                );
14122                              }
14123                            }
14124                          )
14125                        },
14126                        font2.slug
14127                      ))
14128                    }
14129                  )
14130                ] })
14131              ] }) }),
14132              /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.Navigator.Screen, { path: "/fontFamily", children: [
14133                libraryFontSelected && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14134                  ConfirmDeleteDialog,
14135                  {
14136                    font: libraryFontSelected,
14137                    isOpen: isConfirmDeleteOpen,
14138                    setIsOpen: setIsConfirmDeleteOpen,
14139                    setNotice,
14140                    uninstallFontFamily,
14141                    handleSetLibraryFontSelected
14142                  }
14143                ),
14144                /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.Flex, { justify: "flex-start", children: [
14145                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14146                    import_components21.Navigator.BackButton,
14147                    {
14148                      icon: (0, import_i18n17.isRTL)() ? chevron_right_default : chevron_left_default,
14149                      size: "small",
14150                      onClick: () => {
14151                        setLastSelectedFontSlug(
14152                          libraryFontSelected?.slug
14153                        );
14154                        handleSetLibraryFontSelected(
14155                          void 0
14156                        );
14157                        setNotice(null);
14158                      },
14159                      label: (0, import_i18n17.__)("Back")
14160                    }
14161                  ),
14162                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14163                    import_components21.__experimentalHeading,
14164                    {
14165                      level: 2,
14166                      size: 13,
14167                      className: "global-styles-ui-header",
14168                      children: libraryFontSelected?.name
14169                    }
14170                  )
14171                ] }),
14172                notice && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
14173                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 1 }),
14174                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14175                    import_components21.Notice,
14176                    {
14177                      status: notice.type,
14178                      onRemove: () => setNotice(null),
14179                      children: notice.message
14180                    }
14181                  ),
14182                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 1 })
14183                ] }),
14184                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 4 }),
14185                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalText, { children: (0, import_i18n17.__)(
14186                  "Choose font variants. Keep in mind that too many variants could make your site slower."
14187                ) }),
14188                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 4 }),
14189                /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { spacing: 0, children: [
14190                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14191                    import_components21.CheckboxControl,
14192                    {
14193                      className: "font-library__select-all",
14194                      label: (0, import_i18n17.__)("Select all"),
14195                      checked: isSelectAllChecked,
14196                      onChange: toggleSelectAll,
14197                      indeterminate: isIndeterminate
14198                    }
14199                  ),
14200                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 8 }),
14201                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14202                    "ul",
14203                    {
14204                      role: "list",
14205                      className: "font-library__fonts-list",
14206                      children: libraryFontSelected && getFontFacesToDisplay(
14207                        libraryFontSelected
14208                      ).map((face, i2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14209                        "li",
14210                        {
14211                          className: "font-library__fonts-list-item",
14212                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14213                            library_font_variant_default,
14214                            {
14215                              font: libraryFontSelected,
14216                              face
14217                            },
14218                            `face$i2}`
14219                          )
14220                        },
14221                        `face$i2}`
14222                      ))
14223                    }
14224                  )
14225                ] })
14226              ] })
14227            ]
14228          }
14229        ),
14230        /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalHStack, { justify: "flex-end", className: "font-library__footer", children: [
14231          isInstalling && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.ProgressBar, {}),
14232          shouldDisplayDeleteButton && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14233            import_components21.Button,
14234            {
14235              __next40pxDefaultSize: true,
14236              isDestructive: true,
14237              variant: "tertiary",
14238              onClick: handleUninstallClick,
14239              children: (0, import_i18n17.__)("Delete")
14240            }
14241          ),
14242          /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14243            import_components21.Button,
14244            {
14245              __next40pxDefaultSize: true,
14246              variant: "primary",
14247              onClick: handleUpdate,
14248              disabled: !fontFamiliesHasChanges,
14249              accessibleWhenDisabled: true,
14250              children: (0, import_i18n17.__)("Update")
14251            }
14252          )
14253        ] })
14254      ] })
14255    ] });
14256  }
14257  function ConfirmDeleteDialog({
14258    font: font2,
14259    isOpen,
14260    setIsOpen,
14261    setNotice,
14262    uninstallFontFamily,
14263    handleSetLibraryFontSelected
14264  }) {
14265    const navigator2 = (0, import_components21.useNavigator)();
14266    const handleConfirmUninstall = async () => {
14267      setNotice(null);
14268      setIsOpen(false);
14269      try {
14270        await uninstallFontFamily(font2);
14271        navigator2.goBack();
14272        handleSetLibraryFontSelected(void 0);
14273        setNotice({
14274          type: "success",
14275          message: (0, import_i18n17.__)("Font family uninstalled successfully.")
14276        });
14277      } catch (error) {
14278        setNotice({
14279          type: "error",
14280          message: (0, import_i18n17.__)("There was an error uninstalling the font family.") + error.message
14281        });
14282      }
14283    };
14284    const handleCancelUninstall = () => {
14285      setIsOpen(false);
14286    };
14287    return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14288      import_components21.__experimentalConfirmDialog,
14289      {
14290        isOpen,
14291        cancelButtonText: (0, import_i18n17.__)("Cancel"),
14292        confirmButtonText: (0, import_i18n17.__)("Delete"),
14293        onCancel: handleCancelUninstall,
14294        onConfirm: handleConfirmUninstall,
14295        size: "medium",
14296        children: font2 && (0, import_i18n17.sprintf)(
14297          /* translators: %s: Name of the font. */
14298          (0, import_i18n17.__)(
14299            'Are you sure you want to delete "%s" font and all its variants and assets?'
14300          ),
14301          font2.name
14302        )
14303      }
14304    );
14305  }
14306  var installed_fonts_default = InstalledFonts;
14307  
14308  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
14309  var import_element37 = __toESM(require_element(), 1);
14310  var import_components24 = __toESM(require_components(), 1);
14311  var import_compose3 = __toESM(require_compose(), 1);
14312  var import_i18n19 = __toESM(require_i18n(), 1);
14313  var import_core_data7 = __toESM(require_core_data(), 1);
14314  
14315  // packages/global-styles-ui/build-module/font-library/utils/filter-fonts.mjs
14316  function filterFonts(fonts, filters) {
14317    const { category, search } = filters;
14318    let filteredFonts = fonts || [];
14319    if (category && category !== "all") {
14320      filteredFonts = filteredFonts.filter(
14321        (font2) => font2.categories && font2.categories.indexOf(category) !== -1
14322      );
14323    }
14324    if (search) {
14325      filteredFonts = filteredFonts.filter(
14326        (font2) => font2.font_family_settings && font2.font_family_settings.name.toLowerCase().includes(search.toLowerCase())
14327      );
14328    }
14329    return filteredFonts;
14330  }
14331  
14332  // packages/global-styles-ui/build-module/font-library/utils/fonts-outline.mjs
14333  function getFontsOutline(fonts) {
14334    return fonts.reduce(
14335      (acc, font2) => ({
14336        ...acc,
14337        [font2.slug]: (font2?.fontFace || []).reduce(
14338          (faces, face) => ({
14339            ...faces,
14340            [`$face.fontStyle}-$face.fontWeight}`]: true
14341          }),
14342          {}
14343        )
14344      }),
14345      {}
14346    );
14347  }
14348  function isFontFontFaceInOutline(slug, face, outline) {
14349    if (!face) {
14350      return !!outline[slug];
14351    }
14352    return !!outline[slug]?.[`$face.fontStyle}-$face.fontWeight}`];
14353  }
14354  
14355  // packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs
14356  var import_i18n18 = __toESM(require_i18n(), 1);
14357  var import_components22 = __toESM(require_components(), 1);
14358  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
14359  function GoogleFontsConfirmDialog() {
14360    const handleConfirm = () => {
14361      window.localStorage.setItem(
14362        "wp-font-library-google-fonts-permission",
14363        "true"
14364      );
14365      window.dispatchEvent(new Event("storage"));
14366    };
14367    return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "font-library__google-fonts-confirm", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_components22.CardBody, { children: [
14368      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalHeading, { level: 2, children: (0, import_i18n18.__)("Connect to Google Fonts") }),
14369      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 6 }),
14370      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalText, { as: "p", children: (0, import_i18n18.__)(
14371        "To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts."
14372      ) }),
14373      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 3 }),
14374      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalText, { as: "p", children: (0, import_i18n18.__)(
14375        "You can alternatively upload files directly on the Upload tab."
14376      ) }),
14377      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 6 }),
14378      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
14379        import_components22.Button,
14380        {
14381          __next40pxDefaultSize: true,
14382          variant: "primary",
14383          onClick: handleConfirm,
14384          children: (0, import_i18n18.__)("Allow access to Google Fonts")
14385        }
14386      )
14387    ] }) }) });
14388  }
14389  var google_fonts_confirm_dialog_default = GoogleFontsConfirmDialog;
14390  
14391  // packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs
14392  var import_element36 = __toESM(require_element(), 1);
14393  var import_components23 = __toESM(require_components(), 1);
14394  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
14395  function CollectionFontVariant({
14396    face,
14397    font: font2,
14398    handleToggleVariant,
14399    selected
14400  }) {
14401    const handleToggleActivation = () => {
14402      if (font2?.fontFace) {
14403        handleToggleVariant(font2, face);
14404        return;
14405      }
14406      handleToggleVariant(font2);
14407    };
14408    const displayName = font2.name + " " + getFontFaceVariantName(face);
14409    const checkboxId = (0, import_element36.useId)();
14410    return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_components23.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
14411      /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
14412        import_components23.CheckboxControl,
14413        {
14414          checked: selected,
14415          onChange: handleToggleActivation,
14416          id: checkboxId
14417        }
14418      ),
14419      /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
14420        font_demo_default,
14421        {
14422          font: face,
14423          text: displayName,
14424          onClick: handleToggleActivation
14425        }
14426      ) })
14427    ] }) });
14428  }
14429  var collection_font_variant_default = CollectionFontVariant;
14430  
14431  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
14432  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
14433  var DEFAULT_CATEGORY = {
14434    slug: "all",
14435    name: (0, import_i18n19._x)("All", "font categories")
14436  };
14437  var LOCAL_STORAGE_ITEM = "wp-font-library-google-fonts-permission";
14438  var MIN_WINDOW_HEIGHT = 500;
14439  function FontCollection({ slug }) {
14440    const requiresPermission = slug === "google-fonts";
14441    const getGoogleFontsPermissionFromStorage = () => {
14442      return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === "true";
14443    };
14444    const [selectedFont, setSelectedFont] = (0, import_element37.useState)(
14445      null
14446    );
14447    const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element37.useState)(void 0);
14448    const [notice, setNotice] = (0, import_element37.useState)(null);
14449    const [fontsToInstall, setFontsToInstall] = (0, import_element37.useState)(
14450      []
14451    );
14452    const [page, setPage] = (0, import_element37.useState)(1);
14453    const [filters, setFilters] = (0, import_element37.useState)({});
14454    const [renderConfirmDialog, setRenderConfirmDialog] = (0, import_element37.useState)(
14455      requiresPermission && !getGoogleFontsPermissionFromStorage()
14456    );
14457    const { installFonts, isInstalling } = (0, import_element37.useContext)(FontLibraryContext);
14458    const { record: selectedCollection, isResolving: isLoading } = (0, import_core_data7.useEntityRecord)("root", "fontCollection", slug);
14459    (0, import_element37.useEffect)(() => {
14460      const handleStorage = () => {
14461        setRenderConfirmDialog(
14462          requiresPermission && !getGoogleFontsPermissionFromStorage()
14463        );
14464      };
14465      handleStorage();
14466      window.addEventListener("storage", handleStorage);
14467      return () => window.removeEventListener("storage", handleStorage);
14468    }, [slug, requiresPermission]);
14469    const revokeAccess = () => {
14470      window.localStorage.setItem(LOCAL_STORAGE_ITEM, "false");
14471      window.dispatchEvent(new Event("storage"));
14472    };
14473    (0, import_element37.useEffect)(() => {
14474      setSelectedFont(null);
14475    }, [slug]);
14476    (0, import_element37.useEffect)(() => {
14477      setFontsToInstall([]);
14478    }, [selectedFont]);
14479    const collectionFonts = (0, import_element37.useMemo)(
14480      () => selectedCollection?.font_families ?? [],
14481      [selectedCollection]
14482    );
14483    const collectionCategories = selectedCollection?.categories ?? [];
14484    const categories = [DEFAULT_CATEGORY, ...collectionCategories];
14485    const fonts = (0, import_element37.useMemo)(
14486      () => filterFonts(collectionFonts, filters),
14487      [collectionFonts, filters]
14488    );
14489    const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT);
14490    const pageSize = Math.floor((windowHeight - 417) / 61);
14491    const totalPages = Math.ceil(fonts.length / pageSize);
14492    const itemsStart = (page - 1) * pageSize;
14493    const itemsLimit = page * pageSize;
14494    const items = fonts.slice(itemsStart, itemsLimit);
14495    const handleCategoryFilter = (category) => {
14496      setFilters({ ...filters, category });
14497      setPage(1);
14498    };
14499    const handleUpdateSearchInput = (value) => {
14500      setFilters({ ...filters, search: value });
14501      setPage(1);
14502    };
14503    const debouncedUpdateSearchInput = (0, import_compose3.debounce)(
14504      // @ts-expect-error `debounce` expects a `(...args: unknown[]) => unknown` callback.
14505      handleUpdateSearchInput,
14506      300
14507    );
14508    const handleToggleVariant = (font2, face) => {
14509      const newFontsToInstall = toggleFont(font2, face, fontsToInstall);
14510      setFontsToInstall(newFontsToInstall);
14511    };
14512    const fontToInstallOutline = getFontsOutline(fontsToInstall);
14513    const resetFontsToInstall = () => {
14514      setFontsToInstall([]);
14515    };
14516    const selectFontCount = fontsToInstall.length > 0 ? fontsToInstall[0]?.fontFace?.length ?? 0 : 0;
14517    const isIndeterminate = selectFontCount > 0 && selectFontCount !== selectedFont?.fontFace?.length;
14518    const isSelectAllChecked = selectFontCount === selectedFont?.fontFace?.length;
14519    const toggleSelectAll = () => {
14520      const newFonts = [];
14521      if (!isSelectAllChecked && selectedFont) {
14522        newFonts.push(selectedFont);
14523      }
14524      setFontsToInstall(newFonts);
14525    };
14526    const handleInstall = async () => {
14527      setNotice(null);
14528      const fontFamily = fontsToInstall[0];
14529      try {
14530        if (fontFamily?.fontFace) {
14531          await Promise.all(
14532            fontFamily.fontFace.map(async (fontFace) => {
14533              if (fontFace.src) {
14534                fontFace.file = await downloadFontFaceAssets(
14535                  fontFace.src
14536                );
14537              }
14538            })
14539          );
14540        }
14541      } catch {
14542        setNotice({
14543          type: "error",
14544          message: (0, import_i18n19.__)(
14545            "Error installing the fonts, could not be downloaded."
14546          )
14547        });
14548        return;
14549      }
14550      try {
14551        await installFonts([fontFamily]);
14552        setNotice({
14553          type: "success",
14554          message: (0, import_i18n19.__)("Fonts were installed successfully.")
14555        });
14556      } catch (error) {
14557        setNotice({
14558          type: "error",
14559          message: error.message
14560        });
14561      }
14562      resetFontsToInstall();
14563    };
14564    const getSortedFontFaces = (fontFamily) => {
14565      if (!fontFamily) {
14566        return [];
14567      }
14568      if (!fontFamily.fontFace || !fontFamily.fontFace.length) {
14569        return [
14570          {
14571            fontFamily: fontFamily.fontFamily,
14572            fontStyle: "normal",
14573            fontWeight: "400"
14574          }
14575        ];
14576      }
14577      return sortFontFaces(fontFamily.fontFace);
14578    };
14579    if (renderConfirmDialog) {
14580      return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(google_fonts_confirm_dialog_default, {});
14581    }
14582    const showActions = slug === "google-fonts" && !renderConfirmDialog && !selectedFont;
14583    return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
14584      isLoading && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.ProgressBar, {}) }),
14585      !isLoading && selectedCollection && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
14586        /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
14587          import_components24.Navigator,
14588          {
14589            initialPath: "/",
14590            className: "font-library__tabpanel-layout",
14591            children: [
14592              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Navigator.Screen, { path: "/", children: [
14593                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { justify: "space-between", children: [
14594                  /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalVStack, { children: [
14595                    /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalHeading, { level: 2, size: 13, children: selectedCollection.name }),
14596                    /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: selectedCollection.description })
14597                  ] }),
14598                  showActions && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14599                    import_components24.DropdownMenu,
14600                    {
14601                      icon: more_vertical_default,
14602                      label: (0, import_i18n19.__)("Actions"),
14603                      popoverProps: {
14604                        position: "bottom left"
14605                      },
14606                      controls: [
14607                        {
14608                          title: (0, import_i18n19.__)(
14609                            "Revoke access to Google Fonts"
14610                          ),
14611                          onClick: revokeAccess
14612                        }
14613                      ]
14614                    }
14615                  )
14616                ] }),
14617                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14618                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { spacing: 4, justify: "space-between", children: [
14619                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14620                    import_components24.SearchControl,
14621                    {
14622                      className: "font-library__search",
14623                      value: filters.search,
14624                      placeholder: (0, import_i18n19.__)("Font name\u2026"),
14625                      label: (0, import_i18n19.__)("Search"),
14626                      onChange: debouncedUpdateSearchInput,
14627                      hideLabelFromVision: false
14628                    }
14629                  ),
14630                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14631                    import_components24.SelectControl,
14632                    {
14633                      label: (0, import_i18n19.__)("Category"),
14634                      value: filters.category,
14635                      onChange: handleCategoryFilter,
14636                      children: categories && categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14637                        "option",
14638                        {
14639                          value: category.slug,
14640                          children: category.name
14641                        },
14642                        category.slug
14643                      ))
14644                    }
14645                  )
14646                ] }),
14647                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14648                !!selectedCollection?.font_families?.length && !fonts.length && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: (0, import_i18n19.__)(
14649                  "No fonts found. Try with a different search term."
14650                ) }),
14651                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "font-library__fonts-grid__main", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14652                  "ul",
14653                  {
14654                    role: "list",
14655                    className: "font-library__fonts-list",
14656                    children: items.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14657                      "li",
14658                      {
14659                        className: "font-library__fonts-list-item",
14660                        children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14661                          font_card_default,
14662                          {
14663                            font: font2.font_family_settings,
14664                            navigatorPath: "/fontFamily",
14665                            shouldFocus: font2.font_family_settings.slug === lastSelectedFontSlug,
14666                            onClick: () => {
14667                              setSelectedFont(
14668                                font2.font_family_settings
14669                              );
14670                            }
14671                          }
14672                        )
14673                      },
14674                      font2.font_family_settings.slug
14675                    ))
14676                  }
14677                ) })
14678              ] }),
14679              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Navigator.Screen, { path: "/fontFamily", children: [
14680                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Flex, { justify: "flex-start", children: [
14681                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14682                    import_components24.Navigator.BackButton,
14683                    {
14684                      icon: (0, import_i18n19.isRTL)() ? chevron_right_default : chevron_left_default,
14685                      size: "small",
14686                      onClick: () => {
14687                        setLastSelectedFontSlug(
14688                          selectedFont?.slug
14689                        );
14690                        setSelectedFont(null);
14691                        setNotice(null);
14692                      },
14693                      label: (0, import_i18n19.__)("Back")
14694                    }
14695                  ),
14696                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14697                    import_components24.__experimentalHeading,
14698                    {
14699                      level: 2,
14700                      size: 13,
14701                      className: "global-styles-ui-header",
14702                      children: selectedFont?.name
14703                    }
14704                  )
14705                ] }),
14706                notice && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
14707                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 1 }),
14708                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14709                    import_components24.Notice,
14710                    {
14711                      status: notice.type,
14712                      onRemove: () => setNotice(null),
14713                      children: notice.message
14714                    }
14715                  ),
14716                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 1 })
14717                ] }),
14718                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14719                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: (0, import_i18n19.__)("Select font variants to install.") }),
14720                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14721                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14722                  import_components24.CheckboxControl,
14723                  {
14724                    className: "font-library__select-all",
14725                    label: (0, import_i18n19.__)("Select all"),
14726                    checked: isSelectAllChecked,
14727                    onChange: toggleSelectAll,
14728                    indeterminate: isIndeterminate
14729                  }
14730                ),
14731                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14732                  "ul",
14733                  {
14734                    role: "list",
14735                    className: "font-library__fonts-list",
14736                    children: selectedFont && getSortedFontFaces(selectedFont).map(
14737                      (face, i2) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14738                        "li",
14739                        {
14740                          className: "font-library__fonts-list-item",
14741                          children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14742                            collection_font_variant_default,
14743                            {
14744                              font: selectedFont,
14745                              face,
14746                              handleToggleVariant,
14747                              selected: isFontFontFaceInOutline(
14748                                selectedFont.slug,
14749                                selectedFont.fontFace ? face : null,
14750                                // If the font has no fontFace, we want to check if the font is in the outline
14751                                fontToInstallOutline
14752                              )
14753                            }
14754                          )
14755                        },
14756                        `face$i2}`
14757                      )
14758                    )
14759                  }
14760                ) }),
14761                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 16 })
14762              ] })
14763            ]
14764          }
14765        ),
14766        selectedFont && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14767          import_components24.Flex,
14768          {
14769            justify: "flex-end",
14770            className: "font-library__footer",
14771            children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14772              import_components24.Button,
14773              {
14774                __next40pxDefaultSize: true,
14775                variant: "primary",
14776                onClick: handleInstall,
14777                isBusy: isInstalling,
14778                disabled: fontsToInstall.length === 0 || isInstalling,
14779                accessibleWhenDisabled: true,
14780                children: (0, import_i18n19.__)("Install")
14781              }
14782            )
14783          }
14784        ),
14785        !selectedFont && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
14786          import_components24.__experimentalHStack,
14787          {
14788            expanded: false,
14789            className: "font-library__footer",
14790            justify: "end",
14791            spacing: 6,
14792            children: [
14793              /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14794                import_components24.__experimentalHStack,
14795                {
14796                  justify: "flex-start",
14797                  expanded: false,
14798                  spacing: 1,
14799                  className: "font-library__page-selection",
14800                  children: (0, import_element37.createInterpolateElement)(
14801                    (0, import_i18n19.sprintf)(
14802                      // translators: 1: Current page number, 2: Total number of pages.
14803                      (0, import_i18n19._x)(
14804                        "<div>Page</div>%1$s<div>of %2$d</div>",
14805                        "paging"
14806                      ),
14807                      "<CurrentPage />",
14808                      totalPages
14809                    ),
14810                    {
14811                      div: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "aria-hidden": true }),
14812                      // @ts-expect-error — Tag injected via sprintf argument, not visible in format string.
14813                      CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14814                        import_components24.SelectControl,
14815                        {
14816                          "aria-label": (0, import_i18n19.__)(
14817                            "Current page"
14818                          ),
14819                          value: page.toString(),
14820                          options: [
14821                            ...Array(totalPages)
14822                          ].map((e2, i2) => {
14823                            return {
14824                              label: (i2 + 1).toString(),
14825                              value: (i2 + 1).toString()
14826                            };
14827                          }),
14828                          onChange: (newPage) => setPage(
14829                            parseInt(newPage)
14830                          ),
14831                          size: "small",
14832                          variant: "minimal"
14833                        }
14834                      )
14835                    }
14836                  )
14837                }
14838              ),
14839              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { expanded: false, spacing: 1, children: [
14840                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14841                  import_components24.Button,
14842                  {
14843                    onClick: () => setPage(page - 1),
14844                    disabled: page === 1,
14845                    accessibleWhenDisabled: true,
14846                    label: (0, import_i18n19.__)("Previous page"),
14847                    icon: (0, import_i18n19.isRTL)() ? next_default : previous_default,
14848                    showTooltip: true,
14849                    size: "compact",
14850                    tooltipPosition: "top"
14851                  }
14852                ),
14853                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14854                  import_components24.Button,
14855                  {
14856                    onClick: () => setPage(page + 1),
14857                    disabled: page === totalPages,
14858                    accessibleWhenDisabled: true,
14859                    label: (0, import_i18n19.__)("Next page"),
14860                    icon: (0, import_i18n19.isRTL)() ? previous_default : next_default,
14861                    showTooltip: true,
14862                    size: "compact",
14863                    tooltipPosition: "top"
14864                  }
14865                )
14866              ] })
14867            ]
14868          }
14869        )
14870      ] })
14871    ] });
14872  }
14873  var font_collection_default = FontCollection;
14874  
14875  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
14876  var import_i18n20 = __toESM(require_i18n(), 1);
14877  var import_components25 = __toESM(require_components(), 1);
14878  var import_element38 = __toESM(require_element(), 1);
14879  
14880  // packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs
14881  var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
14882    get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2]
14883  }) : x2)(function(x2) {
14884    if (typeof __require !== "undefined") return __require.apply(this, arguments);
14885    throw Error('Dynamic require of "' + x2 + '" is not supported');
14886  });
14887  var unbrotli_default = (function() {
14888    var define, module, exports;
14889    return (/* @__PURE__ */ (function() {
14890      function r3(e2, n2, t2) {
14891        function o2(i22, f2) {
14892          if (!n2[i22]) {
14893            if (!e2[i22]) {
14894              var c2 = "function" == typeof __require2 && __require2;
14895              if (!f2 && c2) return c2(i22, true);
14896              if (u2) return u2(i22, true);
14897              var a2 = new Error("Cannot find module '" + i22 + "'");
14898              throw a2.code = "MODULE_NOT_FOUND", a2;
14899            }
14900            var p3 = n2[i22] = { exports: {} };
14901            e2[i22][0].call(
14902              p3.exports,
14903              function(r22) {
14904                var n22 = e2[i22][1][r22];
14905                return o2(n22 || r22);
14906              },
14907              p3,
14908              p3.exports,
14909              r3,
14910              e2,
14911              n2,
14912              t2
14913            );
14914          }
14915          return n2[i22].exports;
14916        }
14917        for (var u2 = "function" == typeof __require2 && __require2, i2 = 0; i2 < t2.length; i2++)
14918          o2(t2[i2]);
14919        return o2;
14920      }
14921      return r3;
14922    })())(
14923      {
14924        1: [
14925          function(require2, module2, exports2) {
14926            var BROTLI_READ_SIZE = 4096;
14927            var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
14928            var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
14929            var kBitMask = new Uint32Array([
14930              0,
14931              1,
14932              3,
14933              7,
14934              15,
14935              31,
14936              63,
14937              127,
14938              255,
14939              511,
14940              1023,
14941              2047,
14942              4095,
14943              8191,
14944              16383,
14945              32767,
14946              65535,
14947              131071,
14948              262143,
14949              524287,
14950              1048575,
14951              2097151,
14952              4194303,
14953              8388607,
14954              16777215
14955            ]);
14956            function BrotliBitReader(input) {
14957              this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
14958              this.input_ = input;
14959              this.reset();
14960            }
14961            BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
14962            BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
14963            BrotliBitReader.prototype.reset = function() {
14964              this.buf_ptr_ = 0;
14965              this.val_ = 0;
14966              this.pos_ = 0;
14967              this.bit_pos_ = 0;
14968              this.bit_end_pos_ = 0;
14969              this.eos_ = 0;
14970              this.readMoreInput();
14971              for (var i2 = 0; i2 < 4; i2++) {
14972                this.val_ |= this.buf_[this.pos_] << 8 * i2;
14973                ++this.pos_;
14974              }
14975              return this.bit_end_pos_ > 0;
14976            };
14977            BrotliBitReader.prototype.readMoreInput = function() {
14978              if (this.bit_end_pos_ > 256) {
14979                return;
14980              } else if (this.eos_) {
14981                if (this.bit_pos_ > this.bit_end_pos_)
14982                  throw new Error(
14983                    "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_
14984                  );
14985              } else {
14986                var dst = this.buf_ptr_;
14987                var bytes_read = this.input_.read(
14988                  this.buf_,
14989                  dst,
14990                  BROTLI_READ_SIZE
14991                );
14992                if (bytes_read < 0) {
14993                  throw new Error("Unexpected end of input");
14994                }
14995                if (bytes_read < BROTLI_READ_SIZE) {
14996                  this.eos_ = 1;
14997                  for (var p3 = 0; p3 < 32; p3++)
14998                    this.buf_[dst + bytes_read + p3] = 0;
14999                }
15000                if (dst === 0) {
15001                  for (var p3 = 0; p3 < 32; p3++)
15002                    this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3];
15003                  this.buf_ptr_ = BROTLI_READ_SIZE;
15004                } else {
15005                  this.buf_ptr_ = 0;
15006                }
15007                this.bit_end_pos_ += bytes_read << 3;
15008              }
15009            };
15010            BrotliBitReader.prototype.fillBitWindow = function() {
15011              while (this.bit_pos_ >= 8) {
15012                this.val_ >>>= 8;
15013                this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
15014                ++this.pos_;
15015                this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
15016                this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
15017              }
15018            };
15019            BrotliBitReader.prototype.readBits = function(n_bits) {
15020              if (32 - this.bit_pos_ < n_bits) {
15021                this.fillBitWindow();
15022              }
15023              var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits];
15024              this.bit_pos_ += n_bits;
15025              return val;
15026            };
15027            module2.exports = BrotliBitReader;
15028          },
15029          {}
15030        ],
15031        2: [
15032          function(require2, module2, exports2) {
15033            var CONTEXT_LSB6 = 0;
15034            var CONTEXT_MSB6 = 1;
15035            var CONTEXT_UTF8 = 2;
15036            var CONTEXT_SIGNED = 3;
15037            exports2.lookup = new Uint8Array([
15038              /* CONTEXT_UTF8, last byte. */
15039              /* ASCII range. */
15040              0,
15041              0,
15042              0,
15043              0,
15044              0,
15045              0,
15046              0,
15047              0,
15048              0,
15049              4,
15050              4,
15051              0,
15052              0,
15053              4,
15054              0,
15055              0,
15056              0,
15057              0,
15058              0,
15059              0,
15060              0,
15061              0,
15062              0,
15063              0,
15064              0,
15065              0,
15066              0,
15067              0,
15068              0,
15069              0,
15070              0,
15071              0,
15072              8,
15073              12,
15074              16,
15075              12,
15076              12,
15077              20,
15078              12,
15079              16,
15080              24,
15081              28,
15082              12,
15083              12,
15084              32,
15085              12,
15086              36,
15087              12,
15088              44,
15089              44,
15090              44,
15091              44,
15092              44,
15093              44,
15094              44,
15095              44,
15096              44,
15097              44,
15098              32,
15099              32,
15100              24,
15101              40,
15102              28,
15103              12,
15104              12,
15105              48,
15106              52,
15107              52,
15108              52,
15109              48,
15110              52,
15111              52,
15112              52,
15113              48,
15114              52,
15115              52,
15116              52,
15117              52,
15118              52,
15119              48,
15120              52,
15121              52,
15122              52,
15123              52,
15124              52,
15125              48,
15126              52,
15127              52,
15128              52,
15129              52,
15130              52,
15131              24,
15132              12,
15133              28,
15134              12,
15135              12,
15136              12,
15137              56,
15138              60,
15139              60,
15140              60,
15141              56,
15142              60,
15143              60,
15144              60,
15145              56,
15146              60,
15147              60,
15148              60,
15149              60,
15150              60,
15151              56,
15152              60,
15153              60,
15154              60,
15155              60,
15156              60,
15157              56,
15158              60,
15159              60,
15160              60,
15161              60,
15162              60,
15163              24,
15164              12,
15165              28,
15166              12,
15167              0,
15168              /* UTF8 continuation byte range. */
15169              0,
15170              1,
15171              0,
15172              1,
15173              0,
15174              1,
15175              0,
15176              1,
15177              0,
15178              1,
15179              0,
15180              1,
15181              0,
15182              1,
15183              0,
15184              1,
15185              0,
15186              1,
15187              0,
15188              1,
15189              0,
15190              1,
15191              0,
15192              1,
15193              0,
15194              1,
15195              0,
15196              1,
15197              0,
15198              1,
15199              0,
15200              1,
15201              0,
15202              1,
15203              0,
15204              1,
15205              0,
15206              1,
15207              0,
15208              1,
15209              0,
15210              1,
15211              0,
15212              1,
15213              0,
15214              1,
15215              0,
15216              1,
15217              0,
15218              1,
15219              0,
15220              1,
15221              0,
15222              1,
15223              0,
15224              1,
15225              0,
15226              1,
15227              0,
15228              1,
15229              0,
15230              1,
15231              0,
15232              1,
15233              2,
15234              3,
15235              2,
15236              3,
15237              2,
15238              3,
15239              2,
15240              3,
15241              2,
15242              3,
15243              2,
15244              3,
15245              2,
15246              3,
15247              2,
15248              3,
15249              2,
15250              3,
15251              2,
15252              3,
15253              2,
15254              3,
15255              2,
15256              3,
15257              2,
15258              3,
15259              2,
15260              3,
15261              2,
15262              3,
15263              2,
15264              3,
15265              2,
15266              3,
15267              2,
15268              3,
15269              2,
15270              3,
15271              2,
15272              3,
15273              2,
15274              3,
15275              2,
15276              3,
15277              2,
15278              3,
15279              2,
15280              3,
15281              2,
15282              3,
15283              2,
15284              3,
15285              2,
15286              3,
15287              2,
15288              3,
15289              2,
15290              3,
15291              2,
15292              3,
15293              2,
15294              3,
15295              2,
15296              3,
15297              /* ASCII range. */
15298              0,
15299              0,
15300              0,
15301              0,
15302              0,
15303              0,
15304              0,
15305              0,
15306              0,
15307              0,
15308              0,
15309              0,
15310              0,
15311              0,
15312              0,
15313              0,
15314              0,
15315              0,
15316              0,
15317              0,
15318              0,
15319              0,
15320              0,
15321              0,
15322              0,
15323              0,
15324              0,
15325              0,
15326              0,
15327              0,
15328              0,
15329              0,
15330              0,
15331              1,
15332              1,
15333              1,
15334              1,
15335              1,
15336              1,
15337              1,
15338              1,
15339              1,
15340              1,
15341              1,
15342              1,
15343              1,
15344              1,
15345              1,
15346              2,
15347              2,
15348              2,
15349              2,
15350              2,
15351              2,
15352              2,
15353              2,
15354              2,
15355              2,
15356              1,
15357              1,
15358              1,
15359              1,
15360              1,
15361              1,
15362              1,
15363              2,
15364              2,
15365              2,
15366              2,
15367              2,
15368              2,
15369              2,
15370              2,
15371              2,
15372              2,
15373              2,
15374              2,
15375              2,
15376              2,
15377              2,
15378              2,
15379              2,
15380              2,
15381              2,
15382              2,
15383              2,
15384              2,
15385              2,
15386              2,
15387              2,
15388              2,
15389              1,
15390              1,
15391              1,
15392              1,
15393              1,
15394              1,
15395              3,
15396              3,
15397              3,
15398              3,
15399              3,
15400              3,
15401              3,
15402              3,
15403              3,
15404              3,
15405              3,
15406              3,
15407              3,
15408              3,
15409              3,
15410              3,
15411              3,
15412              3,
15413              3,
15414              3,
15415              3,
15416              3,
15417              3,
15418              3,
15419              3,
15420              3,
15421              1,
15422              1,
15423              1,
15424              1,
15425              0,
15426              /* UTF8 continuation byte range. */
15427              0,
15428              0,
15429              0,
15430              0,
15431              0,
15432              0,
15433              0,
15434              0,
15435              0,
15436              0,
15437              0,
15438              0,
15439              0,
15440              0,
15441              0,
15442              0,
15443              0,
15444              0,
15445              0,
15446              0,
15447              0,
15448              0,
15449              0,
15450              0,
15451              0,
15452              0,
15453              0,
15454              0,
15455              0,
15456              0,
15457              0,
15458              0,
15459              0,
15460              0,
15461              0,
15462              0,
15463              0,
15464              0,
15465              0,
15466              0,
15467              0,
15468              0,
15469              0,
15470              0,
15471              0,
15472              0,
15473              0,
15474              0,
15475              0,
15476              0,
15477              0,
15478              0,
15479              0,
15480              0,
15481              0,
15482              0,
15483              0,
15484              0,
15485              0,
15486              0,
15487              0,
15488              0,
15489              0,
15490              0,
15491              0,
15492              0,
15493              0,
15494              0,
15495              0,
15496              0,
15497              0,
15498              0,
15499              0,
15500              0,
15501              0,
15502              0,
15503              0,
15504              0,
15505              0,
15506              0,
15507              0,
15508              0,
15509              0,
15510              0,
15511              0,
15512              0,
15513              0,
15514              0,
15515              0,
15516              0,
15517              0,
15518              0,
15519              0,
15520              0,
15521              0,
15522              0,
15523              2,
15524              2,
15525              2,
15526              2,
15527              2,
15528              2,
15529              2,
15530              2,
15531              2,
15532              2,
15533              2,
15534              2,
15535              2,
15536              2,
15537              2,
15538              2,
15539              2,
15540              2,
15541              2,
15542              2,
15543              2,
15544              2,
15545              2,
15546              2,
15547              2,
15548              2,
15549              2,
15550              2,
15551              2,
15552              2,
15553              2,
15554              2,
15555              0,
15556              1,
15557              1,
15558              1,
15559              1,
15560              1,
15561              1,
15562              1,
15563              1,
15564              1,
15565              1,
15566              1,
15567              1,
15568              1,
15569              1,
15570              1,
15571              2,
15572              2,
15573              2,
15574              2,
15575              2,
15576              2,
15577              2,
15578              2,
15579              2,
15580              2,
15581              2,
15582              2,
15583              2,
15584              2,
15585              2,
15586              2,
15587              2,
15588              2,
15589              2,
15590              2,
15591              2,
15592              2,
15593              2,
15594              2,
15595              2,
15596              2,
15597              2,
15598              2,
15599              2,
15600              2,
15601              2,
15602              2,
15603              2,
15604              2,
15605              2,
15606              2,
15607              2,
15608              2,
15609              2,
15610              2,
15611              2,
15612              2,
15613              2,
15614              2,
15615              2,
15616              2,
15617              2,
15618              2,
15619              3,
15620              3,
15621              3,
15622              3,
15623              3,
15624              3,
15625              3,
15626              3,
15627              3,
15628              3,
15629              3,
15630              3,
15631              3,
15632              3,
15633              3,
15634              3,
15635              3,
15636              3,
15637              3,
15638              3,
15639              3,
15640              3,
15641              3,
15642              3,
15643              3,
15644              3,
15645              3,
15646              3,
15647              3,
15648              3,
15649              3,
15650              3,
15651              3,
15652              3,
15653              3,
15654              3,
15655              3,
15656              3,
15657              3,
15658              3,
15659              3,
15660              3,
15661              3,
15662              3,
15663              3,
15664              3,
15665              3,
15666              3,
15667              3,
15668              3,
15669              3,
15670              3,
15671              3,
15672              3,
15673              3,
15674              3,
15675              3,
15676              3,
15677              3,
15678              3,
15679              3,
15680              3,
15681              3,
15682              3,
15683              4,
15684              4,
15685              4,
15686              4,
15687              4,
15688              4,
15689              4,
15690              4,
15691              4,
15692              4,
15693              4,
15694              4,
15695              4,
15696              4,
15697              4,
15698              4,
15699              4,
15700              4,
15701              4,
15702              4,
15703              4,
15704              4,
15705              4,
15706              4,
15707              4,
15708              4,
15709              4,
15710              4,
15711              4,
15712              4,
15713              4,
15714              4,
15715              4,
15716              4,
15717              4,
15718              4,
15719              4,
15720              4,
15721              4,
15722              4,
15723              4,
15724              4,
15725              4,
15726              4,
15727              4,
15728              4,
15729              4,
15730              4,
15731              4,
15732              4,
15733              4,
15734              4,
15735              4,
15736              4,
15737              4,
15738              4,
15739              4,
15740              4,
15741              4,
15742              4,
15743              4,
15744              4,
15745              4,
15746              4,
15747              5,
15748              5,
15749              5,
15750              5,
15751              5,
15752              5,
15753              5,
15754              5,
15755              5,
15756              5,
15757              5,
15758              5,
15759              5,
15760              5,
15761              5,
15762              5,
15763              5,
15764              5,
15765              5,
15766              5,
15767              5,
15768              5,
15769              5,
15770              5,
15771              5,
15772              5,
15773              5,
15774              5,
15775              5,
15776              5,
15777              5,
15778              5,
15779              5,
15780              5,
15781              5,
15782              5,
15783              5,
15784              5,
15785              5,
15786              5,
15787              5,
15788              5,
15789              5,
15790              5,
15791              5,
15792              5,
15793              5,
15794              5,
15795              6,
15796              6,
15797              6,
15798              6,
15799              6,
15800              6,
15801              6,
15802              6,
15803              6,
15804              6,
15805              6,
15806              6,
15807              6,
15808              6,
15809              6,
15810              7,
15811              /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
15812              0,
15813              8,
15814              8,
15815              8,
15816              8,
15817              8,
15818              8,
15819              8,
15820              8,
15821              8,
15822              8,
15823              8,
15824              8,
15825              8,
15826              8,
15827              8,
15828              16,
15829              16,
15830              16,
15831              16,
15832              16,
15833              16,
15834              16,
15835              16,
15836              16,
15837              16,
15838              16,
15839              16,
15840              16,
15841              16,
15842              16,
15843              16,
15844              16,
15845              16,
15846              16,
15847              16,
15848              16,
15849              16,
15850              16,
15851              16,
15852              16,
15853              16,
15854              16,
15855              16,
15856              16,
15857              16,
15858              16,
15859              16,
15860              16,
15861              16,
15862              16,
15863              16,
15864              16,
15865              16,
15866              16,
15867              16,
15868              16,
15869              16,
15870              16,
15871              16,
15872              16,
15873              16,
15874              16,
15875              16,
15876              24,
15877              24,
15878              24,
15879              24,
15880              24,
15881              24,
15882              24,
15883              24,
15884              24,
15885              24,
15886              24,
15887              24,
15888              24,
15889              24,
15890              24,
15891              24,
15892              24,
15893              24,
15894              24,
15895              24,
15896              24,
15897              24,
15898              24,
15899              24,
15900              24,
15901              24,
15902              24,
15903              24,
15904              24,
15905              24,
15906              24,
15907              24,
15908              24,
15909              24,
15910              24,
15911              24,
15912              24,
15913              24,
15914              24,
15915              24,
15916              24,
15917              24,
15918              24,
15919              24,
15920              24,
15921              24,
15922              24,
15923              24,
15924              24,
15925              24,
15926              24,
15927              24,
15928              24,
15929              24,
15930              24,
15931              24,
15932              24,
15933              24,
15934              24,
15935              24,
15936              24,
15937              24,
15938              24,
15939              24,
15940              32,
15941              32,
15942              32,
15943              32,
15944              32,
15945              32,
15946              32,
15947              32,
15948              32,
15949              32,
15950              32,
15951              32,
15952              32,
15953              32,
15954              32,
15955              32,
15956              32,
15957              32,
15958              32,
15959              32,
15960              32,
15961              32,
15962              32,
15963              32,
15964              32,
15965              32,
15966              32,
15967              32,
15968              32,
15969              32,
15970              32,
15971              32,
15972              32,
15973              32,
15974              32,
15975              32,
15976              32,
15977              32,
15978              32,
15979              32,
15980              32,
15981              32,
15982              32,
15983              32,
15984              32,
15985              32,
15986              32,
15987              32,
15988              32,
15989              32,
15990              32,
15991              32,
15992              32,
15993              32,
15994              32,
15995              32,
15996              32,
15997              32,
15998              32,
15999              32,
16000              32,
16001              32,
16002              32,
16003              32,
16004              40,
16005              40,
16006              40,
16007              40,
16008              40,
16009              40,
16010              40,
16011              40,
16012              40,
16013              40,
16014              40,
16015              40,
16016              40,
16017              40,
16018              40,
16019              40,
16020              40,
16021              40,
16022              40,
16023              40,
16024              40,
16025              40,
16026              40,
16027              40,
16028              40,
16029              40,
16030              40,
16031              40,
16032              40,
16033              40,
16034              40,
16035              40,
16036              40,
16037              40,
16038              40,
16039              40,
16040              40,
16041              40,
16042              40,
16043              40,
16044              40,
16045              40,
16046              40,
16047              40,
16048              40,
16049              40,
16050              40,
16051              40,
16052              48,
16053              48,
16054              48,
16055              48,
16056              48,
16057              48,
16058              48,
16059              48,
16060              48,
16061              48,
16062              48,
16063              48,
16064              48,
16065              48,
16066              48,
16067              56,
16068              /* CONTEXT_LSB6, last byte. */
16069              0,
16070              1,
16071              2,
16072              3,
16073              4,
16074              5,
16075              6,
16076              7,
16077              8,
16078              9,
16079              10,
16080              11,
16081              12,
16082              13,
16083              14,
16084              15,
16085              16,
16086              17,
16087              18,
16088              19,
16089              20,
16090              21,
16091              22,
16092              23,
16093              24,
16094              25,
16095              26,
16096              27,
16097              28,
16098              29,
16099              30,
16100              31,
16101              32,
16102              33,
16103              34,
16104              35,
16105              36,
16106              37,
16107              38,
16108              39,
16109              40,
16110              41,
16111              42,
16112              43,
16113              44,
16114              45,
16115              46,
16116              47,
16117              48,
16118              49,
16119              50,
16120              51,
16121              52,
16122              53,
16123              54,
16124              55,
16125              56,
16126              57,
16127              58,
16128              59,
16129              60,
16130              61,
16131              62,
16132              63,
16133              0,
16134              1,
16135              2,
16136              3,
16137              4,
16138              5,
16139              6,
16140              7,
16141              8,
16142              9,
16143              10,
16144              11,
16145              12,
16146              13,
16147              14,
16148              15,
16149              16,
16150              17,
16151              18,
16152              19,
16153              20,
16154              21,
16155              22,
16156              23,
16157              24,
16158              25,
16159              26,
16160              27,
16161              28,
16162              29,
16163              30,
16164              31,
16165              32,
16166              33,
16167              34,
16168              35,
16169              36,
16170              37,
16171              38,
16172              39,
16173              40,
16174              41,
16175              42,
16176              43,
16177              44,
16178              45,
16179              46,
16180              47,
16181              48,
16182              49,
16183              50,
16184              51,
16185              52,
16186              53,
16187              54,
16188              55,
16189              56,
16190              57,
16191              58,
16192              59,
16193              60,
16194              61,
16195              62,
16196              63,
16197              0,
16198              1,
16199              2,
16200              3,
16201              4,
16202              5,
16203              6,
16204              7,
16205              8,
16206              9,
16207              10,
16208              11,
16209              12,
16210              13,
16211              14,
16212              15,
16213              16,
16214              17,
16215              18,
16216              19,
16217              20,
16218              21,
16219              22,
16220              23,
16221              24,
16222              25,
16223              26,
16224              27,
16225              28,
16226              29,
16227              30,
16228              31,
16229              32,
16230              33,
16231              34,
16232              35,
16233              36,
16234              37,
16235              38,
16236              39,
16237              40,
16238              41,
16239              42,
16240              43,
16241              44,
16242              45,
16243              46,
16244              47,
16245              48,
16246              49,
16247              50,
16248              51,
16249              52,
16250              53,
16251              54,
16252              55,
16253              56,
16254              57,
16255              58,
16256              59,
16257              60,
16258              61,
16259              62,
16260              63,
16261              0,
16262              1,
16263              2,
16264              3,
16265              4,
16266              5,
16267              6,
16268              7,
16269              8,
16270              9,
16271              10,
16272              11,
16273              12,
16274              13,
16275              14,
16276              15,
16277              16,
16278              17,
16279              18,
16280              19,
16281              20,
16282              21,
16283              22,
16284              23,
16285              24,
16286              25,
16287              26,
16288              27,
16289              28,
16290              29,
16291              30,
16292              31,
16293              32,
16294              33,
16295              34,
16296              35,
16297              36,
16298              37,
16299              38,
16300              39,
16301              40,
16302              41,
16303              42,
16304              43,
16305              44,
16306              45,
16307              46,
16308              47,
16309              48,
16310              49,
16311              50,
16312              51,
16313              52,
16314              53,
16315              54,
16316              55,
16317              56,
16318              57,
16319              58,
16320              59,
16321              60,
16322              61,
16323              62,
16324              63,
16325              /* CONTEXT_MSB6, last byte. */
16326              0,
16327              0,
16328              0,
16329              0,
16330              1,
16331              1,
16332              1,
16333              1,
16334              2,
16335              2,
16336              2,
16337              2,
16338              3,
16339              3,
16340              3,
16341              3,
16342              4,
16343              4,
16344              4,
16345              4,
16346              5,
16347              5,
16348              5,
16349              5,
16350              6,
16351              6,
16352              6,
16353              6,
16354              7,
16355              7,
16356              7,
16357              7,
16358              8,
16359              8,
16360              8,
16361              8,
16362              9,
16363              9,
16364              9,
16365              9,
16366              10,
16367              10,
16368              10,
16369              10,
16370              11,
16371              11,
16372              11,
16373              11,
16374              12,
16375              12,
16376              12,
16377              12,
16378              13,
16379              13,
16380              13,
16381              13,
16382              14,
16383              14,
16384              14,
16385              14,
16386              15,
16387              15,
16388              15,
16389              15,
16390              16,
16391              16,
16392              16,
16393              16,
16394              17,
16395              17,
16396              17,
16397              17,
16398              18,
16399              18,
16400              18,
16401              18,
16402              19,
16403              19,
16404              19,
16405              19,
16406              20,
16407              20,
16408              20,
16409              20,
16410              21,
16411              21,
16412              21,
16413              21,
16414              22,
16415              22,
16416              22,
16417              22,
16418              23,
16419              23,
16420              23,
16421              23,
16422              24,
16423              24,
16424              24,
16425              24,
16426              25,
16427              25,
16428              25,
16429              25,
16430              26,
16431              26,
16432              26,
16433              26,
16434              27,
16435              27,
16436              27,
16437              27,
16438              28,
16439              28,
16440              28,
16441              28,
16442              29,
16443              29,
16444              29,
16445              29,
16446              30,
16447              30,
16448              30,
16449              30,
16450              31,
16451              31,
16452              31,
16453              31,
16454              32,
16455              32,
16456              32,
16457              32,
16458              33,
16459              33,
16460              33,
16461              33,
16462              34,
16463              34,
16464              34,
16465              34,
16466              35,
16467              35,
16468              35,
16469              35,
16470              36,
16471              36,
16472              36,
16473              36,
16474              37,
16475              37,
16476              37,
16477              37,
16478              38,
16479              38,
16480              38,
16481              38,
16482              39,
16483              39,
16484              39,
16485              39,
16486              40,
16487              40,
16488              40,
16489              40,
16490              41,
16491              41,
16492              41,
16493              41,
16494              42,
16495              42,
16496              42,
16497              42,
16498              43,
16499              43,
16500              43,
16501              43,
16502              44,
16503              44,
16504              44,
16505              44,
16506              45,
16507              45,
16508              45,
16509              45,
16510              46,
16511              46,
16512              46,
16513              46,
16514              47,
16515              47,
16516              47,
16517              47,
16518              48,
16519              48,
16520              48,
16521              48,
16522              49,
16523              49,
16524              49,
16525              49,
16526              50,
16527              50,
16528              50,
16529              50,
16530              51,
16531              51,
16532              51,
16533              51,
16534              52,
16535              52,
16536              52,
16537              52,
16538              53,
16539              53,
16540              53,
16541              53,
16542              54,
16543              54,
16544              54,
16545              54,
16546              55,
16547              55,
16548              55,
16549              55,
16550              56,
16551              56,
16552              56,
16553              56,
16554              57,
16555              57,
16556              57,
16557              57,
16558              58,
16559              58,
16560              58,
16561              58,
16562              59,
16563              59,
16564              59,
16565              59,
16566              60,
16567              60,
16568              60,
16569              60,
16570              61,
16571              61,
16572              61,
16573              61,
16574              62,
16575              62,
16576              62,
16577              62,
16578              63,
16579              63,
16580              63,
16581              63,
16582              /* CONTEXT_{M,L}SB6, second last byte, */
16583              0,
16584              0,
16585              0,
16586              0,
16587              0,
16588              0,
16589              0,
16590              0,
16591              0,
16592              0,
16593              0,
16594              0,
16595              0,
16596              0,
16597              0,
16598              0,
16599              0,
16600              0,
16601              0,
16602              0,
16603              0,
16604              0,
16605              0,
16606              0,
16607              0,
16608              0,
16609              0,
16610              0,
16611              0,
16612              0,
16613              0,
16614              0,
16615              0,
16616              0,
16617              0,
16618              0,
16619              0,
16620              0,
16621              0,
16622              0,
16623              0,
16624              0,
16625              0,
16626              0,
16627              0,
16628              0,
16629              0,
16630              0,
16631              0,
16632              0,
16633              0,
16634              0,
16635              0,
16636              0,
16637              0,
16638              0,
16639              0,
16640              0,
16641              0,
16642              0,
16643              0,
16644              0,
16645              0,
16646              0,
16647              0,
16648              0,
16649              0,
16650              0,
16651              0,
16652              0,
16653              0,
16654              0,
16655              0,
16656              0,
16657              0,
16658              0,
16659              0,
16660              0,
16661              0,
16662              0,
16663              0,
16664              0,
16665              0,
16666              0,
16667              0,
16668              0,
16669              0,
16670              0,
16671              0,
16672              0,
16673              0,
16674              0,
16675              0,
16676              0,
16677              0,
16678              0,
16679              0,
16680              0,
16681              0,
16682              0,
16683              0,
16684              0,
16685              0,
16686              0,
16687              0,
16688              0,
16689              0,
16690              0,
16691              0,
16692              0,
16693              0,
16694              0,
16695              0,
16696              0,
16697              0,
16698              0,
16699              0,
16700              0,
16701              0,
16702              0,
16703              0,
16704              0,
16705              0,
16706              0,
16707              0,
16708              0,
16709              0,
16710              0,
16711              0,
16712              0,
16713              0,
16714              0,
16715              0,
16716              0,
16717              0,
16718              0,
16719              0,
16720              0,
16721              0,
16722              0,
16723              0,
16724              0,
16725              0,
16726              0,
16727              0,
16728              0,
16729              0,
16730              0,
16731              0,
16732              0,
16733              0,
16734              0,
16735              0,
16736              0,
16737              0,
16738              0,
16739              0,
16740              0,
16741              0,
16742              0,
16743              0,
16744              0,
16745              0,
16746              0,
16747              0,
16748              0,
16749              0,
16750              0,
16751              0,
16752              0,
16753              0,
16754              0,
16755              0,
16756              0,
16757              0,
16758              0,
16759              0,
16760              0,
16761              0,
16762              0,
16763              0,
16764              0,
16765              0,
16766              0,
16767              0,
16768              0,
16769              0,
16770              0,
16771              0,
16772              0,
16773              0,
16774              0,
16775              0,
16776              0,
16777              0,
16778              0,
16779              0,
16780              0,
16781              0,
16782              0,
16783              0,
16784              0,
16785              0,
16786              0,
16787              0,
16788              0,
16789              0,
16790              0,
16791              0,
16792              0,
16793              0,
16794              0,
16795              0,
16796              0,
16797              0,
16798              0,
16799              0,
16800              0,
16801              0,
16802              0,
16803              0,
16804              0,
16805              0,
16806              0,
16807              0,
16808              0,
16809              0,
16810              0,
16811              0,
16812              0,
16813              0,
16814              0,
16815              0,
16816              0,
16817              0,
16818              0,
16819              0,
16820              0,
16821              0,
16822              0,
16823              0,
16824              0,
16825              0,
16826              0,
16827              0,
16828              0,
16829              0,
16830              0,
16831              0,
16832              0,
16833              0,
16834              0,
16835              0,
16836              0,
16837              0,
16838              0
16839            ]);
16840            exports2.lookupOffsets = new Uint16Array([
16841              /* CONTEXT_LSB6 */
16842              1024,
16843              1536,
16844              1280,
16845              1536,
16846              0,
16847              256,
16848              768,
16849              512
16850            ]);
16851          },
16852          {}
16853        ],
16854        3: [
16855          function(require2, module2, exports2) {
16856            var BrotliInput = require2("./streams").BrotliInput;
16857            var BrotliOutput = require2("./streams").BrotliOutput;
16858            var BrotliBitReader = require2("./bit_reader");
16859            var BrotliDictionary = require2("./dictionary");
16860            var HuffmanCode = require2("./huffman").HuffmanCode;
16861            var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable;
16862            var Context = require2("./context");
16863            var Prefix = require2("./prefix");
16864            var Transform = require2("./transform");
16865            var kDefaultCodeLength = 8;
16866            var kCodeLengthRepeatCode = 16;
16867            var kNumLiteralCodes = 256;
16868            var kNumInsertAndCopyCodes = 704;
16869            var kNumBlockLengthCodes = 26;
16870            var kLiteralContextBits = 6;
16871            var kDistanceContextBits = 2;
16872            var HUFFMAN_TABLE_BITS = 8;
16873            var HUFFMAN_TABLE_MASK = 255;
16874            var HUFFMAN_MAX_TABLE_SIZE = 1080;
16875            var CODE_LENGTH_CODES = 18;
16876            var kCodeLengthCodeOrder = new Uint8Array([
16877              1,
16878              2,
16879              3,
16880              4,
16881              0,
16882              5,
16883              17,
16884              6,
16885              16,
16886              7,
16887              8,
16888              9,
16889              10,
16890              11,
16891              12,
16892              13,
16893              14,
16894              15
16895            ]);
16896            var NUM_DISTANCE_SHORT_CODES = 16;
16897            var kDistanceShortCodeIndexOffset = new Uint8Array([
16898              3,
16899              2,
16900              1,
16901              0,
16902              3,
16903              3,
16904              3,
16905              3,
16906              3,
16907              3,
16908              2,
16909              2,
16910              2,
16911              2,
16912              2,
16913              2
16914            ]);
16915            var kDistanceShortCodeValueOffset = new Int8Array([
16916              0,
16917              0,
16918              0,
16919              0,
16920              -1,
16921              1,
16922              -2,
16923              2,
16924              -3,
16925              3,
16926              -1,
16927              1,
16928              -2,
16929              2,
16930              -3,
16931              3
16932            ]);
16933            var kMaxHuffmanTableSize = new Uint16Array([
16934              256,
16935              402,
16936              436,
16937              468,
16938              500,
16939              534,
16940              566,
16941              598,
16942              630,
16943              662,
16944              694,
16945              726,
16946              758,
16947              790,
16948              822,
16949              854,
16950              886,
16951              920,
16952              952,
16953              984,
16954              1016,
16955              1048,
16956              1080
16957            ]);
16958            function DecodeWindowBits(br) {
16959              var n2;
16960              if (br.readBits(1) === 0) {
16961                return 16;
16962              }
16963              n2 = br.readBits(3);
16964              if (n2 > 0) {
16965                return 17 + n2;
16966              }
16967              n2 = br.readBits(3);
16968              if (n2 > 0) {
16969                return 8 + n2;
16970              }
16971              return 17;
16972            }
16973            function DecodeVarLenUint8(br) {
16974              if (br.readBits(1)) {
16975                var nbits = br.readBits(3);
16976                if (nbits === 0) {
16977                  return 1;
16978                } else {
16979                  return br.readBits(nbits) + (1 << nbits);
16980                }
16981              }
16982              return 0;
16983            }
16984            function MetaBlockLength() {
16985              this.meta_block_length = 0;
16986              this.input_end = 0;
16987              this.is_uncompressed = 0;
16988              this.is_metadata = false;
16989            }
16990            function DecodeMetaBlockLength(br) {
16991              var out = new MetaBlockLength();
16992              var size_nibbles;
16993              var size_bytes;
16994              var i2;
16995              out.input_end = br.readBits(1);
16996              if (out.input_end && br.readBits(1)) {
16997                return out;
16998              }
16999              size_nibbles = br.readBits(2) + 4;
17000              if (size_nibbles === 7) {
17001                out.is_metadata = true;
17002                if (br.readBits(1) !== 0)
17003                  throw new Error("Invalid reserved bit");
17004                size_bytes = br.readBits(2);
17005                if (size_bytes === 0) return out;
17006                for (i2 = 0; i2 < size_bytes; i2++) {
17007                  var next_byte = br.readBits(8);
17008                  if (i2 + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
17009                    throw new Error("Invalid size byte");
17010                  out.meta_block_length |= next_byte << i2 * 8;
17011                }
17012              } else {
17013                for (i2 = 0; i2 < size_nibbles; ++i2) {
17014                  var next_nibble = br.readBits(4);
17015                  if (i2 + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
17016                    throw new Error("Invalid size nibble");
17017                  out.meta_block_length |= next_nibble << i2 * 4;
17018                }
17019              }
17020              ++out.meta_block_length;
17021              if (!out.input_end && !out.is_metadata) {
17022                out.is_uncompressed = br.readBits(1);
17023              }
17024              return out;
17025            }
17026            function ReadSymbol(table, index2, br) {
17027              var start_index = index2;
17028              var nbits;
17029              br.fillBitWindow();
17030              index2 += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK;
17031              nbits = table[index2].bits - HUFFMAN_TABLE_BITS;
17032              if (nbits > 0) {
17033                br.bit_pos_ += HUFFMAN_TABLE_BITS;
17034                index2 += table[index2].value;
17035                index2 += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1;
17036              }
17037              br.bit_pos_ += table[index2].bits;
17038              return table[index2].value;
17039            }
17040            function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
17041              var symbol = 0;
17042              var prev_code_len = kDefaultCodeLength;
17043              var repeat = 0;
17044              var repeat_code_len = 0;
17045              var space = 32768;
17046              var table = [];
17047              for (var i2 = 0; i2 < 32; i2++)
17048                table.push(new HuffmanCode(0, 0));
17049              BrotliBuildHuffmanTable(
17050                table,
17051                0,
17052                5,
17053                code_length_code_lengths,
17054                CODE_LENGTH_CODES
17055              );
17056              while (symbol < num_symbols && space > 0) {
17057                var p3 = 0;
17058                var code_len;
17059                br.readMoreInput();
17060                br.fillBitWindow();
17061                p3 += br.val_ >>> br.bit_pos_ & 31;
17062                br.bit_pos_ += table[p3].bits;
17063                code_len = table[p3].value & 255;
17064                if (code_len < kCodeLengthRepeatCode) {
17065                  repeat = 0;
17066                  code_lengths[symbol++] = code_len;
17067                  if (code_len !== 0) {
17068                    prev_code_len = code_len;
17069                    space -= 32768 >> code_len;
17070                  }
17071                } else {
17072                  var extra_bits = code_len - 14;
17073                  var old_repeat;
17074                  var repeat_delta;
17075                  var new_len = 0;
17076                  if (code_len === kCodeLengthRepeatCode) {
17077                    new_len = prev_code_len;
17078                  }
17079                  if (repeat_code_len !== new_len) {
17080                    repeat = 0;
17081                    repeat_code_len = new_len;
17082                  }
17083                  old_repeat = repeat;
17084                  if (repeat > 0) {
17085                    repeat -= 2;
17086                    repeat <<= extra_bits;
17087                  }
17088                  repeat += br.readBits(extra_bits) + 3;
17089                  repeat_delta = repeat - old_repeat;
17090                  if (symbol + repeat_delta > num_symbols) {
17091                    throw new Error(
17092                      "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols"
17093                    );
17094                  }
17095                  for (var x2 = 0; x2 < repeat_delta; x2++)
17096                    code_lengths[symbol + x2] = repeat_code_len;
17097                  symbol += repeat_delta;
17098                  if (repeat_code_len !== 0) {
17099                    space -= repeat_delta << 15 - repeat_code_len;
17100                  }
17101                }
17102              }
17103              if (space !== 0) {
17104                throw new Error(
17105                  "[ReadHuffmanCodeLengths] space = " + space
17106                );
17107              }
17108              for (; symbol < num_symbols; symbol++)
17109                code_lengths[symbol] = 0;
17110            }
17111            function ReadHuffmanCode(alphabet_size, tables, table, br) {
17112              var table_size = 0;
17113              var simple_code_or_skip;
17114              var code_lengths = new Uint8Array(alphabet_size);
17115              br.readMoreInput();
17116              simple_code_or_skip = br.readBits(2);
17117              if (simple_code_or_skip === 1) {
17118                var i2;
17119                var max_bits_counter = alphabet_size - 1;
17120                var max_bits = 0;
17121                var symbols = new Int32Array(4);
17122                var num_symbols = br.readBits(2) + 1;
17123                while (max_bits_counter) {
17124                  max_bits_counter >>= 1;
17125                  ++max_bits;
17126                }
17127                for (i2 = 0; i2 < num_symbols; ++i2) {
17128                  symbols[i2] = br.readBits(max_bits) % alphabet_size;
17129                  code_lengths[symbols[i2]] = 2;
17130                }
17131                code_lengths[symbols[0]] = 1;
17132                switch (num_symbols) {
17133                  case 1:
17134                    break;
17135                  case 3:
17136                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) {
17137                      throw new Error(
17138                        "[ReadHuffmanCode] invalid symbols"
17139                      );
17140                    }
17141                    break;
17142                  case 2:
17143                    if (symbols[0] === symbols[1]) {
17144                      throw new Error(
17145                        "[ReadHuffmanCode] invalid symbols"
17146                      );
17147                    }
17148                    code_lengths[symbols[1]] = 1;
17149                    break;
17150                  case 4:
17151                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) {
17152                      throw new Error(
17153                        "[ReadHuffmanCode] invalid symbols"
17154                      );
17155                    }
17156                    if (br.readBits(1)) {
17157                      code_lengths[symbols[2]] = 3;
17158                      code_lengths[symbols[3]] = 3;
17159                    } else {
17160                      code_lengths[symbols[0]] = 2;
17161                    }
17162                    break;
17163                }
17164              } else {
17165                var i2;
17166                var code_length_code_lengths = new Uint8Array(
17167                  CODE_LENGTH_CODES
17168                );
17169                var space = 32;
17170                var num_codes = 0;
17171                var huff = [
17172                  new HuffmanCode(2, 0),
17173                  new HuffmanCode(2, 4),
17174                  new HuffmanCode(2, 3),
17175                  new HuffmanCode(3, 2),
17176                  new HuffmanCode(2, 0),
17177                  new HuffmanCode(2, 4),
17178                  new HuffmanCode(2, 3),
17179                  new HuffmanCode(4, 1),
17180                  new HuffmanCode(2, 0),
17181                  new HuffmanCode(2, 4),
17182                  new HuffmanCode(2, 3),
17183                  new HuffmanCode(3, 2),
17184                  new HuffmanCode(2, 0),
17185                  new HuffmanCode(2, 4),
17186                  new HuffmanCode(2, 3),
17187                  new HuffmanCode(4, 5)
17188                ];
17189                for (i2 = simple_code_or_skip; i2 < CODE_LENGTH_CODES && space > 0; ++i2) {
17190                  var code_len_idx = kCodeLengthCodeOrder[i2];
17191                  var p3 = 0;
17192                  var v2;
17193                  br.fillBitWindow();
17194                  p3 += br.val_ >>> br.bit_pos_ & 15;
17195                  br.bit_pos_ += huff[p3].bits;
17196                  v2 = huff[p3].value;
17197                  code_length_code_lengths[code_len_idx] = v2;
17198                  if (v2 !== 0) {
17199                    space -= 32 >> v2;
17200                    ++num_codes;
17201                  }
17202                }
17203                if (!(num_codes === 1 || space === 0))
17204                  throw new Error(
17205                    "[ReadHuffmanCode] invalid num_codes or space"
17206                  );
17207                ReadHuffmanCodeLengths(
17208                  code_length_code_lengths,
17209                  alphabet_size,
17210                  code_lengths,
17211                  br
17212                );
17213              }
17214              table_size = BrotliBuildHuffmanTable(
17215                tables,
17216                table,
17217                HUFFMAN_TABLE_BITS,
17218                code_lengths,
17219                alphabet_size
17220              );
17221              if (table_size === 0) {
17222                throw new Error(
17223                  "[ReadHuffmanCode] BuildHuffmanTable failed: "
17224                );
17225              }
17226              return table_size;
17227            }
17228            function ReadBlockLength(table, index2, br) {
17229              var code;
17230              var nbits;
17231              code = ReadSymbol(table, index2, br);
17232              nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
17233              return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
17234            }
17235            function TranslateShortCodes(code, ringbuffer, index2) {
17236              var val;
17237              if (code < NUM_DISTANCE_SHORT_CODES) {
17238                index2 += kDistanceShortCodeIndexOffset[code];
17239                index2 &= 3;
17240                val = ringbuffer[index2] + kDistanceShortCodeValueOffset[code];
17241              } else {
17242                val = code - NUM_DISTANCE_SHORT_CODES + 1;
17243              }
17244              return val;
17245            }
17246            function MoveToFront(v2, index2) {
17247              var value = v2[index2];
17248              var i2 = index2;
17249              for (; i2; --i2) v2[i2] = v2[i2 - 1];
17250              v2[0] = value;
17251            }
17252            function InverseMoveToFrontTransform(v2, v_len) {
17253              var mtf = new Uint8Array(256);
17254              var i2;
17255              for (i2 = 0; i2 < 256; ++i2) {
17256                mtf[i2] = i2;
17257              }
17258              for (i2 = 0; i2 < v_len; ++i2) {
17259                var index2 = v2[i2];
17260                v2[i2] = mtf[index2];
17261                if (index2) MoveToFront(mtf, index2);
17262              }
17263            }
17264            function HuffmanTreeGroup(alphabet_size, num_htrees) {
17265              this.alphabet_size = alphabet_size;
17266              this.num_htrees = num_htrees;
17267              this.codes = new Array(
17268                num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5]
17269              );
17270              this.htrees = new Uint32Array(num_htrees);
17271            }
17272            HuffmanTreeGroup.prototype.decode = function(br) {
17273              var i2;
17274              var table_size;
17275              var next = 0;
17276              for (i2 = 0; i2 < this.num_htrees; ++i2) {
17277                this.htrees[i2] = next;
17278                table_size = ReadHuffmanCode(
17279                  this.alphabet_size,
17280                  this.codes,
17281                  next,
17282                  br
17283                );
17284                next += table_size;
17285              }
17286            };
17287            function DecodeContextMap(context_map_size, br) {
17288              var out = { num_htrees: null, context_map: null };
17289              var use_rle_for_zeros;
17290              var max_run_length_prefix = 0;
17291              var table;
17292              var i2;
17293              br.readMoreInput();
17294              var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
17295              var context_map = out.context_map = new Uint8Array(
17296                context_map_size
17297              );
17298              if (num_htrees <= 1) {
17299                return out;
17300              }
17301              use_rle_for_zeros = br.readBits(1);
17302              if (use_rle_for_zeros) {
17303                max_run_length_prefix = br.readBits(4) + 1;
17304              }
17305              table = [];
17306              for (i2 = 0; i2 < HUFFMAN_MAX_TABLE_SIZE; i2++) {
17307                table[i2] = new HuffmanCode(0, 0);
17308              }
17309              ReadHuffmanCode(
17310                num_htrees + max_run_length_prefix,
17311                table,
17312                0,
17313                br
17314              );
17315              for (i2 = 0; i2 < context_map_size; ) {
17316                var code;
17317                br.readMoreInput();
17318                code = ReadSymbol(table, 0, br);
17319                if (code === 0) {
17320                  context_map[i2] = 0;
17321                  ++i2;
17322                } else if (code <= max_run_length_prefix) {
17323                  var reps = 1 + (1 << code) + br.readBits(code);
17324                  while (--reps) {
17325                    if (i2 >= context_map_size) {
17326                      throw new Error(
17327                        "[DecodeContextMap] i >= context_map_size"
17328                      );
17329                    }
17330                    context_map[i2] = 0;
17331                    ++i2;
17332                  }
17333                } else {
17334                  context_map[i2] = code - max_run_length_prefix;
17335                  ++i2;
17336                }
17337              }
17338              if (br.readBits(1)) {
17339                InverseMoveToFrontTransform(
17340                  context_map,
17341                  context_map_size
17342                );
17343              }
17344              return out;
17345            }
17346            function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
17347              var ringbuffer = tree_type * 2;
17348              var index2 = tree_type;
17349              var type_code = ReadSymbol(
17350                trees,
17351                tree_type * HUFFMAN_MAX_TABLE_SIZE,
17352                br
17353              );
17354              var block_type;
17355              if (type_code === 0) {
17356                block_type = ringbuffers[ringbuffer + (indexes[index2] & 1)];
17357              } else if (type_code === 1) {
17358                block_type = ringbuffers[ringbuffer + (indexes[index2] - 1 & 1)] + 1;
17359              } else {
17360                block_type = type_code - 2;
17361              }
17362              if (block_type >= max_block_type) {
17363                block_type -= max_block_type;
17364              }
17365              block_types[tree_type] = block_type;
17366              ringbuffers[ringbuffer + (indexes[index2] & 1)] = block_type;
17367              ++indexes[index2];
17368            }
17369            function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
17370              var rb_size = ringbuffer_mask + 1;
17371              var rb_pos = pos & ringbuffer_mask;
17372              var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
17373              var nbytes;
17374              if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
17375                while (len-- > 0) {
17376                  br.readMoreInput();
17377                  ringbuffer[rb_pos++] = br.readBits(8);
17378                  if (rb_pos === rb_size) {
17379                    output.write(ringbuffer, rb_size);
17380                    rb_pos = 0;
17381                  }
17382                }
17383                return;
17384              }
17385              if (br.bit_end_pos_ < 32) {
17386                throw new Error(
17387                  "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32"
17388                );
17389              }
17390              while (br.bit_pos_ < 32) {
17391                ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_;
17392                br.bit_pos_ += 8;
17393                ++rb_pos;
17394                --len;
17395              }
17396              nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3;
17397              if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
17398                var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
17399                for (var x2 = 0; x2 < tail; x2++)
17400                  ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
17401                nbytes -= tail;
17402                rb_pos += tail;
17403                len -= tail;
17404                br_pos = 0;
17405              }
17406              for (var x2 = 0; x2 < nbytes; x2++)
17407                ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
17408              rb_pos += nbytes;
17409              len -= nbytes;
17410              if (rb_pos >= rb_size) {
17411                output.write(ringbuffer, rb_size);
17412                rb_pos -= rb_size;
17413                for (var x2 = 0; x2 < rb_pos; x2++)
17414                  ringbuffer[x2] = ringbuffer[rb_size + x2];
17415              }
17416              while (rb_pos + len >= rb_size) {
17417                nbytes = rb_size - rb_pos;
17418                if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
17419                  throw new Error(
17420                    "[CopyUncompressedBlockToOutput] not enough bytes"
17421                  );
17422                }
17423                output.write(ringbuffer, rb_size);
17424                len -= nbytes;
17425                rb_pos = 0;
17426              }
17427              if (br.input_.read(ringbuffer, rb_pos, len) < len) {
17428                throw new Error(
17429                  "[CopyUncompressedBlockToOutput] not enough bytes"
17430                );
17431              }
17432              br.reset();
17433            }
17434            function JumpToByteBoundary(br) {
17435              var new_bit_pos = br.bit_pos_ + 7 & ~7;
17436              var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
17437              return pad_bits == 0;
17438            }
17439            function BrotliDecompressedSize(buffer) {
17440              var input = new BrotliInput(buffer);
17441              var br = new BrotliBitReader(input);
17442              DecodeWindowBits(br);
17443              var out = DecodeMetaBlockLength(br);
17444              return out.meta_block_length;
17445            }
17446            exports2.BrotliDecompressedSize = BrotliDecompressedSize;
17447            function BrotliDecompressBuffer(buffer, output_size) {
17448              var input = new BrotliInput(buffer);
17449              if (output_size == null) {
17450                output_size = BrotliDecompressedSize(buffer);
17451              }
17452              var output_buffer = new Uint8Array(output_size);
17453              var output = new BrotliOutput(output_buffer);
17454              BrotliDecompress(input, output);
17455              if (output.pos < output.buffer.length) {
17456                output.buffer = output.buffer.subarray(
17457                  0,
17458                  output.pos
17459                );
17460              }
17461              return output.buffer;
17462            }
17463            exports2.BrotliDecompressBuffer = BrotliDecompressBuffer;
17464            function BrotliDecompress(input, output) {
17465              var i2;
17466              var pos = 0;
17467              var input_end = 0;
17468              var window_bits = 0;
17469              var max_backward_distance;
17470              var max_distance = 0;
17471              var ringbuffer_size;
17472              var ringbuffer_mask;
17473              var ringbuffer;
17474              var ringbuffer_end;
17475              var dist_rb = [16, 15, 11, 4];
17476              var dist_rb_idx = 0;
17477              var prev_byte1 = 0;
17478              var prev_byte2 = 0;
17479              var hgroup = [
17480                new HuffmanTreeGroup(0, 0),
17481                new HuffmanTreeGroup(0, 0),
17482                new HuffmanTreeGroup(0, 0)
17483              ];
17484              var block_type_trees;
17485              var block_len_trees;
17486              var br;
17487              var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
17488              br = new BrotliBitReader(input);
17489              window_bits = DecodeWindowBits(br);
17490              max_backward_distance = (1 << window_bits) - 16;
17491              ringbuffer_size = 1 << window_bits;
17492              ringbuffer_mask = ringbuffer_size - 1;
17493              ringbuffer = new Uint8Array(
17494                ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength
17495              );
17496              ringbuffer_end = ringbuffer_size;
17497              block_type_trees = [];
17498              block_len_trees = [];
17499              for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) {
17500                block_type_trees[x2] = new HuffmanCode(0, 0);
17501                block_len_trees[x2] = new HuffmanCode(0, 0);
17502              }
17503              while (!input_end) {
17504                var meta_block_remaining_len = 0;
17505                var is_uncompressed;
17506                var block_length = [1 << 28, 1 << 28, 1 << 28];
17507                var block_type = [0];
17508                var num_block_types = [1, 1, 1];
17509                var block_type_rb = [0, 1, 0, 1, 0, 1];
17510                var block_type_rb_index = [0];
17511                var distance_postfix_bits;
17512                var num_direct_distance_codes;
17513                var distance_postfix_mask;
17514                var num_distance_codes;
17515                var context_map = null;
17516                var context_modes = null;
17517                var num_literal_htrees;
17518                var dist_context_map = null;
17519                var num_dist_htrees;
17520                var context_offset = 0;
17521                var context_map_slice = null;
17522                var literal_htree_index = 0;
17523                var dist_context_offset = 0;
17524                var dist_context_map_slice = null;
17525                var dist_htree_index = 0;
17526                var context_lookup_offset1 = 0;
17527                var context_lookup_offset2 = 0;
17528                var context_mode;
17529                var htree_command;
17530                for (i2 = 0; i2 < 3; ++i2) {
17531                  hgroup[i2].codes = null;
17532                  hgroup[i2].htrees = null;
17533                }
17534                br.readMoreInput();
17535                var _out = DecodeMetaBlockLength(br);
17536                meta_block_remaining_len = _out.meta_block_length;
17537                if (pos + meta_block_remaining_len > output.buffer.length) {
17538                  var tmp = new Uint8Array(
17539                    pos + meta_block_remaining_len
17540                  );
17541                  tmp.set(output.buffer);
17542                  output.buffer = tmp;
17543                }
17544                input_end = _out.input_end;
17545                is_uncompressed = _out.is_uncompressed;
17546                if (_out.is_metadata) {
17547                  JumpToByteBoundary(br);
17548                  for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
17549                    br.readMoreInput();
17550                    br.readBits(8);
17551                  }
17552                  continue;
17553                }
17554                if (meta_block_remaining_len === 0) {
17555                  continue;
17556                }
17557                if (is_uncompressed) {
17558                  br.bit_pos_ = br.bit_pos_ + 7 & ~7;
17559                  CopyUncompressedBlockToOutput(
17560                    output,
17561                    meta_block_remaining_len,
17562                    pos,
17563                    ringbuffer,
17564                    ringbuffer_mask,
17565                    br
17566                  );
17567                  pos += meta_block_remaining_len;
17568                  continue;
17569                }
17570                for (i2 = 0; i2 < 3; ++i2) {
17571                  num_block_types[i2] = DecodeVarLenUint8(br) + 1;
17572                  if (num_block_types[i2] >= 2) {
17573                    ReadHuffmanCode(
17574                      num_block_types[i2] + 2,
17575                      block_type_trees,
17576                      i2 * HUFFMAN_MAX_TABLE_SIZE,
17577                      br
17578                    );
17579                    ReadHuffmanCode(
17580                      kNumBlockLengthCodes,
17581                      block_len_trees,
17582                      i2 * HUFFMAN_MAX_TABLE_SIZE,
17583                      br
17584                    );
17585                    block_length[i2] = ReadBlockLength(
17586                      block_len_trees,
17587                      i2 * HUFFMAN_MAX_TABLE_SIZE,
17588                      br
17589                    );
17590                    block_type_rb_index[i2] = 1;
17591                  }
17592                }
17593                br.readMoreInput();
17594                distance_postfix_bits = br.readBits(2);
17595                num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
17596                distance_postfix_mask = (1 << distance_postfix_bits) - 1;
17597                num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits);
17598                context_modes = new Uint8Array(
17599                  num_block_types[0]
17600                );
17601                for (i2 = 0; i2 < num_block_types[0]; ++i2) {
17602                  br.readMoreInput();
17603                  context_modes[i2] = br.readBits(2) << 1;
17604                }
17605                var _o1 = DecodeContextMap(
17606                  num_block_types[0] << kLiteralContextBits,
17607                  br
17608                );
17609                num_literal_htrees = _o1.num_htrees;
17610                context_map = _o1.context_map;
17611                var _o2 = DecodeContextMap(
17612                  num_block_types[2] << kDistanceContextBits,
17613                  br
17614                );
17615                num_dist_htrees = _o2.num_htrees;
17616                dist_context_map = _o2.context_map;
17617                hgroup[0] = new HuffmanTreeGroup(
17618                  kNumLiteralCodes,
17619                  num_literal_htrees
17620                );
17621                hgroup[1] = new HuffmanTreeGroup(
17622                  kNumInsertAndCopyCodes,
17623                  num_block_types[1]
17624                );
17625                hgroup[2] = new HuffmanTreeGroup(
17626                  num_distance_codes,
17627                  num_dist_htrees
17628                );
17629                for (i2 = 0; i2 < 3; ++i2) {
17630                  hgroup[i2].decode(br);
17631                }
17632                context_map_slice = 0;
17633                dist_context_map_slice = 0;
17634                context_mode = context_modes[block_type[0]];
17635                context_lookup_offset1 = Context.lookupOffsets[context_mode];
17636                context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
17637                htree_command = hgroup[1].htrees[0];
17638                while (meta_block_remaining_len > 0) {
17639                  var cmd_code;
17640                  var range_idx;
17641                  var insert_code;
17642                  var copy_code;
17643                  var insert_length;
17644                  var copy_length;
17645                  var distance_code;
17646                  var distance;
17647                  var context;
17648                  var j2;
17649                  var copy_dst;
17650                  br.readMoreInput();
17651                  if (block_length[1] === 0) {
17652                    DecodeBlockType(
17653                      num_block_types[1],
17654                      block_type_trees,
17655                      1,
17656                      block_type,
17657                      block_type_rb,
17658                      block_type_rb_index,
17659                      br
17660                    );
17661                    block_length[1] = ReadBlockLength(
17662                      block_len_trees,
17663                      HUFFMAN_MAX_TABLE_SIZE,
17664                      br
17665                    );
17666                    htree_command = hgroup[1].htrees[block_type[1]];
17667                  }
17668                  --block_length[1];
17669                  cmd_code = ReadSymbol(
17670                    hgroup[1].codes,
17671                    htree_command,
17672                    br
17673                  );
17674                  range_idx = cmd_code >> 6;
17675                  if (range_idx >= 2) {
17676                    range_idx -= 2;
17677                    distance_code = -1;
17678                  } else {
17679                    distance_code = 0;
17680                  }
17681                  insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7);
17682                  copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
17683                  insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(
17684                    Prefix.kInsertLengthPrefixCode[insert_code].nbits
17685                  );
17686                  copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(
17687                    Prefix.kCopyLengthPrefixCode[copy_code].nbits
17688                  );
17689                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
17690                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
17691                  for (j2 = 0; j2 < insert_length; ++j2) {
17692                    br.readMoreInput();
17693                    if (block_length[0] === 0) {
17694                      DecodeBlockType(
17695                        num_block_types[0],
17696                        block_type_trees,
17697                        0,
17698                        block_type,
17699                        block_type_rb,
17700                        block_type_rb_index,
17701                        br
17702                      );
17703                      block_length[0] = ReadBlockLength(
17704                        block_len_trees,
17705                        0,
17706                        br
17707                      );
17708                      context_offset = block_type[0] << kLiteralContextBits;
17709                      context_map_slice = context_offset;
17710                      context_mode = context_modes[block_type[0]];
17711                      context_lookup_offset1 = Context.lookupOffsets[context_mode];
17712                      context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
17713                    }
17714                    context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2];
17715                    literal_htree_index = context_map[context_map_slice + context];
17716                    --block_length[0];
17717                    prev_byte2 = prev_byte1;
17718                    prev_byte1 = ReadSymbol(
17719                      hgroup[0].codes,
17720                      hgroup[0].htrees[literal_htree_index],
17721                      br
17722                    );
17723                    ringbuffer[pos & ringbuffer_mask] = prev_byte1;
17724                    if ((pos & ringbuffer_mask) === ringbuffer_mask) {
17725                      output.write(
17726                        ringbuffer,
17727                        ringbuffer_size
17728                      );
17729                    }
17730                    ++pos;
17731                  }
17732                  meta_block_remaining_len -= insert_length;
17733                  if (meta_block_remaining_len <= 0) break;
17734                  if (distance_code < 0) {
17735                    var context;
17736                    br.readMoreInput();
17737                    if (block_length[2] === 0) {
17738                      DecodeBlockType(
17739                        num_block_types[2],
17740                        block_type_trees,
17741                        2,
17742                        block_type,
17743                        block_type_rb,
17744                        block_type_rb_index,
17745                        br
17746                      );
17747                      block_length[2] = ReadBlockLength(
17748                        block_len_trees,
17749                        2 * HUFFMAN_MAX_TABLE_SIZE,
17750                        br
17751                      );
17752                      dist_context_offset = block_type[2] << kDistanceContextBits;
17753                      dist_context_map_slice = dist_context_offset;
17754                    }
17755                    --block_length[2];
17756                    context = (copy_length > 4 ? 3 : copy_length - 2) & 255;
17757                    dist_htree_index = dist_context_map[dist_context_map_slice + context];
17758                    distance_code = ReadSymbol(
17759                      hgroup[2].codes,
17760                      hgroup[2].htrees[dist_htree_index],
17761                      br
17762                    );
17763                    if (distance_code >= num_direct_distance_codes) {
17764                      var nbits;
17765                      var postfix;
17766                      var offset4;
17767                      distance_code -= num_direct_distance_codes;
17768                      postfix = distance_code & distance_postfix_mask;
17769                      distance_code >>= distance_postfix_bits;
17770                      nbits = (distance_code >> 1) + 1;
17771                      offset4 = (2 + (distance_code & 1) << nbits) - 4;
17772                      distance_code = num_direct_distance_codes + (offset4 + br.readBits(nbits) << distance_postfix_bits) + postfix;
17773                    }
17774                  }
17775                  distance = TranslateShortCodes(
17776                    distance_code,
17777                    dist_rb,
17778                    dist_rb_idx
17779                  );
17780                  if (distance < 0) {
17781                    throw new Error(
17782                      "[BrotliDecompress] invalid distance"
17783                    );
17784                  }
17785                  if (pos < max_backward_distance && max_distance !== max_backward_distance) {
17786                    max_distance = pos;
17787                  } else {
17788                    max_distance = max_backward_distance;
17789                  }
17790                  copy_dst = pos & ringbuffer_mask;
17791                  if (distance > max_distance) {
17792                    if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) {
17793                      var offset4 = BrotliDictionary.offsetsByLength[copy_length];
17794                      var word_id = distance - max_distance - 1;
17795                      var shift4 = BrotliDictionary.sizeBitsByLength[copy_length];
17796                      var mask = (1 << shift4) - 1;
17797                      var word_idx = word_id & mask;
17798                      var transform_idx = word_id >> shift4;
17799                      offset4 += word_idx * copy_length;
17800                      if (transform_idx < Transform.kNumTransforms) {
17801                        var len = Transform.transformDictionaryWord(
17802                          ringbuffer,
17803                          copy_dst,
17804                          offset4,
17805                          copy_length,
17806                          transform_idx
17807                        );
17808                        copy_dst += len;
17809                        pos += len;
17810                        meta_block_remaining_len -= len;
17811                        if (copy_dst >= ringbuffer_end) {
17812                          output.write(
17813                            ringbuffer,
17814                            ringbuffer_size
17815                          );
17816                          for (var _x10 = 0; _x10 < copy_dst - ringbuffer_end; _x10++)
17817                            ringbuffer[_x10] = ringbuffer[ringbuffer_end + _x10];
17818                        }
17819                      } else {
17820                        throw new Error(
17821                          "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
17822                        );
17823                      }
17824                    } else {
17825                      throw new Error(
17826                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
17827                      );
17828                    }
17829                  } else {
17830                    if (distance_code > 0) {
17831                      dist_rb[dist_rb_idx & 3] = distance;
17832                      ++dist_rb_idx;
17833                    }
17834                    if (copy_length > meta_block_remaining_len) {
17835                      throw new Error(
17836                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
17837                      );
17838                    }
17839                    for (j2 = 0; j2 < copy_length; ++j2) {
17840                      ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask];
17841                      if ((pos & ringbuffer_mask) === ringbuffer_mask) {
17842                        output.write(
17843                          ringbuffer,
17844                          ringbuffer_size
17845                        );
17846                      }
17847                      ++pos;
17848                      --meta_block_remaining_len;
17849                    }
17850                  }
17851                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
17852                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
17853                }
17854                pos &= 1073741823;
17855              }
17856              output.write(ringbuffer, pos & ringbuffer_mask);
17857            }
17858            exports2.BrotliDecompress = BrotliDecompress;
17859            BrotliDictionary.init();
17860          },
17861          {
17862            "./bit_reader": 1,
17863            "./context": 2,
17864            "./dictionary": 6,
17865            "./huffman": 7,
17866            "./prefix": 9,
17867            "./streams": 10,
17868            "./transform": 11
17869          }
17870        ],
17871        4: [
17872          function(require2, module2, exports2) {
17873            var base64 = require2("base64-js");
17874            exports2.init = function() {
17875              var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer;
17876              var compressed = base64.toByteArray(
17877                require2("./dictionary.bin.js")
17878              );
17879              return BrotliDecompressBuffer(compressed);
17880            };
17881          },
17882          { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 }
17883        ],
17884        5: [
17885          function(require2, module2, exports2) {
17886            module2.exports = "W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMh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yvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=";
17887          },
17888          {}
17889        ],
17890        6: [
17891          function(require2, module2, exports2) {
17892            var data = require2("./dictionary-browser");
17893            exports2.init = function() {
17894              exports2.dictionary = data.init();
17895            };
17896            exports2.offsetsByLength = new Uint32Array([
17897              0,
17898              0,
17899              0,
17900              0,
17901              0,
17902              4096,
17903              9216,
17904              21504,
17905              35840,
17906              44032,
17907              53248,
17908              63488,
17909              74752,
17910              87040,
17911              93696,
17912              100864,
17913              104704,
17914              106752,
17915              108928,
17916              113536,
17917              115968,
17918              118528,
17919              119872,
17920              121280,
17921              122016
17922            ]);
17923            exports2.sizeBitsByLength = new Uint8Array([
17924              0,
17925              0,
17926              0,
17927              0,
17928              10,
17929              10,
17930              11,
17931              11,
17932              10,
17933              10,
17934              10,
17935              10,
17936              10,
17937              9,
17938              9,
17939              8,
17940              7,
17941              7,
17942              8,
17943              7,
17944              7,
17945              6,
17946              6,
17947              5,
17948              5
17949            ]);
17950            exports2.minDictionaryWordLength = 4;
17951            exports2.maxDictionaryWordLength = 24;
17952          },
17953          { "./dictionary-browser": 4 }
17954        ],
17955        7: [
17956          function(require2, module2, exports2) {
17957            function HuffmanCode(bits, value) {
17958              this.bits = bits;
17959              this.value = value;
17960            }
17961            exports2.HuffmanCode = HuffmanCode;
17962            var MAX_LENGTH = 15;
17963            function GetNextKey(key, len) {
17964              var step = 1 << len - 1;
17965              while (key & step) {
17966                step >>= 1;
17967              }
17968              return (key & step - 1) + step;
17969            }
17970            function ReplicateValue(table, i2, step, end, code) {
17971              do {
17972                end -= step;
17973                table[i2 + end] = new HuffmanCode(
17974                  code.bits,
17975                  code.value
17976                );
17977              } while (end > 0);
17978            }
17979            function NextTableBitSize(count, len, root_bits) {
17980              var left = 1 << len - root_bits;
17981              while (len < MAX_LENGTH) {
17982                left -= count[len];
17983                if (left <= 0) break;
17984                ++len;
17985                left <<= 1;
17986              }
17987              return len - root_bits;
17988            }
17989            exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
17990              var start_table = table;
17991              var code;
17992              var len;
17993              var symbol;
17994              var key;
17995              var step;
17996              var low;
17997              var mask;
17998              var table_bits;
17999              var table_size;
18000              var total_size;
18001              var sorted;
18002              var count = new Int32Array(
18003                MAX_LENGTH + 1
18004              );
18005              var offset4 = new Int32Array(
18006                MAX_LENGTH + 1
18007              );
18008              sorted = new Int32Array(code_lengths_size);
18009              for (symbol = 0; symbol < code_lengths_size; symbol++) {
18010                count[code_lengths[symbol]]++;
18011              }
18012              offset4[1] = 0;
18013              for (len = 1; len < MAX_LENGTH; len++) {
18014                offset4[len + 1] = offset4[len] + count[len];
18015              }
18016              for (symbol = 0; symbol < code_lengths_size; symbol++) {
18017                if (code_lengths[symbol] !== 0) {
18018                  sorted[offset4[code_lengths[symbol]]++] = symbol;
18019                }
18020              }
18021              table_bits = root_bits;
18022              table_size = 1 << table_bits;
18023              total_size = table_size;
18024              if (offset4[MAX_LENGTH] === 1) {
18025                for (key = 0; key < total_size; ++key) {
18026                  root_table[table + key] = new HuffmanCode(
18027                    0,
18028                    sorted[0] & 65535
18029                  );
18030                }
18031                return total_size;
18032              }
18033              key = 0;
18034              symbol = 0;
18035              for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
18036                for (; count[len] > 0; --count[len]) {
18037                  code = new HuffmanCode(
18038                    len & 255,
18039                    sorted[symbol++] & 65535
18040                  );
18041                  ReplicateValue(
18042                    root_table,
18043                    table + key,
18044                    step,
18045                    table_size,
18046                    code
18047                  );
18048                  key = GetNextKey(key, len);
18049                }
18050              }
18051              mask = total_size - 1;
18052              low = -1;
18053              for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
18054                for (; count[len] > 0; --count[len]) {
18055                  if ((key & mask) !== low) {
18056                    table += table_size;
18057                    table_bits = NextTableBitSize(
18058                      count,
18059                      len,
18060                      root_bits
18061                    );
18062                    table_size = 1 << table_bits;
18063                    total_size += table_size;
18064                    low = key & mask;
18065                    root_table[start_table + low] = new HuffmanCode(
18066                      table_bits + root_bits & 255,
18067                      table - start_table - low & 65535
18068                    );
18069                  }
18070                  code = new HuffmanCode(
18071                    len - root_bits & 255,
18072                    sorted[symbol++] & 65535
18073                  );
18074                  ReplicateValue(
18075                    root_table,
18076                    table + (key >> root_bits),
18077                    step,
18078                    table_size,
18079                    code
18080                  );
18081                  key = GetNextKey(key, len);
18082                }
18083              }
18084              return total_size;
18085            };
18086          },
18087          {}
18088        ],
18089        8: [
18090          function(require2, module2, exports2) {
18091            "use strict";
18092            exports2.byteLength = byteLength;
18093            exports2.toByteArray = toByteArray;
18094            exports2.fromByteArray = fromByteArray;
18095            var lookup = [];
18096            var revLookup = [];
18097            var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
18098            var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
18099            for (var i2 = 0, len = code.length; i2 < len; ++i2) {
18100              lookup[i2] = code[i2];
18101              revLookup[code.charCodeAt(i2)] = i2;
18102            }
18103            revLookup["-".charCodeAt(0)] = 62;
18104            revLookup["_".charCodeAt(0)] = 63;
18105            function getLens(b64) {
18106              var len2 = b64.length;
18107              if (len2 % 4 > 0) {
18108                throw new Error(
18109                  "Invalid string. Length must be a multiple of 4"
18110                );
18111              }
18112              var validLen = b64.indexOf("=");
18113              if (validLen === -1) validLen = len2;
18114              var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
18115              return [validLen, placeHoldersLen];
18116            }
18117            function byteLength(b64) {
18118              var lens = getLens(b64);
18119              var validLen = lens[0];
18120              var placeHoldersLen = lens[1];
18121              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
18122            }
18123            function _byteLength(b64, validLen, placeHoldersLen) {
18124              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
18125            }
18126            function toByteArray(b64) {
18127              var tmp;
18128              var lens = getLens(b64);
18129              var validLen = lens[0];
18130              var placeHoldersLen = lens[1];
18131              var arr = new Arr(
18132                _byteLength(b64, validLen, placeHoldersLen)
18133              );
18134              var curByte = 0;
18135              var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
18136              for (var i22 = 0; i22 < len2; i22 += 4) {
18137                tmp = revLookup[b64.charCodeAt(i22)] << 18 | revLookup[b64.charCodeAt(i22 + 1)] << 12 | revLookup[b64.charCodeAt(i22 + 2)] << 6 | revLookup[b64.charCodeAt(i22 + 3)];
18138                arr[curByte++] = tmp >> 16 & 255;
18139                arr[curByte++] = tmp >> 8 & 255;
18140                arr[curByte++] = tmp & 255;
18141              }
18142              if (placeHoldersLen === 2) {
18143                tmp = revLookup[b64.charCodeAt(i22)] << 2 | revLookup[b64.charCodeAt(i22 + 1)] >> 4;
18144                arr[curByte++] = tmp & 255;
18145              }
18146              if (placeHoldersLen === 1) {
18147                tmp = revLookup[b64.charCodeAt(i22)] << 10 | revLookup[b64.charCodeAt(i22 + 1)] << 4 | revLookup[b64.charCodeAt(i22 + 2)] >> 2;
18148                arr[curByte++] = tmp >> 8 & 255;
18149                arr[curByte++] = tmp & 255;
18150              }
18151              return arr;
18152            }
18153            function tripletToBase64(num) {
18154              return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
18155            }
18156            function encodeChunk(uint8, start, end) {
18157              var tmp;
18158              var output = [];
18159              for (var i22 = start; i22 < end; i22 += 3) {
18160                tmp = (uint8[i22] << 16 & 16711680) + (uint8[i22 + 1] << 8 & 65280) + (uint8[i22 + 2] & 255);
18161                output.push(tripletToBase64(tmp));
18162              }
18163              return output.join("");
18164            }
18165            function fromByteArray(uint8) {
18166              var tmp;
18167              var len2 = uint8.length;
18168              var extraBytes = len2 % 3;
18169              var parts = [];
18170              var maxChunkLength = 16383;
18171              for (var i22 = 0, len22 = len2 - extraBytes; i22 < len22; i22 += maxChunkLength) {
18172                parts.push(
18173                  encodeChunk(
18174                    uint8,
18175                    i22,
18176                    i22 + maxChunkLength > len22 ? len22 : i22 + maxChunkLength
18177                  )
18178                );
18179              }
18180              if (extraBytes === 1) {
18181                tmp = uint8[len2 - 1];
18182                parts.push(
18183                  lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
18184                );
18185              } else if (extraBytes === 2) {
18186                tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
18187                parts.push(
18188                  lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
18189                );
18190              }
18191              return parts.join("");
18192            }
18193          },
18194          {}
18195        ],
18196        9: [
18197          function(require2, module2, exports2) {
18198            function PrefixCodeRange(offset4, nbits) {
18199              this.offset = offset4;
18200              this.nbits = nbits;
18201            }
18202            exports2.kBlockLengthPrefixCode = [
18203              new PrefixCodeRange(1, 2),
18204              new PrefixCodeRange(5, 2),
18205              new PrefixCodeRange(9, 2),
18206              new PrefixCodeRange(13, 2),
18207              new PrefixCodeRange(17, 3),
18208              new PrefixCodeRange(25, 3),
18209              new PrefixCodeRange(33, 3),
18210              new PrefixCodeRange(41, 3),
18211              new PrefixCodeRange(49, 4),
18212              new PrefixCodeRange(65, 4),
18213              new PrefixCodeRange(81, 4),
18214              new PrefixCodeRange(97, 4),
18215              new PrefixCodeRange(113, 5),
18216              new PrefixCodeRange(145, 5),
18217              new PrefixCodeRange(177, 5),
18218              new PrefixCodeRange(209, 5),
18219              new PrefixCodeRange(241, 6),
18220              new PrefixCodeRange(305, 6),
18221              new PrefixCodeRange(369, 7),
18222              new PrefixCodeRange(497, 8),
18223              new PrefixCodeRange(753, 9),
18224              new PrefixCodeRange(1265, 10),
18225              new PrefixCodeRange(2289, 11),
18226              new PrefixCodeRange(4337, 12),
18227              new PrefixCodeRange(8433, 13),
18228              new PrefixCodeRange(16625, 24)
18229            ];
18230            exports2.kInsertLengthPrefixCode = [
18231              new PrefixCodeRange(0, 0),
18232              new PrefixCodeRange(1, 0),
18233              new PrefixCodeRange(2, 0),
18234              new PrefixCodeRange(3, 0),
18235              new PrefixCodeRange(4, 0),
18236              new PrefixCodeRange(5, 0),
18237              new PrefixCodeRange(6, 1),
18238              new PrefixCodeRange(8, 1),
18239              new PrefixCodeRange(10, 2),
18240              new PrefixCodeRange(14, 2),
18241              new PrefixCodeRange(18, 3),
18242              new PrefixCodeRange(26, 3),
18243              new PrefixCodeRange(34, 4),
18244              new PrefixCodeRange(50, 4),
18245              new PrefixCodeRange(66, 5),
18246              new PrefixCodeRange(98, 5),
18247              new PrefixCodeRange(130, 6),
18248              new PrefixCodeRange(194, 7),
18249              new PrefixCodeRange(322, 8),
18250              new PrefixCodeRange(578, 9),
18251              new PrefixCodeRange(1090, 10),
18252              new PrefixCodeRange(2114, 12),
18253              new PrefixCodeRange(6210, 14),
18254              new PrefixCodeRange(22594, 24)
18255            ];
18256            exports2.kCopyLengthPrefixCode = [
18257              new PrefixCodeRange(2, 0),
18258              new PrefixCodeRange(3, 0),
18259              new PrefixCodeRange(4, 0),
18260              new PrefixCodeRange(5, 0),
18261              new PrefixCodeRange(6, 0),
18262              new PrefixCodeRange(7, 0),
18263              new PrefixCodeRange(8, 0),
18264              new PrefixCodeRange(9, 0),
18265              new PrefixCodeRange(10, 1),
18266              new PrefixCodeRange(12, 1),
18267              new PrefixCodeRange(14, 2),
18268              new PrefixCodeRange(18, 2),
18269              new PrefixCodeRange(22, 3),
18270              new PrefixCodeRange(30, 3),
18271              new PrefixCodeRange(38, 4),
18272              new PrefixCodeRange(54, 4),
18273              new PrefixCodeRange(70, 5),
18274              new PrefixCodeRange(102, 5),
18275              new PrefixCodeRange(134, 6),
18276              new PrefixCodeRange(198, 7),
18277              new PrefixCodeRange(326, 8),
18278              new PrefixCodeRange(582, 9),
18279              new PrefixCodeRange(1094, 10),
18280              new PrefixCodeRange(2118, 24)
18281            ];
18282            exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16];
18283            exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16];
18284          },
18285          {}
18286        ],
18287        10: [
18288          function(require2, module2, exports2) {
18289            function BrotliInput(buffer) {
18290              this.buffer = buffer;
18291              this.pos = 0;
18292            }
18293            BrotliInput.prototype.read = function(buf, i2, count) {
18294              if (this.pos + count > this.buffer.length) {
18295                count = this.buffer.length - this.pos;
18296              }
18297              for (var p3 = 0; p3 < count; p3++)
18298                buf[i2 + p3] = this.buffer[this.pos + p3];
18299              this.pos += count;
18300              return count;
18301            };
18302            exports2.BrotliInput = BrotliInput;
18303            function BrotliOutput(buf) {
18304              this.buffer = buf;
18305              this.pos = 0;
18306            }
18307            BrotliOutput.prototype.write = function(buf, count) {
18308              if (this.pos + count > this.buffer.length)
18309                throw new Error(
18310                  "Output buffer is not large enough"
18311                );
18312              this.buffer.set(buf.subarray(0, count), this.pos);
18313              this.pos += count;
18314              return count;
18315            };
18316            exports2.BrotliOutput = BrotliOutput;
18317          },
18318          {}
18319        ],
18320        11: [
18321          function(require2, module2, exports2) {
18322            var BrotliDictionary = require2("./dictionary");
18323            var kIdentity = 0;
18324            var kOmitLast1 = 1;
18325            var kOmitLast2 = 2;
18326            var kOmitLast3 = 3;
18327            var kOmitLast4 = 4;
18328            var kOmitLast5 = 5;
18329            var kOmitLast6 = 6;
18330            var kOmitLast7 = 7;
18331            var kOmitLast8 = 8;
18332            var kOmitLast9 = 9;
18333            var kUppercaseFirst = 10;
18334            var kUppercaseAll = 11;
18335            var kOmitFirst1 = 12;
18336            var kOmitFirst2 = 13;
18337            var kOmitFirst3 = 14;
18338            var kOmitFirst4 = 15;
18339            var kOmitFirst5 = 16;
18340            var kOmitFirst6 = 17;
18341            var kOmitFirst7 = 18;
18342            var kOmitFirst8 = 19;
18343            var kOmitFirst9 = 20;
18344            function Transform(prefix, transform, suffix) {
18345              this.prefix = new Uint8Array(prefix.length);
18346              this.transform = transform;
18347              this.suffix = new Uint8Array(suffix.length);
18348              for (var i2 = 0; i2 < prefix.length; i2++)
18349                this.prefix[i2] = prefix.charCodeAt(i2);
18350              for (var i2 = 0; i2 < suffix.length; i2++)
18351                this.suffix[i2] = suffix.charCodeAt(i2);
18352            }
18353            var kTransforms = [
18354              new Transform("", kIdentity, ""),
18355              new Transform("", kIdentity, " "),
18356              new Transform(" ", kIdentity, " "),
18357              new Transform("", kOmitFirst1, ""),
18358              new Transform("", kUppercaseFirst, " "),
18359              new Transform("", kIdentity, " the "),
18360              new Transform(" ", kIdentity, ""),
18361              new Transform("s ", kIdentity, " "),
18362              new Transform("", kIdentity, " of "),
18363              new Transform("", kUppercaseFirst, ""),
18364              new Transform("", kIdentity, " and "),
18365              new Transform("", kOmitFirst2, ""),
18366              new Transform("", kOmitLast1, ""),
18367              new Transform(", ", kIdentity, " "),
18368              new Transform("", kIdentity, ", "),
18369              new Transform(" ", kUppercaseFirst, " "),
18370              new Transform("", kIdentity, " in "),
18371              new Transform("", kIdentity, " to "),
18372              new Transform("e ", kIdentity, " "),
18373              new Transform("", kIdentity, '"'),
18374              new Transform("", kIdentity, "."),
18375              new Transform("", kIdentity, '">'),
18376              new Transform("", kIdentity, "\n"),
18377              new Transform("", kOmitLast3, ""),
18378              new Transform("", kIdentity, "]"),
18379              new Transform("", kIdentity, " for "),
18380              new Transform("", kOmitFirst3, ""),
18381              new Transform("", kOmitLast2, ""),
18382              new Transform("", kIdentity, " a "),
18383              new Transform("", kIdentity, " that "),
18384              new Transform(" ", kUppercaseFirst, ""),
18385              new Transform("", kIdentity, ". "),
18386              new Transform(".", kIdentity, ""),
18387              new Transform(" ", kIdentity, ", "),
18388              new Transform("", kOmitFirst4, ""),
18389              new Transform("", kIdentity, " with "),
18390              new Transform("", kIdentity, "'"),
18391              new Transform("", kIdentity, " from "),
18392              new Transform("", kIdentity, " by "),
18393              new Transform("", kOmitFirst5, ""),
18394              new Transform("", kOmitFirst6, ""),
18395              new Transform(" the ", kIdentity, ""),
18396              new Transform("", kOmitLast4, ""),
18397              new Transform("", kIdentity, ". The "),
18398              new Transform("", kUppercaseAll, ""),
18399              new Transform("", kIdentity, " on "),
18400              new Transform("", kIdentity, " as "),
18401              new Transform("", kIdentity, " is "),
18402              new Transform("", kOmitLast7, ""),
18403              new Transform("", kOmitLast1, "ing "),
18404              new Transform("", kIdentity, "\n    "),
18405              new Transform("", kIdentity, ":"),
18406              new Transform(" ", kIdentity, ". "),
18407              new Transform("", kIdentity, "ed "),
18408              new Transform("", kOmitFirst9, ""),
18409              new Transform("", kOmitFirst7, ""),
18410              new Transform("", kOmitLast6, ""),
18411              new Transform("", kIdentity, "("),
18412              new Transform("", kUppercaseFirst, ", "),
18413              new Transform("", kOmitLast8, ""),
18414              new Transform("", kIdentity, " at "),
18415              new Transform("", kIdentity, "ly "),
18416              new Transform(" the ", kIdentity, " of "),
18417              new Transform("", kOmitLast5, ""),
18418              new Transform("", kOmitLast9, ""),
18419              new Transform(" ", kUppercaseFirst, ", "),
18420              new Transform("", kUppercaseFirst, '"'),
18421              new Transform(".", kIdentity, "("),
18422              new Transform("", kUppercaseAll, " "),
18423              new Transform("", kUppercaseFirst, '">'),
18424              new Transform("", kIdentity, '="'),
18425              new Transform(" ", kIdentity, "."),
18426              new Transform(".com/", kIdentity, ""),
18427              new Transform(" the ", kIdentity, " of the "),
18428              new Transform("", kUppercaseFirst, "'"),
18429              new Transform("", kIdentity, ". This "),
18430              new Transform("", kIdentity, ","),
18431              new Transform(".", kIdentity, " "),
18432              new Transform("", kUppercaseFirst, "("),
18433              new Transform("", kUppercaseFirst, "."),
18434              new Transform("", kIdentity, " not "),
18435              new Transform(" ", kIdentity, '="'),
18436              new Transform("", kIdentity, "er "),
18437              new Transform(" ", kUppercaseAll, " "),
18438              new Transform("", kIdentity, "al "),
18439              new Transform(" ", kUppercaseAll, ""),
18440              new Transform("", kIdentity, "='"),
18441              new Transform("", kUppercaseAll, '"'),
18442              new Transform("", kUppercaseFirst, ". "),
18443              new Transform(" ", kIdentity, "("),
18444              new Transform("", kIdentity, "ful "),
18445              new Transform(" ", kUppercaseFirst, ". "),
18446              new Transform("", kIdentity, "ive "),
18447              new Transform("", kIdentity, "less "),
18448              new Transform("", kUppercaseAll, "'"),
18449              new Transform("", kIdentity, "est "),
18450              new Transform(" ", kUppercaseFirst, "."),
18451              new Transform("", kUppercaseAll, '">'),
18452              new Transform(" ", kIdentity, "='"),
18453              new Transform("", kUppercaseFirst, ","),
18454              new Transform("", kIdentity, "ize "),
18455              new Transform("", kUppercaseAll, "."),
18456              new Transform("\xC2\xA0", kIdentity, ""),
18457              new Transform(" ", kIdentity, ","),
18458              new Transform("", kUppercaseFirst, '="'),
18459              new Transform("", kUppercaseAll, '="'),
18460              new Transform("", kIdentity, "ous "),
18461              new Transform("", kUppercaseAll, ", "),
18462              new Transform("", kUppercaseFirst, "='"),
18463              new Transform(" ", kUppercaseFirst, ","),
18464              new Transform(" ", kUppercaseAll, '="'),
18465              new Transform(" ", kUppercaseAll, ", "),
18466              new Transform("", kUppercaseAll, ","),
18467              new Transform("", kUppercaseAll, "("),
18468              new Transform("", kUppercaseAll, ". "),
18469              new Transform(" ", kUppercaseAll, "."),
18470              new Transform("", kUppercaseAll, "='"),
18471              new Transform(" ", kUppercaseAll, ". "),
18472              new Transform(" ", kUppercaseFirst, '="'),
18473              new Transform(" ", kUppercaseAll, "='"),
18474              new Transform(" ", kUppercaseFirst, "='")
18475            ];
18476            exports2.kTransforms = kTransforms;
18477            exports2.kNumTransforms = kTransforms.length;
18478            function ToUpperCase(p3, i2) {
18479              if (p3[i2] < 192) {
18480                if (p3[i2] >= 97 && p3[i2] <= 122) {
18481                  p3[i2] ^= 32;
18482                }
18483                return 1;
18484              }
18485              if (p3[i2] < 224) {
18486                p3[i2 + 1] ^= 32;
18487                return 2;
18488              }
18489              p3[i2 + 2] ^= 5;
18490              return 3;
18491            }
18492            exports2.transformDictionaryWord = function(dst, idx, word, len, transform) {
18493              var prefix = kTransforms[transform].prefix;
18494              var suffix = kTransforms[transform].suffix;
18495              var t2 = kTransforms[transform].transform;
18496              var skip = t2 < kOmitFirst1 ? 0 : t2 - (kOmitFirst1 - 1);
18497              var i2 = 0;
18498              var start_idx = idx;
18499              var uppercase;
18500              if (skip > len) {
18501                skip = len;
18502              }
18503              var prefix_pos = 0;
18504              while (prefix_pos < prefix.length) {
18505                dst[idx++] = prefix[prefix_pos++];
18506              }
18507              word += skip;
18508              len -= skip;
18509              if (t2 <= kOmitLast9) {
18510                len -= t2;
18511              }
18512              for (i2 = 0; i2 < len; i2++) {
18513                dst[idx++] = BrotliDictionary.dictionary[word + i2];
18514              }
18515              uppercase = idx - len;
18516              if (t2 === kUppercaseFirst) {
18517                ToUpperCase(dst, uppercase);
18518              } else if (t2 === kUppercaseAll) {
18519                while (len > 0) {
18520                  var step = ToUpperCase(dst, uppercase);
18521                  uppercase += step;
18522                  len -= step;
18523                }
18524              }
18525              var suffix_pos = 0;
18526              while (suffix_pos < suffix.length) {
18527                dst[idx++] = suffix[suffix_pos++];
18528              }
18529              return idx - start_idx;
18530            };
18531          },
18532          { "./dictionary": 6 }
18533        ],
18534        12: [
18535          function(require2, module2, exports2) {
18536            module2.exports = require2("./dec/decode").BrotliDecompressBuffer;
18537          },
18538          { "./dec/decode": 3 }
18539        ]
18540      },
18541      {},
18542      [12]
18543    )(12);
18544  })();
18545  
18546  // packages/global-styles-ui/build-module/font-library/lib/inflate.mjs
18547  var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
18548    get: (a2, b2) => (typeof __require !== "undefined" ? __require : a2)[b2]
18549  }) : x2)(function(x2) {
18550    if (typeof __require !== "undefined") return __require.apply(this, arguments);
18551    throw Error('Dynamic require of "' + x2 + '" is not supported');
18552  });
18553  var inflate_default = (function() {
18554    var define, module, exports;
18555    return (/* @__PURE__ */ (function() {
18556      function r3(e2, n2, t2) {
18557        function o2(i22, f2) {
18558          if (!n2[i22]) {
18559            if (!e2[i22]) {
18560              var c2 = "function" == typeof __require3 && __require3;
18561              if (!f2 && c2) return c2(i22, true);
18562              if (u2) return u2(i22, true);
18563              var a2 = new Error("Cannot find module '" + i22 + "'");
18564              throw a2.code = "MODULE_NOT_FOUND", a2;
18565            }
18566            var p3 = n2[i22] = { exports: {} };
18567            e2[i22][0].call(
18568              p3.exports,
18569              function(r22) {
18570                var n22 = e2[i22][1][r22];
18571                return o2(n22 || r22);
18572              },
18573              p3,
18574              p3.exports,
18575              r3,
18576              e2,
18577              n2,
18578              t2
18579            );
18580          }
18581          return n2[i22].exports;
18582        }
18583        for (var u2 = "function" == typeof __require3 && __require3, i2 = 0; i2 < t2.length; i2++)
18584          o2(t2[i2]);
18585        return o2;
18586      }
18587      return r3;
18588    })())(
18589      {
18590        1: [
18591          function(require2, module2, exports2) {
18592            "use strict";
18593            var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined";
18594            function _has(obj, key) {
18595              return Object.prototype.hasOwnProperty.call(obj, key);
18596            }
18597            exports2.assign = function(obj) {
18598              var sources = Array.prototype.slice.call(
18599                arguments,
18600                1
18601              );
18602              while (sources.length) {
18603                var source = sources.shift();
18604                if (!source) {
18605                  continue;
18606                }
18607                if (typeof source !== "object") {
18608                  throw new TypeError(
18609                    source + "must be non-object"
18610                  );
18611                }
18612                for (var p3 in source) {
18613                  if (_has(source, p3)) {
18614                    obj[p3] = source[p3];
18615                  }
18616                }
18617              }
18618              return obj;
18619            };
18620            exports2.shrinkBuf = function(buf, size4) {
18621              if (buf.length === size4) {
18622                return buf;
18623              }
18624              if (buf.subarray) {
18625                return buf.subarray(0, size4);
18626              }
18627              buf.length = size4;
18628              return buf;
18629            };
18630            var fnTyped = {
18631              arraySet: function(dest, src, src_offs, len, dest_offs) {
18632                if (src.subarray && dest.subarray) {
18633                  dest.set(
18634                    src.subarray(src_offs, src_offs + len),
18635                    dest_offs
18636                  );
18637                  return;
18638                }
18639                for (var i2 = 0; i2 < len; i2++) {
18640                  dest[dest_offs + i2] = src[src_offs + i2];
18641                }
18642              },
18643              // Join array of chunks to single array.
18644              flattenChunks: function(chunks) {
18645                var i2, l2, len, pos, chunk, result;
18646                len = 0;
18647                for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) {
18648                  len += chunks[i2].length;
18649                }
18650                result = new Uint8Array(len);
18651                pos = 0;
18652                for (i2 = 0, l2 = chunks.length; i2 < l2; i2++) {
18653                  chunk = chunks[i2];
18654                  result.set(chunk, pos);
18655                  pos += chunk.length;
18656                }
18657                return result;
18658              }
18659            };
18660            var fnUntyped = {
18661              arraySet: function(dest, src, src_offs, len, dest_offs) {
18662                for (var i2 = 0; i2 < len; i2++) {
18663                  dest[dest_offs + i2] = src[src_offs + i2];
18664                }
18665              },
18666              // Join array of chunks to single array.
18667              flattenChunks: function(chunks) {
18668                return [].concat.apply([], chunks);
18669              }
18670            };
18671            exports2.setTyped = function(on) {
18672              if (on) {
18673                exports2.Buf8 = Uint8Array;
18674                exports2.Buf16 = Uint16Array;
18675                exports2.Buf32 = Int32Array;
18676                exports2.assign(exports2, fnTyped);
18677              } else {
18678                exports2.Buf8 = Array;
18679                exports2.Buf16 = Array;
18680                exports2.Buf32 = Array;
18681                exports2.assign(exports2, fnUntyped);
18682              }
18683            };
18684            exports2.setTyped(TYPED_OK);
18685          },
18686          {}
18687        ],
18688        2: [
18689          function(require2, module2, exports2) {
18690            "use strict";
18691            var utils = require2("./common");
18692            var STR_APPLY_OK = true;
18693            var STR_APPLY_UIA_OK = true;
18694            try {
18695              String.fromCharCode.apply(null, [0]);
18696            } catch (__45) {
18697              STR_APPLY_OK = false;
18698            }
18699            try {
18700              String.fromCharCode.apply(null, new Uint8Array(1));
18701            } catch (__45) {
18702              STR_APPLY_UIA_OK = false;
18703            }
18704            var _utf8len = new utils.Buf8(256);
18705            for (var q = 0; q < 256; q++) {
18706              _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1;
18707            }
18708            _utf8len[254] = _utf8len[254] = 1;
18709            exports2.string2buf = function(str) {
18710              var buf, c2, c22, m_pos, i2, str_len = str.length, buf_len = 0;
18711              for (m_pos = 0; m_pos < str_len; m_pos++) {
18712                c2 = str.charCodeAt(m_pos);
18713                if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
18714                  c22 = str.charCodeAt(m_pos + 1);
18715                  if ((c22 & 64512) === 56320) {
18716                    c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
18717                    m_pos++;
18718                  }
18719                }
18720                buf_len += c2 < 128 ? 1 : c2 < 2048 ? 2 : c2 < 65536 ? 3 : 4;
18721              }
18722              buf = new utils.Buf8(buf_len);
18723              for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) {
18724                c2 = str.charCodeAt(m_pos);
18725                if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
18726                  c22 = str.charCodeAt(m_pos + 1);
18727                  if ((c22 & 64512) === 56320) {
18728                    c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
18729                    m_pos++;
18730                  }
18731                }
18732                if (c2 < 128) {
18733                  buf[i2++] = c2;
18734                } else if (c2 < 2048) {
18735                  buf[i2++] = 192 | c2 >>> 6;
18736                  buf[i2++] = 128 | c2 & 63;
18737                } else if (c2 < 65536) {
18738                  buf[i2++] = 224 | c2 >>> 12;
18739                  buf[i2++] = 128 | c2 >>> 6 & 63;
18740                  buf[i2++] = 128 | c2 & 63;
18741                } else {
18742                  buf[i2++] = 240 | c2 >>> 18;
18743                  buf[i2++] = 128 | c2 >>> 12 & 63;
18744                  buf[i2++] = 128 | c2 >>> 6 & 63;
18745                  buf[i2++] = 128 | c2 & 63;
18746                }
18747              }
18748              return buf;
18749            };
18750            function buf2binstring(buf, len) {
18751              if (len < 65534) {
18752                if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) {
18753                  return String.fromCharCode.apply(
18754                    null,
18755                    utils.shrinkBuf(buf, len)
18756                  );
18757                }
18758              }
18759              var result = "";
18760              for (var i2 = 0; i2 < len; i2++) {
18761                result += String.fromCharCode(buf[i2]);
18762              }
18763              return result;
18764            }
18765            exports2.buf2binstring = function(buf) {
18766              return buf2binstring(buf, buf.length);
18767            };
18768            exports2.binstring2buf = function(str) {
18769              var buf = new utils.Buf8(str.length);
18770              for (var i2 = 0, len = buf.length; i2 < len; i2++) {
18771                buf[i2] = str.charCodeAt(i2);
18772              }
18773              return buf;
18774            };
18775            exports2.buf2string = function(buf, max2) {
18776              var i2, out, c2, c_len;
18777              var len = max2 || buf.length;
18778              var utf16buf = new Array(len * 2);
18779              for (out = 0, i2 = 0; i2 < len; ) {
18780                c2 = buf[i2++];
18781                if (c2 < 128) {
18782                  utf16buf[out++] = c2;
18783                  continue;
18784                }
18785                c_len = _utf8len[c2];
18786                if (c_len > 4) {
18787                  utf16buf[out++] = 65533;
18788                  i2 += c_len - 1;
18789                  continue;
18790                }
18791                c2 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7;
18792                while (c_len > 1 && i2 < len) {
18793                  c2 = c2 << 6 | buf[i2++] & 63;
18794                  c_len--;
18795                }
18796                if (c_len > 1) {
18797                  utf16buf[out++] = 65533;
18798                  continue;
18799                }
18800                if (c2 < 65536) {
18801                  utf16buf[out++] = c2;
18802                } else {
18803                  c2 -= 65536;
18804                  utf16buf[out++] = 55296 | c2 >> 10 & 1023;
18805                  utf16buf[out++] = 56320 | c2 & 1023;
18806                }
18807              }
18808              return buf2binstring(utf16buf, out);
18809            };
18810            exports2.utf8border = function(buf, max2) {
18811              var pos;
18812              max2 = max2 || buf.length;
18813              if (max2 > buf.length) {
18814                max2 = buf.length;
18815              }
18816              pos = max2 - 1;
18817              while (pos >= 0 && (buf[pos] & 192) === 128) {
18818                pos--;
18819              }
18820              if (pos < 0) {
18821                return max2;
18822              }
18823              if (pos === 0) {
18824                return max2;
18825              }
18826              return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
18827            };
18828          },
18829          { "./common": 1 }
18830        ],
18831        3: [
18832          function(require2, module2, exports2) {
18833            "use strict";
18834            function adler32(adler, buf, len, pos) {
18835              var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n2 = 0;
18836              while (len !== 0) {
18837                n2 = len > 2e3 ? 2e3 : len;
18838                len -= n2;
18839                do {
18840                  s1 = s1 + buf[pos++] | 0;
18841                  s2 = s2 + s1 | 0;
18842                } while (--n2);
18843                s1 %= 65521;
18844                s2 %= 65521;
18845              }
18846              return s1 | s2 << 16 | 0;
18847            }
18848            module2.exports = adler32;
18849          },
18850          {}
18851        ],
18852        4: [
18853          function(require2, module2, exports2) {
18854            "use strict";
18855            module2.exports = {
18856              /* Allowed flush values; see deflate() and inflate() below for details */
18857              Z_NO_FLUSH: 0,
18858              Z_PARTIAL_FLUSH: 1,
18859              Z_SYNC_FLUSH: 2,
18860              Z_FULL_FLUSH: 3,
18861              Z_FINISH: 4,
18862              Z_BLOCK: 5,
18863              Z_TREES: 6,
18864              /* Return codes for the compression/decompression functions. Negative values
18865               * are errors, positive values are used for special but normal events.
18866               */
18867              Z_OK: 0,
18868              Z_STREAM_END: 1,
18869              Z_NEED_DICT: 2,
18870              Z_ERRNO: -1,
18871              Z_STREAM_ERROR: -2,
18872              Z_DATA_ERROR: -3,
18873              //Z_MEM_ERROR:     -4,
18874              Z_BUF_ERROR: -5,
18875              //Z_VERSION_ERROR: -6,
18876              /* compression levels */
18877              Z_NO_COMPRESSION: 0,
18878              Z_BEST_SPEED: 1,
18879              Z_BEST_COMPRESSION: 9,
18880              Z_DEFAULT_COMPRESSION: -1,
18881              Z_FILTERED: 1,
18882              Z_HUFFMAN_ONLY: 2,
18883              Z_RLE: 3,
18884              Z_FIXED: 4,
18885              Z_DEFAULT_STRATEGY: 0,
18886              /* Possible values of the data_type field (though see inflate()) */
18887              Z_BINARY: 0,
18888              Z_TEXT: 1,
18889              //Z_ASCII:                1, // = Z_TEXT (deprecated)
18890              Z_UNKNOWN: 2,
18891              /* The deflate compression method */
18892              Z_DEFLATED: 8
18893              //Z_NULL:                 null // Use -1 or null inline, depending on var type
18894            };
18895          },
18896          {}
18897        ],
18898        5: [
18899          function(require2, module2, exports2) {
18900            "use strict";
18901            function makeTable() {
18902              var c2, table = [];
18903              for (var n2 = 0; n2 < 256; n2++) {
18904                c2 = n2;
18905                for (var k = 0; k < 8; k++) {
18906                  c2 = c2 & 1 ? 3988292384 ^ c2 >>> 1 : c2 >>> 1;
18907                }
18908                table[n2] = c2;
18909              }
18910              return table;
18911            }
18912            var crcTable = makeTable();
18913            function crc32(crc, buf, len, pos) {
18914              var t2 = crcTable, end = pos + len;
18915              crc ^= -1;
18916              for (var i2 = pos; i2 < end; i2++) {
18917                crc = crc >>> 8 ^ t2[(crc ^ buf[i2]) & 255];
18918              }
18919              return crc ^ -1;
18920            }
18921            module2.exports = crc32;
18922          },
18923          {}
18924        ],
18925        6: [
18926          function(require2, module2, exports2) {
18927            "use strict";
18928            function GZheader() {
18929              this.text = 0;
18930              this.time = 0;
18931              this.xflags = 0;
18932              this.os = 0;
18933              this.extra = null;
18934              this.extra_len = 0;
18935              this.name = "";
18936              this.comment = "";
18937              this.hcrc = 0;
18938              this.done = false;
18939            }
18940            module2.exports = GZheader;
18941          },
18942          {}
18943        ],
18944        7: [
18945          function(require2, module2, exports2) {
18946            "use strict";
18947            var BAD = 30;
18948            var TYPE = 12;
18949            module2.exports = function inflate_fast(strm, start) {
18950              var state;
18951              var _in;
18952              var last;
18953              var _out;
18954              var beg;
18955              var end;
18956              var dmax;
18957              var wsize;
18958              var whave;
18959              var wnext;
18960              var s_window;
18961              var hold;
18962              var bits;
18963              var lcode;
18964              var dcode;
18965              var lmask;
18966              var dmask;
18967              var here;
18968              var op;
18969              var len;
18970              var dist;
18971              var from;
18972              var from_source;
18973              var input, output;
18974              state = strm.state;
18975              _in = strm.next_in;
18976              input = strm.input;
18977              last = _in + (strm.avail_in - 5);
18978              _out = strm.next_out;
18979              output = strm.output;
18980              beg = _out - (start - strm.avail_out);
18981              end = _out + (strm.avail_out - 257);
18982              dmax = state.dmax;
18983              wsize = state.wsize;
18984              whave = state.whave;
18985              wnext = state.wnext;
18986              s_window = state.window;
18987              hold = state.hold;
18988              bits = state.bits;
18989              lcode = state.lencode;
18990              dcode = state.distcode;
18991              lmask = (1 << state.lenbits) - 1;
18992              dmask = (1 << state.distbits) - 1;
18993              top: do {
18994                if (bits < 15) {
18995                  hold += input[_in++] << bits;
18996                  bits += 8;
18997                  hold += input[_in++] << bits;
18998                  bits += 8;
18999                }
19000                here = lcode[hold & lmask];
19001                dolen: for (; ; ) {
19002                  op = here >>> 24;
19003                  hold >>>= op;
19004                  bits -= op;
19005                  op = here >>> 16 & 255;
19006                  if (op === 0) {
19007                    output[_out++] = here & 65535;
19008                  } else if (op & 16) {
19009                    len = here & 65535;
19010                    op &= 15;
19011                    if (op) {
19012                      if (bits < op) {
19013                        hold += input[_in++] << bits;
19014                        bits += 8;
19015                      }
19016                      len += hold & (1 << op) - 1;
19017                      hold >>>= op;
19018                      bits -= op;
19019                    }
19020                    if (bits < 15) {
19021                      hold += input[_in++] << bits;
19022                      bits += 8;
19023                      hold += input[_in++] << bits;
19024                      bits += 8;
19025                    }
19026                    here = dcode[hold & dmask];
19027                    dodist: for (; ; ) {
19028                      op = here >>> 24;
19029                      hold >>>= op;
19030                      bits -= op;
19031                      op = here >>> 16 & 255;
19032                      if (op & 16) {
19033                        dist = here & 65535;
19034                        op &= 15;
19035                        if (bits < op) {
19036                          hold += input[_in++] << bits;
19037                          bits += 8;
19038                          if (bits < op) {
19039                            hold += input[_in++] << bits;
19040                            bits += 8;
19041                          }
19042                        }
19043                        dist += hold & (1 << op) - 1;
19044                        if (dist > dmax) {
19045                          strm.msg = "invalid distance too far back";
19046                          state.mode = BAD;
19047                          break top;
19048                        }
19049                        hold >>>= op;
19050                        bits -= op;
19051                        op = _out - beg;
19052                        if (dist > op) {
19053                          op = dist - op;
19054                          if (op > whave) {
19055                            if (state.sane) {
19056                              strm.msg = "invalid distance too far back";
19057                              state.mode = BAD;
19058                              break top;
19059                            }
19060                          }
19061                          from = 0;
19062                          from_source = s_window;
19063                          if (wnext === 0) {
19064                            from += wsize - op;
19065                            if (op < len) {
19066                              len -= op;
19067                              do {
19068                                output[_out++] = s_window[from++];
19069                              } while (--op);
19070                              from = _out - dist;
19071                              from_source = output;
19072                            }
19073                          } else if (wnext < op) {
19074                            from += wsize + wnext - op;
19075                            op -= wnext;
19076                            if (op < len) {
19077                              len -= op;
19078                              do {
19079                                output[_out++] = s_window[from++];
19080                              } while (--op);
19081                              from = 0;
19082                              if (wnext < len) {
19083                                op = wnext;
19084                                len -= op;
19085                                do {
19086                                  output[_out++] = s_window[from++];
19087                                } while (--op);
19088                                from = _out - dist;
19089                                from_source = output;
19090                              }
19091                            }
19092                          } else {
19093                            from += wnext - op;
19094                            if (op < len) {
19095                              len -= op;
19096                              do {
19097                                output[_out++] = s_window[from++];
19098                              } while (--op);
19099                              from = _out - dist;
19100                              from_source = output;
19101                            }
19102                          }
19103                          while (len > 2) {
19104                            output[_out++] = from_source[from++];
19105                            output[_out++] = from_source[from++];
19106                            output[_out++] = from_source[from++];
19107                            len -= 3;
19108                          }
19109                          if (len) {
19110                            output[_out++] = from_source[from++];
19111                            if (len > 1) {
19112                              output[_out++] = from_source[from++];
19113                            }
19114                          }
19115                        } else {
19116                          from = _out - dist;
19117                          do {
19118                            output[_out++] = output[from++];
19119                            output[_out++] = output[from++];
19120                            output[_out++] = output[from++];
19121                            len -= 3;
19122                          } while (len > 2);
19123                          if (len) {
19124                            output[_out++] = output[from++];
19125                            if (len > 1) {
19126                              output[_out++] = output[from++];
19127                            }
19128                          }
19129                        }
19130                      } else if ((op & 64) === 0) {
19131                        here = dcode[(here & 65535) + (hold & (1 << op) - 1)];
19132                        continue dodist;
19133                      } else {
19134                        strm.msg = "invalid distance code";
19135                        state.mode = BAD;
19136                        break top;
19137                      }
19138                      break;
19139                    }
19140                  } else if ((op & 64) === 0) {
19141                    here = lcode[(here & 65535) + (hold & (1 << op) - 1)];
19142                    continue dolen;
19143                  } else if (op & 32) {
19144                    state.mode = TYPE;
19145                    break top;
19146                  } else {
19147                    strm.msg = "invalid literal/length code";
19148                    state.mode = BAD;
19149                    break top;
19150                  }
19151                  break;
19152                }
19153              } while (_in < last && _out < end);
19154              len = bits >> 3;
19155              _in -= len;
19156              bits -= len << 3;
19157              hold &= (1 << bits) - 1;
19158              strm.next_in = _in;
19159              strm.next_out = _out;
19160              strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
19161              strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
19162              state.hold = hold;
19163              state.bits = bits;
19164              return;
19165            };
19166          },
19167          {}
19168        ],
19169        8: [
19170          function(require2, module2, exports2) {
19171            "use strict";
19172            var utils = require2("../utils/common");
19173            var adler32 = require2("./adler32");
19174            var crc32 = require2("./crc32");
19175            var inflate_fast = require2("./inffast");
19176            var inflate_table = require2("./inftrees");
19177            var CODES = 0;
19178            var LENS = 1;
19179            var DISTS = 2;
19180            var Z_FINISH = 4;
19181            var Z_BLOCK = 5;
19182            var Z_TREES = 6;
19183            var Z_OK = 0;
19184            var Z_STREAM_END = 1;
19185            var Z_NEED_DICT = 2;
19186            var Z_STREAM_ERROR = -2;
19187            var Z_DATA_ERROR = -3;
19188            var Z_MEM_ERROR = -4;
19189            var Z_BUF_ERROR = -5;
19190            var Z_DEFLATED = 8;
19191            var HEAD = 1;
19192            var FLAGS = 2;
19193            var TIME = 3;
19194            var OS = 4;
19195            var EXLEN = 5;
19196            var EXTRA = 6;
19197            var NAME = 7;
19198            var COMMENT = 8;
19199            var HCRC = 9;
19200            var DICTID = 10;
19201            var DICT = 11;
19202            var TYPE = 12;
19203            var TYPEDO = 13;
19204            var STORED = 14;
19205            var COPY_ = 15;
19206            var COPY = 16;
19207            var TABLE = 17;
19208            var LENLENS = 18;
19209            var CODELENS = 19;
19210            var LEN_ = 20;
19211            var LEN = 21;
19212            var LENEXT = 22;
19213            var DIST = 23;
19214            var DISTEXT = 24;
19215            var MATCH = 25;
19216            var LIT = 26;
19217            var CHECK = 27;
19218            var LENGTH = 28;
19219            var DONE = 29;
19220            var BAD = 30;
19221            var MEM = 31;
19222            var SYNC = 32;
19223            var ENOUGH_LENS = 852;
19224            var ENOUGH_DISTS = 592;
19225            var MAX_WBITS = 15;
19226            var DEF_WBITS = MAX_WBITS;
19227            function zswap32(q) {
19228              return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24);
19229            }
19230            function InflateState() {
19231              this.mode = 0;
19232              this.last = false;
19233              this.wrap = 0;
19234              this.havedict = false;
19235              this.flags = 0;
19236              this.dmax = 0;
19237              this.check = 0;
19238              this.total = 0;
19239              this.head = null;
19240              this.wbits = 0;
19241              this.wsize = 0;
19242              this.whave = 0;
19243              this.wnext = 0;
19244              this.window = null;
19245              this.hold = 0;
19246              this.bits = 0;
19247              this.length = 0;
19248              this.offset = 0;
19249              this.extra = 0;
19250              this.lencode = null;
19251              this.distcode = null;
19252              this.lenbits = 0;
19253              this.distbits = 0;
19254              this.ncode = 0;
19255              this.nlen = 0;
19256              this.ndist = 0;
19257              this.have = 0;
19258              this.next = null;
19259              this.lens = new utils.Buf16(
19260                320
19261              );
19262              this.work = new utils.Buf16(
19263                288
19264              );
19265              this.lendyn = null;
19266              this.distdyn = null;
19267              this.sane = 0;
19268              this.back = 0;
19269              this.was = 0;
19270            }
19271            function inflateResetKeep(strm) {
19272              var state;
19273              if (!strm || !strm.state) {
19274                return Z_STREAM_ERROR;
19275              }
19276              state = strm.state;
19277              strm.total_in = strm.total_out = state.total = 0;
19278              strm.msg = "";
19279              if (state.wrap) {
19280                strm.adler = state.wrap & 1;
19281              }
19282              state.mode = HEAD;
19283              state.last = 0;
19284              state.havedict = 0;
19285              state.dmax = 32768;
19286              state.head = null;
19287              state.hold = 0;
19288              state.bits = 0;
19289              state.lencode = state.lendyn = new utils.Buf32(
19290                ENOUGH_LENS
19291              );
19292              state.distcode = state.distdyn = new utils.Buf32(
19293                ENOUGH_DISTS
19294              );
19295              state.sane = 1;
19296              state.back = -1;
19297              return Z_OK;
19298            }
19299            function inflateReset(strm) {
19300              var state;
19301              if (!strm || !strm.state) {
19302                return Z_STREAM_ERROR;
19303              }
19304              state = strm.state;
19305              state.wsize = 0;
19306              state.whave = 0;
19307              state.wnext = 0;
19308              return inflateResetKeep(strm);
19309            }
19310            function inflateReset2(strm, windowBits) {
19311              var wrap;
19312              var state;
19313              if (!strm || !strm.state) {
19314                return Z_STREAM_ERROR;
19315              }
19316              state = strm.state;
19317              if (windowBits < 0) {
19318                wrap = 0;
19319                windowBits = -windowBits;
19320              } else {
19321                wrap = (windowBits >> 4) + 1;
19322                if (windowBits < 48) {
19323                  windowBits &= 15;
19324                }
19325              }
19326              if (windowBits && (windowBits < 8 || windowBits > 15)) {
19327                return Z_STREAM_ERROR;
19328              }
19329              if (state.window !== null && state.wbits !== windowBits) {
19330                state.window = null;
19331              }
19332              state.wrap = wrap;
19333              state.wbits = windowBits;
19334              return inflateReset(strm);
19335            }
19336            function inflateInit2(strm, windowBits) {
19337              var ret;
19338              var state;
19339              if (!strm) {
19340                return Z_STREAM_ERROR;
19341              }
19342              state = new InflateState();
19343              strm.state = state;
19344              state.window = null;
19345              ret = inflateReset2(strm, windowBits);
19346              if (ret !== Z_OK) {
19347                strm.state = null;
19348              }
19349              return ret;
19350            }
19351            function inflateInit(strm) {
19352              return inflateInit2(strm, DEF_WBITS);
19353            }
19354            var virgin = true;
19355            var lenfix, distfix;
19356            function fixedtables(state) {
19357              if (virgin) {
19358                var sym;
19359                lenfix = new utils.Buf32(512);
19360                distfix = new utils.Buf32(32);
19361                sym = 0;
19362                while (sym < 144) {
19363                  state.lens[sym++] = 8;
19364                }
19365                while (sym < 256) {
19366                  state.lens[sym++] = 9;
19367                }
19368                while (sym < 280) {
19369                  state.lens[sym++] = 7;
19370                }
19371                while (sym < 288) {
19372                  state.lens[sym++] = 8;
19373                }
19374                inflate_table(
19375                  LENS,
19376                  state.lens,
19377                  0,
19378                  288,
19379                  lenfix,
19380                  0,
19381                  state.work,
19382                  { bits: 9 }
19383                );
19384                sym = 0;
19385                while (sym < 32) {
19386                  state.lens[sym++] = 5;
19387                }
19388                inflate_table(
19389                  DISTS,
19390                  state.lens,
19391                  0,
19392                  32,
19393                  distfix,
19394                  0,
19395                  state.work,
19396                  { bits: 5 }
19397                );
19398                virgin = false;
19399              }
19400              state.lencode = lenfix;
19401              state.lenbits = 9;
19402              state.distcode = distfix;
19403              state.distbits = 5;
19404            }
19405            function updatewindow(strm, src, end, copy) {
19406              var dist;
19407              var state = strm.state;
19408              if (state.window === null) {
19409                state.wsize = 1 << state.wbits;
19410                state.wnext = 0;
19411                state.whave = 0;
19412                state.window = new utils.Buf8(state.wsize);
19413              }
19414              if (copy >= state.wsize) {
19415                utils.arraySet(
19416                  state.window,
19417                  src,
19418                  end - state.wsize,
19419                  state.wsize,
19420                  0
19421                );
19422                state.wnext = 0;
19423                state.whave = state.wsize;
19424              } else {
19425                dist = state.wsize - state.wnext;
19426                if (dist > copy) {
19427                  dist = copy;
19428                }
19429                utils.arraySet(
19430                  state.window,
19431                  src,
19432                  end - copy,
19433                  dist,
19434                  state.wnext
19435                );
19436                copy -= dist;
19437                if (copy) {
19438                  utils.arraySet(
19439                    state.window,
19440                    src,
19441                    end - copy,
19442                    copy,
19443                    0
19444                  );
19445                  state.wnext = copy;
19446                  state.whave = state.wsize;
19447                } else {
19448                  state.wnext += dist;
19449                  if (state.wnext === state.wsize) {
19450                    state.wnext = 0;
19451                  }
19452                  if (state.whave < state.wsize) {
19453                    state.whave += dist;
19454                  }
19455                }
19456              }
19457              return 0;
19458            }
19459            function inflate(strm, flush) {
19460              var state;
19461              var input, output;
19462              var next;
19463              var put;
19464              var have, left;
19465              var hold;
19466              var bits;
19467              var _in, _out;
19468              var copy;
19469              var from;
19470              var from_source;
19471              var here = 0;
19472              var here_bits, here_op, here_val;
19473              var last_bits, last_op, last_val;
19474              var len;
19475              var ret;
19476              var hbuf = new utils.Buf8(
19477                4
19478              );
19479              var opts;
19480              var n2;
19481              var order = (
19482                /* permutation of code lengths */
19483                [
19484                  16,
19485                  17,
19486                  18,
19487                  0,
19488                  8,
19489                  7,
19490                  9,
19491                  6,
19492                  10,
19493                  5,
19494                  11,
19495                  4,
19496                  12,
19497                  3,
19498                  13,
19499                  2,
19500                  14,
19501                  1,
19502                  15
19503                ]
19504              );
19505              if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
19506                return Z_STREAM_ERROR;
19507              }
19508              state = strm.state;
19509              if (state.mode === TYPE) {
19510                state.mode = TYPEDO;
19511              }
19512              put = strm.next_out;
19513              output = strm.output;
19514              left = strm.avail_out;
19515              next = strm.next_in;
19516              input = strm.input;
19517              have = strm.avail_in;
19518              hold = state.hold;
19519              bits = state.bits;
19520              _in = have;
19521              _out = left;
19522              ret = Z_OK;
19523              inf_leave: for (; ; ) {
19524                switch (state.mode) {
19525                  case HEAD:
19526                    if (state.wrap === 0) {
19527                      state.mode = TYPEDO;
19528                      break;
19529                    }
19530                    while (bits < 16) {
19531                      if (have === 0) {
19532                        break inf_leave;
19533                      }
19534                      have--;
19535                      hold += input[next++] << bits;
19536                      bits += 8;
19537                    }
19538                    if (state.wrap & 2 && hold === 35615) {
19539                      state.check = 0;
19540                      hbuf[0] = hold & 255;
19541                      hbuf[1] = hold >>> 8 & 255;
19542                      state.check = crc32(
19543                        state.check,
19544                        hbuf,
19545                        2,
19546                        0
19547                      );
19548                      hold = 0;
19549                      bits = 0;
19550                      state.mode = FLAGS;
19551                      break;
19552                    }
19553                    state.flags = 0;
19554                    if (state.head) {
19555                      state.head.done = false;
19556                    }
19557                    if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {
19558                      strm.msg = "incorrect header check";
19559                      state.mode = BAD;
19560                      break;
19561                    }
19562                    if ((hold & 15) !== Z_DEFLATED) {
19563                      strm.msg = "unknown compression method";
19564                      state.mode = BAD;
19565                      break;
19566                    }
19567                    hold >>>= 4;
19568                    bits -= 4;
19569                    len = (hold & 15) + 8;
19570                    if (state.wbits === 0) {
19571                      state.wbits = len;
19572                    } else if (len > state.wbits) {
19573                      strm.msg = "invalid window size";
19574                      state.mode = BAD;
19575                      break;
19576                    }
19577                    state.dmax = 1 << len;
19578                    strm.adler = state.check = 1;
19579                    state.mode = hold & 512 ? DICTID : TYPE;
19580                    hold = 0;
19581                    bits = 0;
19582                    break;
19583                  case FLAGS:
19584                    while (bits < 16) {
19585                      if (have === 0) {
19586                        break inf_leave;
19587                      }
19588                      have--;
19589                      hold += input[next++] << bits;
19590                      bits += 8;
19591                    }
19592                    state.flags = hold;
19593                    if ((state.flags & 255) !== Z_DEFLATED) {
19594                      strm.msg = "unknown compression method";
19595                      state.mode = BAD;
19596                      break;
19597                    }
19598                    if (state.flags & 57344) {
19599                      strm.msg = "unknown header flags set";
19600                      state.mode = BAD;
19601                      break;
19602                    }
19603                    if (state.head) {
19604                      state.head.text = hold >> 8 & 1;
19605                    }
19606                    if (state.flags & 512) {
19607                      hbuf[0] = hold & 255;
19608                      hbuf[1] = hold >>> 8 & 255;
19609                      state.check = crc32(
19610                        state.check,
19611                        hbuf,
19612                        2,
19613                        0
19614                      );
19615                    }
19616                    hold = 0;
19617                    bits = 0;
19618                    state.mode = TIME;
19619                  /* falls through */
19620                  case TIME:
19621                    while (bits < 32) {
19622                      if (have === 0) {
19623                        break inf_leave;
19624                      }
19625                      have--;
19626                      hold += input[next++] << bits;
19627                      bits += 8;
19628                    }
19629                    if (state.head) {
19630                      state.head.time = hold;
19631                    }
19632                    if (state.flags & 512) {
19633                      hbuf[0] = hold & 255;
19634                      hbuf[1] = hold >>> 8 & 255;
19635                      hbuf[2] = hold >>> 16 & 255;
19636                      hbuf[3] = hold >>> 24 & 255;
19637                      state.check = crc32(
19638                        state.check,
19639                        hbuf,
19640                        4,
19641                        0
19642                      );
19643                    }
19644                    hold = 0;
19645                    bits = 0;
19646                    state.mode = OS;
19647                  /* falls through */
19648                  case OS:
19649                    while (bits < 16) {
19650                      if (have === 0) {
19651                        break inf_leave;
19652                      }
19653                      have--;
19654                      hold += input[next++] << bits;
19655                      bits += 8;
19656                    }
19657                    if (state.head) {
19658                      state.head.xflags = hold & 255;
19659                      state.head.os = hold >> 8;
19660                    }
19661                    if (state.flags & 512) {
19662                      hbuf[0] = hold & 255;
19663                      hbuf[1] = hold >>> 8 & 255;
19664                      state.check = crc32(
19665                        state.check,
19666                        hbuf,
19667                        2,
19668                        0
19669                      );
19670                    }
19671                    hold = 0;
19672                    bits = 0;
19673                    state.mode = EXLEN;
19674                  /* falls through */
19675                  case EXLEN:
19676                    if (state.flags & 1024) {
19677                      while (bits < 16) {
19678                        if (have === 0) {
19679                          break inf_leave;
19680                        }
19681                        have--;
19682                        hold += input[next++] << bits;
19683                        bits += 8;
19684                      }
19685                      state.length = hold;
19686                      if (state.head) {
19687                        state.head.extra_len = hold;
19688                      }
19689                      if (state.flags & 512) {
19690                        hbuf[0] = hold & 255;
19691                        hbuf[1] = hold >>> 8 & 255;
19692                        state.check = crc32(
19693                          state.check,
19694                          hbuf,
19695                          2,
19696                          0
19697                        );
19698                      }
19699                      hold = 0;
19700                      bits = 0;
19701                    } else if (state.head) {
19702                      state.head.extra = null;
19703                    }
19704                    state.mode = EXTRA;
19705                  /* falls through */
19706                  case EXTRA:
19707                    if (state.flags & 1024) {
19708                      copy = state.length;
19709                      if (copy > have) {
19710                        copy = have;
19711                      }
19712                      if (copy) {
19713                        if (state.head) {
19714                          len = state.head.extra_len - state.length;
19715                          if (!state.head.extra) {
19716                            state.head.extra = new Array(
19717                              state.head.extra_len
19718                            );
19719                          }
19720                          utils.arraySet(
19721                            state.head.extra,
19722                            input,
19723                            next,
19724                            // extra field is limited to 65536 bytes
19725                            // - no need for additional size check
19726                            copy,
19727                            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
19728                            len
19729                          );
19730                        }
19731                        if (state.flags & 512) {
19732                          state.check = crc32(
19733                            state.check,
19734                            input,
19735                            copy,
19736                            next
19737                          );
19738                        }
19739                        have -= copy;
19740                        next += copy;
19741                        state.length -= copy;
19742                      }
19743                      if (state.length) {
19744                        break inf_leave;
19745                      }
19746                    }
19747                    state.length = 0;
19748                    state.mode = NAME;
19749                  /* falls through */
19750                  case NAME:
19751                    if (state.flags & 2048) {
19752                      if (have === 0) {
19753                        break inf_leave;
19754                      }
19755                      copy = 0;
19756                      do {
19757                        len = input[next + copy++];
19758                        if (state.head && len && state.length < 65536) {
19759                          state.head.name += String.fromCharCode(len);
19760                        }
19761                      } while (len && copy < have);
19762                      if (state.flags & 512) {
19763                        state.check = crc32(
19764                          state.check,
19765                          input,
19766                          copy,
19767                          next
19768                        );
19769                      }
19770                      have -= copy;
19771                      next += copy;
19772                      if (len) {
19773                        break inf_leave;
19774                      }
19775                    } else if (state.head) {
19776                      state.head.name = null;
19777                    }
19778                    state.length = 0;
19779                    state.mode = COMMENT;
19780                  /* falls through */
19781                  case COMMENT:
19782                    if (state.flags & 4096) {
19783                      if (have === 0) {
19784                        break inf_leave;
19785                      }
19786                      copy = 0;
19787                      do {
19788                        len = input[next + copy++];
19789                        if (state.head && len && state.length < 65536) {
19790                          state.head.comment += String.fromCharCode(len);
19791                        }
19792                      } while (len && copy < have);
19793                      if (state.flags & 512) {
19794                        state.check = crc32(
19795                          state.check,
19796                          input,
19797                          copy,
19798                          next
19799                        );
19800                      }
19801                      have -= copy;
19802                      next += copy;
19803                      if (len) {
19804                        break inf_leave;
19805                      }
19806                    } else if (state.head) {
19807                      state.head.comment = null;
19808                    }
19809                    state.mode = HCRC;
19810                  /* falls through */
19811                  case HCRC:
19812                    if (state.flags & 512) {
19813                      while (bits < 16) {
19814                        if (have === 0) {
19815                          break inf_leave;
19816                        }
19817                        have--;
19818                        hold += input[next++] << bits;
19819                        bits += 8;
19820                      }
19821                      if (hold !== (state.check & 65535)) {
19822                        strm.msg = "header crc mismatch";
19823                        state.mode = BAD;
19824                        break;
19825                      }
19826                      hold = 0;
19827                      bits = 0;
19828                    }
19829                    if (state.head) {
19830                      state.head.hcrc = state.flags >> 9 & 1;
19831                      state.head.done = true;
19832                    }
19833                    strm.adler = state.check = 0;
19834                    state.mode = TYPE;
19835                    break;
19836                  case DICTID:
19837                    while (bits < 32) {
19838                      if (have === 0) {
19839                        break inf_leave;
19840                      }
19841                      have--;
19842                      hold += input[next++] << bits;
19843                      bits += 8;
19844                    }
19845                    strm.adler = state.check = zswap32(hold);
19846                    hold = 0;
19847                    bits = 0;
19848                    state.mode = DICT;
19849                  /* falls through */
19850                  case DICT:
19851                    if (state.havedict === 0) {
19852                      strm.next_out = put;
19853                      strm.avail_out = left;
19854                      strm.next_in = next;
19855                      strm.avail_in = have;
19856                      state.hold = hold;
19857                      state.bits = bits;
19858                      return Z_NEED_DICT;
19859                    }
19860                    strm.adler = state.check = 1;
19861                    state.mode = TYPE;
19862                  /* falls through */
19863                  case TYPE:
19864                    if (flush === Z_BLOCK || flush === Z_TREES) {
19865                      break inf_leave;
19866                    }
19867                  /* falls through */
19868                  case TYPEDO:
19869                    if (state.last) {
19870                      hold >>>= bits & 7;
19871                      bits -= bits & 7;
19872                      state.mode = CHECK;
19873                      break;
19874                    }
19875                    while (bits < 3) {
19876                      if (have === 0) {
19877                        break inf_leave;
19878                      }
19879                      have--;
19880                      hold += input[next++] << bits;
19881                      bits += 8;
19882                    }
19883                    state.last = hold & 1;
19884                    hold >>>= 1;
19885                    bits -= 1;
19886                    switch (hold & 3) {
19887                      case 0:
19888                        state.mode = STORED;
19889                        break;
19890                      case 1:
19891                        fixedtables(state);
19892                        state.mode = LEN_;
19893                        if (flush === Z_TREES) {
19894                          hold >>>= 2;
19895                          bits -= 2;
19896                          break inf_leave;
19897                        }
19898                        break;
19899                      case 2:
19900                        state.mode = TABLE;
19901                        break;
19902                      case 3:
19903                        strm.msg = "invalid block type";
19904                        state.mode = BAD;
19905                    }
19906                    hold >>>= 2;
19907                    bits -= 2;
19908                    break;
19909                  case STORED:
19910                    hold >>>= bits & 7;
19911                    bits -= bits & 7;
19912                    while (bits < 32) {
19913                      if (have === 0) {
19914                        break inf_leave;
19915                      }
19916                      have--;
19917                      hold += input[next++] << bits;
19918                      bits += 8;
19919                    }
19920                    if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {
19921                      strm.msg = "invalid stored block lengths";
19922                      state.mode = BAD;
19923                      break;
19924                    }
19925                    state.length = hold & 65535;
19926                    hold = 0;
19927                    bits = 0;
19928                    state.mode = COPY_;
19929                    if (flush === Z_TREES) {
19930                      break inf_leave;
19931                    }
19932                  /* falls through */
19933                  case COPY_:
19934                    state.mode = COPY;
19935                  /* falls through */
19936                  case COPY:
19937                    copy = state.length;
19938                    if (copy) {
19939                      if (copy > have) {
19940                        copy = have;
19941                      }
19942                      if (copy > left) {
19943                        copy = left;
19944                      }
19945                      if (copy === 0) {
19946                        break inf_leave;
19947                      }
19948                      utils.arraySet(
19949                        output,
19950                        input,
19951                        next,
19952                        copy,
19953                        put
19954                      );
19955                      have -= copy;
19956                      next += copy;
19957                      left -= copy;
19958                      put += copy;
19959                      state.length -= copy;
19960                      break;
19961                    }
19962                    state.mode = TYPE;
19963                    break;
19964                  case TABLE:
19965                    while (bits < 14) {
19966                      if (have === 0) {
19967                        break inf_leave;
19968                      }
19969                      have--;
19970                      hold += input[next++] << bits;
19971                      bits += 8;
19972                    }
19973                    state.nlen = (hold & 31) + 257;
19974                    hold >>>= 5;
19975                    bits -= 5;
19976                    state.ndist = (hold & 31) + 1;
19977                    hold >>>= 5;
19978                    bits -= 5;
19979                    state.ncode = (hold & 15) + 4;
19980                    hold >>>= 4;
19981                    bits -= 4;
19982                    if (state.nlen > 286 || state.ndist > 30) {
19983                      strm.msg = "too many length or distance symbols";
19984                      state.mode = BAD;
19985                      break;
19986                    }
19987                    state.have = 0;
19988                    state.mode = LENLENS;
19989                  /* falls through */
19990                  case LENLENS:
19991                    while (state.have < state.ncode) {
19992                      while (bits < 3) {
19993                        if (have === 0) {
19994                          break inf_leave;
19995                        }
19996                        have--;
19997                        hold += input[next++] << bits;
19998                        bits += 8;
19999                      }
20000                      state.lens[order[state.have++]] = hold & 7;
20001                      hold >>>= 3;
20002                      bits -= 3;
20003                    }
20004                    while (state.have < 19) {
20005                      state.lens[order[state.have++]] = 0;
20006                    }
20007                    state.lencode = state.lendyn;
20008                    state.lenbits = 7;
20009                    opts = { bits: state.lenbits };
20010                    ret = inflate_table(
20011                      CODES,
20012                      state.lens,
20013                      0,
20014                      19,
20015                      state.lencode,
20016                      0,
20017                      state.work,
20018                      opts
20019                    );
20020                    state.lenbits = opts.bits;
20021                    if (ret) {
20022                      strm.msg = "invalid code lengths set";
20023                      state.mode = BAD;
20024                      break;
20025                    }
20026                    state.have = 0;
20027                    state.mode = CODELENS;
20028                  /* falls through */
20029                  case CODELENS:
20030                    while (state.have < state.nlen + state.ndist) {
20031                      for (; ; ) {
20032                        here = state.lencode[hold & (1 << state.lenbits) - 1];
20033                        here_bits = here >>> 24;
20034                        here_op = here >>> 16 & 255;
20035                        here_val = here & 65535;
20036                        if (here_bits <= bits) {
20037                          break;
20038                        }
20039                        if (have === 0) {
20040                          break inf_leave;
20041                        }
20042                        have--;
20043                        hold += input[next++] << bits;
20044                        bits += 8;
20045                      }
20046                      if (here_val < 16) {
20047                        hold >>>= here_bits;
20048                        bits -= here_bits;
20049                        state.lens[state.have++] = here_val;
20050                      } else {
20051                        if (here_val === 16) {
20052                          n2 = here_bits + 2;
20053                          while (bits < n2) {
20054                            if (have === 0) {
20055                              break inf_leave;
20056                            }
20057                            have--;
20058                            hold += input[next++] << bits;
20059                            bits += 8;
20060                          }
20061                          hold >>>= here_bits;
20062                          bits -= here_bits;
20063                          if (state.have === 0) {
20064                            strm.msg = "invalid bit length repeat";
20065                            state.mode = BAD;
20066                            break;
20067                          }
20068                          len = state.lens[state.have - 1];
20069                          copy = 3 + (hold & 3);
20070                          hold >>>= 2;
20071                          bits -= 2;
20072                        } else if (here_val === 17) {
20073                          n2 = here_bits + 3;
20074                          while (bits < n2) {
20075                            if (have === 0) {
20076                              break inf_leave;
20077                            }
20078                            have--;
20079                            hold += input[next++] << bits;
20080                            bits += 8;
20081                          }
20082                          hold >>>= here_bits;
20083                          bits -= here_bits;
20084                          len = 0;
20085                          copy = 3 + (hold & 7);
20086                          hold >>>= 3;
20087                          bits -= 3;
20088                        } else {
20089                          n2 = here_bits + 7;
20090                          while (bits < n2) {
20091                            if (have === 0) {
20092                              break inf_leave;
20093                            }
20094                            have--;
20095                            hold += input[next++] << bits;
20096                            bits += 8;
20097                          }
20098                          hold >>>= here_bits;
20099                          bits -= here_bits;
20100                          len = 0;
20101                          copy = 11 + (hold & 127);
20102                          hold >>>= 7;
20103                          bits -= 7;
20104                        }
20105                        if (state.have + copy > state.nlen + state.ndist) {
20106                          strm.msg = "invalid bit length repeat";
20107                          state.mode = BAD;
20108                          break;
20109                        }
20110                        while (copy--) {
20111                          state.lens[state.have++] = len;
20112                        }
20113                      }
20114                    }
20115                    if (state.mode === BAD) {
20116                      break;
20117                    }
20118                    if (state.lens[256] === 0) {
20119                      strm.msg = "invalid code -- missing end-of-block";
20120                      state.mode = BAD;
20121                      break;
20122                    }
20123                    state.lenbits = 9;
20124                    opts = { bits: state.lenbits };
20125                    ret = inflate_table(
20126                      LENS,
20127                      state.lens,
20128                      0,
20129                      state.nlen,
20130                      state.lencode,
20131                      0,
20132                      state.work,
20133                      opts
20134                    );
20135                    state.lenbits = opts.bits;
20136                    if (ret) {
20137                      strm.msg = "invalid literal/lengths set";
20138                      state.mode = BAD;
20139                      break;
20140                    }
20141                    state.distbits = 6;
20142                    state.distcode = state.distdyn;
20143                    opts = { bits: state.distbits };
20144                    ret = inflate_table(
20145                      DISTS,
20146                      state.lens,
20147                      state.nlen,
20148                      state.ndist,
20149                      state.distcode,
20150                      0,
20151                      state.work,
20152                      opts
20153                    );
20154                    state.distbits = opts.bits;
20155                    if (ret) {
20156                      strm.msg = "invalid distances set";
20157                      state.mode = BAD;
20158                      break;
20159                    }
20160                    state.mode = LEN_;
20161                    if (flush === Z_TREES) {
20162                      break inf_leave;
20163                    }
20164                  /* falls through */
20165                  case LEN_:
20166                    state.mode = LEN;
20167                  /* falls through */
20168                  case LEN:
20169                    if (have >= 6 && left >= 258) {
20170                      strm.next_out = put;
20171                      strm.avail_out = left;
20172                      strm.next_in = next;
20173                      strm.avail_in = have;
20174                      state.hold = hold;
20175                      state.bits = bits;
20176                      inflate_fast(strm, _out);
20177                      put = strm.next_out;
20178                      output = strm.output;
20179                      left = strm.avail_out;
20180                      next = strm.next_in;
20181                      input = strm.input;
20182                      have = strm.avail_in;
20183                      hold = state.hold;
20184                      bits = state.bits;
20185                      if (state.mode === TYPE) {
20186                        state.back = -1;
20187                      }
20188                      break;
20189                    }
20190                    state.back = 0;
20191                    for (; ; ) {
20192                      here = state.lencode[hold & (1 << state.lenbits) - 1];
20193                      here_bits = here >>> 24;
20194                      here_op = here >>> 16 & 255;
20195                      here_val = here & 65535;
20196                      if (here_bits <= bits) {
20197                        break;
20198                      }
20199                      if (have === 0) {
20200                        break inf_leave;
20201                      }
20202                      have--;
20203                      hold += input[next++] << bits;
20204                      bits += 8;
20205                    }
20206                    if (here_op && (here_op & 240) === 0) {
20207                      last_bits = here_bits;
20208                      last_op = here_op;
20209                      last_val = here_val;
20210                      for (; ; ) {
20211                        here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
20212                        here_bits = here >>> 24;
20213                        here_op = here >>> 16 & 255;
20214                        here_val = here & 65535;
20215                        if (last_bits + here_bits <= bits) {
20216                          break;
20217                        }
20218                        if (have === 0) {
20219                          break inf_leave;
20220                        }
20221                        have--;
20222                        hold += input[next++] << bits;
20223                        bits += 8;
20224                      }
20225                      hold >>>= last_bits;
20226                      bits -= last_bits;
20227                      state.back += last_bits;
20228                    }
20229                    hold >>>= here_bits;
20230                    bits -= here_bits;
20231                    state.back += here_bits;
20232                    state.length = here_val;
20233                    if (here_op === 0) {
20234                      state.mode = LIT;
20235                      break;
20236                    }
20237                    if (here_op & 32) {
20238                      state.back = -1;
20239                      state.mode = TYPE;
20240                      break;
20241                    }
20242                    if (here_op & 64) {
20243                      strm.msg = "invalid literal/length code";
20244                      state.mode = BAD;
20245                      break;
20246                    }
20247                    state.extra = here_op & 15;
20248                    state.mode = LENEXT;
20249                  /* falls through */
20250                  case LENEXT:
20251                    if (state.extra) {
20252                      n2 = state.extra;
20253                      while (bits < n2) {
20254                        if (have === 0) {
20255                          break inf_leave;
20256                        }
20257                        have--;
20258                        hold += input[next++] << bits;
20259                        bits += 8;
20260                      }
20261                      state.length += hold & (1 << state.extra) - 1;
20262                      hold >>>= state.extra;
20263                      bits -= state.extra;
20264                      state.back += state.extra;
20265                    }
20266                    state.was = state.length;
20267                    state.mode = DIST;
20268                  /* falls through */
20269                  case DIST:
20270                    for (; ; ) {
20271                      here = state.distcode[hold & (1 << state.distbits) - 1];
20272                      here_bits = here >>> 24;
20273                      here_op = here >>> 16 & 255;
20274                      here_val = here & 65535;
20275                      if (here_bits <= bits) {
20276                        break;
20277                      }
20278                      if (have === 0) {
20279                        break inf_leave;
20280                      }
20281                      have--;
20282                      hold += input[next++] << bits;
20283                      bits += 8;
20284                    }
20285                    if ((here_op & 240) === 0) {
20286                      last_bits = here_bits;
20287                      last_op = here_op;
20288                      last_val = here_val;
20289                      for (; ; ) {
20290                        here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
20291                        here_bits = here >>> 24;
20292                        here_op = here >>> 16 & 255;
20293                        here_val = here & 65535;
20294                        if (last_bits + here_bits <= bits) {
20295                          break;
20296                        }
20297                        if (have === 0) {
20298                          break inf_leave;
20299                        }
20300                        have--;
20301                        hold += input[next++] << bits;
20302                        bits += 8;
20303                      }
20304                      hold >>>= last_bits;
20305                      bits -= last_bits;
20306                      state.back += last_bits;
20307                    }
20308                    hold >>>= here_bits;
20309                    bits -= here_bits;
20310                    state.back += here_bits;
20311                    if (here_op & 64) {
20312                      strm.msg = "invalid distance code";
20313                      state.mode = BAD;
20314                      break;
20315                    }
20316                    state.offset = here_val;
20317                    state.extra = here_op & 15;
20318                    state.mode = DISTEXT;
20319                  /* falls through */
20320                  case DISTEXT:
20321                    if (state.extra) {
20322                      n2 = state.extra;
20323                      while (bits < n2) {
20324                        if (have === 0) {
20325                          break inf_leave;
20326                        }
20327                        have--;
20328                        hold += input[next++] << bits;
20329                        bits += 8;
20330                      }
20331                      state.offset += hold & (1 << state.extra) - 1;
20332                      hold >>>= state.extra;
20333                      bits -= state.extra;
20334                      state.back += state.extra;
20335                    }
20336                    if (state.offset > state.dmax) {
20337                      strm.msg = "invalid distance too far back";
20338                      state.mode = BAD;
20339                      break;
20340                    }
20341                    state.mode = MATCH;
20342                  /* falls through */
20343                  case MATCH:
20344                    if (left === 0) {
20345                      break inf_leave;
20346                    }
20347                    copy = _out - left;
20348                    if (state.offset > copy) {
20349                      copy = state.offset - copy;
20350                      if (copy > state.whave) {
20351                        if (state.sane) {
20352                          strm.msg = "invalid distance too far back";
20353                          state.mode = BAD;
20354                          break;
20355                        }
20356                      }
20357                      if (copy > state.wnext) {
20358                        copy -= state.wnext;
20359                        from = state.wsize - copy;
20360                      } else {
20361                        from = state.wnext - copy;
20362                      }
20363                      if (copy > state.length) {
20364                        copy = state.length;
20365                      }
20366                      from_source = state.window;
20367                    } else {
20368                      from_source = output;
20369                      from = put - state.offset;
20370                      copy = state.length;
20371                    }
20372                    if (copy > left) {
20373                      copy = left;
20374                    }
20375                    left -= copy;
20376                    state.length -= copy;
20377                    do {
20378                      output[put++] = from_source[from++];
20379                    } while (--copy);
20380                    if (state.length === 0) {
20381                      state.mode = LEN;
20382                    }
20383                    break;
20384                  case LIT:
20385                    if (left === 0) {
20386                      break inf_leave;
20387                    }
20388                    output[put++] = state.length;
20389                    left--;
20390                    state.mode = LEN;
20391                    break;
20392                  case CHECK:
20393                    if (state.wrap) {
20394                      while (bits < 32) {
20395                        if (have === 0) {
20396                          break inf_leave;
20397                        }
20398                        have--;
20399                        hold |= input[next++] << bits;
20400                        bits += 8;
20401                      }
20402                      _out -= left;
20403                      strm.total_out += _out;
20404                      state.total += _out;
20405                      if (_out) {
20406                        strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
20407                        state.flags ? crc32(
20408                          state.check,
20409                          output,
20410                          _out,
20411                          put - _out
20412                        ) : adler32(
20413                          state.check,
20414                          output,
20415                          _out,
20416                          put - _out
20417                        );
20418                      }
20419                      _out = left;
20420                      if ((state.flags ? hold : zswap32(hold)) !== state.check) {
20421                        strm.msg = "incorrect data check";
20422                        state.mode = BAD;
20423                        break;
20424                      }
20425                      hold = 0;
20426                      bits = 0;
20427                    }
20428                    state.mode = LENGTH;
20429                  /* falls through */
20430                  case LENGTH:
20431                    if (state.wrap && state.flags) {
20432                      while (bits < 32) {
20433                        if (have === 0) {
20434                          break inf_leave;
20435                        }
20436                        have--;
20437                        hold += input[next++] << bits;
20438                        bits += 8;
20439                      }
20440                      if (hold !== (state.total & 4294967295)) {
20441                        strm.msg = "incorrect length check";
20442                        state.mode = BAD;
20443                        break;
20444                      }
20445                      hold = 0;
20446                      bits = 0;
20447                    }
20448                    state.mode = DONE;
20449                  /* falls through */
20450                  case DONE:
20451                    ret = Z_STREAM_END;
20452                    break inf_leave;
20453                  case BAD:
20454                    ret = Z_DATA_ERROR;
20455                    break inf_leave;
20456                  case MEM:
20457                    return Z_MEM_ERROR;
20458                  case SYNC:
20459                  /* falls through */
20460                  default:
20461                    return Z_STREAM_ERROR;
20462                }
20463              }
20464              strm.next_out = put;
20465              strm.avail_out = left;
20466              strm.next_in = next;
20467              strm.avail_in = have;
20468              state.hold = hold;
20469              state.bits = bits;
20470              if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {
20471                if (updatewindow(
20472                  strm,
20473                  strm.output,
20474                  strm.next_out,
20475                  _out - strm.avail_out
20476                )) {
20477                  state.mode = MEM;
20478                  return Z_MEM_ERROR;
20479                }
20480              }
20481              _in -= strm.avail_in;
20482              _out -= strm.avail_out;
20483              strm.total_in += _in;
20484              strm.total_out += _out;
20485              state.total += _out;
20486              if (state.wrap && _out) {
20487                strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
20488                state.flags ? crc32(
20489                  state.check,
20490                  output,
20491                  _out,
20492                  strm.next_out - _out
20493                ) : adler32(
20494                  state.check,
20495                  output,
20496                  _out,
20497                  strm.next_out - _out
20498                );
20499              }
20500              strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
20501              if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) {
20502                ret = Z_BUF_ERROR;
20503              }
20504              return ret;
20505            }
20506            function inflateEnd(strm) {
20507              if (!strm || !strm.state) {
20508                return Z_STREAM_ERROR;
20509              }
20510              var state = strm.state;
20511              if (state.window) {
20512                state.window = null;
20513              }
20514              strm.state = null;
20515              return Z_OK;
20516            }
20517            function inflateGetHeader(strm, head2) {
20518              var state;
20519              if (!strm || !strm.state) {
20520                return Z_STREAM_ERROR;
20521              }
20522              state = strm.state;
20523              if ((state.wrap & 2) === 0) {
20524                return Z_STREAM_ERROR;
20525              }
20526              state.head = head2;
20527              head2.done = false;
20528              return Z_OK;
20529            }
20530            function inflateSetDictionary(strm, dictionary) {
20531              var dictLength = dictionary.length;
20532              var state;
20533              var dictid;
20534              var ret;
20535              if (!strm || !strm.state) {
20536                return Z_STREAM_ERROR;
20537              }
20538              state = strm.state;
20539              if (state.wrap !== 0 && state.mode !== DICT) {
20540                return Z_STREAM_ERROR;
20541              }
20542              if (state.mode === DICT) {
20543                dictid = 1;
20544                dictid = adler32(
20545                  dictid,
20546                  dictionary,
20547                  dictLength,
20548                  0
20549                );
20550                if (dictid !== state.check) {
20551                  return Z_DATA_ERROR;
20552                }
20553              }
20554              ret = updatewindow(
20555                strm,
20556                dictionary,
20557                dictLength,
20558                dictLength
20559              );
20560              if (ret) {
20561                state.mode = MEM;
20562                return Z_MEM_ERROR;
20563              }
20564              state.havedict = 1;
20565              return Z_OK;
20566            }
20567            exports2.inflateReset = inflateReset;
20568            exports2.inflateReset2 = inflateReset2;
20569            exports2.inflateResetKeep = inflateResetKeep;
20570            exports2.inflateInit = inflateInit;
20571            exports2.inflateInit2 = inflateInit2;
20572            exports2.inflate = inflate;
20573            exports2.inflateEnd = inflateEnd;
20574            exports2.inflateGetHeader = inflateGetHeader;
20575            exports2.inflateSetDictionary = inflateSetDictionary;
20576            exports2.inflateInfo = "pako inflate (from Nodeca project)";
20577          },
20578          {
20579            "../utils/common": 1,
20580            "./adler32": 3,
20581            "./crc32": 5,
20582            "./inffast": 7,
20583            "./inftrees": 9
20584          }
20585        ],
20586        9: [
20587          function(require2, module2, exports2) {
20588            "use strict";
20589            var utils = require2("../utils/common");
20590            var MAXBITS = 15;
20591            var ENOUGH_LENS = 852;
20592            var ENOUGH_DISTS = 592;
20593            var CODES = 0;
20594            var LENS = 1;
20595            var DISTS = 2;
20596            var lbase = [
20597              /* Length codes 257..285 base */
20598              3,
20599              4,
20600              5,
20601              6,
20602              7,
20603              8,
20604              9,
20605              10,
20606              11,
20607              13,
20608              15,
20609              17,
20610              19,
20611              23,
20612              27,
20613              31,
20614              35,
20615              43,
20616              51,
20617              59,
20618              67,
20619              83,
20620              99,
20621              115,
20622              131,
20623              163,
20624              195,
20625              227,
20626              258,
20627              0,
20628              0
20629            ];
20630            var lext = [
20631              /* Length codes 257..285 extra */
20632              16,
20633              16,
20634              16,
20635              16,
20636              16,
20637              16,
20638              16,
20639              16,
20640              17,
20641              17,
20642              17,
20643              17,
20644              18,
20645              18,
20646              18,
20647              18,
20648              19,
20649              19,
20650              19,
20651              19,
20652              20,
20653              20,
20654              20,
20655              20,
20656              21,
20657              21,
20658              21,
20659              21,
20660              16,
20661              72,
20662              78
20663            ];
20664            var dbase = [
20665              /* Distance codes 0..29 base */
20666              1,
20667              2,
20668              3,
20669              4,
20670              5,
20671              7,
20672              9,
20673              13,
20674              17,
20675              25,
20676              33,
20677              49,
20678              65,
20679              97,
20680              129,
20681              193,
20682              257,
20683              385,
20684              513,
20685              769,
20686              1025,
20687              1537,
20688              2049,
20689              3073,
20690              4097,
20691              6145,
20692              8193,
20693              12289,
20694              16385,
20695              24577,
20696              0,
20697              0
20698            ];
20699            var dext = [
20700              /* Distance codes 0..29 extra */
20701              16,
20702              16,
20703              16,
20704              16,
20705              17,
20706              17,
20707              18,
20708              18,
20709              19,
20710              19,
20711              20,
20712              20,
20713              21,
20714              21,
20715              22,
20716              22,
20717              23,
20718              23,
20719              24,
20720              24,
20721              25,
20722              25,
20723              26,
20724              26,
20725              27,
20726              27,
20727              28,
20728              28,
20729              29,
20730              29,
20731              64,
20732              64
20733            ];
20734            module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
20735              var bits = opts.bits;
20736              var len = 0;
20737              var sym = 0;
20738              var min2 = 0, max2 = 0;
20739              var root = 0;
20740              var curr = 0;
20741              var drop = 0;
20742              var left = 0;
20743              var used = 0;
20744              var huff = 0;
20745              var incr;
20746              var fill;
20747              var low;
20748              var mask;
20749              var next;
20750              var base = null;
20751              var base_index = 0;
20752              var end;
20753              var count = new utils.Buf16(MAXBITS + 1);
20754              var offs = new utils.Buf16(MAXBITS + 1);
20755              var extra = null;
20756              var extra_index = 0;
20757              var here_bits, here_op, here_val;
20758              for (len = 0; len <= MAXBITS; len++) {
20759                count[len] = 0;
20760              }
20761              for (sym = 0; sym < codes; sym++) {
20762                count[lens[lens_index + sym]]++;
20763              }
20764              root = bits;
20765              for (max2 = MAXBITS; max2 >= 1; max2--) {
20766                if (count[max2] !== 0) {
20767                  break;
20768                }
20769              }
20770              if (root > max2) {
20771                root = max2;
20772              }
20773              if (max2 === 0) {
20774                table[table_index++] = 1 << 24 | 64 << 16 | 0;
20775                table[table_index++] = 1 << 24 | 64 << 16 | 0;
20776                opts.bits = 1;
20777                return 0;
20778              }
20779              for (min2 = 1; min2 < max2; min2++) {
20780                if (count[min2] !== 0) {
20781                  break;
20782                }
20783              }
20784              if (root < min2) {
20785                root = min2;
20786              }
20787              left = 1;
20788              for (len = 1; len <= MAXBITS; len++) {
20789                left <<= 1;
20790                left -= count[len];
20791                if (left < 0) {
20792                  return -1;
20793                }
20794              }
20795              if (left > 0 && (type === CODES || max2 !== 1)) {
20796                return -1;
20797              }
20798              offs[1] = 0;
20799              for (len = 1; len < MAXBITS; len++) {
20800                offs[len + 1] = offs[len] + count[len];
20801              }
20802              for (sym = 0; sym < codes; sym++) {
20803                if (lens[lens_index + sym] !== 0) {
20804                  work[offs[lens[lens_index + sym]]++] = sym;
20805                }
20806              }
20807              if (type === CODES) {
20808                base = extra = work;
20809                end = 19;
20810              } else if (type === LENS) {
20811                base = lbase;
20812                base_index -= 257;
20813                extra = lext;
20814                extra_index -= 257;
20815                end = 256;
20816              } else {
20817                base = dbase;
20818                extra = dext;
20819                end = -1;
20820              }
20821              huff = 0;
20822              sym = 0;
20823              len = min2;
20824              next = table_index;
20825              curr = root;
20826              drop = 0;
20827              low = -1;
20828              used = 1 << root;
20829              mask = used - 1;
20830              if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
20831                return 1;
20832              }
20833              for (; ; ) {
20834                here_bits = len - drop;
20835                if (work[sym] < end) {
20836                  here_op = 0;
20837                  here_val = work[sym];
20838                } else if (work[sym] > end) {
20839                  here_op = extra[extra_index + work[sym]];
20840                  here_val = base[base_index + work[sym]];
20841                } else {
20842                  here_op = 32 + 64;
20843                  here_val = 0;
20844                }
20845                incr = 1 << len - drop;
20846                fill = 1 << curr;
20847                min2 = fill;
20848                do {
20849                  fill -= incr;
20850                  table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
20851                } while (fill !== 0);
20852                incr = 1 << len - 1;
20853                while (huff & incr) {
20854                  incr >>= 1;
20855                }
20856                if (incr !== 0) {
20857                  huff &= incr - 1;
20858                  huff += incr;
20859                } else {
20860                  huff = 0;
20861                }
20862                sym++;
20863                if (--count[len] === 0) {
20864                  if (len === max2) {
20865                    break;
20866                  }
20867                  len = lens[lens_index + work[sym]];
20868                }
20869                if (len > root && (huff & mask) !== low) {
20870                  if (drop === 0) {
20871                    drop = root;
20872                  }
20873                  next += min2;
20874                  curr = len - drop;
20875                  left = 1 << curr;
20876                  while (curr + drop < max2) {
20877                    left -= count[curr + drop];
20878                    if (left <= 0) {
20879                      break;
20880                    }
20881                    curr++;
20882                    left <<= 1;
20883                  }
20884                  used += 1 << curr;
20885                  if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
20886                    return 1;
20887                  }
20888                  low = huff & mask;
20889                  table[low] = root << 24 | curr << 16 | next - table_index | 0;
20890                }
20891              }
20892              if (huff !== 0) {
20893                table[next + huff] = len - drop << 24 | 64 << 16 | 0;
20894              }
20895              opts.bits = root;
20896              return 0;
20897            };
20898          },
20899          { "../utils/common": 1 }
20900        ],
20901        10: [
20902          function(require2, module2, exports2) {
20903            "use strict";
20904            module2.exports = {
20905              2: "need dictionary",
20906              1: "stream end",
20907              0: "",
20908              "-1": "file error",
20909              "-2": "stream error",
20910              "-3": "data error",
20911              "-4": "insufficient memory",
20912              "-5": "buffer error",
20913              "-6": "incompatible version"
20914            };
20915          },
20916          {}
20917        ],
20918        11: [
20919          function(require2, module2, exports2) {
20920            "use strict";
20921            function ZStream() {
20922              this.input = null;
20923              this.next_in = 0;
20924              this.avail_in = 0;
20925              this.total_in = 0;
20926              this.output = null;
20927              this.next_out = 0;
20928              this.avail_out = 0;
20929              this.total_out = 0;
20930              this.msg = "";
20931              this.state = null;
20932              this.data_type = 2;
20933              this.adler = 0;
20934            }
20935            module2.exports = ZStream;
20936          },
20937          {}
20938        ],
20939        "/lib/inflate.js": [
20940          function(require2, module2, exports2) {
20941            "use strict";
20942            var zlib_inflate = require2("./zlib/inflate");
20943            var utils = require2("./utils/common");
20944            var strings = require2("./utils/strings");
20945            var c2 = require2("./zlib/constants");
20946            var msg = require2("./zlib/messages");
20947            var ZStream = require2("./zlib/zstream");
20948            var GZheader = require2("./zlib/gzheader");
20949            var toString = Object.prototype.toString;
20950            function Inflate(options) {
20951              if (!(this instanceof Inflate))
20952                return new Inflate(options);
20953              this.options = utils.assign(
20954                {
20955                  chunkSize: 16384,
20956                  windowBits: 0,
20957                  to: ""
20958                },
20959                options || {}
20960              );
20961              var opt = this.options;
20962              if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
20963                opt.windowBits = -opt.windowBits;
20964                if (opt.windowBits === 0) {
20965                  opt.windowBits = -15;
20966                }
20967              }
20968              if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
20969                opt.windowBits += 32;
20970              }
20971              if (opt.windowBits > 15 && opt.windowBits < 48) {
20972                if ((opt.windowBits & 15) === 0) {
20973                  opt.windowBits |= 15;
20974                }
20975              }
20976              this.err = 0;
20977              this.msg = "";
20978              this.ended = false;
20979              this.chunks = [];
20980              this.strm = new ZStream();
20981              this.strm.avail_out = 0;
20982              var status = zlib_inflate.inflateInit2(
20983                this.strm,
20984                opt.windowBits
20985              );
20986              if (status !== c2.Z_OK) {
20987                throw new Error(msg[status]);
20988              }
20989              this.header = new GZheader();
20990              zlib_inflate.inflateGetHeader(this.strm, this.header);
20991              if (opt.dictionary) {
20992                if (typeof opt.dictionary === "string") {
20993                  opt.dictionary = strings.string2buf(
20994                    opt.dictionary
20995                  );
20996                } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") {
20997                  opt.dictionary = new Uint8Array(
20998                    opt.dictionary
20999                  );
21000                }
21001                if (opt.raw) {
21002                  status = zlib_inflate.inflateSetDictionary(
21003                    this.strm,
21004                    opt.dictionary
21005                  );
21006                  if (status !== c2.Z_OK) {
21007                    throw new Error(msg[status]);
21008                  }
21009                }
21010              }
21011            }
21012            Inflate.prototype.push = function(data, mode) {
21013              var strm = this.strm;
21014              var chunkSize = this.options.chunkSize;
21015              var dictionary = this.options.dictionary;
21016              var status, _mode;
21017              var next_out_utf8, tail, utf8str;
21018              var allowBufError = false;
21019              if (this.ended) {
21020                return false;
21021              }
21022              _mode = mode === ~~mode ? mode : mode === true ? c2.Z_FINISH : c2.Z_NO_FLUSH;
21023              if (typeof data === "string") {
21024                strm.input = strings.binstring2buf(data);
21025              } else if (toString.call(data) === "[object ArrayBuffer]") {
21026                strm.input = new Uint8Array(data);
21027              } else {
21028                strm.input = data;
21029              }
21030              strm.next_in = 0;
21031              strm.avail_in = strm.input.length;
21032              do {
21033                if (strm.avail_out === 0) {
21034                  strm.output = new utils.Buf8(chunkSize);
21035                  strm.next_out = 0;
21036                  strm.avail_out = chunkSize;
21037                }
21038                status = zlib_inflate.inflate(
21039                  strm,
21040                  c2.Z_NO_FLUSH
21041                );
21042                if (status === c2.Z_NEED_DICT && dictionary) {
21043                  status = zlib_inflate.inflateSetDictionary(
21044                    this.strm,
21045                    dictionary
21046                  );
21047                }
21048                if (status === c2.Z_BUF_ERROR && allowBufError === true) {
21049                  status = c2.Z_OK;
21050                  allowBufError = false;
21051                }
21052                if (status !== c2.Z_STREAM_END && status !== c2.Z_OK) {
21053                  this.onEnd(status);
21054                  this.ended = true;
21055                  return false;
21056                }
21057                if (strm.next_out) {
21058                  if (strm.avail_out === 0 || status === c2.Z_STREAM_END || strm.avail_in === 0 && (_mode === c2.Z_FINISH || _mode === c2.Z_SYNC_FLUSH)) {
21059                    if (this.options.to === "string") {
21060                      next_out_utf8 = strings.utf8border(
21061                        strm.output,
21062                        strm.next_out
21063                      );
21064                      tail = strm.next_out - next_out_utf8;
21065                      utf8str = strings.buf2string(
21066                        strm.output,
21067                        next_out_utf8
21068                      );
21069                      strm.next_out = tail;
21070                      strm.avail_out = chunkSize - tail;
21071                      if (tail) {
21072                        utils.arraySet(
21073                          strm.output,
21074                          strm.output,
21075                          next_out_utf8,
21076                          tail,
21077                          0
21078                        );
21079                      }
21080                      this.onData(utf8str);
21081                    } else {
21082                      this.onData(
21083                        utils.shrinkBuf(
21084                          strm.output,
21085                          strm.next_out
21086                        )
21087                      );
21088                    }
21089                  }
21090                }
21091                if (strm.avail_in === 0 && strm.avail_out === 0) {
21092                  allowBufError = true;
21093                }
21094              } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c2.Z_STREAM_END);
21095              if (status === c2.Z_STREAM_END) {
21096                _mode = c2.Z_FINISH;
21097              }
21098              if (_mode === c2.Z_FINISH) {
21099                status = zlib_inflate.inflateEnd(this.strm);
21100                this.onEnd(status);
21101                this.ended = true;
21102                return status === c2.Z_OK;
21103              }
21104              if (_mode === c2.Z_SYNC_FLUSH) {
21105                this.onEnd(c2.Z_OK);
21106                strm.avail_out = 0;
21107                return true;
21108              }
21109              return true;
21110            };
21111            Inflate.prototype.onData = function(chunk) {
21112              this.chunks.push(chunk);
21113            };
21114            Inflate.prototype.onEnd = function(status) {
21115              if (status === c2.Z_OK) {
21116                if (this.options.to === "string") {
21117                  this.result = this.chunks.join("");
21118                } else {
21119                  this.result = utils.flattenChunks(
21120                    this.chunks
21121                  );
21122                }
21123              }
21124              this.chunks = [];
21125              this.err = status;
21126              this.msg = this.strm.msg;
21127            };
21128            function inflate(input, options) {
21129              var inflator = new Inflate(options);
21130              inflator.push(input, true);
21131              if (inflator.err) {
21132                throw inflator.msg || msg[inflator.err];
21133              }
21134              return inflator.result;
21135            }
21136            function inflateRaw(input, options) {
21137              options = options || {};
21138              options.raw = true;
21139              return inflate(input, options);
21140            }
21141            exports2.Inflate = Inflate;
21142            exports2.inflate = inflate;
21143            exports2.inflateRaw = inflateRaw;
21144            exports2.ungzip = inflate;
21145          },
21146          {
21147            "./utils/common": 1,
21148            "./utils/strings": 2,
21149            "./zlib/constants": 4,
21150            "./zlib/gzheader": 6,
21151            "./zlib/inflate": 8,
21152            "./zlib/messages": 10,
21153            "./zlib/zstream": 11
21154          }
21155        ]
21156      },
21157      {},
21158      []
21159    )("/lib/inflate.js");
21160  })();
21161  
21162  // packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs
21163  var fetchFunction = globalThis.fetch;
21164  var Event2 = class {
21165    constructor(type, detail = {}, msg) {
21166      this.type = type;
21167      this.detail = detail;
21168      this.msg = msg;
21169      Object.defineProperty(this, `__mayPropagate`, {
21170        enumerable: false,
21171        writable: true
21172      });
21173      this.__mayPropagate = true;
21174    }
21175    preventDefault() {
21176    }
21177    stopPropagation() {
21178      this.__mayPropagate = false;
21179    }
21180    valueOf() {
21181      return this;
21182    }
21183    toString() {
21184      return this.msg ? `[$this.type} event]: $this.msg}` : `[$this.type} event]`;
21185    }
21186  };
21187  var EventManager = class {
21188    constructor() {
21189      this.listeners = {};
21190    }
21191    addEventListener(type, listener, useCapture) {
21192      let bin = this.listeners[type] || [];
21193      if (useCapture) bin.unshift(listener);
21194      else bin.push(listener);
21195      this.listeners[type] = bin;
21196    }
21197    removeEventListener(type, listener) {
21198      let bin = this.listeners[type] || [];
21199      let pos = bin.findIndex((e2) => e2 === listener);
21200      if (pos > -1) {
21201        bin.splice(pos, 1);
21202        this.listeners[type] = bin;
21203      }
21204    }
21205    dispatch(event) {
21206      let bin = this.listeners[event.type];
21207      if (bin) {
21208        for (let l2 = 0, e2 = bin.length; l2 < e2; l2++) {
21209          if (!event.__mayPropagate) break;
21210          bin[l2](event);
21211        }
21212      }
21213    }
21214  };
21215  var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime();
21216  function asText(data) {
21217    return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``);
21218  }
21219  var Parser = class {
21220    constructor(dict, dataview, name2) {
21221      this.name = (name2 || dict.tag || ``).trim();
21222      this.length = dict.length;
21223      this.start = dict.offset;
21224      this.offset = 0;
21225      this.data = dataview;
21226      [
21227        `getInt8`,
21228        `getUint8`,
21229        `getInt16`,
21230        `getUint16`,
21231        `getInt32`,
21232        `getUint32`,
21233        `getBigInt64`,
21234        `getBigUint64`
21235      ].forEach((name3) => {
21236        let fn = name3.replace(/get(Big)?/, "").toLowerCase();
21237        let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8;
21238        Object.defineProperty(this, fn, {
21239          get: () => this.getValue(name3, increment)
21240        });
21241      });
21242    }
21243    get currentPosition() {
21244      return this.start + this.offset;
21245    }
21246    set currentPosition(position) {
21247      this.start = position;
21248      this.offset = 0;
21249    }
21250    skip(n2 = 0, bits = 8) {
21251      this.offset += n2 * bits / 8;
21252    }
21253    getValue(type, increment) {
21254      let pos = this.start + this.offset;
21255      this.offset += increment;
21256      try {
21257        return this.data[type](pos);
21258      } catch (e2) {
21259        console.error(`parser`, type, increment, this);
21260        console.error(`parser`, this.start, this.offset);
21261        throw e2;
21262      }
21263    }
21264    flags(n2) {
21265      if (n2 === 8 || n2 === 16 || n2 === 32 || n2 === 64) {
21266        return this[`uint$n2}`].toString(2).padStart(n2, 0).split(``).map((v2) => v2 === "1");
21267      }
21268      console.error(
21269        `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
21270      );
21271      console.trace();
21272    }
21273    get tag() {
21274      const t2 = this.uint32;
21275      return asText([
21276        t2 >> 24 & 255,
21277        t2 >> 16 & 255,
21278        t2 >> 8 & 255,
21279        t2 & 255
21280      ]);
21281    }
21282    get fixed() {
21283      let major = this.int16;
21284      let minor = Math.round(1e3 * this.uint16 / 65356);
21285      return major + minor / 1e3;
21286    }
21287    get legacyFixed() {
21288      let major = this.uint16;
21289      let minor = this.uint16.toString(16).padStart(4, 0);
21290      return parseFloat(`$major}.$minor}`);
21291    }
21292    get uint24() {
21293      return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8;
21294    }
21295    get uint128() {
21296      let value = 0;
21297      for (let i2 = 0; i2 < 5; i2++) {
21298        let byte = this.uint8;
21299        value = value * 128 + (byte & 127);
21300        if (byte < 128) break;
21301      }
21302      return value;
21303    }
21304    get longdatetime() {
21305      return new Date(startDate + 1e3 * parseInt(this.int64.toString()));
21306    }
21307    get fword() {
21308      return this.int16;
21309    }
21310    get ufword() {
21311      return this.uint16;
21312    }
21313    get Offset16() {
21314      return this.uint16;
21315    }
21316    get Offset32() {
21317      return this.uint32;
21318    }
21319    get F2DOT14() {
21320      const bits = p.uint16;
21321      const integer = [0, 1, -2, -1][bits >> 14];
21322      const fraction = bits & 16383;
21323      return integer + fraction / 16384;
21324    }
21325    verifyLength() {
21326      if (this.offset != this.length) {
21327        console.error(
21328          `unexpected parsed table size ($this.offset}) for "$this.name}" (expected $this.length})`
21329        );
21330      }
21331    }
21332    readBytes(n2 = 0, position = 0, bits = 8, signed = false) {
21333      n2 = n2 || this.length;
21334      if (n2 === 0) return [];
21335      if (position) this.currentPosition = position;
21336      const fn = `$signed ? `` : `u`}int$bits}`, slice = [];
21337      while (n2--) slice.push(this[fn]);
21338      return slice;
21339    }
21340  };
21341  var ParsedData = class {
21342    constructor(parser) {
21343      const pGetter = { enumerable: false, get: () => parser };
21344      Object.defineProperty(this, `parser`, pGetter);
21345      const start = parser.currentPosition;
21346      const startGetter = { enumerable: false, get: () => start };
21347      Object.defineProperty(this, `start`, startGetter);
21348    }
21349    load(struct) {
21350      Object.keys(struct).forEach((p22) => {
21351        let props = Object.getOwnPropertyDescriptor(struct, p22);
21352        if (props.get) {
21353          this[p22] = props.get.bind(this);
21354        } else if (props.value !== void 0) {
21355          this[p22] = props.value;
21356        }
21357      });
21358      if (this.parser.length) {
21359        this.parser.verifyLength();
21360      }
21361    }
21362  };
21363  var SimpleTable = class extends ParsedData {
21364    constructor(dict, dataview, name2) {
21365      const { parser, start } = super(
21366        new Parser(dict, dataview, name2)
21367      );
21368      const pGetter = { enumerable: false, get: () => parser };
21369      Object.defineProperty(this, `p`, pGetter);
21370      const startGetter = { enumerable: false, get: () => start };
21371      Object.defineProperty(this, `tableStart`, startGetter);
21372    }
21373  };
21374  function lazy$1(object, property, getter) {
21375    let val;
21376    Object.defineProperty(object, property, {
21377      get: () => {
21378        if (val) return val;
21379        val = getter();
21380        return val;
21381      },
21382      enumerable: true
21383    });
21384  }
21385  var SFNT = class extends SimpleTable {
21386    constructor(font2, dataview, createTable2) {
21387      const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`);
21388      this.version = p22.uint32;
21389      this.numTables = p22.uint16;
21390      this.searchRange = p22.uint16;
21391      this.entrySelector = p22.uint16;
21392      this.rangeShift = p22.uint16;
21393      p22.verifyLength();
21394      this.directory = [...new Array(this.numTables)].map(
21395        (_) => new TableRecord(p22)
21396      );
21397      this.tables = {};
21398      this.directory.forEach((entry) => {
21399        const getter = () => createTable2(
21400          this.tables,
21401          {
21402            tag: entry.tag,
21403            offset: entry.offset,
21404            length: entry.length
21405          },
21406          dataview
21407        );
21408        lazy$1(this.tables, entry.tag.trim(), getter);
21409      });
21410    }
21411  };
21412  var TableRecord = class {
21413    constructor(p22) {
21414      this.tag = p22.tag;
21415      this.checksum = p22.uint32;
21416      this.offset = p22.uint32;
21417      this.length = p22.uint32;
21418    }
21419  };
21420  var gzipDecode = inflate_default.inflate || void 0;
21421  var nativeGzipDecode = void 0;
21422  var WOFF$1 = class extends SimpleTable {
21423    constructor(font2, dataview, createTable2) {
21424      const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`);
21425      this.signature = p22.tag;
21426      this.flavor = p22.uint32;
21427      this.length = p22.uint32;
21428      this.numTables = p22.uint16;
21429      p22.uint16;
21430      this.totalSfntSize = p22.uint32;
21431      this.majorVersion = p22.uint16;
21432      this.minorVersion = p22.uint16;
21433      this.metaOffset = p22.uint32;
21434      this.metaLength = p22.uint32;
21435      this.metaOrigLength = p22.uint32;
21436      this.privOffset = p22.uint32;
21437      this.privLength = p22.uint32;
21438      p22.verifyLength();
21439      this.directory = [...new Array(this.numTables)].map(
21440        (_) => new WoffTableDirectoryEntry(p22)
21441      );
21442      buildWoffLazyLookups(this, dataview, createTable2);
21443    }
21444  };
21445  var WoffTableDirectoryEntry = class {
21446    constructor(p22) {
21447      this.tag = p22.tag;
21448      this.offset = p22.uint32;
21449      this.compLength = p22.uint32;
21450      this.origLength = p22.uint32;
21451      this.origChecksum = p22.uint32;
21452    }
21453  };
21454  function buildWoffLazyLookups(woff, dataview, createTable2) {
21455    woff.tables = {};
21456    woff.directory.forEach((entry) => {
21457      lazy$1(woff.tables, entry.tag.trim(), () => {
21458        let offset4 = 0;
21459        let view = dataview;
21460        if (entry.compLength !== entry.origLength) {
21461          const data = dataview.buffer.slice(
21462            entry.offset,
21463            entry.offset + entry.compLength
21464          );
21465          let unpacked;
21466          if (gzipDecode) {
21467            unpacked = gzipDecode(new Uint8Array(data));
21468          } else if (nativeGzipDecode) {
21469            unpacked = nativeGzipDecode(new Uint8Array(data));
21470          } else {
21471            const msg = `no brotli decoder available to decode WOFF2 font`;
21472            if (font.onerror) font.onerror(msg);
21473            throw new Error(msg);
21474          }
21475          view = new DataView(unpacked.buffer);
21476        } else {
21477          offset4 = entry.offset;
21478        }
21479        return createTable2(
21480          woff.tables,
21481          { tag: entry.tag, offset: offset4, length: entry.origLength },
21482          view
21483        );
21484      });
21485    });
21486  }
21487  var brotliDecode = unbrotli_default;
21488  var nativeBrotliDecode = void 0;
21489  var WOFF2$1 = class extends SimpleTable {
21490    constructor(font2, dataview, createTable2) {
21491      const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`);
21492      this.signature = p22.tag;
21493      this.flavor = p22.uint32;
21494      this.length = p22.uint32;
21495      this.numTables = p22.uint16;
21496      p22.uint16;
21497      this.totalSfntSize = p22.uint32;
21498      this.totalCompressedSize = p22.uint32;
21499      this.majorVersion = p22.uint16;
21500      this.minorVersion = p22.uint16;
21501      this.metaOffset = p22.uint32;
21502      this.metaLength = p22.uint32;
21503      this.metaOrigLength = p22.uint32;
21504      this.privOffset = p22.uint32;
21505      this.privLength = p22.uint32;
21506      p22.verifyLength();
21507      this.directory = [...new Array(this.numTables)].map(
21508        (_) => new Woff2TableDirectoryEntry(p22)
21509      );
21510      let dictOffset = p22.currentPosition;
21511      this.directory[0].offset = 0;
21512      this.directory.forEach((e2, i2) => {
21513        let next = this.directory[i2 + 1];
21514        if (next) {
21515          next.offset = e2.offset + (e2.transformLength !== void 0 ? e2.transformLength : e2.origLength);
21516        }
21517      });
21518      let decoded;
21519      let buffer = dataview.buffer.slice(dictOffset);
21520      if (brotliDecode) {
21521        decoded = brotliDecode(new Uint8Array(buffer));
21522      } else if (nativeBrotliDecode) {
21523        decoded = new Uint8Array(nativeBrotliDecode(buffer));
21524      } else {
21525        const msg = `no brotli decoder available to decode WOFF2 font`;
21526        if (font2.onerror) font2.onerror(msg);
21527        throw new Error(msg);
21528      }
21529      buildWoff2LazyLookups(this, decoded, createTable2);
21530    }
21531  };
21532  var Woff2TableDirectoryEntry = class {
21533    constructor(p22) {
21534      this.flags = p22.uint8;
21535      const tagNumber = this.tagNumber = this.flags & 63;
21536      if (tagNumber === 63) {
21537        this.tag = p22.tag;
21538      } else {
21539        this.tag = getWOFF2Tag(tagNumber);
21540      }
21541      const transformVersion = this.transformVersion = (this.flags & 192) >> 6;
21542      let hasTransforms = transformVersion !== 0;
21543      if (this.tag === `glyf` || this.tag === `loca`) {
21544        hasTransforms = this.transformVersion !== 3;
21545      }
21546      this.origLength = p22.uint128;
21547      if (hasTransforms) {
21548        this.transformLength = p22.uint128;
21549      }
21550    }
21551  };
21552  function buildWoff2LazyLookups(woff2, decoded, createTable2) {
21553    woff2.tables = {};
21554    woff2.directory.forEach((entry) => {
21555      lazy$1(woff2.tables, entry.tag.trim(), () => {
21556        const start = entry.offset;
21557        const end = start + (entry.transformLength ? entry.transformLength : entry.origLength);
21558        const data = new DataView(decoded.slice(start, end).buffer);
21559        try {
21560          return createTable2(
21561            woff2.tables,
21562            { tag: entry.tag, offset: 0, length: entry.origLength },
21563            data
21564          );
21565        } catch (e2) {
21566          console.error(e2);
21567        }
21568      });
21569    });
21570  }
21571  function getWOFF2Tag(flag) {
21572    return [
21573      `cmap`,
21574      `head`,
21575      `hhea`,
21576      `hmtx`,
21577      `maxp`,
21578      `name`,
21579      `OS/2`,
21580      `post`,
21581      `cvt `,
21582      `fpgm`,
21583      `glyf`,
21584      `loca`,
21585      `prep`,
21586      `CFF `,
21587      `VORG`,
21588      `EBDT`,
21589      `EBLC`,
21590      `gasp`,
21591      `hdmx`,
21592      `kern`,
21593      `LTSH`,
21594      `PCLT`,
21595      `VDMX`,
21596      `vhea`,
21597      `vmtx`,
21598      `BASE`,
21599      `GDEF`,
21600      `GPOS`,
21601      `GSUB`,
21602      `EBSC`,
21603      `JSTF`,
21604      `MATH`,
21605      `CBDT`,
21606      `CBLC`,
21607      `COLR`,
21608      `CPAL`,
21609      `SVG `,
21610      `sbix`,
21611      `acnt`,
21612      `avar`,
21613      `bdat`,
21614      `bloc`,
21615      `bsln`,
21616      `cvar`,
21617      `fdsc`,
21618      `feat`,
21619      `fmtx`,
21620      `fvar`,
21621      `gvar`,
21622      `hsty`,
21623      `just`,
21624      `lcar`,
21625      `mort`,
21626      `morx`,
21627      `opbd`,
21628      `prop`,
21629      `trak`,
21630      `Zapf`,
21631      `Silf`,
21632      `Glat`,
21633      `Gloc`,
21634      `Feat`,
21635      `Sill`
21636    ][flag & 63];
21637  }
21638  var tableClasses = {};
21639  var tableClassesLoaded = false;
21640  Promise.all([
21641    Promise.resolve().then(function() {
21642      return cmap$1;
21643    }),
21644    Promise.resolve().then(function() {
21645      return head$1;
21646    }),
21647    Promise.resolve().then(function() {
21648      return hhea$1;
21649    }),
21650    Promise.resolve().then(function() {
21651      return hmtx$1;
21652    }),
21653    Promise.resolve().then(function() {
21654      return maxp$1;
21655    }),
21656    Promise.resolve().then(function() {
21657      return name$1;
21658    }),
21659    Promise.resolve().then(function() {
21660      return OS2$1;
21661    }),
21662    Promise.resolve().then(function() {
21663      return post$1;
21664    }),
21665    Promise.resolve().then(function() {
21666      return BASE$1;
21667    }),
21668    Promise.resolve().then(function() {
21669      return GDEF$1;
21670    }),
21671    Promise.resolve().then(function() {
21672      return GSUB$1;
21673    }),
21674    Promise.resolve().then(function() {
21675      return GPOS$1;
21676    }),
21677    Promise.resolve().then(function() {
21678      return SVG$1;
21679    }),
21680    Promise.resolve().then(function() {
21681      return fvar$1;
21682    }),
21683    Promise.resolve().then(function() {
21684      return cvt$1;
21685    }),
21686    Promise.resolve().then(function() {
21687      return fpgm$1;
21688    }),
21689    Promise.resolve().then(function() {
21690      return gasp$1;
21691    }),
21692    Promise.resolve().then(function() {
21693      return glyf$1;
21694    }),
21695    Promise.resolve().then(function() {
21696      return loca$1;
21697    }),
21698    Promise.resolve().then(function() {
21699      return prep$1;
21700    }),
21701    Promise.resolve().then(function() {
21702      return CFF$1;
21703    }),
21704    Promise.resolve().then(function() {
21705      return CFF2$1;
21706    }),
21707    Promise.resolve().then(function() {
21708      return VORG$1;
21709    }),
21710    Promise.resolve().then(function() {
21711      return EBLC$1;
21712    }),
21713    Promise.resolve().then(function() {
21714      return EBDT$1;
21715    }),
21716    Promise.resolve().then(function() {
21717      return EBSC$1;
21718    }),
21719    Promise.resolve().then(function() {
21720      return CBLC$1;
21721    }),
21722    Promise.resolve().then(function() {
21723      return CBDT$1;
21724    }),
21725    Promise.resolve().then(function() {
21726      return sbix$1;
21727    }),
21728    Promise.resolve().then(function() {
21729      return COLR$1;
21730    }),
21731    Promise.resolve().then(function() {
21732      return CPAL$1;
21733    }),
21734    Promise.resolve().then(function() {
21735      return DSIG$1;
21736    }),
21737    Promise.resolve().then(function() {
21738      return hdmx$1;
21739    }),
21740    Promise.resolve().then(function() {
21741      return kern$1;
21742    }),
21743    Promise.resolve().then(function() {
21744      return LTSH$1;
21745    }),
21746    Promise.resolve().then(function() {
21747      return MERG$1;
21748    }),
21749    Promise.resolve().then(function() {
21750      return meta$1;
21751    }),
21752    Promise.resolve().then(function() {
21753      return PCLT$1;
21754    }),
21755    Promise.resolve().then(function() {
21756      return VDMX$1;
21757    }),
21758    Promise.resolve().then(function() {
21759      return vhea$1;
21760    }),
21761    Promise.resolve().then(function() {
21762      return vmtx$1;
21763    })
21764  ]).then((data) => {
21765    data.forEach((e2) => {
21766      let name2 = Object.keys(e2)[0];
21767      tableClasses[name2] = e2[name2];
21768    });
21769    tableClassesLoaded = true;
21770  });
21771  function createTable(tables, dict, dataview) {
21772    let name2 = dict.tag.replace(/[^\w\d]/g, ``);
21773    let Type = tableClasses[name2];
21774    if (Type) return new Type(dict, dataview, tables);
21775    console.warn(
21776      `lib-font has no definition for $name2}. The table was skipped.`
21777    );
21778    return {};
21779  }
21780  function loadTableClasses() {
21781    let count = 0;
21782    function checkLoaded(resolve, reject) {
21783      if (!tableClassesLoaded) {
21784        if (count > 10) {
21785          return reject(new Error(`loading took too long`));
21786        }
21787        count++;
21788        return setTimeout(() => checkLoaded(resolve), 250);
21789      }
21790      resolve(createTable);
21791    }
21792    return new Promise((resolve, reject) => checkLoaded(resolve));
21793  }
21794  function getFontCSSFormat(path, errorOnStyle) {
21795    let pos = path.lastIndexOf(`.`);
21796    let ext = (path.substring(pos + 1) || ``).toLowerCase();
21797    let format = {
21798      ttf: `truetype`,
21799      otf: `opentype`,
21800      woff: `woff`,
21801      woff2: `woff2`
21802    }[ext];
21803    if (format) return format;
21804    let msg = {
21805      eot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`,
21806      svg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`,
21807      fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
21808      ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`
21809    }[ext];
21810    if (!msg) msg = `$path} is not a known webfont format.`;
21811    if (errorOnStyle) {
21812      throw new Error(msg);
21813    } else {
21814      console.warn(`Could not load font: $msg}`);
21815    }
21816  }
21817  async function setupFontFace(name2, url, options = {}) {
21818    if (!globalThis.document) return;
21819    let format = getFontCSSFormat(url, options.errorOnStyle);
21820    if (!format) return;
21821    let style = document.createElement(`style`);
21822    style.className = `injected-by-Font-js`;
21823    let rules = [];
21824    if (options.styleRules) {
21825      rules = Object.entries(options.styleRules).map(
21826        ([key, value]) => `$key}: $value};`
21827      );
21828    }
21829    style.textContent = `
21830  @font-face {
21831      font-family: "$name2}";
21832      $rules.join(
21833      `
21834      `
21835    )}
21836      src: url("$url}") format("$format}");
21837  }`;
21838    globalThis.document.head.appendChild(style);
21839    return style;
21840  }
21841  var TTF = [0, 1, 0, 0];
21842  var OTF = [79, 84, 84, 79];
21843  var WOFF = [119, 79, 70, 70];
21844  var WOFF2 = [119, 79, 70, 50];
21845  function match(ar1, ar2) {
21846    if (ar1.length !== ar2.length) return;
21847    for (let i2 = 0; i2 < ar1.length; i2++) {
21848      if (ar1[i2] !== ar2[i2]) return;
21849    }
21850    return true;
21851  }
21852  function validFontFormat(dataview) {
21853    const LEAD_BYTES = [
21854      dataview.getUint8(0),
21855      dataview.getUint8(1),
21856      dataview.getUint8(2),
21857      dataview.getUint8(3)
21858    ];
21859    if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`;
21860    if (match(LEAD_BYTES, WOFF)) return `WOFF`;
21861    if (match(LEAD_BYTES, WOFF2)) return `WOFF2`;
21862  }
21863  function checkFetchResponseStatus(response) {
21864    if (!response.ok) {
21865      throw new Error(
21866        `HTTP $response.status} - $response.statusText}`
21867      );
21868    }
21869    return response;
21870  }
21871  var Font = class extends EventManager {
21872    constructor(name2, options = {}) {
21873      super();
21874      this.name = name2;
21875      this.options = options;
21876      this.metrics = false;
21877    }
21878    get src() {
21879      return this.__src;
21880    }
21881    set src(src) {
21882      this.__src = src;
21883      (async () => {
21884        if (globalThis.document && !this.options.skipStyleSheet) {
21885          await setupFontFace(this.name, src, this.options);
21886        }
21887        this.loadFont(src);
21888      })();
21889    }
21890    async loadFont(url, filename) {
21891      fetch(url).then(
21892        (response) => checkFetchResponseStatus(response) && response.arrayBuffer()
21893      ).then(
21894        (buffer) => this.fromDataBuffer(buffer, filename || url)
21895      ).catch((err) => {
21896        const evt = new Event2(
21897          `error`,
21898          err,
21899          `Failed to load font at $filename || url}`
21900        );
21901        this.dispatch(evt);
21902        if (this.onerror) this.onerror(evt);
21903      });
21904    }
21905    async fromDataBuffer(buffer, filenameOrUrL) {
21906      this.fontData = new DataView(buffer);
21907      let type = validFontFormat(this.fontData);
21908      if (!type) {
21909        throw new Error(
21910          `$filenameOrUrL} is either an unsupported font format, or not a font at all.`
21911        );
21912      }
21913      await this.parseBasicData(type);
21914      const evt = new Event2("load", { font: this });
21915      this.dispatch(evt);
21916      if (this.onload) this.onload(evt);
21917    }
21918    async parseBasicData(type) {
21919      return loadTableClasses().then((createTable2) => {
21920        if (type === `SFNT`) {
21921          this.opentype = new SFNT(this, this.fontData, createTable2);
21922        }
21923        if (type === `WOFF`) {
21924          this.opentype = new WOFF$1(this, this.fontData, createTable2);
21925        }
21926        if (type === `WOFF2`) {
21927          this.opentype = new WOFF2$1(this, this.fontData, createTable2);
21928        }
21929        return this.opentype;
21930      });
21931    }
21932    getGlyphId(char) {
21933      return this.opentype.tables.cmap.getGlyphId(char);
21934    }
21935    reverse(glyphid) {
21936      return this.opentype.tables.cmap.reverse(glyphid);
21937    }
21938    supports(char) {
21939      return this.getGlyphId(char) !== 0;
21940    }
21941    supportsVariation(variation) {
21942      return this.opentype.tables.cmap.supportsVariation(variation) !== false;
21943    }
21944    measureText(text, size4 = 16) {
21945      if (this.__unloaded)
21946        throw new Error(
21947          "Cannot measure text: font was unloaded. Please reload before calling measureText()"
21948        );
21949      let d2 = document.createElement("div");
21950      d2.textContent = text;
21951      d2.style.fontFamily = this.name;
21952      d2.style.fontSize = `$size4}px`;
21953      d2.style.color = `transparent`;
21954      d2.style.background = `transparent`;
21955      d2.style.top = `0`;
21956      d2.style.left = `0`;
21957      d2.style.position = `absolute`;
21958      document.body.appendChild(d2);
21959      let bbox = d2.getBoundingClientRect();
21960      document.body.removeChild(d2);
21961      const OS22 = this.opentype.tables["OS/2"];
21962      bbox.fontSize = size4;
21963      bbox.ascender = OS22.sTypoAscender;
21964      bbox.descender = OS22.sTypoDescender;
21965      return bbox;
21966    }
21967    unload() {
21968      if (this.styleElement.parentNode) {
21969        this.styleElement.parentNode.removeElement(this.styleElement);
21970        const evt = new Event2("unload", { font: this });
21971        this.dispatch(evt);
21972        if (this.onunload) this.onunload(evt);
21973      }
21974      this._unloaded = true;
21975    }
21976    load() {
21977      if (this.__unloaded) {
21978        delete this.__unloaded;
21979        document.head.appendChild(this.styleElement);
21980        const evt = new Event2("load", { font: this });
21981        this.dispatch(evt);
21982        if (this.onload) this.onload(evt);
21983      }
21984    }
21985  };
21986  globalThis.Font = Font;
21987  var Subtable = class extends ParsedData {
21988    constructor(p22, plaformID, encodingID) {
21989      super(p22);
21990      this.plaformID = plaformID;
21991      this.encodingID = encodingID;
21992    }
21993  };
21994  var Format0 = class extends Subtable {
21995    constructor(p22, platformID, encodingID) {
21996      super(p22, platformID, encodingID);
21997      this.format = 0;
21998      this.length = p22.uint16;
21999      this.language = p22.uint16;
22000      this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8);
22001    }
22002    supports(charCode) {
22003      if (charCode.charCodeAt) {
22004        charCode = -1;
22005        console.warn(
22006          `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
22007        );
22008      }
22009      return 0 <= charCode && charCode <= 255;
22010    }
22011    reverse(glyphID) {
22012      console.warn(`reverse not implemented for cmap subtable format 0`);
22013      return {};
22014    }
22015    getSupportedCharCodes() {
22016      return [{ start: 1, end: 256 }];
22017    }
22018  };
22019  var Format2 = class extends Subtable {
22020    constructor(p22, platformID, encodingID) {
22021      super(p22, platformID, encodingID);
22022      this.format = 2;
22023      this.length = p22.uint16;
22024      this.language = p22.uint16;
22025      this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16);
22026      const subHeaderCount = Math.max(...this.subHeaderKeys);
22027      const subHeaderOffset = p22.currentPosition;
22028      lazy$1(this, `subHeaders`, () => {
22029        p22.currentPosition = subHeaderOffset;
22030        return [...new Array(subHeaderCount)].map(
22031          (_) => new SubHeader(p22)
22032        );
22033      });
22034      const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
22035      lazy$1(this, `glyphIndexArray`, () => {
22036        p22.currentPosition = glyphIndexOffset;
22037        return [...new Array(subHeaderCount)].map((_) => p22.uint16);
22038      });
22039    }
22040    supports(charCode) {
22041      if (charCode.charCodeAt) {
22042        charCode = -1;
22043        console.warn(
22044          `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
22045        );
22046      }
22047      const low = charCode && 255;
22048      const high = charCode && 65280;
22049      const subHeaderKey = this.subHeaders[high];
22050      const subheader = this.subHeaders[subHeaderKey];
22051      const first = subheader.firstCode;
22052      const last = first + subheader.entryCount;
22053      return first <= low && low <= last;
22054    }
22055    reverse(glyphID) {
22056      console.warn(`reverse not implemented for cmap subtable format 2`);
22057      return {};
22058    }
22059    getSupportedCharCodes(preservePropNames = false) {
22060      if (preservePropNames) {
22061        return this.subHeaders.map((h2) => ({
22062          firstCode: h2.firstCode,
22063          lastCode: h2.lastCode
22064        }));
22065      }
22066      return this.subHeaders.map((h2) => ({
22067        start: h2.firstCode,
22068        end: h2.lastCode
22069      }));
22070    }
22071  };
22072  var SubHeader = class {
22073    constructor(p22) {
22074      this.firstCode = p22.uint16;
22075      this.entryCount = p22.uint16;
22076      this.lastCode = this.first + this.entryCount;
22077      this.idDelta = p22.int16;
22078      this.idRangeOffset = p22.uint16;
22079    }
22080  };
22081  var Format4 = class extends Subtable {
22082    constructor(p22, platformID, encodingID) {
22083      super(p22, platformID, encodingID);
22084      this.format = 4;
22085      this.length = p22.uint16;
22086      this.language = p22.uint16;
22087      this.segCountX2 = p22.uint16;
22088      this.segCount = this.segCountX2 / 2;
22089      this.searchRange = p22.uint16;
22090      this.entrySelector = p22.uint16;
22091      this.rangeShift = p22.uint16;
22092      const endCodePosition = p22.currentPosition;
22093      lazy$1(
22094        this,
22095        `endCode`,
22096        () => p22.readBytes(this.segCount, endCodePosition, 16)
22097      );
22098      const startCodePosition = endCodePosition + 2 + this.segCountX2;
22099      lazy$1(
22100        this,
22101        `startCode`,
22102        () => p22.readBytes(this.segCount, startCodePosition, 16)
22103      );
22104      const idDeltaPosition = startCodePosition + this.segCountX2;
22105      lazy$1(
22106        this,
22107        `idDelta`,
22108        () => p22.readBytes(this.segCount, idDeltaPosition, 16, true)
22109      );
22110      const idRangePosition = idDeltaPosition + this.segCountX2;
22111      lazy$1(
22112        this,
22113        `idRangeOffset`,
22114        () => p22.readBytes(this.segCount, idRangePosition, 16)
22115      );
22116      const glyphIdArrayPosition = idRangePosition + this.segCountX2;
22117      const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart);
22118      lazy$1(
22119        this,
22120        `glyphIdArray`,
22121        () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16)
22122      );
22123      lazy$1(
22124        this,
22125        `segments`,
22126        () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22)
22127      );
22128    }
22129    buildSegments(idRangePosition, glyphIdArrayPosition, p22) {
22130      const build = (_, i2) => {
22131        let startCode = this.startCode[i2], endCode = this.endCode[i2], idDelta = this.idDelta[i2], idRangeOffset = this.idRangeOffset[i2], idRangeOffsetPointer = idRangePosition + 2 * i2, glyphIDs = [];
22132        if (idRangeOffset === 0) {
22133          for (let i22 = startCode + idDelta, e2 = endCode + idDelta; i22 <= e2; i22++) {
22134            glyphIDs.push(i22);
22135          }
22136        } else {
22137          for (let i22 = 0, e2 = endCode - startCode; i22 <= e2; i22++) {
22138            p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i22 * 2;
22139            glyphIDs.push(p22.uint16);
22140          }
22141        }
22142        return {
22143          startCode,
22144          endCode,
22145          idDelta,
22146          idRangeOffset,
22147          glyphIDs
22148        };
22149      };
22150      return [...new Array(this.segCount)].map(build);
22151    }
22152    reverse(glyphID) {
22153      let s2 = this.segments.find((v2) => v2.glyphIDs.includes(glyphID));
22154      if (!s2) return {};
22155      const code = s2.startCode + s2.glyphIDs.indexOf(glyphID);
22156      return { code, unicode: String.fromCodePoint(code) };
22157    }
22158    getGlyphId(charCode) {
22159      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22160      if (55296 <= charCode && charCode <= 57343) return 0;
22161      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
22162        return 0;
22163      let segment = this.segments.find(
22164        (s2) => s2.startCode <= charCode && charCode <= s2.endCode
22165      );
22166      if (!segment) return 0;
22167      return segment.glyphIDs[charCode - segment.startCode];
22168    }
22169    supports(charCode) {
22170      return this.getGlyphId(charCode) !== 0;
22171    }
22172    getSupportedCharCodes(preservePropNames = false) {
22173      if (preservePropNames) return this.segments;
22174      return this.segments.map((v2) => ({
22175        start: v2.startCode,
22176        end: v2.endCode
22177      }));
22178    }
22179  };
22180  var Format6 = class extends Subtable {
22181    constructor(p22, platformID, encodingID) {
22182      super(p22, platformID, encodingID);
22183      this.format = 6;
22184      this.length = p22.uint16;
22185      this.language = p22.uint16;
22186      this.firstCode = p22.uint16;
22187      this.entryCount = p22.uint16;
22188      this.lastCode = this.firstCode + this.entryCount - 1;
22189      const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16);
22190      lazy$1(this, `glyphIdArray`, getter);
22191    }
22192    supports(charCode) {
22193      if (charCode.charCodeAt) {
22194        charCode = -1;
22195        console.warn(
22196          `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
22197        );
22198      }
22199      if (charCode < this.firstCode) return {};
22200      if (charCode > this.firstCode + this.entryCount) return {};
22201      const code = charCode - this.firstCode;
22202      return { code, unicode: String.fromCodePoint(code) };
22203    }
22204    reverse(glyphID) {
22205      let pos = this.glyphIdArray.indexOf(glyphID);
22206      if (pos > -1) return this.firstCode + pos;
22207    }
22208    getSupportedCharCodes(preservePropNames = false) {
22209      if (preservePropNames) {
22210        return [{ firstCode: this.firstCode, lastCode: this.lastCode }];
22211      }
22212      return [{ start: this.firstCode, end: this.lastCode }];
22213    }
22214  };
22215  var Format8 = class extends Subtable {
22216    constructor(p22, platformID, encodingID) {
22217      super(p22, platformID, encodingID);
22218      this.format = 8;
22219      p22.uint16;
22220      this.length = p22.uint32;
22221      this.language = p22.uint32;
22222      this.is32 = [...new Array(8192)].map((_) => p22.uint8);
22223      this.numGroups = p22.uint32;
22224      const getter = () => [...new Array(this.numGroups)].map(
22225        (_) => new SequentialMapGroup$1(p22)
22226      );
22227      lazy$1(this, `groups`, getter);
22228    }
22229    supports(charCode) {
22230      if (charCode.charCodeAt) {
22231        charCode = -1;
22232        console.warn(
22233          `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
22234        );
22235      }
22236      return this.groups.findIndex(
22237        (s2) => s2.startcharCode <= charCode && charCode <= s2.endcharCode
22238      ) !== -1;
22239    }
22240    reverse(glyphID) {
22241      console.warn(`reverse not implemented for cmap subtable format 8`);
22242      return {};
22243    }
22244    getSupportedCharCodes(preservePropNames = false) {
22245      if (preservePropNames) return this.groups;
22246      return this.groups.map((v2) => ({
22247        start: v2.startcharCode,
22248        end: v2.endcharCode
22249      }));
22250    }
22251  };
22252  var SequentialMapGroup$1 = class {
22253    constructor(p22) {
22254      this.startcharCode = p22.uint32;
22255      this.endcharCode = p22.uint32;
22256      this.startGlyphID = p22.uint32;
22257    }
22258  };
22259  var Format10 = class extends Subtable {
22260    constructor(p22, platformID, encodingID) {
22261      super(p22, platformID, encodingID);
22262      this.format = 10;
22263      p22.uint16;
22264      this.length = p22.uint32;
22265      this.language = p22.uint32;
22266      this.startCharCode = p22.uint32;
22267      this.numChars = p22.uint32;
22268      this.endCharCode = this.startCharCode + this.numChars;
22269      const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16);
22270      lazy$1(this, `glyphs`, getter);
22271    }
22272    supports(charCode) {
22273      if (charCode.charCodeAt) {
22274        charCode = -1;
22275        console.warn(
22276          `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
22277        );
22278      }
22279      if (charCode < this.startCharCode) return false;
22280      if (charCode > this.startCharCode + this.numChars) return false;
22281      return charCode - this.startCharCode;
22282    }
22283    reverse(glyphID) {
22284      console.warn(`reverse not implemented for cmap subtable format 10`);
22285      return {};
22286    }
22287    getSupportedCharCodes(preservePropNames = false) {
22288      if (preservePropNames) {
22289        return [
22290          {
22291            startCharCode: this.startCharCode,
22292            endCharCode: this.endCharCode
22293          }
22294        ];
22295      }
22296      return [{ start: this.startCharCode, end: this.endCharCode }];
22297    }
22298  };
22299  var Format12 = class extends Subtable {
22300    constructor(p22, platformID, encodingID) {
22301      super(p22, platformID, encodingID);
22302      this.format = 12;
22303      p22.uint16;
22304      this.length = p22.uint32;
22305      this.language = p22.uint32;
22306      this.numGroups = p22.uint32;
22307      const getter = () => [...new Array(this.numGroups)].map(
22308        (_) => new SequentialMapGroup(p22)
22309      );
22310      lazy$1(this, `groups`, getter);
22311    }
22312    supports(charCode) {
22313      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22314      if (55296 <= charCode && charCode <= 57343) return 0;
22315      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
22316        return 0;
22317      return this.groups.findIndex(
22318        (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode
22319      ) !== -1;
22320    }
22321    reverse(glyphID) {
22322      for (let group of this.groups) {
22323        let start = group.startGlyphID;
22324        if (start > glyphID) continue;
22325        if (start === glyphID) return group.startCharCode;
22326        let end = start + (group.endCharCode - group.startCharCode);
22327        if (end < glyphID) continue;
22328        const code = group.startCharCode + (glyphID - start);
22329        return { code, unicode: String.fromCodePoint(code) };
22330      }
22331      return {};
22332    }
22333    getSupportedCharCodes(preservePropNames = false) {
22334      if (preservePropNames) return this.groups;
22335      return this.groups.map((v2) => ({
22336        start: v2.startCharCode,
22337        end: v2.endCharCode
22338      }));
22339    }
22340  };
22341  var SequentialMapGroup = class {
22342    constructor(p22) {
22343      this.startCharCode = p22.uint32;
22344      this.endCharCode = p22.uint32;
22345      this.startGlyphID = p22.uint32;
22346    }
22347  };
22348  var Format13 = class extends Subtable {
22349    constructor(p22, platformID, encodingID) {
22350      super(p22, platformID, encodingID);
22351      this.format = 13;
22352      p22.uint16;
22353      this.length = p22.uint32;
22354      this.language = p22.uint32;
22355      this.numGroups = p22.uint32;
22356      const getter = [...new Array(this.numGroups)].map(
22357        (_) => new ConstantMapGroup(p22)
22358      );
22359      lazy$1(this, `groups`, getter);
22360    }
22361    supports(charCode) {
22362      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22363      return this.groups.findIndex(
22364        (s2) => s2.startCharCode <= charCode && charCode <= s2.endCharCode
22365      ) !== -1;
22366    }
22367    reverse(glyphID) {
22368      console.warn(`reverse not implemented for cmap subtable format 13`);
22369      return {};
22370    }
22371    getSupportedCharCodes(preservePropNames = false) {
22372      if (preservePropNames) return this.groups;
22373      return this.groups.map((v2) => ({
22374        start: v2.startCharCode,
22375        end: v2.endCharCode
22376      }));
22377    }
22378  };
22379  var ConstantMapGroup = class {
22380    constructor(p22) {
22381      this.startCharCode = p22.uint32;
22382      this.endCharCode = p22.uint32;
22383      this.glyphID = p22.uint32;
22384    }
22385  };
22386  var Format14 = class extends Subtable {
22387    constructor(p22, platformID, encodingID) {
22388      super(p22, platformID, encodingID);
22389      this.subTableStart = p22.currentPosition;
22390      this.format = 14;
22391      this.length = p22.uint32;
22392      this.numVarSelectorRecords = p22.uint32;
22393      lazy$1(
22394        this,
22395        `varSelectors`,
22396        () => [...new Array(this.numVarSelectorRecords)].map(
22397          (_) => new VariationSelector(p22)
22398        )
22399      );
22400    }
22401    supports() {
22402      console.warn(`supports not implemented for cmap subtable format 14`);
22403      return 0;
22404    }
22405    getSupportedCharCodes() {
22406      console.warn(
22407        `getSupportedCharCodes not implemented for cmap subtable format 14`
22408      );
22409      return [];
22410    }
22411    reverse(glyphID) {
22412      console.warn(`reverse not implemented for cmap subtable format 14`);
22413      return {};
22414    }
22415    supportsVariation(variation) {
22416      let v2 = this.varSelector.find(
22417        (uvs) => uvs.varSelector === variation
22418      );
22419      return v2 ? v2 : false;
22420    }
22421    getSupportedVariations() {
22422      return this.varSelectors.map((v2) => v2.varSelector);
22423    }
22424  };
22425  var VariationSelector = class {
22426    constructor(p22) {
22427      this.varSelector = p22.uint24;
22428      this.defaultUVSOffset = p22.Offset32;
22429      this.nonDefaultUVSOffset = p22.Offset32;
22430    }
22431  };
22432  function createSubTable(parser, platformID, encodingID) {
22433    const format = parser.uint16;
22434    if (format === 0) return new Format0(parser, platformID, encodingID);
22435    if (format === 2) return new Format2(parser, platformID, encodingID);
22436    if (format === 4) return new Format4(parser, platformID, encodingID);
22437    if (format === 6) return new Format6(parser, platformID, encodingID);
22438    if (format === 8) return new Format8(parser, platformID, encodingID);
22439    if (format === 10) return new Format10(parser, platformID, encodingID);
22440    if (format === 12) return new Format12(parser, platformID, encodingID);
22441    if (format === 13) return new Format13(parser, platformID, encodingID);
22442    if (format === 14) return new Format14(parser, platformID, encodingID);
22443    return {};
22444  }
22445  var cmap = class extends SimpleTable {
22446    constructor(dict, dataview) {
22447      const { p: p22 } = super(dict, dataview);
22448      this.version = p22.uint16;
22449      this.numTables = p22.uint16;
22450      this.encodingRecords = [...new Array(this.numTables)].map(
22451        (_) => new EncodingRecord(p22, this.tableStart)
22452      );
22453    }
22454    getSubTable(tableID) {
22455      return this.encodingRecords[tableID].table;
22456    }
22457    getSupportedEncodings() {
22458      return this.encodingRecords.map((r3) => ({
22459        platformID: r3.platformID,
22460        encodingId: r3.encodingID
22461      }));
22462    }
22463    getSupportedCharCodes(platformID, encodingID) {
22464      const recordID = this.encodingRecords.findIndex(
22465        (r3) => r3.platformID === platformID && r3.encodingID === encodingID
22466      );
22467      if (recordID === -1) return false;
22468      const subtable = this.getSubTable(recordID);
22469      return subtable.getSupportedCharCodes();
22470    }
22471    reverse(glyphid) {
22472      for (let i2 = 0; i2 < this.numTables; i2++) {
22473        let code = this.getSubTable(i2).reverse(glyphid);
22474        if (code) return code;
22475      }
22476    }
22477    getGlyphId(char) {
22478      let last = 0;
22479      this.encodingRecords.some((_, tableID) => {
22480        let t2 = this.getSubTable(tableID);
22481        if (!t2.getGlyphId) return false;
22482        last = t2.getGlyphId(char);
22483        return last !== 0;
22484      });
22485      return last;
22486    }
22487    supports(char) {
22488      return this.encodingRecords.some((_, tableID) => {
22489        const t2 = this.getSubTable(tableID);
22490        return t2.supports && t2.supports(char) !== false;
22491      });
22492    }
22493    supportsVariation(variation) {
22494      return this.encodingRecords.some((_, tableID) => {
22495        const t2 = this.getSubTable(tableID);
22496        return t2.supportsVariation && t2.supportsVariation(variation) !== false;
22497      });
22498    }
22499  };
22500  var EncodingRecord = class {
22501    constructor(p22, tableStart) {
22502      const platformID = this.platformID = p22.uint16;
22503      const encodingID = this.encodingID = p22.uint16;
22504      const offset4 = this.offset = p22.Offset32;
22505      lazy$1(this, `table`, () => {
22506        p22.currentPosition = tableStart + offset4;
22507        return createSubTable(p22, platformID, encodingID);
22508      });
22509    }
22510  };
22511  var cmap$1 = Object.freeze({ __proto__: null, cmap });
22512  var head = class extends SimpleTable {
22513    constructor(dict, dataview) {
22514      const { p: p22 } = super(dict, dataview);
22515      this.load({
22516        majorVersion: p22.uint16,
22517        minorVersion: p22.uint16,
22518        fontRevision: p22.fixed,
22519        checkSumAdjustment: p22.uint32,
22520        magicNumber: p22.uint32,
22521        flags: p22.flags(16),
22522        unitsPerEm: p22.uint16,
22523        created: p22.longdatetime,
22524        modified: p22.longdatetime,
22525        xMin: p22.int16,
22526        yMin: p22.int16,
22527        xMax: p22.int16,
22528        yMax: p22.int16,
22529        macStyle: p22.flags(16),
22530        lowestRecPPEM: p22.uint16,
22531        fontDirectionHint: p22.uint16,
22532        indexToLocFormat: p22.uint16,
22533        glyphDataFormat: p22.uint16
22534      });
22535    }
22536  };
22537  var head$1 = Object.freeze({ __proto__: null, head });
22538  var hhea = class extends SimpleTable {
22539    constructor(dict, dataview) {
22540      const { p: p22 } = super(dict, dataview);
22541      this.majorVersion = p22.uint16;
22542      this.minorVersion = p22.uint16;
22543      this.ascender = p22.fword;
22544      this.descender = p22.fword;
22545      this.lineGap = p22.fword;
22546      this.advanceWidthMax = p22.ufword;
22547      this.minLeftSideBearing = p22.fword;
22548      this.minRightSideBearing = p22.fword;
22549      this.xMaxExtent = p22.fword;
22550      this.caretSlopeRise = p22.int16;
22551      this.caretSlopeRun = p22.int16;
22552      this.caretOffset = p22.int16;
22553      p22.int16;
22554      p22.int16;
22555      p22.int16;
22556      p22.int16;
22557      this.metricDataFormat = p22.int16;
22558      this.numberOfHMetrics = p22.uint16;
22559      p22.verifyLength();
22560    }
22561  };
22562  var hhea$1 = Object.freeze({ __proto__: null, hhea });
22563  var hmtx = class extends SimpleTable {
22564    constructor(dict, dataview, tables) {
22565      const { p: p22 } = super(dict, dataview);
22566      const numberOfHMetrics = tables.hhea.numberOfHMetrics;
22567      const numGlyphs = tables.maxp.numGlyphs;
22568      const metricsStart = p22.currentPosition;
22569      lazy$1(this, `hMetrics`, () => {
22570        p22.currentPosition = metricsStart;
22571        return [...new Array(numberOfHMetrics)].map(
22572          (_) => new LongHorMetric(p22.uint16, p22.int16)
22573        );
22574      });
22575      if (numberOfHMetrics < numGlyphs) {
22576        const lsbStart = metricsStart + numberOfHMetrics * 4;
22577        lazy$1(this, `leftSideBearings`, () => {
22578          p22.currentPosition = lsbStart;
22579          return [...new Array(numGlyphs - numberOfHMetrics)].map(
22580            (_) => p22.int16
22581          );
22582        });
22583      }
22584    }
22585  };
22586  var LongHorMetric = class {
22587    constructor(w2, b2) {
22588      this.advanceWidth = w2;
22589      this.lsb = b2;
22590    }
22591  };
22592  var hmtx$1 = Object.freeze({ __proto__: null, hmtx });
22593  var maxp = class extends SimpleTable {
22594    constructor(dict, dataview) {
22595      const { p: p22 } = super(dict, dataview);
22596      this.version = p22.legacyFixed;
22597      this.numGlyphs = p22.uint16;
22598      if (this.version === 1) {
22599        this.maxPoints = p22.uint16;
22600        this.maxContours = p22.uint16;
22601        this.maxCompositePoints = p22.uint16;
22602        this.maxCompositeContours = p22.uint16;
22603        this.maxZones = p22.uint16;
22604        this.maxTwilightPoints = p22.uint16;
22605        this.maxStorage = p22.uint16;
22606        this.maxFunctionDefs = p22.uint16;
22607        this.maxInstructionDefs = p22.uint16;
22608        this.maxStackElements = p22.uint16;
22609        this.maxSizeOfInstructions = p22.uint16;
22610        this.maxComponentElements = p22.uint16;
22611        this.maxComponentDepth = p22.uint16;
22612      }
22613      p22.verifyLength();
22614    }
22615  };
22616  var maxp$1 = Object.freeze({ __proto__: null, maxp });
22617  var name = class extends SimpleTable {
22618    constructor(dict, dataview) {
22619      const { p: p22 } = super(dict, dataview);
22620      this.format = p22.uint16;
22621      this.count = p22.uint16;
22622      this.stringOffset = p22.Offset16;
22623      this.nameRecords = [...new Array(this.count)].map(
22624        (_) => new NameRecord(p22, this)
22625      );
22626      if (this.format === 1) {
22627        this.langTagCount = p22.uint16;
22628        this.langTagRecords = [...new Array(this.langTagCount)].map(
22629          (_) => new LangTagRecord(p22.uint16, p22.Offset16)
22630        );
22631      }
22632      this.stringStart = this.tableStart + this.stringOffset;
22633    }
22634    get(nameID) {
22635      let record = this.nameRecords.find(
22636        (record2) => record2.nameID === nameID
22637      );
22638      if (record) return record.string;
22639    }
22640  };
22641  var LangTagRecord = class {
22642    constructor(length, offset4) {
22643      this.length = length;
22644      this.offset = offset4;
22645    }
22646  };
22647  var NameRecord = class {
22648    constructor(p22, nameTable) {
22649      this.platformID = p22.uint16;
22650      this.encodingID = p22.uint16;
22651      this.languageID = p22.uint16;
22652      this.nameID = p22.uint16;
22653      this.length = p22.uint16;
22654      this.offset = p22.Offset16;
22655      lazy$1(this, `string`, () => {
22656        p22.currentPosition = nameTable.stringStart + this.offset;
22657        return decodeString(p22, this);
22658      });
22659    }
22660  };
22661  function decodeString(p22, record) {
22662    const { platformID, length } = record;
22663    if (length === 0) return ``;
22664    if (platformID === 0 || platformID === 3) {
22665      const str2 = [];
22666      for (let i2 = 0, e2 = length / 2; i2 < e2; i2++)
22667        str2[i2] = String.fromCharCode(p22.uint16);
22668      return str2.join(``);
22669    }
22670    const bytes = p22.readBytes(length);
22671    const str = [];
22672    bytes.forEach(function(b2, i2) {
22673      str[i2] = String.fromCharCode(b2);
22674    });
22675    return str.join(``);
22676  }
22677  var name$1 = Object.freeze({ __proto__: null, name });
22678  var OS2 = class extends SimpleTable {
22679    constructor(dict, dataview) {
22680      const { p: p22 } = super(dict, dataview);
22681      this.version = p22.uint16;
22682      this.xAvgCharWidth = p22.int16;
22683      this.usWeightClass = p22.uint16;
22684      this.usWidthClass = p22.uint16;
22685      this.fsType = p22.uint16;
22686      this.ySubscriptXSize = p22.int16;
22687      this.ySubscriptYSize = p22.int16;
22688      this.ySubscriptXOffset = p22.int16;
22689      this.ySubscriptYOffset = p22.int16;
22690      this.ySuperscriptXSize = p22.int16;
22691      this.ySuperscriptYSize = p22.int16;
22692      this.ySuperscriptXOffset = p22.int16;
22693      this.ySuperscriptYOffset = p22.int16;
22694      this.yStrikeoutSize = p22.int16;
22695      this.yStrikeoutPosition = p22.int16;
22696      this.sFamilyClass = p22.int16;
22697      this.panose = [...new Array(10)].map((_) => p22.uint8);
22698      this.ulUnicodeRange1 = p22.flags(32);
22699      this.ulUnicodeRange2 = p22.flags(32);
22700      this.ulUnicodeRange3 = p22.flags(32);
22701      this.ulUnicodeRange4 = p22.flags(32);
22702      this.achVendID = p22.tag;
22703      this.fsSelection = p22.uint16;
22704      this.usFirstCharIndex = p22.uint16;
22705      this.usLastCharIndex = p22.uint16;
22706      this.sTypoAscender = p22.int16;
22707      this.sTypoDescender = p22.int16;
22708      this.sTypoLineGap = p22.int16;
22709      this.usWinAscent = p22.uint16;
22710      this.usWinDescent = p22.uint16;
22711      if (this.version === 0) return p22.verifyLength();
22712      this.ulCodePageRange1 = p22.flags(32);
22713      this.ulCodePageRange2 = p22.flags(32);
22714      if (this.version === 1) return p22.verifyLength();
22715      this.sxHeight = p22.int16;
22716      this.sCapHeight = p22.int16;
22717      this.usDefaultChar = p22.uint16;
22718      this.usBreakChar = p22.uint16;
22719      this.usMaxContext = p22.uint16;
22720      if (this.version <= 4) return p22.verifyLength();
22721      this.usLowerOpticalPointSize = p22.uint16;
22722      this.usUpperOpticalPointSize = p22.uint16;
22723      if (this.version === 5) return p22.verifyLength();
22724    }
22725  };
22726  var OS2$1 = Object.freeze({ __proto__: null, OS2 });
22727  var post = class extends SimpleTable {
22728    constructor(dict, dataview) {
22729      const { p: p22 } = super(dict, dataview);
22730      this.version = p22.legacyFixed;
22731      this.italicAngle = p22.fixed;
22732      this.underlinePosition = p22.fword;
22733      this.underlineThickness = p22.fword;
22734      this.isFixedPitch = p22.uint32;
22735      this.minMemType42 = p22.uint32;
22736      this.maxMemType42 = p22.uint32;
22737      this.minMemType1 = p22.uint32;
22738      this.maxMemType1 = p22.uint32;
22739      if (this.version === 1 || this.version === 3) return p22.verifyLength();
22740      this.numGlyphs = p22.uint16;
22741      if (this.version === 2) {
22742        this.glyphNameIndex = [...new Array(this.numGlyphs)].map(
22743          (_) => p22.uint16
22744        );
22745        this.namesOffset = p22.currentPosition;
22746        this.glyphNameOffsets = [1];
22747        for (let i2 = 0; i2 < this.numGlyphs; i2++) {
22748          let index2 = this.glyphNameIndex[i2];
22749          if (index2 < macStrings.length) {
22750            this.glyphNameOffsets.push(this.glyphNameOffsets[i2]);
22751            continue;
22752          }
22753          let bytelength = p22.int8;
22754          p22.skip(bytelength);
22755          this.glyphNameOffsets.push(
22756            this.glyphNameOffsets[i2] + bytelength + 1
22757          );
22758        }
22759      }
22760      if (this.version === 2.5) {
22761        this.offset = [...new Array(this.numGlyphs)].map(
22762          (_) => p22.int8
22763        );
22764      }
22765    }
22766    getGlyphName(glyphid) {
22767      if (this.version !== 2) {
22768        console.warn(
22769          `post table version $this.version} does not support glyph name lookups`
22770        );
22771        return ``;
22772      }
22773      let index2 = this.glyphNameIndex[glyphid];
22774      if (index2 < 258) return macStrings[index2];
22775      let offset4 = this.glyphNameOffsets[glyphid];
22776      let next = this.glyphNameOffsets[glyphid + 1];
22777      let len = next - offset4 - 1;
22778      if (len === 0) return `.notdef.`;
22779      this.parser.currentPosition = this.namesOffset + offset4;
22780      const data = this.parser.readBytes(
22781        len,
22782        this.namesOffset + offset4,
22783        8,
22784        true
22785      );
22786      return data.map((b2) => String.fromCharCode(b2)).join(``);
22787    }
22788  };
22789  var macStrings = [
22790    `.notdef`,
22791    `.null`,
22792    `nonmarkingreturn`,
22793    `space`,
22794    `exclam`,
22795    `quotedbl`,
22796    `numbersign`,
22797    `dollar`,
22798    `percent`,
22799    `ampersand`,
22800    `quotesingle`,
22801    `parenleft`,
22802    `parenright`,
22803    `asterisk`,
22804    `plus`,
22805    `comma`,
22806    `hyphen`,
22807    `period`,
22808    `slash`,
22809    `zero`,
22810    `one`,
22811    `two`,
22812    `three`,
22813    `four`,
22814    `five`,
22815    `six`,
22816    `seven`,
22817    `eight`,
22818    `nine`,
22819    `colon`,
22820    `semicolon`,
22821    `less`,
22822    `equal`,
22823    `greater`,
22824    `question`,
22825    `at`,
22826    `A`,
22827    `B`,
22828    `C`,
22829    `D`,
22830    `E`,
22831    `F`,
22832    `G`,
22833    `H`,
22834    `I`,
22835    `J`,
22836    `K`,
22837    `L`,
22838    `M`,
22839    `N`,
22840    `O`,
22841    `P`,
22842    `Q`,
22843    `R`,
22844    `S`,
22845    `T`,
22846    `U`,
22847    `V`,
22848    `W`,
22849    `X`,
22850    `Y`,
22851    `Z`,
22852    `bracketleft`,
22853    `backslash`,
22854    `bracketright`,
22855    `asciicircum`,
22856    `underscore`,
22857    `grave`,
22858    `a`,
22859    `b`,
22860    `c`,
22861    `d`,
22862    `e`,
22863    `f`,
22864    `g`,
22865    `h`,
22866    `i`,
22867    `j`,
22868    `k`,
22869    `l`,
22870    `m`,
22871    `n`,
22872    `o`,
22873    `p`,
22874    `q`,
22875    `r`,
22876    `s`,
22877    `t`,
22878    `u`,
22879    `v`,
22880    `w`,
22881    `x`,
22882    `y`,
22883    `z`,
22884    `braceleft`,
22885    `bar`,
22886    `braceright`,
22887    `asciitilde`,
22888    `Adieresis`,
22889    `Aring`,
22890    `Ccedilla`,
22891    `Eacute`,
22892    `Ntilde`,
22893    `Odieresis`,
22894    `Udieresis`,
22895    `aacute`,
22896    `agrave`,
22897    `acircumflex`,
22898    `adieresis`,
22899    `atilde`,
22900    `aring`,
22901    `ccedilla`,
22902    `eacute`,
22903    `egrave`,
22904    `ecircumflex`,
22905    `edieresis`,
22906    `iacute`,
22907    `igrave`,
22908    `icircumflex`,
22909    `idieresis`,
22910    `ntilde`,
22911    `oacute`,
22912    `ograve`,
22913    `ocircumflex`,
22914    `odieresis`,
22915    `otilde`,
22916    `uacute`,
22917    `ugrave`,
22918    `ucircumflex`,
22919    `udieresis`,
22920    `dagger`,
22921    `degree`,
22922    `cent`,
22923    `sterling`,
22924    `section`,
22925    `bullet`,
22926    `paragraph`,
22927    `germandbls`,
22928    `registered`,
22929    `copyright`,
22930    `trademark`,
22931    `acute`,
22932    `dieresis`,
22933    `notequal`,
22934    `AE`,
22935    `Oslash`,
22936    `infinity`,
22937    `plusminus`,
22938    `lessequal`,
22939    `greaterequal`,
22940    `yen`,
22941    `mu`,
22942    `partialdiff`,
22943    `summation`,
22944    `product`,
22945    `pi`,
22946    `integral`,
22947    `ordfeminine`,
22948    `ordmasculine`,
22949    `Omega`,
22950    `ae`,
22951    `oslash`,
22952    `questiondown`,
22953    `exclamdown`,
22954    `logicalnot`,
22955    `radical`,
22956    `florin`,
22957    `approxequal`,
22958    `Delta`,
22959    `guillemotleft`,
22960    `guillemotright`,
22961    `ellipsis`,
22962    `nonbreakingspace`,
22963    `Agrave`,
22964    `Atilde`,
22965    `Otilde`,
22966    `OE`,
22967    `oe`,
22968    `endash`,
22969    `emdash`,
22970    `quotedblleft`,
22971    `quotedblright`,
22972    `quoteleft`,
22973    `quoteright`,
22974    `divide`,
22975    `lozenge`,
22976    `ydieresis`,
22977    `Ydieresis`,
22978    `fraction`,
22979    `currency`,
22980    `guilsinglleft`,
22981    `guilsinglright`,
22982    `fi`,
22983    `fl`,
22984    `daggerdbl`,
22985    `periodcentered`,
22986    `quotesinglbase`,
22987    `quotedblbase`,
22988    `perthousand`,
22989    `Acircumflex`,
22990    `Ecircumflex`,
22991    `Aacute`,
22992    `Edieresis`,
22993    `Egrave`,
22994    `Iacute`,
22995    `Icircumflex`,
22996    `Idieresis`,
22997    `Igrave`,
22998    `Oacute`,
22999    `Ocircumflex`,
23000    `apple`,
23001    `Ograve`,
23002    `Uacute`,
23003    `Ucircumflex`,
23004    `Ugrave`,
23005    `dotlessi`,
23006    `circumflex`,
23007    `tilde`,
23008    `macron`,
23009    `breve`,
23010    `dotaccent`,
23011    `ring`,
23012    `cedilla`,
23013    `hungarumlaut`,
23014    `ogonek`,
23015    `caron`,
23016    `Lslash`,
23017    `lslash`,
23018    `Scaron`,
23019    `scaron`,
23020    `Zcaron`,
23021    `zcaron`,
23022    `brokenbar`,
23023    `Eth`,
23024    `eth`,
23025    `Yacute`,
23026    `yacute`,
23027    `Thorn`,
23028    `thorn`,
23029    `minus`,
23030    `multiply`,
23031    `onesuperior`,
23032    `twosuperior`,
23033    `threesuperior`,
23034    `onehalf`,
23035    `onequarter`,
23036    `threequarters`,
23037    `franc`,
23038    `Gbreve`,
23039    `gbreve`,
23040    `Idotaccent`,
23041    `Scedilla`,
23042    `scedilla`,
23043    `Cacute`,
23044    `cacute`,
23045    `Ccaron`,
23046    `ccaron`,
23047    `dcroat`
23048  ];
23049  var post$1 = Object.freeze({ __proto__: null, post });
23050  var BASE = class extends SimpleTable {
23051    constructor(dict, dataview) {
23052      const { p: p22 } = super(dict, dataview);
23053      this.majorVersion = p22.uint16;
23054      this.minorVersion = p22.uint16;
23055      this.horizAxisOffset = p22.Offset16;
23056      this.vertAxisOffset = p22.Offset16;
23057      lazy$1(
23058        this,
23059        `horizAxis`,
23060        () => new AxisTable(
23061          { offset: dict.offset + this.horizAxisOffset },
23062          dataview
23063        )
23064      );
23065      lazy$1(
23066        this,
23067        `vertAxis`,
23068        () => new AxisTable(
23069          { offset: dict.offset + this.vertAxisOffset },
23070          dataview
23071        )
23072      );
23073      if (this.majorVersion === 1 && this.minorVersion === 1) {
23074        this.itemVarStoreOffset = p22.Offset32;
23075        lazy$1(
23076          this,
23077          `itemVarStore`,
23078          () => new AxisTable(
23079            { offset: dict.offset + this.itemVarStoreOffset },
23080            dataview
23081          )
23082        );
23083      }
23084    }
23085  };
23086  var AxisTable = class extends SimpleTable {
23087    constructor(dict, dataview) {
23088      const { p: p22 } = super(dict, dataview, `AxisTable`);
23089      this.baseTagListOffset = p22.Offset16;
23090      this.baseScriptListOffset = p22.Offset16;
23091      lazy$1(
23092        this,
23093        `baseTagList`,
23094        () => new BaseTagListTable(
23095          { offset: dict.offset + this.baseTagListOffset },
23096          dataview
23097        )
23098      );
23099      lazy$1(
23100        this,
23101        `baseScriptList`,
23102        () => new BaseScriptListTable(
23103          { offset: dict.offset + this.baseScriptListOffset },
23104          dataview
23105        )
23106      );
23107    }
23108  };
23109  var BaseTagListTable = class extends SimpleTable {
23110    constructor(dict, dataview) {
23111      const { p: p22 } = super(dict, dataview, `BaseTagListTable`);
23112      this.baseTagCount = p22.uint16;
23113      this.baselineTags = [...new Array(this.baseTagCount)].map(
23114        (_) => p22.tag
23115      );
23116    }
23117  };
23118  var BaseScriptListTable = class extends SimpleTable {
23119    constructor(dict, dataview) {
23120      const { p: p22 } = super(dict, dataview, `BaseScriptListTable`);
23121      this.baseScriptCount = p22.uint16;
23122      const recordStart = p22.currentPosition;
23123      lazy$1(this, `baseScriptRecords`, () => {
23124        p22.currentPosition = recordStart;
23125        return [...new Array(this.baseScriptCount)].map(
23126          (_) => new BaseScriptRecord(this.start, p22)
23127        );
23128      });
23129    }
23130  };
23131  var BaseScriptRecord = class {
23132    constructor(baseScriptListTableStart, p22) {
23133      this.baseScriptTag = p22.tag;
23134      this.baseScriptOffset = p22.Offset16;
23135      lazy$1(this, `baseScriptTable`, () => {
23136        p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset;
23137        return new BaseScriptTable(p22);
23138      });
23139    }
23140  };
23141  var BaseScriptTable = class {
23142    constructor(p22) {
23143      this.start = p22.currentPosition;
23144      this.baseValuesOffset = p22.Offset16;
23145      this.defaultMinMaxOffset = p22.Offset16;
23146      this.baseLangSysCount = p22.uint16;
23147      this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map(
23148        (_) => new BaseLangSysRecord(this.start, p22)
23149      );
23150      lazy$1(this, `baseValues`, () => {
23151        p22.currentPosition = this.start + this.baseValuesOffset;
23152        return new BaseValuesTable(p22);
23153      });
23154      lazy$1(this, `defaultMinMax`, () => {
23155        p22.currentPosition = this.start + this.defaultMinMaxOffset;
23156        return new MinMaxTable(p22);
23157      });
23158    }
23159  };
23160  var BaseLangSysRecord = class {
23161    constructor(baseScriptTableStart, p22) {
23162      this.baseLangSysTag = p22.tag;
23163      this.minMaxOffset = p22.Offset16;
23164      lazy$1(this, `minMax`, () => {
23165        p22.currentPosition = baseScriptTableStart + this.minMaxOffset;
23166        return new MinMaxTable(p22);
23167      });
23168    }
23169  };
23170  var BaseValuesTable = class {
23171    constructor(p22) {
23172      this.parser = p22;
23173      this.start = p22.currentPosition;
23174      this.defaultBaselineIndex = p22.uint16;
23175      this.baseCoordCount = p22.uint16;
23176      this.baseCoords = [...new Array(this.baseCoordCount)].map(
23177        (_) => p22.Offset16
23178      );
23179    }
23180    getTable(id) {
23181      this.parser.currentPosition = this.start + this.baseCoords[id];
23182      return new BaseCoordTable(this.parser);
23183    }
23184  };
23185  var MinMaxTable = class {
23186    constructor(p22) {
23187      this.minCoord = p22.Offset16;
23188      this.maxCoord = p22.Offset16;
23189      this.featMinMaxCount = p22.uint16;
23190      const recordStart = p22.currentPosition;
23191      lazy$1(this, `featMinMaxRecords`, () => {
23192        p22.currentPosition = recordStart;
23193        return [...new Array(this.featMinMaxCount)].map(
23194          (_) => new FeatMinMaxRecord(p22)
23195        );
23196      });
23197    }
23198  };
23199  var FeatMinMaxRecord = class {
23200    constructor(p22) {
23201      this.featureTableTag = p22.tag;
23202      this.minCoord = p22.Offset16;
23203      this.maxCoord = p22.Offset16;
23204    }
23205  };
23206  var BaseCoordTable = class {
23207    constructor(p22) {
23208      this.baseCoordFormat = p22.uint16;
23209      this.coordinate = p22.int16;
23210      if (this.baseCoordFormat === 2) {
23211        this.referenceGlyph = p22.uint16;
23212        this.baseCoordPoint = p22.uint16;
23213      }
23214      if (this.baseCoordFormat === 3) {
23215        this.deviceTable = p22.Offset16;
23216      }
23217    }
23218  };
23219  var BASE$1 = Object.freeze({ __proto__: null, BASE });
23220  var ClassDefinition = class {
23221    constructor(p22) {
23222      this.classFormat = p22.uint16;
23223      if (this.classFormat === 1) {
23224        this.startGlyphID = p22.uint16;
23225        this.glyphCount = p22.uint16;
23226        this.classValueArray = [...new Array(this.glyphCount)].map(
23227          (_) => p22.uint16
23228        );
23229      }
23230      if (this.classFormat === 2) {
23231        this.classRangeCount = p22.uint16;
23232        this.classRangeRecords = [
23233          ...new Array(this.classRangeCount)
23234        ].map((_) => new ClassRangeRecord(p22));
23235      }
23236    }
23237  };
23238  var ClassRangeRecord = class {
23239    constructor(p22) {
23240      this.startGlyphID = p22.uint16;
23241      this.endGlyphID = p22.uint16;
23242      this.class = p22.uint16;
23243    }
23244  };
23245  var CoverageTable = class extends ParsedData {
23246    constructor(p22) {
23247      super(p22);
23248      this.coverageFormat = p22.uint16;
23249      if (this.coverageFormat === 1) {
23250        this.glyphCount = p22.uint16;
23251        this.glyphArray = [...new Array(this.glyphCount)].map(
23252          (_) => p22.uint16
23253        );
23254      }
23255      if (this.coverageFormat === 2) {
23256        this.rangeCount = p22.uint16;
23257        this.rangeRecords = [...new Array(this.rangeCount)].map(
23258          (_) => new CoverageRangeRecord(p22)
23259        );
23260      }
23261    }
23262  };
23263  var CoverageRangeRecord = class {
23264    constructor(p22) {
23265      this.startGlyphID = p22.uint16;
23266      this.endGlyphID = p22.uint16;
23267      this.startCoverageIndex = p22.uint16;
23268    }
23269  };
23270  var ItemVariationStoreTable = class {
23271    constructor(table, p22) {
23272      this.table = table;
23273      this.parser = p22;
23274      this.start = p22.currentPosition;
23275      this.format = p22.uint16;
23276      this.variationRegionListOffset = p22.Offset32;
23277      this.itemVariationDataCount = p22.uint16;
23278      this.itemVariationDataOffsets = [
23279        ...new Array(this.itemVariationDataCount)
23280      ].map((_) => p22.Offset32);
23281    }
23282  };
23283  var GDEF = class extends SimpleTable {
23284    constructor(dict, dataview) {
23285      const { p: p22 } = super(dict, dataview);
23286      this.majorVersion = p22.uint16;
23287      this.minorVersion = p22.uint16;
23288      this.glyphClassDefOffset = p22.Offset16;
23289      lazy$1(this, `glyphClassDefs`, () => {
23290        if (this.glyphClassDefOffset === 0) return void 0;
23291        p22.currentPosition = this.tableStart + this.glyphClassDefOffset;
23292        return new ClassDefinition(p22);
23293      });
23294      this.attachListOffset = p22.Offset16;
23295      lazy$1(this, `attachList`, () => {
23296        if (this.attachListOffset === 0) return void 0;
23297        p22.currentPosition = this.tableStart + this.attachListOffset;
23298        return new AttachList(p22);
23299      });
23300      this.ligCaretListOffset = p22.Offset16;
23301      lazy$1(this, `ligCaretList`, () => {
23302        if (this.ligCaretListOffset === 0) return void 0;
23303        p22.currentPosition = this.tableStart + this.ligCaretListOffset;
23304        return new LigCaretList(p22);
23305      });
23306      this.markAttachClassDefOffset = p22.Offset16;
23307      lazy$1(this, `markAttachClassDef`, () => {
23308        if (this.markAttachClassDefOffset === 0) return void 0;
23309        p22.currentPosition = this.tableStart + this.markAttachClassDefOffset;
23310        return new ClassDefinition(p22);
23311      });
23312      if (this.minorVersion >= 2) {
23313        this.markGlyphSetsDefOffset = p22.Offset16;
23314        lazy$1(this, `markGlyphSetsDef`, () => {
23315          if (this.markGlyphSetsDefOffset === 0) return void 0;
23316          p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset;
23317          return new MarkGlyphSetsTable(p22);
23318        });
23319      }
23320      if (this.minorVersion === 3) {
23321        this.itemVarStoreOffset = p22.Offset32;
23322        lazy$1(this, `itemVarStore`, () => {
23323          if (this.itemVarStoreOffset === 0) return void 0;
23324          p22.currentPosition = this.tableStart + this.itemVarStoreOffset;
23325          return new ItemVariationStoreTable(p22);
23326        });
23327      }
23328    }
23329  };
23330  var AttachList = class extends ParsedData {
23331    constructor(p22) {
23332      super(p22);
23333      this.coverageOffset = p22.Offset16;
23334      this.glyphCount = p22.uint16;
23335      this.attachPointOffsets = [...new Array(this.glyphCount)].map(
23336        (_) => p22.Offset16
23337      );
23338    }
23339    getPoint(pointID) {
23340      this.parser.currentPosition = this.start + this.attachPointOffsets[pointID];
23341      return new AttachPoint(this.parser);
23342    }
23343  };
23344  var AttachPoint = class {
23345    constructor(p22) {
23346      this.pointCount = p22.uint16;
23347      this.pointIndices = [...new Array(this.pointCount)].map(
23348        (_) => p22.uint16
23349      );
23350    }
23351  };
23352  var LigCaretList = class extends ParsedData {
23353    constructor(p22) {
23354      super(p22);
23355      this.coverageOffset = p22.Offset16;
23356      lazy$1(this, `coverage`, () => {
23357        p22.currentPosition = this.start + this.coverageOffset;
23358        return new CoverageTable(p22);
23359      });
23360      this.ligGlyphCount = p22.uint16;
23361      this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map(
23362        (_) => p22.Offset16
23363      );
23364    }
23365    getLigGlyph(ligGlyphID) {
23366      this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID];
23367      return new LigGlyph(this.parser);
23368    }
23369  };
23370  var LigGlyph = class extends ParsedData {
23371    constructor(p22) {
23372      super(p22);
23373      this.caretCount = p22.uint16;
23374      this.caretValueOffsets = [...new Array(this.caretCount)].map(
23375        (_) => p22.Offset16
23376      );
23377    }
23378    getCaretValue(caretID) {
23379      this.parser.currentPosition = this.start + this.caretValueOffsets[caretID];
23380      return new CaretValue(this.parser);
23381    }
23382  };
23383  var CaretValue = class {
23384    constructor(p22) {
23385      this.caretValueFormat = p22.uint16;
23386      if (this.caretValueFormat === 1) {
23387        this.coordinate = p22.int16;
23388      }
23389      if (this.caretValueFormat === 2) {
23390        this.caretValuePointIndex = p22.uint16;
23391      }
23392      if (this.caretValueFormat === 3) {
23393        this.coordinate = p22.int16;
23394        this.deviceOffset = p22.Offset16;
23395      }
23396    }
23397  };
23398  var MarkGlyphSetsTable = class extends ParsedData {
23399    constructor(p22) {
23400      super(p22);
23401      this.markGlyphSetTableFormat = p22.uint16;
23402      this.markGlyphSetCount = p22.uint16;
23403      this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map(
23404        (_) => p22.Offset32
23405      );
23406    }
23407    getMarkGlyphSet(markGlyphSetID) {
23408      this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID];
23409      return new CoverageTable(this.parser);
23410    }
23411  };
23412  var GDEF$1 = Object.freeze({ __proto__: null, GDEF });
23413  var ScriptList = class extends ParsedData {
23414    static EMPTY = { scriptCount: 0, scriptRecords: [] };
23415    constructor(p22) {
23416      super(p22);
23417      this.scriptCount = p22.uint16;
23418      this.scriptRecords = [...new Array(this.scriptCount)].map(
23419        (_) => new ScriptRecord(p22)
23420      );
23421    }
23422  };
23423  var ScriptRecord = class {
23424    constructor(p22) {
23425      this.scriptTag = p22.tag;
23426      this.scriptOffset = p22.Offset16;
23427    }
23428  };
23429  var ScriptTable = class extends ParsedData {
23430    constructor(p22) {
23431      super(p22);
23432      this.defaultLangSys = p22.Offset16;
23433      this.langSysCount = p22.uint16;
23434      this.langSysRecords = [...new Array(this.langSysCount)].map(
23435        (_) => new LangSysRecord(p22)
23436      );
23437    }
23438  };
23439  var LangSysRecord = class {
23440    constructor(p22) {
23441      this.langSysTag = p22.tag;
23442      this.langSysOffset = p22.Offset16;
23443    }
23444  };
23445  var LangSysTable = class {
23446    constructor(p22) {
23447      this.lookupOrder = p22.Offset16;
23448      this.requiredFeatureIndex = p22.uint16;
23449      this.featureIndexCount = p22.uint16;
23450      this.featureIndices = [...new Array(this.featureIndexCount)].map(
23451        (_) => p22.uint16
23452      );
23453    }
23454  };
23455  var FeatureList = class extends ParsedData {
23456    static EMPTY = { featureCount: 0, featureRecords: [] };
23457    constructor(p22) {
23458      super(p22);
23459      this.featureCount = p22.uint16;
23460      this.featureRecords = [...new Array(this.featureCount)].map(
23461        (_) => new FeatureRecord(p22)
23462      );
23463    }
23464  };
23465  var FeatureRecord = class {
23466    constructor(p22) {
23467      this.featureTag = p22.tag;
23468      this.featureOffset = p22.Offset16;
23469    }
23470  };
23471  var FeatureTable = class extends ParsedData {
23472    constructor(p22) {
23473      super(p22);
23474      this.featureParams = p22.Offset16;
23475      this.lookupIndexCount = p22.uint16;
23476      this.lookupListIndices = [...new Array(this.lookupIndexCount)].map(
23477        (_) => p22.uint16
23478      );
23479    }
23480    getFeatureParams() {
23481      if (this.featureParams > 0) {
23482        const p22 = this.parser;
23483        p22.currentPosition = this.start + this.featureParams;
23484        const tag = this.featureTag;
23485        if (tag === `size`) return new Size(p22);
23486        if (tag.startsWith(`cc`)) return new CharacterVariant(p22);
23487        if (tag.startsWith(`ss`)) return new StylisticSet(p22);
23488      }
23489    }
23490  };
23491  var CharacterVariant = class {
23492    constructor(p22) {
23493      this.format = p22.uint16;
23494      this.featUiLabelNameId = p22.uint16;
23495      this.featUiTooltipTextNameId = p22.uint16;
23496      this.sampleTextNameId = p22.uint16;
23497      this.numNamedParameters = p22.uint16;
23498      this.firstParamUiLabelNameId = p22.uint16;
23499      this.charCount = p22.uint16;
23500      this.character = [...new Array(this.charCount)].map(
23501        (_) => p22.uint24
23502      );
23503    }
23504  };
23505  var Size = class {
23506    constructor(p22) {
23507      this.designSize = p22.uint16;
23508      this.subfamilyIdentifier = p22.uint16;
23509      this.subfamilyNameID = p22.uint16;
23510      this.smallEnd = p22.uint16;
23511      this.largeEnd = p22.uint16;
23512    }
23513  };
23514  var StylisticSet = class {
23515    constructor(p22) {
23516      this.version = p22.uint16;
23517      this.UINameID = p22.uint16;
23518    }
23519  };
23520  function undoCoverageOffsetParsing(instance) {
23521    instance.parser.currentPosition -= 2;
23522    delete instance.coverageOffset;
23523    delete instance.getCoverageTable;
23524  }
23525  var LookupType$1 = class extends ParsedData {
23526    constructor(p22) {
23527      super(p22);
23528      this.substFormat = p22.uint16;
23529      this.coverageOffset = p22.Offset16;
23530    }
23531    getCoverageTable() {
23532      let p22 = this.parser;
23533      p22.currentPosition = this.start + this.coverageOffset;
23534      return new CoverageTable(p22);
23535    }
23536  };
23537  var SubstLookupRecord = class {
23538    constructor(p22) {
23539      this.glyphSequenceIndex = p22.uint16;
23540      this.lookupListIndex = p22.uint16;
23541    }
23542  };
23543  var LookupType1$1 = class extends LookupType$1 {
23544    constructor(p22) {
23545      super(p22);
23546      this.deltaGlyphID = p22.int16;
23547    }
23548  };
23549  var LookupType2$1 = class extends LookupType$1 {
23550    constructor(p22) {
23551      super(p22);
23552      this.sequenceCount = p22.uint16;
23553      this.sequenceOffsets = [...new Array(this.sequenceCount)].map(
23554        (_) => p22.Offset16
23555      );
23556    }
23557    getSequence(index2) {
23558      let p22 = this.parser;
23559      p22.currentPosition = this.start + this.sequenceOffsets[index2];
23560      return new SequenceTable(p22);
23561    }
23562  };
23563  var SequenceTable = class {
23564    constructor(p22) {
23565      this.glyphCount = p22.uint16;
23566      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
23567        (_) => p22.uint16
23568      );
23569    }
23570  };
23571  var LookupType3$1 = class extends LookupType$1 {
23572    constructor(p22) {
23573      super(p22);
23574      this.alternateSetCount = p22.uint16;
23575      this.alternateSetOffsets = [
23576        ...new Array(this.alternateSetCount)
23577      ].map((_) => p22.Offset16);
23578    }
23579    getAlternateSet(index2) {
23580      let p22 = this.parser;
23581      p22.currentPosition = this.start + this.alternateSetOffsets[index2];
23582      return new AlternateSetTable(p22);
23583    }
23584  };
23585  var AlternateSetTable = class {
23586    constructor(p22) {
23587      this.glyphCount = p22.uint16;
23588      this.alternateGlyphIDs = [...new Array(this.glyphCount)].map(
23589        (_) => p22.uint16
23590      );
23591    }
23592  };
23593  var LookupType4$1 = class extends LookupType$1 {
23594    constructor(p22) {
23595      super(p22);
23596      this.ligatureSetCount = p22.uint16;
23597      this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map(
23598        (_) => p22.Offset16
23599      );
23600    }
23601    getLigatureSet(index2) {
23602      let p22 = this.parser;
23603      p22.currentPosition = this.start + this.ligatureSetOffsets[index2];
23604      return new LigatureSetTable(p22);
23605    }
23606  };
23607  var LigatureSetTable = class extends ParsedData {
23608    constructor(p22) {
23609      super(p22);
23610      this.ligatureCount = p22.uint16;
23611      this.ligatureOffsets = [...new Array(this.ligatureCount)].map(
23612        (_) => p22.Offset16
23613      );
23614    }
23615    getLigature(index2) {
23616      let p22 = this.parser;
23617      p22.currentPosition = this.start + this.ligatureOffsets[index2];
23618      return new LigatureTable(p22);
23619    }
23620  };
23621  var LigatureTable = class {
23622    constructor(p22) {
23623      this.ligatureGlyph = p22.uint16;
23624      this.componentCount = p22.uint16;
23625      this.componentGlyphIDs = [
23626        ...new Array(this.componentCount - 1)
23627      ].map((_) => p22.uint16);
23628    }
23629  };
23630  var LookupType5$1 = class extends LookupType$1 {
23631    constructor(p22) {
23632      super(p22);
23633      if (this.substFormat === 1) {
23634        this.subRuleSetCount = p22.uint16;
23635        this.subRuleSetOffsets = [
23636          ...new Array(this.subRuleSetCount)
23637        ].map((_) => p22.Offset16);
23638      }
23639      if (this.substFormat === 2) {
23640        this.classDefOffset = p22.Offset16;
23641        this.subClassSetCount = p22.uint16;
23642        this.subClassSetOffsets = [
23643          ...new Array(this.subClassSetCount)
23644        ].map((_) => p22.Offset16);
23645      }
23646      if (this.substFormat === 3) {
23647        undoCoverageOffsetParsing(this);
23648        this.glyphCount = p22.uint16;
23649        this.substitutionCount = p22.uint16;
23650        this.coverageOffsets = [...new Array(this.glyphCount)].map(
23651          (_) => p22.Offset16
23652        );
23653        this.substLookupRecords = [
23654          ...new Array(this.substitutionCount)
23655        ].map((_) => new SubstLookupRecord(p22));
23656      }
23657    }
23658    getSubRuleSet(index2) {
23659      if (this.substFormat !== 1)
23660        throw new Error(
23661          `lookup type 5.$this.substFormat} has no subrule sets.`
23662        );
23663      let p22 = this.parser;
23664      p22.currentPosition = this.start + this.subRuleSetOffsets[index2];
23665      return new SubRuleSetTable(p22);
23666    }
23667    getSubClassSet(index2) {
23668      if (this.substFormat !== 2)
23669        throw new Error(
23670          `lookup type 5.$this.substFormat} has no subclass sets.`
23671        );
23672      let p22 = this.parser;
23673      p22.currentPosition = this.start + this.subClassSetOffsets[index2];
23674      return new SubClassSetTable(p22);
23675    }
23676    getCoverageTable(index2) {
23677      if (this.substFormat !== 3 && !index2)
23678        return super.getCoverageTable();
23679      if (!index2)
23680        throw new Error(
23681          `lookup type 5.$this.substFormat} requires an coverage table index.`
23682        );
23683      let p22 = this.parser;
23684      p22.currentPosition = this.start + this.coverageOffsets[index2];
23685      return new CoverageTable(p22);
23686    }
23687  };
23688  var SubRuleSetTable = class extends ParsedData {
23689    constructor(p22) {
23690      super(p22);
23691      this.subRuleCount = p22.uint16;
23692      this.subRuleOffsets = [...new Array(this.subRuleCount)].map(
23693        (_) => p22.Offset16
23694      );
23695    }
23696    getSubRule(index2) {
23697      let p22 = this.parser;
23698      p22.currentPosition = this.start + this.subRuleOffsets[index2];
23699      return new SubRuleTable(p22);
23700    }
23701  };
23702  var SubRuleTable = class {
23703    constructor(p22) {
23704      this.glyphCount = p22.uint16;
23705      this.substitutionCount = p22.uint16;
23706      this.inputSequence = [...new Array(this.glyphCount - 1)].map(
23707        (_) => p22.uint16
23708      );
23709      this.substLookupRecords = [
23710        ...new Array(this.substitutionCount)
23711      ].map((_) => new SubstLookupRecord(p22));
23712    }
23713  };
23714  var SubClassSetTable = class extends ParsedData {
23715    constructor(p22) {
23716      super(p22);
23717      this.subClassRuleCount = p22.uint16;
23718      this.subClassRuleOffsets = [
23719        ...new Array(this.subClassRuleCount)
23720      ].map((_) => p22.Offset16);
23721    }
23722    getSubClass(index2) {
23723      let p22 = this.parser;
23724      p22.currentPosition = this.start + this.subClassRuleOffsets[index2];
23725      return new SubClassRuleTable(p22);
23726    }
23727  };
23728  var SubClassRuleTable = class extends SubRuleTable {
23729    constructor(p22) {
23730      super(p22);
23731    }
23732  };
23733  var LookupType6$1 = class extends LookupType$1 {
23734    constructor(p22) {
23735      super(p22);
23736      if (this.substFormat === 1) {
23737        this.chainSubRuleSetCount = p22.uint16;
23738        this.chainSubRuleSetOffsets = [
23739          ...new Array(this.chainSubRuleSetCount)
23740        ].map((_) => p22.Offset16);
23741      }
23742      if (this.substFormat === 2) {
23743        this.backtrackClassDefOffset = p22.Offset16;
23744        this.inputClassDefOffset = p22.Offset16;
23745        this.lookaheadClassDefOffset = p22.Offset16;
23746        this.chainSubClassSetCount = p22.uint16;
23747        this.chainSubClassSetOffsets = [
23748          ...new Array(this.chainSubClassSetCount)
23749        ].map((_) => p22.Offset16);
23750      }
23751      if (this.substFormat === 3) {
23752        undoCoverageOffsetParsing(this);
23753        this.backtrackGlyphCount = p22.uint16;
23754        this.backtrackCoverageOffsets = [
23755          ...new Array(this.backtrackGlyphCount)
23756        ].map((_) => p22.Offset16);
23757        this.inputGlyphCount = p22.uint16;
23758        this.inputCoverageOffsets = [
23759          ...new Array(this.inputGlyphCount)
23760        ].map((_) => p22.Offset16);
23761        this.lookaheadGlyphCount = p22.uint16;
23762        this.lookaheadCoverageOffsets = [
23763          ...new Array(this.lookaheadGlyphCount)
23764        ].map((_) => p22.Offset16);
23765        this.seqLookupCount = p22.uint16;
23766        this.seqLookupRecords = [
23767          ...new Array(this.substitutionCount)
23768        ].map((_) => new SequenceLookupRecord(p22));
23769      }
23770    }
23771    getChainSubRuleSet(index2) {
23772      if (this.substFormat !== 1)
23773        throw new Error(
23774          `lookup type 6.$this.substFormat} has no chainsubrule sets.`
23775        );
23776      let p22 = this.parser;
23777      p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index2];
23778      return new ChainSubRuleSetTable(p22);
23779    }
23780    getChainSubClassSet(index2) {
23781      if (this.substFormat !== 2)
23782        throw new Error(
23783          `lookup type 6.$this.substFormat} has no chainsubclass sets.`
23784        );
23785      let p22 = this.parser;
23786      p22.currentPosition = this.start + this.chainSubClassSetOffsets[index2];
23787      return new ChainSubClassSetTable(p22);
23788    }
23789    getCoverageFromOffset(offset4) {
23790      if (this.substFormat !== 3)
23791        throw new Error(
23792          `lookup type 6.$this.substFormat} does not use contextual coverage offsets.`
23793        );
23794      let p22 = this.parser;
23795      p22.currentPosition = this.start + offset4;
23796      return new CoverageTable(p22);
23797    }
23798  };
23799  var ChainSubRuleSetTable = class extends ParsedData {
23800    constructor(p22) {
23801      super(p22);
23802      this.chainSubRuleCount = p22.uint16;
23803      this.chainSubRuleOffsets = [
23804        ...new Array(this.chainSubRuleCount)
23805      ].map((_) => p22.Offset16);
23806    }
23807    getSubRule(index2) {
23808      let p22 = this.parser;
23809      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
23810      return new ChainSubRuleTable(p22);
23811    }
23812  };
23813  var ChainSubRuleTable = class {
23814    constructor(p22) {
23815      this.backtrackGlyphCount = p22.uint16;
23816      this.backtrackSequence = [
23817        ...new Array(this.backtrackGlyphCount)
23818      ].map((_) => p22.uint16);
23819      this.inputGlyphCount = p22.uint16;
23820      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
23821        (_) => p22.uint16
23822      );
23823      this.lookaheadGlyphCount = p22.uint16;
23824      this.lookAheadSequence = [
23825        ...new Array(this.lookAheadGlyphCount)
23826      ].map((_) => p22.uint16);
23827      this.substitutionCount = p22.uint16;
23828      this.substLookupRecords = [...new Array(this.SubstCount)].map(
23829        (_) => new SubstLookupRecord(p22)
23830      );
23831    }
23832  };
23833  var ChainSubClassSetTable = class extends ParsedData {
23834    constructor(p22) {
23835      super(p22);
23836      this.chainSubClassRuleCount = p22.uint16;
23837      this.chainSubClassRuleOffsets = [
23838        ...new Array(this.chainSubClassRuleCount)
23839      ].map((_) => p22.Offset16);
23840    }
23841    getSubClass(index2) {
23842      let p22 = this.parser;
23843      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
23844      return new ChainSubClassRuleTable(p22);
23845    }
23846  };
23847  var ChainSubClassRuleTable = class {
23848    constructor(p22) {
23849      this.backtrackGlyphCount = p22.uint16;
23850      this.backtrackSequence = [
23851        ...new Array(this.backtrackGlyphCount)
23852      ].map((_) => p22.uint16);
23853      this.inputGlyphCount = p22.uint16;
23854      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
23855        (_) => p22.uint16
23856      );
23857      this.lookaheadGlyphCount = p22.uint16;
23858      this.lookAheadSequence = [
23859        ...new Array(this.lookAheadGlyphCount)
23860      ].map((_) => p22.uint16);
23861      this.substitutionCount = p22.uint16;
23862      this.substLookupRecords = [
23863        ...new Array(this.substitutionCount)
23864      ].map((_) => new SequenceLookupRecord(p22));
23865    }
23866  };
23867  var SequenceLookupRecord = class extends ParsedData {
23868    constructor(p22) {
23869      super(p22);
23870      this.sequenceIndex = p22.uint16;
23871      this.lookupListIndex = p22.uint16;
23872    }
23873  };
23874  var LookupType7$1 = class extends ParsedData {
23875    constructor(p22) {
23876      super(p22);
23877      this.substFormat = p22.uint16;
23878      this.extensionLookupType = p22.uint16;
23879      this.extensionOffset = p22.Offset32;
23880    }
23881  };
23882  var LookupType8$1 = class extends LookupType$1 {
23883    constructor(p22) {
23884      super(p22);
23885      this.backtrackGlyphCount = p22.uint16;
23886      this.backtrackCoverageOffsets = [
23887        ...new Array(this.backtrackGlyphCount)
23888      ].map((_) => p22.Offset16);
23889      this.lookaheadGlyphCount = p22.uint16;
23890      this.lookaheadCoverageOffsets = [
23891        new Array(this.lookaheadGlyphCount)
23892      ].map((_) => p22.Offset16);
23893      this.glyphCount = p22.uint16;
23894      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
23895        (_) => p22.uint16
23896      );
23897    }
23898  };
23899  var GSUBtables = {
23900    buildSubtable: function(type, p22) {
23901      const subtable = new [
23902        void 0,
23903        LookupType1$1,
23904        LookupType2$1,
23905        LookupType3$1,
23906        LookupType4$1,
23907        LookupType5$1,
23908        LookupType6$1,
23909        LookupType7$1,
23910        LookupType8$1
23911      ][type](p22);
23912      subtable.type = type;
23913      return subtable;
23914    }
23915  };
23916  var LookupType = class extends ParsedData {
23917    constructor(p22) {
23918      super(p22);
23919    }
23920  };
23921  var LookupType1 = class extends LookupType {
23922    constructor(p22) {
23923      super(p22);
23924      console.log(`lookup type 1`);
23925    }
23926  };
23927  var LookupType2 = class extends LookupType {
23928    constructor(p22) {
23929      super(p22);
23930      console.log(`lookup type 2`);
23931    }
23932  };
23933  var LookupType3 = class extends LookupType {
23934    constructor(p22) {
23935      super(p22);
23936      console.log(`lookup type 3`);
23937    }
23938  };
23939  var LookupType4 = class extends LookupType {
23940    constructor(p22) {
23941      super(p22);
23942      console.log(`lookup type 4`);
23943    }
23944  };
23945  var LookupType5 = class extends LookupType {
23946    constructor(p22) {
23947      super(p22);
23948      console.log(`lookup type 5`);
23949    }
23950  };
23951  var LookupType6 = class extends LookupType {
23952    constructor(p22) {
23953      super(p22);
23954      console.log(`lookup type 6`);
23955    }
23956  };
23957  var LookupType7 = class extends LookupType {
23958    constructor(p22) {
23959      super(p22);
23960      console.log(`lookup type 7`);
23961    }
23962  };
23963  var LookupType8 = class extends LookupType {
23964    constructor(p22) {
23965      super(p22);
23966      console.log(`lookup type 8`);
23967    }
23968  };
23969  var LookupType9 = class extends LookupType {
23970    constructor(p22) {
23971      super(p22);
23972      console.log(`lookup type 9`);
23973    }
23974  };
23975  var GPOStables = {
23976    buildSubtable: function(type, p22) {
23977      const subtable = new [
23978        void 0,
23979        LookupType1,
23980        LookupType2,
23981        LookupType3,
23982        LookupType4,
23983        LookupType5,
23984        LookupType6,
23985        LookupType7,
23986        LookupType8,
23987        LookupType9
23988      ][type](p22);
23989      subtable.type = type;
23990      return subtable;
23991    }
23992  };
23993  var LookupList = class extends ParsedData {
23994    static EMPTY = { lookupCount: 0, lookups: [] };
23995    constructor(p22) {
23996      super(p22);
23997      this.lookupCount = p22.uint16;
23998      this.lookups = [...new Array(this.lookupCount)].map(
23999        (_) => p22.Offset16
24000      );
24001    }
24002  };
24003  var LookupTable = class extends ParsedData {
24004    constructor(p22, type) {
24005      super(p22);
24006      this.ctType = type;
24007      this.lookupType = p22.uint16;
24008      this.lookupFlag = p22.uint16;
24009      this.subTableCount = p22.uint16;
24010      this.subtableOffsets = [...new Array(this.subTableCount)].map(
24011        (_) => p22.Offset16
24012      );
24013      this.markFilteringSet = p22.uint16;
24014    }
24015    get rightToLeft() {
24016      return this.lookupFlag & true;
24017    }
24018    get ignoreBaseGlyphs() {
24019      return this.lookupFlag & true;
24020    }
24021    get ignoreLigatures() {
24022      return this.lookupFlag & true;
24023    }
24024    get ignoreMarks() {
24025      return this.lookupFlag & true;
24026    }
24027    get useMarkFilteringSet() {
24028      return this.lookupFlag & true;
24029    }
24030    get markAttachmentType() {
24031      return this.lookupFlag & true;
24032    }
24033    getSubTable(index2) {
24034      const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
24035      this.parser.currentPosition = this.start + this.subtableOffsets[index2];
24036      return builder.buildSubtable(this.lookupType, this.parser);
24037    }
24038  };
24039  var CommonLayoutTable = class extends SimpleTable {
24040    constructor(dict, dataview, name2) {
24041      const { p: p22, tableStart } = super(dict, dataview, name2);
24042      this.majorVersion = p22.uint16;
24043      this.minorVersion = p22.uint16;
24044      this.scriptListOffset = p22.Offset16;
24045      this.featureListOffset = p22.Offset16;
24046      this.lookupListOffset = p22.Offset16;
24047      if (this.majorVersion === 1 && this.minorVersion === 1) {
24048        this.featureVariationsOffset = p22.Offset32;
24049      }
24050      const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset);
24051      lazy$1(this, `scriptList`, () => {
24052        if (no_content) return ScriptList.EMPTY;
24053        p22.currentPosition = tableStart + this.scriptListOffset;
24054        return new ScriptList(p22);
24055      });
24056      lazy$1(this, `featureList`, () => {
24057        if (no_content) return FeatureList.EMPTY;
24058        p22.currentPosition = tableStart + this.featureListOffset;
24059        return new FeatureList(p22);
24060      });
24061      lazy$1(this, `lookupList`, () => {
24062        if (no_content) return LookupList.EMPTY;
24063        p22.currentPosition = tableStart + this.lookupListOffset;
24064        return new LookupList(p22);
24065      });
24066      if (this.featureVariationsOffset) {
24067        lazy$1(this, `featureVariations`, () => {
24068          if (no_content) return FeatureVariations.EMPTY;
24069          p22.currentPosition = tableStart + this.featureVariationsOffset;
24070          return new FeatureVariations(p22);
24071        });
24072      }
24073    }
24074    getSupportedScripts() {
24075      return this.scriptList.scriptRecords.map((r3) => r3.scriptTag);
24076    }
24077    getScriptTable(scriptTag) {
24078      let record = this.scriptList.scriptRecords.find(
24079        (r3) => r3.scriptTag === scriptTag
24080      );
24081      this.parser.currentPosition = this.scriptList.start + record.scriptOffset;
24082      let table = new ScriptTable(this.parser);
24083      table.scriptTag = scriptTag;
24084      return table;
24085    }
24086    ensureScriptTable(arg) {
24087      if (typeof arg === "string") {
24088        return this.getScriptTable(arg);
24089      }
24090      return arg;
24091    }
24092    getSupportedLangSys(scriptTable) {
24093      scriptTable = this.ensureScriptTable(scriptTable);
24094      const hasDefault = scriptTable.defaultLangSys !== 0;
24095      const supported = scriptTable.langSysRecords.map(
24096        (l2) => l2.langSysTag
24097      );
24098      if (hasDefault) supported.unshift(`dflt`);
24099      return supported;
24100    }
24101    getDefaultLangSysTable(scriptTable) {
24102      scriptTable = this.ensureScriptTable(scriptTable);
24103      let offset4 = scriptTable.defaultLangSys;
24104      if (offset4 !== 0) {
24105        this.parser.currentPosition = scriptTable.start + offset4;
24106        let table = new LangSysTable(this.parser);
24107        table.langSysTag = ``;
24108        table.defaultForScript = scriptTable.scriptTag;
24109        return table;
24110      }
24111    }
24112    getLangSysTable(scriptTable, langSysTag = `dflt`) {
24113      if (langSysTag === `dflt`)
24114        return this.getDefaultLangSysTable(scriptTable);
24115      scriptTable = this.ensureScriptTable(scriptTable);
24116      let record = scriptTable.langSysRecords.find(
24117        (l2) => l2.langSysTag === langSysTag
24118      );
24119      this.parser.currentPosition = scriptTable.start + record.langSysOffset;
24120      let table = new LangSysTable(this.parser);
24121      table.langSysTag = langSysTag;
24122      return table;
24123    }
24124    getFeatures(langSysTable) {
24125      return langSysTable.featureIndices.map(
24126        (index2) => this.getFeature(index2)
24127      );
24128    }
24129    getFeature(indexOrTag) {
24130      let record;
24131      if (parseInt(indexOrTag) == indexOrTag) {
24132        record = this.featureList.featureRecords[indexOrTag];
24133      } else {
24134        record = this.featureList.featureRecords.find(
24135          (f2) => f2.featureTag === indexOrTag
24136        );
24137      }
24138      if (!record) return;
24139      this.parser.currentPosition = this.featureList.start + record.featureOffset;
24140      let table = new FeatureTable(this.parser);
24141      table.featureTag = record.featureTag;
24142      return table;
24143    }
24144    getLookups(featureTable) {
24145      return featureTable.lookupListIndices.map(
24146        (index2) => this.getLookup(index2)
24147      );
24148    }
24149    getLookup(lookupIndex, type) {
24150      let lookupOffset = this.lookupList.lookups[lookupIndex];
24151      this.parser.currentPosition = this.lookupList.start + lookupOffset;
24152      return new LookupTable(this.parser, type);
24153    }
24154  };
24155  var GSUB = class extends CommonLayoutTable {
24156    constructor(dict, dataview) {
24157      super(dict, dataview, `GSUB`);
24158    }
24159    getLookup(lookupIndex) {
24160      return super.getLookup(lookupIndex, `GSUB`);
24161    }
24162  };
24163  var GSUB$1 = Object.freeze({ __proto__: null, GSUB });
24164  var GPOS = class extends CommonLayoutTable {
24165    constructor(dict, dataview) {
24166      super(dict, dataview, `GPOS`);
24167    }
24168    getLookup(lookupIndex) {
24169      return super.getLookup(lookupIndex, `GPOS`);
24170    }
24171  };
24172  var GPOS$1 = Object.freeze({ __proto__: null, GPOS });
24173  var SVG6 = class extends SimpleTable {
24174    constructor(dict, dataview) {
24175      const { p: p22 } = super(dict, dataview);
24176      this.version = p22.uint16;
24177      this.offsetToSVGDocumentList = p22.Offset32;
24178      p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
24179      this.documentList = new SVGDocumentList(p22);
24180    }
24181  };
24182  var SVGDocumentList = class extends ParsedData {
24183    constructor(p22) {
24184      super(p22);
24185      this.numEntries = p22.uint16;
24186      this.documentRecords = [...new Array(this.numEntries)].map(
24187        (_) => new SVGDocumentRecord(p22)
24188      );
24189    }
24190    getDocument(documentID) {
24191      let record = this.documentRecords[documentID];
24192      if (!record) return "";
24193      let offset4 = this.start + record.svgDocOffset;
24194      this.parser.currentPosition = offset4;
24195      return this.parser.readBytes(record.svgDocLength);
24196    }
24197    getDocumentForGlyph(glyphID) {
24198      let id = this.documentRecords.findIndex(
24199        (d2) => d2.startGlyphID <= glyphID && glyphID <= d2.endGlyphID
24200      );
24201      if (id === -1) return "";
24202      return this.getDocument(id);
24203    }
24204  };
24205  var SVGDocumentRecord = class {
24206    constructor(p22) {
24207      this.startGlyphID = p22.uint16;
24208      this.endGlyphID = p22.uint16;
24209      this.svgDocOffset = p22.Offset32;
24210      this.svgDocLength = p22.uint32;
24211    }
24212  };
24213  var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG6 });
24214  var fvar = class extends SimpleTable {
24215    constructor(dict, dataview) {
24216      const { p: p22 } = super(dict, dataview);
24217      this.majorVersion = p22.uint16;
24218      this.minorVersion = p22.uint16;
24219      this.axesArrayOffset = p22.Offset16;
24220      p22.uint16;
24221      this.axisCount = p22.uint16;
24222      this.axisSize = p22.uint16;
24223      this.instanceCount = p22.uint16;
24224      this.instanceSize = p22.uint16;
24225      const axisStart = this.tableStart + this.axesArrayOffset;
24226      lazy$1(this, `axes`, () => {
24227        p22.currentPosition = axisStart;
24228        return [...new Array(this.axisCount)].map(
24229          (_) => new VariationAxisRecord(p22)
24230        );
24231      });
24232      const instanceStart = axisStart + this.axisCount * this.axisSize;
24233      lazy$1(this, `instances`, () => {
24234        let instances = [];
24235        for (let i2 = 0; i2 < this.instanceCount; i2++) {
24236          p22.currentPosition = instanceStart + i2 * this.instanceSize;
24237          instances.push(
24238            new InstanceRecord(p22, this.axisCount, this.instanceSize)
24239          );
24240        }
24241        return instances;
24242      });
24243    }
24244    getSupportedAxes() {
24245      return this.axes.map((a2) => a2.tag);
24246    }
24247    getAxis(name2) {
24248      return this.axes.find((a2) => a2.tag === name2);
24249    }
24250  };
24251  var VariationAxisRecord = class {
24252    constructor(p22) {
24253      this.tag = p22.tag;
24254      this.minValue = p22.fixed;
24255      this.defaultValue = p22.fixed;
24256      this.maxValue = p22.fixed;
24257      this.flags = p22.flags(16);
24258      this.axisNameID = p22.uint16;
24259    }
24260  };
24261  var InstanceRecord = class {
24262    constructor(p22, axisCount, size4) {
24263      let start = p22.currentPosition;
24264      this.subfamilyNameID = p22.uint16;
24265      p22.uint16;
24266      this.coordinates = [...new Array(axisCount)].map(
24267        (_) => p22.fixed
24268      );
24269      if (p22.currentPosition - start < size4) {
24270        this.postScriptNameID = p22.uint16;
24271      }
24272    }
24273  };
24274  var fvar$1 = Object.freeze({ __proto__: null, fvar });
24275  var cvt = class extends SimpleTable {
24276    constructor(dict, dataview) {
24277      const { p: p22 } = super(dict, dataview);
24278      const n2 = dict.length / 2;
24279      lazy$1(
24280        this,
24281        `items`,
24282        () => [...new Array(n2)].map((_) => p22.fword)
24283      );
24284    }
24285  };
24286  var cvt$1 = Object.freeze({ __proto__: null, cvt });
24287  var fpgm = class extends SimpleTable {
24288    constructor(dict, dataview) {
24289      const { p: p22 } = super(dict, dataview);
24290      lazy$1(
24291        this,
24292        `instructions`,
24293        () => [...new Array(dict.length)].map((_) => p22.uint8)
24294      );
24295    }
24296  };
24297  var fpgm$1 = Object.freeze({ __proto__: null, fpgm });
24298  var gasp = class extends SimpleTable {
24299    constructor(dict, dataview) {
24300      const { p: p22 } = super(dict, dataview);
24301      this.version = p22.uint16;
24302      this.numRanges = p22.uint16;
24303      const getter = () => [...new Array(this.numRanges)].map(
24304        (_) => new GASPRange(p22)
24305      );
24306      lazy$1(this, `gaspRanges`, getter);
24307    }
24308  };
24309  var GASPRange = class {
24310    constructor(p22) {
24311      this.rangeMaxPPEM = p22.uint16;
24312      this.rangeGaspBehavior = p22.uint16;
24313    }
24314  };
24315  var gasp$1 = Object.freeze({ __proto__: null, gasp });
24316  var glyf = class extends SimpleTable {
24317    constructor(dict, dataview) {
24318      super(dict, dataview);
24319    }
24320    getGlyphData(offset4, length) {
24321      this.parser.currentPosition = this.tableStart + offset4;
24322      return this.parser.readBytes(length);
24323    }
24324  };
24325  var glyf$1 = Object.freeze({ __proto__: null, glyf });
24326  var loca = class extends SimpleTable {
24327    constructor(dict, dataview, tables) {
24328      const { p: p22 } = super(dict, dataview);
24329      const n2 = tables.maxp.numGlyphs + 1;
24330      if (tables.head.indexToLocFormat === 0) {
24331        this.x2 = true;
24332        lazy$1(
24333          this,
24334          `offsets`,
24335          () => [...new Array(n2)].map((_) => p22.Offset16)
24336        );
24337      } else {
24338        lazy$1(
24339          this,
24340          `offsets`,
24341          () => [...new Array(n2)].map((_) => p22.Offset32)
24342        );
24343      }
24344    }
24345    getGlyphDataOffsetAndLength(glyphID) {
24346      let offset4 = this.offsets[glyphID] * this.x2 ? 2 : 1;
24347      let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1;
24348      return { offset: offset4, length: nextOffset - offset4 };
24349    }
24350  };
24351  var loca$1 = Object.freeze({ __proto__: null, loca });
24352  var prep = class extends SimpleTable {
24353    constructor(dict, dataview) {
24354      const { p: p22 } = super(dict, dataview);
24355      lazy$1(
24356        this,
24357        `instructions`,
24358        () => [...new Array(dict.length)].map((_) => p22.uint8)
24359      );
24360    }
24361  };
24362  var prep$1 = Object.freeze({ __proto__: null, prep });
24363  var CFF = class extends SimpleTable {
24364    constructor(dict, dataview) {
24365      const { p: p22 } = super(dict, dataview);
24366      lazy$1(this, `data`, () => p22.readBytes());
24367    }
24368  };
24369  var CFF$1 = Object.freeze({ __proto__: null, CFF });
24370  var CFF2 = class extends SimpleTable {
24371    constructor(dict, dataview) {
24372      const { p: p22 } = super(dict, dataview);
24373      lazy$1(this, `data`, () => p22.readBytes());
24374    }
24375  };
24376  var CFF2$1 = Object.freeze({ __proto__: null, CFF2 });
24377  var VORG = class extends SimpleTable {
24378    constructor(dict, dataview) {
24379      const { p: p22 } = super(dict, dataview);
24380      this.majorVersion = p22.uint16;
24381      this.minorVersion = p22.uint16;
24382      this.defaultVertOriginY = p22.int16;
24383      this.numVertOriginYMetrics = p22.uint16;
24384      lazy$1(
24385        this,
24386        `vertORiginYMetrics`,
24387        () => [...new Array(this.numVertOriginYMetrics)].map(
24388          (_) => new VertOriginYMetric(p22)
24389        )
24390      );
24391    }
24392  };
24393  var VertOriginYMetric = class {
24394    constructor(p22) {
24395      this.glyphIndex = p22.uint16;
24396      this.vertOriginY = p22.int16;
24397    }
24398  };
24399  var VORG$1 = Object.freeze({ __proto__: null, VORG });
24400  var BitmapSize = class {
24401    constructor(p22) {
24402      this.indexSubTableArrayOffset = p22.Offset32;
24403      this.indexTablesSize = p22.uint32;
24404      this.numberofIndexSubTables = p22.uint32;
24405      this.colorRef = p22.uint32;
24406      this.hori = new SbitLineMetrics(p22);
24407      this.vert = new SbitLineMetrics(p22);
24408      this.startGlyphIndex = p22.uint16;
24409      this.endGlyphIndex = p22.uint16;
24410      this.ppemX = p22.uint8;
24411      this.ppemY = p22.uint8;
24412      this.bitDepth = p22.uint8;
24413      this.flags = p22.int8;
24414    }
24415  };
24416  var BitmapScale = class {
24417    constructor(p22) {
24418      this.hori = new SbitLineMetrics(p22);
24419      this.vert = new SbitLineMetrics(p22);
24420      this.ppemX = p22.uint8;
24421      this.ppemY = p22.uint8;
24422      this.substitutePpemX = p22.uint8;
24423      this.substitutePpemY = p22.uint8;
24424    }
24425  };
24426  var SbitLineMetrics = class {
24427    constructor(p22) {
24428      this.ascender = p22.int8;
24429      this.descender = p22.int8;
24430      this.widthMax = p22.uint8;
24431      this.caretSlopeNumerator = p22.int8;
24432      this.caretSlopeDenominator = p22.int8;
24433      this.caretOffset = p22.int8;
24434      this.minOriginSB = p22.int8;
24435      this.minAdvanceSB = p22.int8;
24436      this.maxBeforeBL = p22.int8;
24437      this.minAfterBL = p22.int8;
24438      this.pad1 = p22.int8;
24439      this.pad2 = p22.int8;
24440    }
24441  };
24442  var EBLC = class extends SimpleTable {
24443    constructor(dict, dataview, name2) {
24444      const { p: p22 } = super(dict, dataview, name2);
24445      this.majorVersion = p22.uint16;
24446      this.minorVersion = p22.uint16;
24447      this.numSizes = p22.uint32;
24448      lazy$1(
24449        this,
24450        `bitMapSizes`,
24451        () => [...new Array(this.numSizes)].map(
24452          (_) => new BitmapSize(p22)
24453        )
24454      );
24455    }
24456  };
24457  var EBLC$1 = Object.freeze({ __proto__: null, EBLC });
24458  var EBDT = class extends SimpleTable {
24459    constructor(dict, dataview, name2) {
24460      const { p: p22 } = super(dict, dataview, name2);
24461      this.majorVersion = p22.uint16;
24462      this.minorVersion = p22.uint16;
24463    }
24464  };
24465  var EBDT$1 = Object.freeze({ __proto__: null, EBDT });
24466  var EBSC = class extends SimpleTable {
24467    constructor(dict, dataview) {
24468      const { p: p22 } = super(dict, dataview);
24469      this.majorVersion = p22.uint16;
24470      this.minorVersion = p22.uint16;
24471      this.numSizes = p22.uint32;
24472      lazy$1(
24473        this,
24474        `bitmapScales`,
24475        () => [...new Array(this.numSizes)].map(
24476          (_) => new BitmapScale(p22)
24477        )
24478      );
24479    }
24480  };
24481  var EBSC$1 = Object.freeze({ __proto__: null, EBSC });
24482  var CBLC = class extends EBLC {
24483    constructor(dict, dataview) {
24484      super(dict, dataview, `CBLC`);
24485    }
24486  };
24487  var CBLC$1 = Object.freeze({ __proto__: null, CBLC });
24488  var CBDT = class extends EBDT {
24489    constructor(dict, dataview) {
24490      super(dict, dataview, `CBDT`);
24491    }
24492  };
24493  var CBDT$1 = Object.freeze({ __proto__: null, CBDT });
24494  var sbix = class extends SimpleTable {
24495    constructor(dict, dataview) {
24496      const { p: p22 } = super(dict, dataview);
24497      this.version = p22.uint16;
24498      this.flags = p22.flags(16);
24499      this.numStrikes = p22.uint32;
24500      lazy$1(
24501        this,
24502        `strikeOffsets`,
24503        () => [...new Array(this.numStrikes)].map((_) => p22.Offset32)
24504      );
24505    }
24506  };
24507  var sbix$1 = Object.freeze({ __proto__: null, sbix });
24508  var COLR = class extends SimpleTable {
24509    constructor(dict, dataview) {
24510      const { p: p22 } = super(dict, dataview);
24511      this.version = p22.uint16;
24512      this.numBaseGlyphRecords = p22.uint16;
24513      this.baseGlyphRecordsOffset = p22.Offset32;
24514      this.layerRecordsOffset = p22.Offset32;
24515      this.numLayerRecords = p22.uint16;
24516    }
24517    getBaseGlyphRecord(glyphID) {
24518      let start = this.tableStart + this.baseGlyphRecordsOffset;
24519      this.parser.currentPosition = start;
24520      let first = new BaseGlyphRecord(this.parser);
24521      let firstID = first.gID;
24522      let end = this.tableStart + this.layerRecordsOffset - 6;
24523      this.parser.currentPosition = end;
24524      let last = new BaseGlyphRecord(this.parser);
24525      let lastID = last.gID;
24526      if (firstID === glyphID) return first;
24527      if (lastID === glyphID) return last;
24528      while (true) {
24529        if (start === end) break;
24530        let mid = start + (end - start) / 12;
24531        this.parser.currentPosition = mid;
24532        let middle = new BaseGlyphRecord(this.parser);
24533        let midID = middle.gID;
24534        if (midID === glyphID) return middle;
24535        else if (midID > glyphID) {
24536          end = mid;
24537        } else if (midID < glyphID) {
24538          start = mid;
24539        }
24540      }
24541      return false;
24542    }
24543    getLayers(glyphID) {
24544      let record = this.getBaseGlyphRecord(glyphID);
24545      this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex;
24546      return [...new Array(record.numLayers)].map(
24547        (_) => new LayerRecord(p)
24548      );
24549    }
24550  };
24551  var BaseGlyphRecord = class {
24552    constructor(p22) {
24553      this.gID = p22.uint16;
24554      this.firstLayerIndex = p22.uint16;
24555      this.numLayers = p22.uint16;
24556    }
24557  };
24558  var LayerRecord = class {
24559    constructor(p22) {
24560      this.gID = p22.uint16;
24561      this.paletteIndex = p22.uint16;
24562    }
24563  };
24564  var COLR$1 = Object.freeze({ __proto__: null, COLR });
24565  var CPAL = class extends SimpleTable {
24566    constructor(dict, dataview) {
24567      const { p: p22 } = super(dict, dataview);
24568      this.version = p22.uint16;
24569      this.numPaletteEntries = p22.uint16;
24570      const numPalettes = this.numPalettes = p22.uint16;
24571      this.numColorRecords = p22.uint16;
24572      this.offsetFirstColorRecord = p22.Offset32;
24573      this.colorRecordIndices = [...new Array(this.numPalettes)].map(
24574        (_) => p22.uint16
24575      );
24576      lazy$1(this, `colorRecords`, () => {
24577        p22.currentPosition = this.tableStart + this.offsetFirstColorRecord;
24578        return [...new Array(this.numColorRecords)].map(
24579          (_) => new ColorRecord(p22)
24580        );
24581      });
24582      if (this.version === 1) {
24583        this.offsetPaletteTypeArray = p22.Offset32;
24584        this.offsetPaletteLabelArray = p22.Offset32;
24585        this.offsetPaletteEntryLabelArray = p22.Offset32;
24586        lazy$1(this, `paletteTypeArray`, () => {
24587          p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray;
24588          return new PaletteTypeArray(p22, numPalettes);
24589        });
24590        lazy$1(this, `paletteLabelArray`, () => {
24591          p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray;
24592          return new PaletteLabelsArray(p22, numPalettes);
24593        });
24594        lazy$1(this, `paletteEntryLabelArray`, () => {
24595          p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray;
24596          return new PaletteEntryLabelArray(p22, numPalettes);
24597        });
24598      }
24599    }
24600  };
24601  var ColorRecord = class {
24602    constructor(p22) {
24603      this.blue = p22.uint8;
24604      this.green = p22.uint8;
24605      this.red = p22.uint8;
24606      this.alpha = p22.uint8;
24607    }
24608  };
24609  var PaletteTypeArray = class {
24610    constructor(p22, numPalettes) {
24611      this.paletteTypes = [...new Array(numPalettes)].map(
24612        (_) => p22.uint32
24613      );
24614    }
24615  };
24616  var PaletteLabelsArray = class {
24617    constructor(p22, numPalettes) {
24618      this.paletteLabels = [...new Array(numPalettes)].map(
24619        (_) => p22.uint16
24620      );
24621    }
24622  };
24623  var PaletteEntryLabelArray = class {
24624    constructor(p22, numPalettes) {
24625      this.paletteEntryLabels = [...new Array(numPalettes)].map(
24626        (_) => p22.uint16
24627      );
24628    }
24629  };
24630  var CPAL$1 = Object.freeze({ __proto__: null, CPAL });
24631  var DSIG = class extends SimpleTable {
24632    constructor(dict, dataview) {
24633      const { p: p22 } = super(dict, dataview);
24634      this.version = p22.uint32;
24635      this.numSignatures = p22.uint16;
24636      this.flags = p22.uint16;
24637      this.signatureRecords = [...new Array(this.numSignatures)].map(
24638        (_) => new SignatureRecord(p22)
24639      );
24640    }
24641    getData(signatureID) {
24642      const record = this.signatureRecords[signatureID];
24643      this.parser.currentPosition = this.tableStart + record.offset;
24644      return new SignatureBlockFormat1(this.parser);
24645    }
24646  };
24647  var SignatureRecord = class {
24648    constructor(p22) {
24649      this.format = p22.uint32;
24650      this.length = p22.uint32;
24651      this.offset = p22.Offset32;
24652    }
24653  };
24654  var SignatureBlockFormat1 = class {
24655    constructor(p22) {
24656      p22.uint16;
24657      p22.uint16;
24658      this.signatureLength = p22.uint32;
24659      this.signature = p22.readBytes(this.signatureLength);
24660    }
24661  };
24662  var DSIG$1 = Object.freeze({ __proto__: null, DSIG });
24663  var hdmx = class extends SimpleTable {
24664    constructor(dict, dataview, tables) {
24665      const { p: p22 } = super(dict, dataview);
24666      const numGlyphs = tables.hmtx.numGlyphs;
24667      this.version = p22.uint16;
24668      this.numRecords = p22.int16;
24669      this.sizeDeviceRecord = p22.int32;
24670      this.records = [...new Array(numRecords)].map(
24671        (_) => new DeviceRecord(p22, numGlyphs)
24672      );
24673    }
24674  };
24675  var DeviceRecord = class {
24676    constructor(p22, numGlyphs) {
24677      this.pixelSize = p22.uint8;
24678      this.maxWidth = p22.uint8;
24679      this.widths = p22.readBytes(numGlyphs);
24680    }
24681  };
24682  var hdmx$1 = Object.freeze({ __proto__: null, hdmx });
24683  var kern = class extends SimpleTable {
24684    constructor(dict, dataview) {
24685      const { p: p22 } = super(dict, dataview);
24686      this.version = p22.uint16;
24687      this.nTables = p22.uint16;
24688      lazy$1(this, `tables`, () => {
24689        let offset4 = this.tableStart + 4;
24690        const tables = [];
24691        for (let i2 = 0; i2 < this.nTables; i2++) {
24692          p22.currentPosition = offset4;
24693          let subtable = new KernSubTable(p22);
24694          tables.push(subtable);
24695          offset4 += subtable;
24696        }
24697        return tables;
24698      });
24699    }
24700  };
24701  var KernSubTable = class {
24702    constructor(p22) {
24703      this.version = p22.uint16;
24704      this.length = p22.uint16;
24705      this.coverage = p22.flags(8);
24706      this.format = p22.uint8;
24707      if (this.format === 0) {
24708        this.nPairs = p22.uint16;
24709        this.searchRange = p22.uint16;
24710        this.entrySelector = p22.uint16;
24711        this.rangeShift = p22.uint16;
24712        lazy$1(
24713          this,
24714          `pairs`,
24715          () => [...new Array(this.nPairs)].map((_) => new Pair(p22))
24716        );
24717      }
24718      if (this.format === 2) {
24719        console.warn(
24720          `Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
24721        );
24722      }
24723    }
24724    get horizontal() {
24725      return this.coverage[0];
24726    }
24727    get minimum() {
24728      return this.coverage[1];
24729    }
24730    get crossstream() {
24731      return this.coverage[2];
24732    }
24733    get override() {
24734      return this.coverage[3];
24735    }
24736  };
24737  var Pair = class {
24738    constructor(p22) {
24739      this.left = p22.uint16;
24740      this.right = p22.uint16;
24741      this.value = p22.fword;
24742    }
24743  };
24744  var kern$1 = Object.freeze({ __proto__: null, kern });
24745  var LTSH = class extends SimpleTable {
24746    constructor(dict, dataview) {
24747      const { p: p22 } = super(dict, dataview);
24748      this.version = p22.uint16;
24749      this.numGlyphs = p22.uint16;
24750      this.yPels = p22.readBytes(this.numGlyphs);
24751    }
24752  };
24753  var LTSH$1 = Object.freeze({ __proto__: null, LTSH });
24754  var MERG = class extends SimpleTable {
24755    constructor(dict, dataview) {
24756      const { p: p22 } = super(dict, dataview);
24757      this.version = p22.uint16;
24758      this.mergeClassCount = p22.uint16;
24759      this.mergeDataOffset = p22.Offset16;
24760      this.classDefCount = p22.uint16;
24761      this.offsetToClassDefOffsets = p22.Offset16;
24762      lazy$1(
24763        this,
24764        `mergeEntryMatrix`,
24765        () => [...new Array(this.mergeClassCount)].map(
24766          (_) => p22.readBytes(this.mergeClassCount)
24767        )
24768      );
24769      console.warn(`Full MERG parsing is currently not supported.`);
24770      console.warn(
24771        `If you need this table parsed, please file an issue, or better yet, a PR.`
24772      );
24773    }
24774  };
24775  var MERG$1 = Object.freeze({ __proto__: null, MERG });
24776  var meta = class extends SimpleTable {
24777    constructor(dict, dataview) {
24778      const { p: p22 } = super(dict, dataview);
24779      this.version = p22.uint32;
24780      this.flags = p22.uint32;
24781      p22.uint32;
24782      this.dataMapsCount = p22.uint32;
24783      this.dataMaps = [...new Array(this.dataMapsCount)].map(
24784        (_) => new DataMap(this.tableStart, p22)
24785      );
24786    }
24787  };
24788  var DataMap = class {
24789    constructor(tableStart, p22) {
24790      this.tableStart = tableStart;
24791      this.parser = p22;
24792      this.tag = p22.tag;
24793      this.dataOffset = p22.Offset32;
24794      this.dataLength = p22.uint32;
24795    }
24796    getData() {
24797      this.parser.currentField = this.tableStart + this.dataOffset;
24798      return this.parser.readBytes(this.dataLength);
24799    }
24800  };
24801  var meta$1 = Object.freeze({ __proto__: null, meta });
24802  var PCLT = class extends SimpleTable {
24803    constructor(dict, dataview) {
24804      super(dict, dataview);
24805      console.warn(
24806        `This font uses a PCLT table, which is currently not supported by this parser.`
24807      );
24808      console.warn(
24809        `If you need this table parsed, please file an issue, or better yet, a PR.`
24810      );
24811    }
24812  };
24813  var PCLT$1 = Object.freeze({ __proto__: null, PCLT });
24814  var VDMX = class extends SimpleTable {
24815    constructor(dict, dataview) {
24816      const { p: p22 } = super(dict, dataview);
24817      this.version = p22.uint16;
24818      this.numRecs = p22.uint16;
24819      this.numRatios = p22.uint16;
24820      this.ratRanges = [...new Array(this.numRatios)].map(
24821        (_) => new RatioRange(p22)
24822      );
24823      this.offsets = [...new Array(this.numRatios)].map(
24824        (_) => p22.Offset16
24825      );
24826      this.VDMXGroups = [...new Array(this.numRecs)].map(
24827        (_) => new VDMXGroup(p22)
24828      );
24829    }
24830  };
24831  var RatioRange = class {
24832    constructor(p22) {
24833      this.bCharSet = p22.uint8;
24834      this.xRatio = p22.uint8;
24835      this.yStartRatio = p22.uint8;
24836      this.yEndRatio = p22.uint8;
24837    }
24838  };
24839  var VDMXGroup = class {
24840    constructor(p22) {
24841      this.recs = p22.uint16;
24842      this.startsz = p22.uint8;
24843      this.endsz = p22.uint8;
24844      this.records = [...new Array(this.recs)].map(
24845        (_) => new vTable(p22)
24846      );
24847    }
24848  };
24849  var vTable = class {
24850    constructor(p22) {
24851      this.yPelHeight = p22.uint16;
24852      this.yMax = p22.int16;
24853      this.yMin = p22.int16;
24854    }
24855  };
24856  var VDMX$1 = Object.freeze({ __proto__: null, VDMX });
24857  var vhea = class extends SimpleTable {
24858    constructor(dict, dataview) {
24859      const { p: p22 } = super(dict, dataview);
24860      this.version = p22.fixed;
24861      this.ascent = this.vertTypoAscender = p22.int16;
24862      this.descent = this.vertTypoDescender = p22.int16;
24863      this.lineGap = this.vertTypoLineGap = p22.int16;
24864      this.advanceHeightMax = p22.int16;
24865      this.minTopSideBearing = p22.int16;
24866      this.minBottomSideBearing = p22.int16;
24867      this.yMaxExtent = p22.int16;
24868      this.caretSlopeRise = p22.int16;
24869      this.caretSlopeRun = p22.int16;
24870      this.caretOffset = p22.int16;
24871      this.reserved = p22.int16;
24872      this.reserved = p22.int16;
24873      this.reserved = p22.int16;
24874      this.reserved = p22.int16;
24875      this.metricDataFormat = p22.int16;
24876      this.numOfLongVerMetrics = p22.uint16;
24877      p22.verifyLength();
24878    }
24879  };
24880  var vhea$1 = Object.freeze({ __proto__: null, vhea });
24881  var vmtx = class extends SimpleTable {
24882    constructor(dict, dataview, tables) {
24883      super(dict, dataview);
24884      const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
24885      const numGlyphs = tables.maxp.numGlyphs;
24886      const metricsStart = p.currentPosition;
24887      lazy(this, `vMetrics`, () => {
24888        p.currentPosition = metricsStart;
24889        return [...new Array(numOfLongVerMetrics)].map(
24890          (_) => new LongVertMetric(p.uint16, p.int16)
24891        );
24892      });
24893      if (numOfLongVerMetrics < numGlyphs) {
24894        const tsbStart = metricsStart + numOfLongVerMetrics * 4;
24895        lazy(this, `topSideBearings`, () => {
24896          p.currentPosition = tsbStart;
24897          return [...new Array(numGlyphs - numOfLongVerMetrics)].map(
24898            (_) => p.int16
24899          );
24900        });
24901      }
24902    }
24903  };
24904  var LongVertMetric = class {
24905    constructor(h2, b2) {
24906      this.advanceHeight = h2;
24907      this.topSideBearing = b2;
24908    }
24909  };
24910  var vmtx$1 = Object.freeze({ __proto__: null, vmtx });
24911  
24912  // packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs
24913  function makeFamiliesFromFaces(fontFaces) {
24914    const fontFamiliesObject = fontFaces.reduce(
24915      (acc, item) => {
24916        if (!acc[item.fontFamily]) {
24917          acc[item.fontFamily] = {
24918            name: item.fontFamily,
24919            fontFamily: item.fontFamily,
24920            slug: kebabCase(item.fontFamily.toLowerCase()),
24921            fontFace: []
24922          };
24923        }
24924        acc[item.fontFamily].fontFace.push(item);
24925        return acc;
24926      },
24927      {}
24928    );
24929    return Object.values(fontFamiliesObject);
24930  }
24931  
24932  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
24933  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
24934  function UploadFonts() {
24935    const { installFonts } = (0, import_element38.useContext)(FontLibraryContext);
24936    const [isUploading, setIsUploading] = (0, import_element38.useState)(false);
24937    const [notice, setNotice] = (0, import_element38.useState)(null);
24938    const handleDropZone = (files) => {
24939      handleFilesUpload(files);
24940    };
24941    const onFilesUpload = (event) => {
24942      handleFilesUpload(event.target.files);
24943    };
24944    const handleFilesUpload = async (files) => {
24945      if (!files) {
24946        return;
24947      }
24948      setNotice(null);
24949      setIsUploading(true);
24950      const uniqueFilenames = /* @__PURE__ */ new Set();
24951      const selectedFiles = [...files];
24952      let hasInvalidFiles = false;
24953      const checkFilesPromises = selectedFiles.map(async (file) => {
24954        const isFont = await isFontFile(file);
24955        if (!isFont) {
24956          hasInvalidFiles = true;
24957          return null;
24958        }
24959        if (uniqueFilenames.has(file.name)) {
24960          return null;
24961        }
24962        const fileExtension = (((file.name ?? "").split(".") ?? []).pop() ?? "").toLowerCase();
24963        if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) {
24964          uniqueFilenames.add(file.name);
24965          return file;
24966        }
24967        return null;
24968      });
24969      const allowedFiles = (await Promise.all(checkFilesPromises)).filter((file) => null !== file);
24970      if (allowedFiles.length > 0) {
24971        loadFiles(allowedFiles);
24972      } else {
24973        const message = hasInvalidFiles ? (0, import_i18n20.__)("Sorry, you are not allowed to upload this file type.") : (0, import_i18n20.__)("No fonts found to install.");
24974        setNotice({
24975          type: "error",
24976          message
24977        });
24978        setIsUploading(false);
24979      }
24980    };
24981    const loadFiles = async (files) => {
24982      const fontFacesLoaded = await Promise.all(
24983        files.map(async (fontFile) => {
24984          const fontFaceData = await getFontFaceMetadata(fontFile);
24985          await loadFontFaceInBrowser(
24986            fontFaceData,
24987            fontFaceData.file,
24988            "all"
24989          );
24990          return fontFaceData;
24991        })
24992      );
24993      handleInstall(fontFacesLoaded);
24994    };
24995    async function isFontFile(file) {
24996      const font2 = new Font("Uploaded Font");
24997      try {
24998        const buffer = await readFileAsArrayBuffer(file);
24999        await font2.fromDataBuffer(buffer, "font");
25000        return true;
25001      } catch {
25002        return false;
25003      }
25004    }
25005    async function readFileAsArrayBuffer(file) {
25006      return new Promise((resolve, reject) => {
25007        const reader = new window.FileReader();
25008        reader.readAsArrayBuffer(file);
25009        reader.onload = () => resolve(reader.result);
25010        reader.onerror = reject;
25011      });
25012    }
25013    const getFontFaceMetadata = async (fontFile) => {
25014      const buffer = await readFileAsArrayBuffer(fontFile);
25015      const fontObj = new Font("Uploaded Font");
25016      fontObj.fromDataBuffer(buffer, fontFile.name);
25017      const onloadEvent = await new Promise(
25018        (resolve) => fontObj.onload = resolve
25019      );
25020      const font2 = onloadEvent.detail.font;
25021      const { name: name2 } = font2.opentype.tables;
25022      const fontName = name2.get(16) || name2.get(1);
25023      const isItalic = name2.get(2).toLowerCase().includes("italic");
25024      const fontWeight = font2.opentype.tables["OS/2"].usWeightClass || "normal";
25025      const isVariable = !!font2.opentype.tables.fvar;
25026      const weightAxis = isVariable && font2.opentype.tables.fvar.axes.find(
25027        ({ tag }) => tag === "wght"
25028      );
25029      const weightRange = weightAxis ? `$weightAxis.minValue} $weightAxis.maxValue}` : null;
25030      return {
25031        file: fontFile,
25032        fontFamily: fontName,
25033        fontStyle: isItalic ? "italic" : "normal",
25034        fontWeight: weightRange || fontWeight
25035      };
25036    };
25037    const handleInstall = async (fontFaces) => {
25038      const fontFamilies = makeFamiliesFromFaces(fontFaces);
25039      try {
25040        await installFonts(fontFamilies);
25041        setNotice({
25042          type: "success",
25043          message: (0, import_i18n20.__)("Fonts were installed successfully.")
25044        });
25045      } catch (error) {
25046        const typedError = error;
25047        setNotice({
25048          type: "error",
25049          message: typedError.message,
25050          errors: typedError?.installationErrors
25051        });
25052      }
25053      setIsUploading(false);
25054    };
25055    return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
25056      /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.DropZone, { onFilesDrop: handleDropZone }),
25057      /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_components25.__experimentalVStack, { className: "font-library__local-fonts", justify: "start", children: [
25058        notice && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
25059          import_components25.Notice,
25060          {
25061            status: notice.type,
25062            __unstableHTML: true,
25063            onRemove: () => setNotice(null),
25064            children: [
25065              notice.message,
25066              notice.errors && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { children: notice.errors.map((error, index2) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: error }, index2)) })
25067            ]
25068          }
25069        ),
25070        isUploading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "font-library__upload-area", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.ProgressBar, {}) }) }),
25071        !isUploading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
25072          import_components25.FormFileUpload,
25073          {
25074            accept: ALLOWED_FILE_EXTENSIONS.map(
25075              (ext) => `.$ext}`
25076            ).join(","),
25077            multiple: true,
25078            onChange: onFilesUpload,
25079            render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
25080              import_components25.Button,
25081              {
25082                __next40pxDefaultSize: true,
25083                className: "font-library__upload-area",
25084                onClick: openFileDialog,
25085                children: (0, import_i18n20.__)("Upload font")
25086              }
25087            )
25088          }
25089        ),
25090        /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.__experimentalText, { className: "font-library__upload-area__text", children: (0, import_i18n20.__)(
25091          "Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."
25092        ) })
25093      ] })
25094    ] });
25095  }
25096  var upload_fonts_default = UploadFonts;
25097  
25098  // packages/global-styles-ui/build-module/font-library/modal.mjs
25099  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
25100  var { Tabs } = unlock3(import_components26.privateApis);
25101  var DEFAULT_TAB = {
25102    id: "installed-fonts",
25103    title: (0, import_i18n21._x)("Library", "Font library")
25104  };
25105  var UPLOAD_TAB = {
25106    id: "upload-fonts",
25107    title: (0, import_i18n21._x)("Upload", "noun")
25108  };
25109  
25110  // packages/global-styles-ui/build-module/font-family-item.mjs
25111  var import_i18n22 = __toESM(require_i18n(), 1);
25112  var import_components27 = __toESM(require_components(), 1);
25113  var import_element39 = __toESM(require_element(), 1);
25114  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
25115  
25116  // packages/global-styles-ui/build-module/font-families.mjs
25117  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
25118  
25119  // packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs
25120  var import_i18n24 = __toESM(require_i18n(), 1);
25121  var import_components29 = __toESM(require_components(), 1);
25122  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
25123  
25124  // packages/global-styles-ui/build-module/screen-typography.mjs
25125  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
25126  
25127  // packages/global-styles-ui/build-module/screen-typography-element.mjs
25128  var import_i18n26 = __toESM(require_i18n(), 1);
25129  var import_components31 = __toESM(require_components(), 1);
25130  var import_element42 = __toESM(require_element(), 1);
25131  
25132  // packages/global-styles-ui/build-module/typography-panel.mjs
25133  var import_block_editor6 = __toESM(require_block_editor(), 1);
25134  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
25135  var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock3(import_block_editor6.privateApis);
25136  
25137  // packages/global-styles-ui/build-module/typography-preview.mjs
25138  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
25139  
25140  // packages/global-styles-ui/build-module/screen-typography-element.mjs
25141  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
25142  var elements = {
25143    text: {
25144      description: (0, import_i18n26.__)("Manage the fonts used on the site."),
25145      title: (0, import_i18n26.__)("Text")
25146    },
25147    link: {
25148      description: (0, import_i18n26.__)("Manage the fonts and typography used on the links."),
25149      title: (0, import_i18n26.__)("Links")
25150    },
25151    heading: {
25152      description: (0, import_i18n26.__)("Manage the fonts and typography used on headings."),
25153      title: (0, import_i18n26.__)("Headings")
25154    },
25155    caption: {
25156      description: (0, import_i18n26.__)("Manage the fonts and typography used on captions."),
25157      title: (0, import_i18n26.__)("Captions")
25158    },
25159    cite: {
25160      description: (0, import_i18n26.__)("Manage the fonts and typography used on citations."),
25161      title: (0, import_i18n26.__)("Citations")
25162    },
25163    button: {
25164      description: (0, import_i18n26.__)("Manage the fonts and typography used on buttons."),
25165      title: (0, import_i18n26.__)("Buttons")
25166    },
25167    textInput: {
25168      description: (0, import_i18n26.__)("Manage the fonts and typography used on inputs."),
25169      title: (0, import_i18n26.__)("Inputs")
25170    },
25171    select: {
25172      description: (0, import_i18n26.__)("Manage the fonts and typography used on selects."),
25173      title: (0, import_i18n26.__)("Selects")
25174    }
25175  };
25176  
25177  // packages/global-styles-ui/build-module/screen-colors.mjs
25178  var import_i18n28 = __toESM(require_i18n(), 1);
25179  var import_components34 = __toESM(require_components(), 1);
25180  var import_block_editor7 = __toESM(require_block_editor(), 1);
25181  
25182  // packages/global-styles-ui/build-module/palette.mjs
25183  var import_components33 = __toESM(require_components(), 1);
25184  var import_i18n27 = __toESM(require_i18n(), 1);
25185  var import_element43 = __toESM(require_element(), 1);
25186  
25187  // packages/global-styles-ui/build-module/color-indicator-wrapper.mjs
25188  var import_components32 = __toESM(require_components(), 1);
25189  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
25190  
25191  // packages/global-styles-ui/build-module/palette.mjs
25192  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
25193  
25194  // packages/global-styles-ui/build-module/screen-colors.mjs
25195  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
25196  var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock3(
25197    import_block_editor7.privateApis
25198  );
25199  var ADDITIONAL_ELEMENTS = [
25200    { name: "cite", label: (0, import_i18n28.__)("Citations") },
25201    { name: "textInput", label: (0, import_i18n28.__)("Inputs") },
25202    { name: "select", label: (0, import_i18n28.__)("Selects") }
25203  ];
25204  
25205  // packages/global-styles-ui/build-module/screen-color-palette.mjs
25206  var import_i18n32 = __toESM(require_i18n(), 1);
25207  
25208  // packages/global-styles-ui/build-module/color-palette-panel.mjs
25209  var import_compose4 = __toESM(require_compose(), 1);
25210  var import_components37 = __toESM(require_components(), 1);
25211  var import_i18n29 = __toESM(require_i18n(), 1);
25212  
25213  // packages/global-styles-ui/build-module/variations/variations-color.mjs
25214  var import_components36 = __toESM(require_components(), 1);
25215  
25216  // packages/global-styles-ui/build-module/preview-colors.mjs
25217  var import_components35 = __toESM(require_components(), 1);
25218  
25219  // packages/global-styles-ui/build-module/preset-colors.mjs
25220  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
25221  function PresetColors() {
25222    const { paletteColors } = useStylesPreviewColors();
25223    return paletteColors.slice(0, 4).map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
25224      "div",
25225      {
25226        style: {
25227          flexGrow: 1,
25228          height: "100%",
25229          background: color
25230        }
25231      },
25232      `$slug}-$index2}`
25233    ));
25234  }
25235  
25236  // packages/global-styles-ui/build-module/preview-colors.mjs
25237  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
25238  var firstFrameVariants2 = {
25239    start: {
25240      scale: 1,
25241      opacity: 1
25242    },
25243    hover: {
25244      scale: 0,
25245      opacity: 0
25246    }
25247  };
25248  var StylesPreviewColors = ({
25249    label,
25250    isFocused,
25251    withHoverView
25252  }) => {
25253    return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
25254      preview_wrapper_default,
25255      {
25256        label,
25257        isFocused,
25258        withHoverView,
25259        children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
25260          import_components35.__unstableMotion.div,
25261          {
25262            variants: firstFrameVariants2,
25263            style: {
25264              height: "100%",
25265              overflow: "hidden"
25266            },
25267            children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
25268              import_components35.__experimentalHStack,
25269              {
25270                spacing: 0,
25271                justify: "center",
25272                style: {
25273                  height: "100%",
25274                  overflow: "hidden"
25275                },
25276                children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PresetColors, {})
25277              }
25278            )
25279          },
25280          key
25281        )
25282      }
25283    );
25284  };
25285  var preview_colors_default = StylesPreviewColors;
25286  
25287  // packages/global-styles-ui/build-module/variations/variations-color.mjs
25288  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
25289  var propertiesToFilter2 = ["color"];
25290  function ColorVariations({
25291    title,
25292    gap = 2
25293  }) {
25294    const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2);
25295    if (colorVariations?.length <= 1) {
25296      return null;
25297    }
25298    return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_components36.__experimentalVStack, { spacing: 3, children: [
25299      title && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Subtitle, { level: 3, children: title }),
25300      /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_components36.__experimentalGrid, { gap, children: colorVariations.map((variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
25301        Variation,
25302        {
25303          variation,
25304          isPill: true,
25305          properties: propertiesToFilter2,
25306          showTooltip: true,
25307          children: () => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(preview_colors_default, {})
25308        },
25309        index2
25310      )) })
25311    ] });
25312  }
25313  
25314  // packages/global-styles-ui/build-module/color-palette-panel.mjs
25315  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
25316  
25317  // packages/global-styles-ui/build-module/gradients-palette-panel.mjs
25318  var import_compose5 = __toESM(require_compose(), 1);
25319  var import_components38 = __toESM(require_components(), 1);
25320  var import_i18n30 = __toESM(require_i18n(), 1);
25321  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
25322  
25323  // packages/global-styles-ui/build-module/duotone-palette-panel.mjs
25324  var import_compose6 = __toESM(require_compose(), 1);
25325  var import_element44 = __toESM(require_element(), 1);
25326  var import_components39 = __toESM(require_components(), 1);
25327  var import_i18n31 = __toESM(require_i18n(), 1);
25328  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
25329  
25330  // packages/global-styles-ui/build-module/screen-color-palette.mjs
25331  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
25332  
25333  // packages/global-styles-ui/build-module/screen-background.mjs
25334  var import_i18n33 = __toESM(require_i18n(), 1);
25335  var import_block_editor9 = __toESM(require_block_editor(), 1);
25336  var import_components40 = __toESM(require_components(), 1);
25337  
25338  // packages/global-styles-ui/build-module/background-panel.mjs
25339  var import_block_editor8 = __toESM(require_block_editor(), 1);
25340  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
25341  var { BackgroundPanel: StylesBackgroundPanel2 } = unlock3(
25342    import_block_editor8.privateApis
25343  );
25344  
25345  // packages/global-styles-ui/build-module/screen-background.mjs
25346  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
25347  var { useHasBackgroundPanel: useHasBackgroundPanel4 } = unlock3(import_block_editor9.privateApis);
25348  
25349  // packages/global-styles-ui/build-module/shadows-panel.mjs
25350  var import_i18n36 = __toESM(require_i18n(), 1);
25351  
25352  // packages/global-styles-ui/build-module/presets/preset-group.mjs
25353  var import_components42 = __toESM(require_components(), 1);
25354  var import_i18n35 = __toESM(require_i18n(), 1);
25355  var import_element45 = __toESM(require_element(), 1);
25356  
25357  // packages/global-styles-ui/build-module/presets/dialogs/confirm-reset-dialog.mjs
25358  var import_components41 = __toESM(require_components(), 1);
25359  var import_i18n34 = __toESM(require_i18n(), 1);
25360  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
25361  
25362  // packages/global-styles-ui/build-module/presets/preset-group.mjs
25363  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
25364  var { Menu: Menu2 } = unlock3(import_components42.privateApis);
25365  
25366  // packages/global-styles-ui/build-module/shadows-panel.mjs
25367  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
25368  
25369  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
25370  var import_components46 = __toESM(require_components(), 1);
25371  var import_i18n39 = __toESM(require_i18n(), 1);
25372  var import_element47 = __toESM(require_element(), 1);
25373  
25374  // packages/global-styles-ui/build-module/presets/preset-edit-header.mjs
25375  var import_components43 = __toESM(require_components(), 1);
25376  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
25377  var { Menu: Menu3 } = unlock3(import_components43.privateApis);
25378  
25379  // packages/global-styles-ui/build-module/presets/dialogs/confirm-delete-dialog.mjs
25380  var import_components44 = __toESM(require_components(), 1);
25381  var import_i18n37 = __toESM(require_i18n(), 1);
25382  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
25383  
25384  // packages/global-styles-ui/build-module/presets/dialogs/rename-dialog.mjs
25385  var import_components45 = __toESM(require_components(), 1);
25386  var import_i18n38 = __toESM(require_i18n(), 1);
25387  var import_element46 = __toESM(require_element(), 1);
25388  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
25389  
25390  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
25391  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
25392  
25393  // packages/global-styles-ui/build-module/screen-shadows.mjs
25394  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
25395  
25396  // packages/global-styles-ui/build-module/screen-layout.mjs
25397  var import_i18n40 = __toESM(require_i18n(), 1);
25398  var import_block_editor11 = __toESM(require_block_editor(), 1);
25399  
25400  // packages/global-styles-ui/build-module/dimensions-panel.mjs
25401  var import_block_editor10 = __toESM(require_block_editor(), 1);
25402  var import_element48 = __toESM(require_element(), 1);
25403  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
25404  var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock3(import_block_editor10.privateApis);
25405  
25406  // packages/global-styles-ui/build-module/screen-layout.mjs
25407  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
25408  var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock3(
25409    import_block_editor11.privateApis
25410  );
25411  
25412  // packages/global-styles-ui/build-module/screen-style-variations.mjs
25413  var import_components49 = __toESM(require_components(), 1);
25414  var import_i18n43 = __toESM(require_i18n(), 1);
25415  
25416  // packages/global-styles-ui/build-module/style-variations-content.mjs
25417  var import_i18n42 = __toESM(require_i18n(), 1);
25418  var import_components48 = __toESM(require_components(), 1);
25419  
25420  // packages/global-styles-ui/build-module/style-variations-container.mjs
25421  var import_core_data9 = __toESM(require_core_data(), 1);
25422  var import_data9 = __toESM(require_data(), 1);
25423  var import_element49 = __toESM(require_element(), 1);
25424  var import_components47 = __toESM(require_components(), 1);
25425  var import_i18n41 = __toESM(require_i18n(), 1);
25426  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
25427  function StyleVariationsContainer({
25428    gap = 2
25429  }) {
25430    const { user } = (0, import_element49.useContext)(GlobalStylesContext);
25431    const userStyles = user?.styles;
25432    const variations = (0, import_data9.useSelect)((select) => {
25433      const result = select(
25434        import_core_data9.store
25435      ).__experimentalGetCurrentThemeGlobalStylesVariations();
25436      return Array.isArray(result) ? result : void 0;
25437    }, []);
25438    const fullStyleVariations = variations?.filter(
25439      (variation) => {
25440        return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [
25441          "typography",
25442          "spacing"
25443        ]);
25444      }
25445    );
25446    const themeVariations = (0, import_element49.useMemo)(() => {
25447      const withEmptyVariation = [
25448        {
25449          title: (0, import_i18n41.__)("Default"),
25450          settings: {},
25451          styles: {}
25452        },
25453        ...fullStyleVariations ?? []
25454      ];
25455      return [
25456        ...withEmptyVariation.map((variation) => {
25457          const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {};
25458          if (userStyles?.blocks) {
25459            Object.keys(userStyles.blocks).forEach((blockName) => {
25460              if (userStyles.blocks?.[blockName]?.css) {
25461                const variationBlockStyles = blockStyles[blockName] || {};
25462                const customCSS = {
25463                  css: `$blockStyles[blockName]?.css || ""} $userStyles.blocks?.[blockName]?.css?.trim() || ""}`
25464                };
25465                blockStyles[blockName] = {
25466                  ...variationBlockStyles,
25467                  ...customCSS
25468                };
25469              }
25470            });
25471          }
25472          const css = userStyles?.css || variation.styles?.css ? {
25473            css: `$variation.styles?.css || ""} $userStyles?.css || ""}`
25474          } : {};
25475          const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {};
25476          const styles = {
25477            ...variation.styles,
25478            ...css,
25479            ...blocks
25480          };
25481          return {
25482            ...variation,
25483            settings: variation.settings ?? {},
25484            styles
25485          };
25486        })
25487      ];
25488    }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
25489    if (!fullStyleVariations || fullStyleVariations.length < 1) {
25490      return null;
25491    }
25492    return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
25493      import_components47.__experimentalGrid,
25494      {
25495        columns: 2,
25496        className: "global-styles-ui-style-variations-container",
25497        gap,
25498        children: themeVariations.map(
25499          (variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
25500            preview_styles_default,
25501            {
25502              label: variation?.title,
25503              withHoverView: true,
25504              isFocused,
25505              variation
25506            }
25507          ) }, index2)
25508        )
25509      }
25510    );
25511  }
25512  var style_variations_container_default = StyleVariationsContainer;
25513  
25514  // packages/global-styles-ui/build-module/style-variations-content.mjs
25515  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
25516  
25517  // packages/global-styles-ui/build-module/screen-style-variations.mjs
25518  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
25519  
25520  // packages/global-styles-ui/build-module/screen-css.mjs
25521  var import_i18n44 = __toESM(require_i18n(), 1);
25522  var import_components50 = __toESM(require_components(), 1);
25523  var import_block_editor12 = __toESM(require_block_editor(), 1);
25524  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
25525  var { AdvancedPanel: StylesAdvancedPanel2 } = unlock3(import_block_editor12.privateApis);
25526  
25527  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
25528  var import_i18n47 = __toESM(require_i18n(), 1);
25529  var import_components53 = __toESM(require_components(), 1);
25530  var import_element51 = __toESM(require_element(), 1);
25531  
25532  // packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs
25533  var import_data10 = __toESM(require_data(), 1);
25534  var import_core_data10 = __toESM(require_core_data(), 1);
25535  var import_element50 = __toESM(require_element(), 1);
25536  
25537  // packages/global-styles-ui/build-module/screen-revisions/revisions-buttons.mjs
25538  var import_i18n45 = __toESM(require_i18n(), 1);
25539  var import_components51 = __toESM(require_components(), 1);
25540  var import_date = __toESM(require_date(), 1);
25541  var import_core_data11 = __toESM(require_core_data(), 1);
25542  var import_data11 = __toESM(require_data(), 1);
25543  var import_keycodes2 = __toESM(require_keycodes(), 1);
25544  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
25545  var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24;
25546  
25547  // packages/global-styles-ui/build-module/pagination/index.mjs
25548  var import_components52 = __toESM(require_components(), 1);
25549  var import_i18n46 = __toESM(require_i18n(), 1);
25550  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
25551  
25552  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
25553  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
25554  
25555  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
25556  var import_i18n48 = __toESM(require_i18n(), 1);
25557  var import_components54 = __toESM(require_components(), 1);
25558  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
25559  
25560  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
25561  var import_i18n50 = __toESM(require_i18n(), 1);
25562  var import_components56 = __toESM(require_components(), 1);
25563  var import_element52 = __toESM(require_element(), 1);
25564  
25565  // packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs
25566  var import_block_editor13 = __toESM(require_block_editor(), 1);
25567  var import_i18n49 = __toESM(require_i18n(), 1);
25568  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
25569  
25570  // packages/global-styles-ui/build-module/size-control/index.mjs
25571  var import_components55 = __toESM(require_components(), 1);
25572  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
25573  
25574  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
25575  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
25576  
25577  // packages/global-styles-ui/build-module/global-styles-ui.mjs
25578  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
25579  
25580  // packages/global-styles-ui/build-module/with-global-styles-provider.mjs
25581  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
25582  function withGlobalStylesProvider(Component) {
25583    return function WrappedComponent({
25584      value,
25585      baseValue,
25586      onChange,
25587      ...props
25588    }) {
25589      return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
25590        GlobalStylesProvider,
25591        {
25592          value,
25593          baseValue,
25594          onChange,
25595          children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Component, { ...props })
25596        }
25597      );
25598    };
25599  }
25600  
25601  // packages/global-styles-ui/build-module/style-variations.mjs
25602  var StyleVariations = withGlobalStylesProvider(style_variations_container_default);
25603  
25604  // packages/global-styles-ui/build-module/color-variations.mjs
25605  var ColorVariations2 = withGlobalStylesProvider(ColorVariations);
25606  
25607  // packages/global-styles-ui/build-module/typography-variations.mjs
25608  var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations);
25609  
25610  // packages/global-styles-ui/build-module/font-library/font-library.mjs
25611  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
25612  function FontLibrary({
25613    value,
25614    baseValue,
25615    onChange,
25616    activeTab = "installed-fonts"
25617  }) {
25618    let content;
25619    switch (activeTab) {
25620      case "upload-fonts":
25621        content = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(upload_fonts_default, {});
25622        break;
25623      case "installed-fonts":
25624        content = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(installed_fonts_default, {});
25625        break;
25626      default:
25627        content = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(font_collection_default, { slug: activeTab });
25628    }
25629    return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
25630      GlobalStylesProvider,
25631      {
25632        value,
25633        baseValue,
25634        onChange,
25635        children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(context_default, { children: content })
25636      }
25637    );
25638  }
25639  
25640  // routes/font-list/lock-unlock.ts
25641  var import_private_apis5 = __toESM(require_private_apis());
25642  var { unlock: unlock4 } = (0, import_private_apis5.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
25643    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
25644    "@wordpress/font-list-route"
25645  );
25646  
25647  // routes/font-list/style.scss
25648  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cb0e994672']")) {
25649    const style = document.createElement("style");
25650    style.setAttribute("data-wp-hash", "cb0e994672");
25651    style.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .components-select-control__input{font-size:11px!important;font-weight:var(--wpds-typography-font-weight-emphasis,600)}}.font-library__search{width:240px}.font-library__fonts-title{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-demo{position:relative}.font-library__font-card{border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-image{transition:opacity var(--wpds-motion-duration-lg,.3s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}}.font-library__font-card .font-library__font-variant_demo-image.is-loading{left:0;opacity:0;position:absolute;top:0}.font-library__font-card .font-library__font-variant-demo-skeleton{border-radius:var(--wpds-border-radius-sm,2px);height:24px}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:var(--wpds-cursor-control,pointer);display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid transparent;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid transparent;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__active-badge,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:0 12px 12px 40px}.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);bottom:0;box-sizing:border-box;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid rgba(0,0,0,.1);outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:rgba(0,0,0,.3)}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-preview__wrapper.is-hoverable{cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-filter{margin-bottom:12px;padding:0 16px}.global-styles-ui-block-types-search{flex-grow:1}.global-styles-ui-block-types-item-list .global-styles-ui-block-types-item__icon{min-width:24px}.global-styles-ui-block-types-item-list__no-results{padding-top:16px}.global-styles-ui-block-types-item__indicator{background:var(--wp-admin-theme-color);border-radius:50%;flex:none;height:6px;margin-left:auto;width:6px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{line-height:1.9!important;margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:var(--wpds-typography-font-weight-emphasis,600)!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel{flex:1 1 auto}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input textarea{flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-color-palette__tablist-container{border-bottom:1px solid #ddd}.global-styles-ui-color-palette__tablist{margin-bottom:-1px}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-duotone-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__content{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);display:flex;flex-direction:column;flex-grow:1;min-height:0}.font-library-page:has(.font-library__footer) .font-library-page__content{padding-bottom:90px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;flex-shrink:0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;min-height:0;overflow:auto}'));
25652    document.head.appendChild(style);
25653  }
25654  
25655  // routes/font-list/stage.tsx
25656  var import_jsx_runtime102 = __toESM(require_jsx_runtime());
25657  var { Tabs: Tabs2 } = unlock4(import_components58.privateApis);
25658  var { useGlobalStyles } = unlock4(import_editor.privateApis);
25659  function FontLibraryPage() {
25660    const { records: collections = [] } = (0, import_core_data12.useEntityRecords)("root", "fontCollection", {
25661      _fields: "slug,name,description"
25662    });
25663    const [activeTab, setActiveTab] = (0, import_element54.useState)("installed-fonts");
25664    const { base, user, setUser, isReady } = useGlobalStyles();
25665    const canUserCreate = (0, import_data13.useSelect)((select) => {
25666      return select(import_core_data12.store).canUser("create", {
25667        kind: "postType",
25668        name: "wp_font_family"
25669      });
25670    }, []);
25671    if (!isReady) {
25672      return null;
25673    }
25674    const tabs = [
25675      {
25676        id: "installed-fonts",
25677        title: (0, import_i18n51._x)("Library", "Font library")
25678      }
25679    ];
25680    if (canUserCreate) {
25681      tabs.push({
25682        id: "upload-fonts",
25683        title: (0, import_i18n51._x)("Upload", "noun")
25684      });
25685      tabs.push(
25686        ...(collections || []).map(({ slug, name: name2 }) => ({
25687          id: slug,
25688          title: collections && collections.length === 1 && slug === "google-fonts" ? (0, import_i18n51.__)("Install Fonts") : name2
25689        }))
25690      );
25691    }
25692    return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(page_default, { title: (0, import_i18n51.__)("Fonts"), className: "font-library-page", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "font-library-page__content", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
25693      Tabs2,
25694      {
25695        selectedTabId: activeTab,
25696        onSelect: (tabId) => setActiveTab(tabId),
25697        children: [
25698          /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "font-library-page__tablist", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tabs2.TabList, { children: tabs.map(({ id, title }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tabs2.Tab, { tabId: id, children: title }, id)) }) }),
25699          tabs.map(({ id }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
25700            Tabs2.TabPanel,
25701            {
25702              tabId: id,
25703              focusable: false,
25704              className: "font-library-page__tab-panel",
25705              children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
25706                FontLibrary,
25707                {
25708                  value: user,
25709                  baseValue: base,
25710                  onChange: setUser,
25711                  activeTab: id
25712                }
25713              )
25714            },
25715            id
25716          ))
25717        ]
25718      }
25719    ) }) });
25720  }
25721  function Stage() {
25722    return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(FontLibraryPage, {});
25723  }
25724  var stage = Stage;
25725  export {
25726    stage
25727  };
25728  /*! Bundled license information:
25729  
25730  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
25731    (**
25732     * @license React
25733     * use-sync-external-store-shim.development.js
25734     *
25735     * Copyright (c) Meta Platforms, Inc. and affiliates.
25736     *
25737     * This source code is licensed under the MIT license found in the
25738     * LICENSE file in the root directory of this source tree.
25739     *)
25740  
25741  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
25742    (**
25743     * @license React
25744     * use-sync-external-store-shim/with-selector.development.js
25745     *
25746     * Copyright (c) Meta Platforms, Inc. and affiliates.
25747     *
25748     * This source code is licensed under the MIT license found in the
25749     * LICENSE file in the root directory of this source tree.
25750     *)
25751  
25752  is-plain-object/dist/is-plain-object.mjs:
25753    (*!
25754     * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
25755     *
25756     * Copyright (c) 2014-2017, Jon Schlinkert.
25757     * Released under the MIT License.
25758     *)
25759  */


Generated : Thu Sep 24 08:20:34 2026 Cross-referenced by PHPXref