PageSourceSearch

https://mariawolff.org/wp-includes/js/dist/commands.js

js mariawolff.org collected 2026-09-24 12:39:07 UTC 131,739 bytes, 3,337 lines download raw bytes

1(function() {
2var wp;
3(wp ||= {}).commands = (() => {
4  var __create = Object.create;
5  var __defProp = Object.defineProperty;
6  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7  var __getOwnPropNames = Object.getOwnPropertyNames;
8  var __getProtoOf = Object.getPrototypeOf;
9  var __hasOwnProp = Object.prototype.hasOwnProperty;
10  var __commonJS = (cb, mod) => function __require() {
11    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12  };
13  var __export = (target, all) => {
14    for (var name in all)
15      __defProp(target, name, { get: all[name], enumerable: true });
16  };
17  var __copyProps = (to, from, except, desc) => {
18    if (from && typeof from === "object" || typeof from === "function") {
19      for (let key of __getOwnPropNames(from))
20        if (!__hasOwnProp.call(to, key) && key !== except)
21          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22    }
23    return to;
24  };
25  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26    // If the importer is in node compatibility mode or this is not an ESM
27    // file that has been converted to a CommonJS file using a Babel-
28    // compatible transform (i.e. "__esModule" has not been set), then set
29    // "default" to the CommonJS "module.exports" for node compatibility.
30    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31    mod
32  ));
33  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
35  // vendor-external:react
36  var require_react = __commonJS({
37    "vendor-external:react"(exports, module) {
38      module.exports = window.React;
39    }
40  });
41
42  // vendor-external:react/jsx-runtime
43  var require_jsx_runtime = __commonJS({
44    "vendor-external:react/jsx-runtime"(exports, module) {
45      module.exports = window.ReactJSXRuntime;
46    }
47  });
48
49  // vendor-external:react-dom
50  var require_react_dom = __commonJS({
51    "vendor-external:react-dom"(exports, module) {
52      module.exports = window.ReactDOM;
53    }
54  });
55
56  // package-external:@wordpress/data
57  var require_data = __commonJS({
58    "package-external:@wordpress/data"(exports, module) {
59      module.exports = window.wp.data;
60    }
61  });
62
63  // package-external:@wordpress/element
64  var require_element = __commonJS({
65    "package-external:@wordpress/element"(exports, module) {
66      module.exports = window.wp.element;
67    }
68  });
69
70  // package-external:@wordpress/i18n
71  var require_i18n = __commonJS({
72    "package-external:@wordpress/i18n"(exports, module) {
73      module.exports = window.wp.i18n;
74    }
75  });
76
77  // package-external:@wordpress/components
78  var require_components = __commonJS({
79    "package-external:@wordpress/components"(exports, module) {
80      module.exports = window.wp.components;
81    }
82  });
83
84  // package-external:@wordpress/keyboard-shortcuts
85  var require_keyboard_shortcuts = __commonJS({
86    "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
87      module.exports = window.wp.keyboardShortcuts;
88    }
89  });
90
91  // package-external:@wordpress/primitives
92  var require_primitives = __commonJS({
93    "package-external:@wordpress/primitives"(exports, module) {
94      module.exports = window.wp.primitives;
95    }
96  });
97
98  // package-external:@wordpress/private-apis
99  var require_private_apis = __commonJS({
100    "package-external:@wordpress/private-apis"(exports, module) {
101      module.exports = window.wp.privateApis;
102    }
103  });
104
105  // package-external:@wordpress/preferences
106  var require_preferences = __commonJS({
107    "package-external:@wordpress/preferences"(exports, module) {
108      module.exports = window.wp.preferences;
109    }
110  });
111
112  
112// packages/commands/build-module/index.mjs
113  var index_exports = {};
114  __export(index_exports, {
115    CommandMenu: () => CommandMenu,
116    privateApis: () => privateApis,
117    store: () => store,
118    useCommand: () => useCommand,
119    useCommandLoader: () => useCommandLoader,
120    useCommands: () => useCommands
121  });
122
123  
vendor: 1,358 bytes, lines 123-150
123// node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
124  var U = 1;
125  var Y = 0.9;
126  var H = 0.8;
127  var J = 0.17;
128  var p = 0.1;
129  var u = 0.999;
130  var $ = 0.9999;
131  var k = 0.99;
132  var m = /[\\\/_+.#"@\[\(\{&]/;
133  var B = /[\\\/_+.#"@\[\(\{&]/g;
134  var K = /[\s-]/;
135  var X = /[\s-]/g;
136  function G(_, C, h, P2, A, f, O) {
137    if (f === C.length) return A === _.length ? U : k;
138    var T2 = `${A},${f}`;
139    if (O[T2] !== void 0) return O[T2];
140    for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) E = G(_, C, h, P2, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, M = _.slice(A, c - 1).match(X), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1);
141    return O[T2] = S, S;
142  }
143  function D(_) {
144    return _.toLowerCase().replace(X, " ");
145  }
146  function W(_, C, h) {
147    return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
148  }
149
150  
vendor: 102 bytes, lines 150-153
150// node_modules/@radix-ui/react-dialog/dist/index.mjs
151  var React24 = __toESM(require_react(), 1);
152
153  
vendor: 487 bytes, lines 153-164
153// node_modules/@radix-ui/primitive/dist/index.mjs
154  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
155  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
156    return function handleEvent(event) {
157      originalEventHandler?.(event);
158      if (checkForDefaultPrevented === false || !event.defaultPrevented) {
159        return ourEventHandler?.(event);
160      }
161    };
162  }
163
164  
vendor: 1,020 bytes, lines 164-201
164// node_modules/@radix-ui/react-compose-refs/dist/index.mjs
165  var React = __toESM(require_react(), 1);
166  function setRef(ref, value) {
167    if (typeof ref === "function") {
168      return ref(value);
169    } else if (ref !== null && ref !== void 0) {
170      ref.current = value;
171    }
172  }
173  function composeRefs(...refs) {
174    return (node) => {
175      let hasCleanup = false;
176      const cleanups = refs.map((ref) => {
177        const cleanup = setRef(ref, node);
178        if (!hasCleanup && typeof cleanup == "function") {
179          hasCleanup = true;
180        }
181        return cleanup;
182      });
183      if (hasCleanup) {
184        return () => {
185          for (let i = 0; i < cleanups.length; i++) {
186            const cleanup = cleanups[i];
187            if (typeof cleanup == "function") {
188              cleanup();
189            } else {
190              setRef(refs[i], null);
191            }
192          }
193        };
194      }
195    };
196  }
197  function useComposedRefs(...refs) {
198    return React.useCallback(composeRefs(...refs), refs);
199  }
200
201  
vendor: 3,543 bytes, lines 201-278
201// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
202  var React2 = __toESM(require_react(), 1);
203  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
204  function createContext2(rootComponentName, defaultContext) {
205    const Context = React2.createContext(defaultContext);
206    const Provider = (props) => {
207      const { children, ...context2 } = props;
208      const value = React2.useMemo(() => context2, Object.values(context2));
209      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
210    };
211    Provider.displayName = rootComponentName + "Provider";
212    function useContext22(consumerName) {
213      const context2 = React2.useContext(Context);
214      if (context2) return context2;
215      if (defaultContext !== void 0) return defaultContext;
216      throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
217    }
218    return [Provider, useContext22];
219  }
220  function createContextScope(scopeName, createContextScopeDeps = []) {
221    let defaultContexts = [];
222    function createContext32(rootComponentName, defaultContext) {
223      const BaseContext = React2.createContext(defaultContext);
224      const index = defaultContexts.length;
225      defaultContexts = [...defaultContexts, defaultContext];
226      const Provider = (props) => {
227        const { scope, children, ...context2 } = props;
228        const Context = scope?.[scopeName]?.[index] || BaseContext;
229        const value = React2.useMemo(() => context2, Object.values(context2));
230        return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
231      };
232      Provider.displayName = rootComponentName + "Provider";
233      function useContext22(consumerName, scope) {
234        const Context = scope?.[scopeName]?.[index] || BaseContext;
235        const context2 = React2.useContext(Context);
236        if (context2) return context2;
237        if (defaultContext !== void 0) return defaultContext;
238        throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
239      }
240      return [Provider, useContext22];
241    }
242    const createScope = () => {
243      const scopeContexts = defaultContexts.map((defaultContext) => {
244        return React2.createContext(defaultContext);
245      });
246      return function useScope(scope) {
247        const contexts = scope?.[scopeName] || scopeContexts;
248        return React2.useMemo(
249          () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
250          [scope, contexts]
251        );
252      };
253    };
254    createScope.scopeName = scopeName;
255    return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
256  }
257  function composeContextScopes(...scopes) {
258    const baseScope = scopes[0];
259    if (scopes.length === 1) return baseScope;
260    const createScope = () => {
261      const scopeHooks = scopes.map((createScope2) => ({
262        useScope: createScope2(),
263        scopeName: createScope2.scopeName
264      }));
265      return function useComposedScopes(overrideScopes) {
266        const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
267          const scopeProps = useScope(overrideScopes);
268          const currentScope = scopeProps[`__scope${scopeName}`];
269          return { ...nextScopes2, ...currentScope };
270        }, {});
271        return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
272      };
273    };
274    createScope.scopeName = baseScope.scopeName;
275    return createScope;
276  }
277
278  
vendor: 97 bytes, lines 278-281
278// node_modules/@radix-ui/react-id/dist/index.mjs
279  var React4 = __toESM(require_react(), 1);
280
281  
vendor: 198 bytes, lines 281-286
281// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
282  var React3 = __toESM(require_react(), 1);
283  var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
284  };
285
286  
vendor: 428 bytes, lines 286-297
286// node_modules/@radix-ui/react-id/dist/index.mjs
287  var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
288  var count = 0;
289  function useId(deterministicId) {
290    const [id, setId] = React4.useState(useReactId());
291    useLayoutEffect2(() => {
292      if (!deterministicId) setId((reactId) => reactId ?? String(count++));
293    }, [deterministicId]);
294    return deterministicId || (id ? `radix-${id}` : "");
295  }
296
297  
vendor: 2,408 bytes, lines 297-365
297// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
298  var React5 = __toESM(require_react(), 1);
299  var React22 = __toESM(require_react(), 1);
300  var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
301  function useControllableState({
302    prop,
303    defaultProp,
304    onChange = () => {
305    },
306    caller
307  }) {
308    const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
309      defaultProp,
310      onChange
311    });
312    const isControlled = prop !== void 0;
313    const value = isControlled ? prop : uncontrolledProp;
314    if (true) {
315      const isControlledRef = React5.useRef(prop !== void 0);
316      React5.useEffect(() => {
317        const wasControlled = isControlledRef.current;
318        if (wasControlled !== isControlled) {
319          const from = wasControlled ? "controlled" : "uncontrolled";
320          const to = isControlled ? "controlled" : "uncontrolled";
321          console.warn(
322            `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
323          );
324        }
325        isControlledRef.current = isControlled;
326      }, [isControlled, caller]);
327    }
328    const setValue = React5.useCallback(
329      (nextValue) => {
330        if (isControlled) {
331          const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
332          if (value2 !== prop) {
333            onChangeRef.current?.(value2);
334          }
335        } else {
336          setUncontrolledProp(nextValue);
337        }
338      },
339      [isControlled, prop, setUncontrolledProp, onChangeRef]
340    );
341    return [value, setValue];
342  }
343  function useUncontrolledState({
344    defaultProp,
345    onChange
346  }) {
347    const [value, setValue] = React5.useState(defaultProp);
348    const prevValueRef = React5.useRef(value);
349    const onChangeRef = React5.useRef(onChange);
350    useInsertionEffect(() => {
351      onChangeRef.current = onChange;
352    }, [onChange]);
353    React5.useEffect(() => {
354      if (prevValueRef.current !== value) {
355        onChangeRef.current?.(value);
356        prevValueRef.current = value;
357      }
358    }, [value, prevValueRef]);
359    return [value, setValue, onChangeRef];
360  }
361  function isFunction(value) {
362    return typeof value === "function";
363  }
364
365  
vendor: 113 bytes, lines 365-368
365// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
366  var React10 = __toESM(require_react(), 1);
367
368  
vendor: 154 bytes, lines 368-372
368// node_modules/@radix-ui/react-primitive/dist/index.mjs
369  var React7 = __toESM(require_react(), 1);
370  var ReactDOM = __toESM(require_react_dom(), 1);
371
372  
vendor: 3,791 bytes, lines 372-458
372// node_modules/@radix-ui/react-slot/dist/index.mjs
373  var React6 = __toESM(require_react(), 1);
374  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
375  // @__NO_SIDE_EFFECTS__
376  function createSlot(ownerName) {
377    const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
378    const Slot2 = React6.forwardRef((props, forwardedRef) => {
379      const { children, ...slotProps } = props;
380      const childrenArray = React6.Children.toArray(children);
381      const slottable = childrenArray.find(isSlottable);
382      if (slottable) {
383        const newElement = slottable.props.children;
384        const newChildren = childrenArray.map((child) => {
385          if (child === slottable) {
386            if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
387            return React6.isValidElement(newElement) ? newElement.props.children : null;
388          } else {
389            return child;
390          }
391        });
392        return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
393      }
394      return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
395    });
396    Slot2.displayName = `${ownerName}.Slot`;
397    return Slot2;
398  }
399  // @__NO_SIDE_EFFECTS__
400  function createSlotClone(ownerName) {
401    const SlotClone = React6.forwardRef((props, forwardedRef) => {
402      const { children, ...slotProps } = props;
403      if (React6.isValidElement(children)) {
404        const childrenRef = getElementRef(children);
405        const props2 = mergeProps(slotProps, children.props);
406        if (children.type !== React6.Fragment) {
407          props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
408        }
409        return React6.cloneElement(children, props2);
410      }
411      return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
412    });
413    SlotClone.displayName = `${ownerName}.SlotClone`;
414    return SlotClone;
415  }
416  var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
417  function isSlottable(child) {
418    return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
419  }
420  function mergeProps(slotProps, childProps) {
421    const overrideProps = { ...childProps };
422    for (const propName in childProps) {
423      const slotPropValue = slotProps[propName];
424      const childPropValue = childProps[propName];
425      const isHandler = /^on[A-Z]/.test(propName);
426      if (isHandler) {
427        if (slotPropValue && childPropValue) {
428          overrideProps[propName] = (...args) => {
429            const result = childPropValue(...args);
430            slotPropValue(...args);
431            return result;
432          };
433        } else if (slotPropValue) {
434          overrideProps[propName] = slotPropValue;
435        }
436      } else if (propName === "style") {
437        overrideProps[propName] = { ...slotPropValue, ...childPropValue };
438      } else if (propName === "className") {
439        overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
440      }
441    }
442    return { ...slotProps, ...overrideProps };
443  }
444  function getElementRef(element) {
445    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
446    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
447    if (mayWarn) {
448      return element.ref;
449    }
450    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
451    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
452    if (mayWarn) {
453      return element.props.ref;
454    }
455    return element.props.ref || element.ref;
456  }
457
458  
vendor: 1,055 bytes, lines 458-496
458// node_modules/@radix-ui/react-primitive/dist/index.mjs
459  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
460  var NODES = [
461    "a",
462    "button",
463    "div",
464    "form",
465    "h2",
466    "h3",
467    "img",
468    "input",
469    "label",
470    "li",
471    "nav",
472    "ol",
473    "p",
474    "select",
475    "span",
476    "svg",
477    "ul"
478  ];
479  var Primitive = NODES.reduce((primitive, node) => {
480    const Slot2 = createSlot(`Primitive.${node}`);
481    const Node2 = React7.forwardRef((props, forwardedRef) => {
482      const { asChild, ...primitiveProps } = props;
483      const Comp = asChild ? Slot2 : node;
484      if (typeof window !== "undefined") {
485        window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
486      }
487      return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
488    });
489    Node2.displayName = `Primitive.${node}`;
490    return { ...primitive, [node]: Node2 };
491  }, {});
492  function dispatchDiscreteCustomEvent(target, event) {
493    if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
494  }
495
496  
vendor: 359 bytes, lines 496-506
496// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
497  var React8 = __toESM(require_react(), 1);
498  function useCallbackRef(callback) {
499    const callbackRef = React8.useRef(callback);
500    React8.useEffect(() => {
501      callbackRef.current = callback;
502    });
503    return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
504  }
505
506  
vendor: 703 bytes, lines 506-521
506// node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
507  var React9 = __toESM(require_react(), 1);
508  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
509    const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
510    React9.useEffect(() => {
511      const handleKeyDown = (event) => {
512        if (event.key === "Escape") {
513          onEscapeKeyDown(event);
514        }
515      };
516      ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
517      return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
518    }, [onEscapeKeyDown, ownerDocument]);
519  }
520
521  
vendor: 9,039 bytes, lines 521-726
521// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
522  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
523  var DISMISSABLE_LAYER_NAME = "DismissableLayer";
524  var CONTEXT_UPDATE = "dismissableLayer.update";
525  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
526  var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
527  var originalBodyPointerEvents;
528  var DismissableLayerContext = React10.createContext({
529    layers: /* @__PURE__ */ new Set(),
530    layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
531    branches: /* @__PURE__ */ new Set()
532  });
533  var DismissableLayer = React10.forwardRef(
534    (props, forwardedRef) => {
535      const {
536        disableOutsidePointerEvents = false,
537        onEscapeKeyDown,
538        onPointerDownOutside,
539        onFocusOutside,
540        onInteractOutside,
541        onDismiss,
542        ...layerProps
543      } = props;
544      const context2 = React10.useContext(DismissableLayerContext);
545      const [node, setNode] = React10.useState(null);
546      const ownerDocument = node?.ownerDocument ?? globalThis?.document;
547      const [, force] = React10.useState({});
548      const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
549      const layers = Array.from(context2.layers);
550      const [highestLayerWithOutsidePointerEventsDisabled] = [...context2.layersWithOutsidePointerEventsDisabled].slice(-1);
551      const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
552      const index = node ? layers.indexOf(node) : -1;
553      const isBodyPointerEventsDisabled = context2.layersWithOutsidePointerEventsDisabled.size > 0;
554      const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
555      const pointerDownOutside = usePointerDownOutside((event) => {
556        const target = event.target;
557        const isPointerDownOnBranch = [...context2.branches].some((branch) => branch.contains(target));
558        if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
559        onPointerDownOutside?.(event);
560        onInteractOutside?.(event);
561        if (!event.defaultPrevented) onDismiss?.();
562      }, ownerDocument);
563      const focusOutside = useFocusOutside((event) => {
564        const target = event.target;
565        const isFocusInBranch = [...context2.branches].some((branch) => branch.contains(target));
566        if (isFocusInBranch) return;
567        onFocusOutside?.(event);
568        onInteractOutside?.(event);
569        if (!event.defaultPrevented) onDismiss?.();
570      }, ownerDocument);
571      useEscapeKeydown((event) => {
572        const isHighestLayer = index === context2.layers.size - 1;
573        if (!isHighestLayer) return;
574        onEscapeKeyDown?.(event);
575        if (!event.defaultPrevented && onDismiss) {
576          event.preventDefault();
577          onDismiss();
578        }
579      }, ownerDocument);
580      React10.useEffect(() => {
581        if (!node) return;
582        if (disableOutsidePointerEvents) {
583          if (context2.layersWithOutsidePointerEventsDisabled.size === 0) {
584            originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
585            ownerDocument.body.style.pointerEvents = "none";
586          }
587          context2.layersWithOutsidePointerEventsDisabled.add(node);
588        }
589        context2.layers.add(node);
590        dispatchUpdate();
591        return () => {
592          if (disableOutsidePointerEvents && context2.layersWithOutsidePointerEventsDisabled.size === 1) {
593            ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
594          }
595        };
596      }, [node, ownerDocument, disableOutsidePointerEvents, context2]);
597      React10.useEffect(() => {
598        return () => {
599          if (!node) return;
600          context2.layers.delete(node);
601          context2.layersWithOutsidePointerEventsDisabled.delete(node);
602          dispatchUpdate();
603        };
604      }, [node, context2]);
605      React10.useEffect(() => {
606        const handleUpdate = () => force({});
607        document.addEventListener(CONTEXT_UPDATE, handleUpdate);
608        return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
609      }, []);
610      return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
611        Primitive.div,
612        {
613          ...layerProps,
614          ref: composedRefs,
615          style: {
616            pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
617            ...props.style
618          },
619          onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
620          onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
621          onPointerDownCapture: composeEventHandlers(
622            props.onPointerDownCapture,
623            pointerDownOutside.onPointerDownCapture
624          )
625        }
626      );
627    }
628  );
629  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
630  var BRANCH_NAME = "DismissableLayerBranch";
631  var DismissableLayerBranch = React10.forwardRef((props, forwardedRef) => {
632    const context2 = React10.useContext(DismissableLayerContext);
633    const ref = React10.useRef(null);
634    const composedRefs = useComposedRefs(forwardedRef, ref);
635    React10.useEffect(() => {
636      const node = ref.current;
637      if (node) {
638        context2.branches.add(node);
639        return () => {
640          context2.branches.delete(node);
641        };
642      }
643    }, [context2.branches]);
644    return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Primitive.div, { ...props, ref: composedRefs });
645  });
646  DismissableLayerBranch.displayName = BRANCH_NAME;
647  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
648    const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
649    const isPointerInsideReactTreeRef = React10.useRef(false);
650    const handleClickRef = React10.useRef(() => {
651    });
652    React10.useEffect(() => {
653      const handlePointerDown = (event) => {
654        if (event.target && !isPointerInsideReactTreeRef.current) {
655          let handleAndDispatchPointerDownOutsideEvent2 = function() {
656            handleAndDispatchCustomEvent(
657              POINTER_DOWN_OUTSIDE,
658              handlePointerDownOutside,
659              eventDetail,
660              { discrete: true }
661            );
662          };
663          var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
664          const eventDetail = { originalEvent: event };
665          if (event.pointerType === "touch") {
666            ownerDocument.removeEventListener("click", handleClickRef.current);
667            handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
668            ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
669          } else {
670            handleAndDispatchPointerDownOutsideEvent2();
671          }
672        } else {
673          ownerDocument.removeEventListener("click", handleClickRef.current);
674        }
675        isPointerInsideReactTreeRef.current = false;
676      };
677      const timerId = window.setTimeout(() => {
678        ownerDocument.addEventListener("pointerdown", handlePointerDown);
679      }, 0);
680      return () => {
681        window.clearTimeout(timerId);
682        ownerDocument.removeEventListener("pointerdown", handlePointerDown);
683        ownerDocument.removeEventListener("click", handleClickRef.current);
684      };
685    }, [ownerDocument, handlePointerDownOutside]);
686    return {
687      // ensures we check React component tree (not just DOM tree)
688      onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
689    };
690  }
691  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
692    const handleFocusOutside = useCallbackRef(onFocusOutside);
693    const isFocusInsideReactTreeRef = React10.useRef(false);
694    React10.useEffect(() => {
695      const handleFocus = (event) => {
696        if (event.target && !isFocusInsideReactTreeRef.current) {
697          const eventDetail = { originalEvent: event };
698          handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
699            discrete: false
700          });
701        }
702      };
703      ownerDocument.addEventListener("focusin", handleFocus);
704      return () => ownerDocument.removeEventListener("focusin", handleFocus);
705    }, [ownerDocument, handleFocusOutside]);
706    return {
707      onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
708      onBlurCapture: () => isFocusInsideReactTreeRef.current = false
709    };
710  }
711  function dispatchUpdate() {
712    const event = new CustomEvent(CONTEXT_UPDATE);
713    document.dispatchEvent(event);
714  }
715  function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
716    const target = detail.originalEvent.target;
717    const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
718    if (handler) target.addEventListener(name, handler, { once: true });
719    if (discrete) {
720      dispatchDiscreteCustomEvent(target, event);
721    } else {
722      target.dispatchEvent(event);
723    }
724  }
725
726  
vendor: 8,398 bytes, lines 726-930
726// node_modules/@radix-ui/react-focus-scope/dist/index.mjs
727  var React11 = __toESM(require_react(), 1);
728  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
729  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
730  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
731  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
732  var FOCUS_SCOPE_NAME = "FocusScope";
733  var FocusScope = React11.forwardRef((props, forwardedRef) => {
734    const {
735      loop = false,
736      trapped = false,
737      onMountAutoFocus: onMountAutoFocusProp,
738      onUnmountAutoFocus: onUnmountAutoFocusProp,
739      ...scopeProps
740    } = props;
741    const [container, setContainer] = React11.useState(null);
742    const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
743    const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
744    const lastFocusedElementRef = React11.useRef(null);
745    const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
746    const focusScope = React11.useRef({
747      paused: false,
748      pause() {
749        this.paused = true;
750      },
751      resume() {
752        this.paused = false;
753      }
754    }).current;
755    React11.useEffect(() => {
756      if (trapped) {
757        let handleFocusIn2 = function(event) {
758          if (focusScope.paused || !container) return;
759          const target = event.target;
760          if (container.contains(target)) {
761            lastFocusedElementRef.current = target;
762          } else {
763            focus(lastFocusedElementRef.current, { select: true });
764          }
765        }, handleFocusOut2 = function(event) {
766          if (focusScope.paused || !container) return;
767          const relatedTarget = event.relatedTarget;
768          if (relatedTarget === null) return;
769          if (!container.contains(relatedTarget)) {
770            focus(lastFocusedElementRef.current, { select: true });
771          }
772        }, handleMutations2 = function(mutations) {
773          const focusedElement = document.activeElement;
774          if (focusedElement !== document.body) return;
775          for (const mutation of mutations) {
776            if (mutation.removedNodes.length > 0) focus(container);
777          }
778        };
779        var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
780        document.addEventListener("focusin", handleFocusIn2);
781        document.addEventListener("focusout", handleFocusOut2);
782        const mutationObserver = new MutationObserver(handleMutations2);
783        if (container) mutationObserver.observe(container, { childList: true, subtree: true });
784        return () => {
785          document.removeEventListener("focusin", handleFocusIn2);
786          document.removeEventListener("focusout", handleFocusOut2);
787          mutationObserver.disconnect();
788        };
789      }
790    }, [trapped, container, focusScope.paused]);
791    React11.useEffect(() => {
792      if (container) {
793        focusScopesStack.add(focusScope);
794        const previouslyFocusedElement = document.activeElement;
795        const hasFocusedCandidate = container.contains(previouslyFocusedElement);
796        if (!hasFocusedCandidate) {
797          const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
798          container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
799          container.dispatchEvent(mountEvent);
800          if (!mountEvent.defaultPrevented) {
801            focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
802            if (document.activeElement === previouslyFocusedElement) {
803              focus(container);
804            }
805          }
806        }
807        return () => {
808          container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
809          setTimeout(() => {
810            const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
811            container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
812            container.dispatchEvent(unmountEvent);
813            if (!unmountEvent.defaultPrevented) {
814              focus(previouslyFocusedElement ?? document.body, { select: true });
815            }
816            container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
817            focusScopesStack.remove(focusScope);
818          }, 0);
819        };
820      }
821    }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
822    const handleKeyDown = React11.useCallback(
823      (event) => {
824        if (!loop && !trapped) return;
825        if (focusScope.paused) return;
826        const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
827        const focusedElement = document.activeElement;
828        if (isTabKey && focusedElement) {
829          const container2 = event.currentTarget;
830          const [first, last] = getTabbableEdges(container2);
831          const hasTabbableElementsInside = first && last;
832          if (!hasTabbableElementsInside) {
833            if (focusedElement === container2) event.preventDefault();
834          } else {
835            if (!event.shiftKey && focusedElement === last) {
836              event.preventDefault();
837              if (loop) focus(first, { select: true });
838            } else if (event.shiftKey && focusedElement === first) {
839              event.preventDefault();
840              if (loop) focus(last, { select: true });
841            }
842          }
843        }
844      },
845      [loop, trapped, focusScope.paused]
846    );
847    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
848  });
849  FocusScope.displayName = FOCUS_SCOPE_NAME;
850  function focusFirst(candidates, { select = false } = {}) {
851    const previouslyFocusedElement = document.activeElement;
852    for (const candidate of candidates) {
853      focus(candidate, { select });
854      if (document.activeElement !== previouslyFocusedElement) return;
855    }
856  }
857  function getTabbableEdges(container) {
858    const candidates = getTabbableCandidates(container);
859    const first = findVisible(candidates, container);
860    const last = findVisible(candidates.reverse(), container);
861    return [first, last];
862  }
863  function getTabbableCandidates(container) {
864    const nodes = [];
865    const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
866      acceptNode: (node) => {
867        const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
868        if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
869        return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
870      }
871    });
872    while (walker.nextNode()) nodes.push(walker.currentNode);
873    return nodes;
874  }
875  function findVisible(elements, container) {
876    for (const element of elements) {
877      if (!isHidden(element, { upTo: container })) return element;
878    }
879  }
880  function isHidden(node, { upTo }) {
881    if (getComputedStyle(node).visibility === "hidden") return true;
882    while (node) {
883      if (upTo !== void 0 && node === upTo) return false;
884      if (getComputedStyle(node).display === "none") return true;
885      node = node.parentElement;
886    }
887    return false;
888  }
889  function isSelectableInput(element) {
890    return element instanceof HTMLInputElement && "select" in element;
891  }
892  function focus(element, { select = false } = {}) {
893    if (element && element.focus) {
894      const previouslyFocusedElement = document.activeElement;
895      element.focus({ preventScroll: true });
896      if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
897        element.select();
898    }
899  }
900  var focusScopesStack = createFocusScopesStack();
901  function createFocusScopesStack() {
902    let stack = [];
903    return {
904      add(focusScope) {
905        const activeFocusScope = stack[0];
906        if (focusScope !== activeFocusScope) {
907          activeFocusScope?.pause();
908        }
909        stack = arrayRemove(stack, focusScope);
910        stack.unshift(focusScope);
911      },
912      remove(focusScope) {
913        stack = arrayRemove(stack, focusScope);
914        stack[0]?.resume();
915      }
916    };
917  }
918  function arrayRemove(array, item) {
919    const updatedArray = [...array];
920    const index = updatedArray.indexOf(item);
921    if (index !== -1) {
922      updatedArray.splice(index, 1);
923    }
924    return updatedArray;
925  }
926  function removeLinks(items) {
927    return items.filter((item) => item.tagName !== "A");
928  }
929
930  
vendor: 787 bytes, lines 930-944
930// node_modules/@radix-ui/react-portal/dist/index.mjs
931  var React12 = __toESM(require_react(), 1);
932  var import_react_dom = __toESM(require_react_dom(), 1);
933  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
934  var PORTAL_NAME = "Portal";
935  var Portal = React12.forwardRef((props, forwardedRef) => {
936    const { container: containerProp, ...portalProps } = props;
937    const [mounted, setMounted] = React12.useState(false);
938    useLayoutEffect2(() => setMounted(true), []);
939    const container = containerProp || mounted && globalThis?.document?.body;
940    return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
941  });
942  Portal.displayName = PORTAL_NAME;
943
944  
vendor: 4,971 bytes, lines 944-1070
944// node_modules/@radix-ui/react-presence/dist/index.mjs
945  var React23 = __toESM(require_react(), 1);
946  var React13 = __toESM(require_react(), 1);
947  function useStateMachine(initialState, machine) {
948    return React13.useReducer((state, event) => {
949      const nextState = machine[state][event];
950      return nextState ?? state;
951    }, initialState);
952  }
953  var Presence = (props) => {
954    const { present, children } = props;
955    const presence = usePresence(present);
956    const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
957    const ref = useComposedRefs(presence.ref, getElementRef2(child));
958    const forceMount = typeof children === "function";
959    return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
960  };
961  Presence.displayName = "Presence";
962  function usePresence(present) {
963    const [node, setNode] = React23.useState();
964    const stylesRef = React23.useRef(null);
965    const prevPresentRef = React23.useRef(present);
966    const prevAnimationNameRef = React23.useRef("none");
967    const initialState = present ? "mounted" : "unmounted";
968    const [state, send] = useStateMachine(initialState, {
969      mounted: {
970        UNMOUNT: "unmounted",
971        ANIMATION_OUT: "unmountSuspended"
972      },
973      unmountSuspended: {
974        MOUNT: "mounted",
975        ANIMATION_END: "unmounted"
976      },
977      unmounted: {
978        MOUNT: "mounted"
979      }
980    });
981    React23.useEffect(() => {
982      const currentAnimationName = getAnimationName(stylesRef.current);
983      prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
984    }, [state]);
985    useLayoutEffect2(() => {
986      const styles = stylesRef.current;
987      const wasPresent = prevPresentRef.current;
988      const hasPresentChanged = wasPresent !== present;
989      if (hasPresentChanged) {
990        const prevAnimationName = prevAnimationNameRef.current;
991        const currentAnimationName = getAnimationName(styles);
992        if (present) {
993          send("MOUNT");
994        } else if (currentAnimationName === "none" || styles?.display === "none") {
995          send("UNMOUNT");
996        } else {
997          const isAnimating = prevAnimationName !== currentAnimationName;
998          if (wasPresent && isAnimating) {
999            send("ANIMATION_OUT");
1000          } else {
1001            send("UNMOUNT");
1002          }
1003        }
1004        prevPresentRef.current = present;
1005      }
1006    }, [present, send]);
1007    useLayoutEffect2(() => {
1008      if (node) {
1009        let timeoutId;
1010        const ownerWindow = node.ownerDocument.defaultView ?? window;
1011        const handleAnimationEnd = (event) => {
1012          const currentAnimationName = getAnimationName(stylesRef.current);
1013          const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
1014          if (event.target === node && isCurrentAnimation) {
1015            send("ANIMATION_END");
1016            if (!prevPresentRef.current) {
1017              const currentFillMode = node.style.animationFillMode;
1018              node.style.animationFillMode = "forwards";
1019              timeoutId = ownerWindow.setTimeout(() => {
1020                if (node.style.animationFillMode === "forwards") {
1021                  node.style.animationFillMode = currentFillMode;
1022                }
1023              });
1024            }
1025          }
1026        };
1027        const handleAnimationStart = (event) => {
1028          if (event.target === node) {
1029            prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1030          }
1031        };
1032        node.addEventListener("animationstart", handleAnimationStart);
1033        node.addEventListener("animationcancel", handleAnimationEnd);
1034        node.addEventListener("animationend", handleAnimationEnd);
1035        return () => {
1036          ownerWindow.clearTimeout(timeoutId);
1037          node.removeEventListener("animationstart", handleAnimationStart);
1038          node.removeEventListener("animationcancel", handleAnimationEnd);
1039          node.removeEventListener("animationend", handleAnimationEnd);
1040        };
1041      } else {
1042        send("ANIMATION_END");
1043      }
1044    }, [node, send]);
1045    return {
1046      isPresent: ["mounted", "unmountSuspended"].includes(state),
1047      ref: React23.useCallback((node2) => {
1048        stylesRef.current = node2 ? getComputedStyle(node2) : null;
1049        setNode(node2);
1050      }, [])
1051    };
1052  }
1053  function getAnimationName(styles) {
1054    return styles?.animationName || "none";
1055  }
1056  function getElementRef2(element) {
1057    let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1058    let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1059    if (mayWarn) {
1060      return element.ref;
1061    }
1062    getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1063    mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1064    if (mayWarn) {
1065      return element.props.ref;
1066    }
1067    return element.props.ref || element.ref;
1068  }
1069
1070  
vendor: 1,044 bytes, lines 1070-1098
1070// node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
1071  var React14 = __toESM(require_react(), 1);
1072  var count2 = 0;
1073  function useFocusGuards() {
1074    React14.useEffect(() => {
1075      const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
1076      document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
1077      document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
1078      count2++;
1079      return () => {
1080        if (count2 === 1) {
1081          document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
1082        }
1083        count2--;
1084      };
1085    }, []);
1086  }
1087  function createFocusGuard() {
1088    const element = document.createElement("span");
1089    element.setAttribute("data-radix-focus-guard", "");
1090    element.tabIndex = 0;
1091    element.style.outline = "none";
1092    element.style.opacity = "0";
1093    element.style.position = "fixed";
1094    element.style.pointerEvents = "none";
1095    return element;
1096  }
1097
1098  
vendor: 1,179 bytes, lines 1098-1130
1098// node_modules/tslib/tslib.es6.mjs
1099  var __assign = function() {
1100    __assign = Object.assign || function __assign2(t2) {
1101      for (var s, i = 1, n = arguments.length; i < n; i++) {
1102        s = arguments[i];
1103        for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2];
1104      }
1105      return t2;
1106    };
1107    return __assign.apply(this, arguments);
1108  };
1109  function __rest(s, e) {
1110    var t2 = {};
1111    for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)
1112      t2[p2] = s[p2];
1113    if (s != null && typeof Object.getOwnPropertySymbols === "function")
1114      for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {
1115        if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))
1116          t2[p2[i]] = s[p2[i]];
1117      }
1118    return t2;
1119  }
1120  function __spreadArray(to, from, pack) {
1121    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1122      if (ar || !(i in from)) {
1123        if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1124        ar[i] = from[i];
1125      }
1126    }
1127    return to.concat(ar || Array.prototype.slice.call(from));
1128  }
1129
1130  
vendor: 144 bytes, lines 1130-1133
1130// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
1131  var React21 = __toESM(require_react());
1132
1133  
vendor: 135 bytes, lines 1133-1136
1133// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
1134  var React17 = __toESM(require_react());
1135
1136  
vendor: 300 bytes, lines 1136-1142
1136// node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1137  var zeroRightClassName = "right-scroll-bar-position";
1138  var fullWidthClassName = "width-before-scroll-bar";
1139  var noScrollbarsClassName = "with-scroll-bars-hidden";
1140  var removedBarSizeVariable = "--removed-body-scroll-bar-size";
1141
1142  
vendor: 226 bytes, lines 1142-1152
1142// node_modules/use-callback-ref/dist/es2015/assignRef.js
1143  function assignRef(ref, value) {
1144    if (typeof ref === "function") {
1145      ref(value);
1146    } else if (ref) {
1147      ref.current = value;
1148    }
1149    return ref;
1150  }
1151
1152  
vendor: 727 bytes, lines 1152-1180
1152// node_modules/use-callback-ref/dist/es2015/useRef.js
1153  var import_react = __toESM(require_react());
1154  function useCallbackRef2(initialValue, callback) {
1155    var ref = (0, import_react.useState)(function() {
1156      return {
1157        // value
1158        value: initialValue,
1159        // last callback
1160        callback,
1161        // "memoized" public interface
1162        facade: {
1163          get current() {
1164            return ref.value;
1165          },
1166          set current(value) {
1167            var last = ref.value;
1168            if (last !== value) {
1169              ref.value = value;
1170              ref.callback(value, last);
1171            }
1172          }
1173        }
1174      };
1175    })[0];
1176    ref.callback = callback;
1177    return ref.facade;
1178  }
1179
1180  
vendor: 1,123 bytes, lines 1180-1212
1180// node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1181  var React15 = __toESM(require_react());
1182  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
1183  var currentValues = /* @__PURE__ */ new WeakMap();
1184  function useMergeRefs(refs, defaultValue) {
1185    var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
1186      return refs.forEach(function(ref) {
1187        return assignRef(ref, newValue);
1188      });
1189    });
1190    useIsomorphicLayoutEffect(function() {
1191      var oldValue = currentValues.get(callbackRef);
1192      if (oldValue) {
1193        var prevRefs_1 = new Set(oldValue);
1194        var nextRefs_1 = new Set(refs);
1195        var current_1 = callbackRef.current;
1196        prevRefs_1.forEach(function(ref) {
1197          if (!nextRefs_1.has(ref)) {
1198            assignRef(ref, null);
1199          }
1200        });
1201        nextRefs_1.forEach(function(ref) {
1202          if (!prevRefs_1.has(ref)) {
1203            assignRef(ref, current_1);
1204          }
1205        });
1206      }
1207      currentValues.set(callbackRef, refs);
1208    }, [refs]);
1209    return callbackRef;
1210  }
1211
1212  
vendor: 2,218 bytes, lines 1212-1298
1212// node_modules/use-sidecar/dist/es2015/medium.js
1213  function ItoI(a) {
1214    return a;
1215  }
1216  function innerCreateMedium(defaults, middleware) {
1217    if (middleware === void 0) {
1218      middleware = ItoI;
1219    }
1220    var buffer = [];
1221    var assigned = false;
1222    var medium = {
1223      read: function() {
1224        if (assigned) {
1225          throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1226        }
1227        if (buffer.length) {
1228          return buffer[buffer.length - 1];
1229        }
1230        return defaults;
1231      },
1232      useMedium: function(data) {
1233        var item = middleware(data, assigned);
1234        buffer.push(item);
1235        return function() {
1236          buffer = buffer.filter(function(x) {
1237            return x !== item;
1238          });
1239        };
1240      },
1241      assignSyncMedium: function(cb) {
1242        assigned = true;
1243        while (buffer.length) {
1244          var cbs = buffer;
1245          buffer = [];
1246          cbs.forEach(cb);
1247        }
1248        buffer = {
1249          push: function(x) {
1250            return cb(x);
1251          },
1252          filter: function() {
1253            return buffer;
1254          }
1255        };
1256      },
1257      assignMedium: function(cb) {
1258        assigned = true;
1259        var pendingQueue = [];
1260        if (buffer.length) {
1261          var cbs = buffer;
1262          buffer = [];
1263          cbs.forEach(cb);
1264          pendingQueue = buffer;
1265        }
1266        var executeQueue = function() {
1267          var cbs2 = pendingQueue;
1268          pendingQueue = [];
1269          cbs2.forEach(cb);
1270        };
1271        var cycle = function() {
1272          return Promise.resolve().then(executeQueue);
1273        };
1274        cycle();
1275        buffer = {
1276          push: function(x) {
1277            pendingQueue.push(x);
1278            cycle();
1279          },
1280          filter: function(filter) {
1281            pendingQueue = pendingQueue.filter(filter);
1282            return buffer;
1283          }
1284        };
1285      }
1286    };
1287    return medium;
1288  }
1289  function createSidecarMedium(options) {
1290    if (options === void 0) {
1291      options = {};
1292    }
1293    var medium = innerCreateMedium(null);
1294    medium.options = __assign({ async: true, ssr: false }, options);
1295    return medium;
1296  }
1297
1298  
vendor: 619 bytes, lines 1298-1317
1298// node_modules/use-sidecar/dist/es2015/exports.js
1299  var React16 = __toESM(require_react());
1300  var SideCar = function(_a) {
1301    var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1302    if (!sideCar) {
1303      throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1304    }
1305    var Target = sideCar.read();
1306    if (!Target) {
1307      throw new Error("Sidecar medium not found");
1308    }
1309    return React16.createElement(Target, __assign({}, rest));
1310  };
1311  SideCar.isSideCarExport = true;
1312  function exportSidecar(medium, exported) {
1313    medium.useMedium(exported);
1314    return SideCar;
1315  }
1316
1317  
vendor: 138 bytes, lines 1317-1320
1317// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js
1318  var effectCar = createSidecarMedium();
1319
1320  
vendor: 1,913 bytes, lines 1320-1352
1320// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
1321  var nothing = function() {
1322    return;
1323  };
1324  var RemoveScroll = React17.forwardRef(function(props, parentRef) {
1325    var ref = React17.useRef(null);
1326    var _a = React17.useState({
1327      onScrollCapture: nothing,
1328      onWheelCapture: nothing,
1329      onTouchMoveCapture: nothing
1330    }), callbacks = _a[0], setCallbacks = _a[1];
1331    var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
1332    var SideCar2 = sideCar;
1333    var containerRef = useMergeRefs([ref, parentRef]);
1334    var containerProps = __assign(__assign({}, rest), callbacks);
1335    return React17.createElement(
1336      React17.Fragment,
1337      null,
1338      enabled && React17.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1339      forwardProps ? React17.cloneElement(React17.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React17.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1340    );
1341  });
1342  RemoveScroll.defaultProps = {
1343    enabled: true,
1344    removeScrollBar: true,
1345    inert: false
1346  };
1347  RemoveScroll.classNames = {
1348    fullWidth: fullWidthClassName,
1349    zeroRight: zeroRightClassName
1350  };
1351
1352  
vendor: 143 bytes, lines 1352-1355
1352// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1353  var React20 = __toESM(require_react());
1354
1355  
vendor: 110 bytes, lines 1355-1358
1355// node_modules/react-remove-scroll-bar/dist/es2015/component.js
1356  var React19 = __toESM(require_react());
1357
1358  
vendor: 103 bytes, lines 1358-1361
1358// node_modules/react-style-singleton/dist/es2015/hook.js
1359  var React18 = __toESM(require_react());
1360
1361  
vendor: 271 bytes, lines 1361-1373
1361// node_modules/get-nonce/dist/es2015/index.js
1362  var currentNonce;
1363  var getNonce = function() {
1364    if (currentNonce) {
1365      return currentNonce;
1366    }
1367    if (typeof __webpack_nonce__ !== "undefined") {
1368      return __webpack_nonce__;
1369    }
1370    return void 0;
1371  };
1372
1373  
vendor: 1,193 bytes, lines 1373-1419
1373// node_modules/react-style-singleton/dist/es2015/singleton.js
1374  function makeStyleTag() {
1375    if (!document)
1376      return null;
1377    var tag = document.createElement("style");
1378    tag.type = "text/css";
1379    var nonce = getNonce();
1380    if (nonce) {
1381      tag.setAttribute("nonce", nonce);
1382    }
1383    return tag;
1384  }
1385  function injectStyles(tag, css) {
1386    if (tag.styleSheet) {
1387      tag.styleSheet.cssText = css;
1388    } else {
1389      tag.appendChild(document.createTextNode(css));
1390    }
1391  }
1392  function insertStyleTag(tag) {
1393    var head = document.head || document.getElementsByTagName("head")[0];
1394    head.appendChild(tag);
1395  }
1396  var stylesheetSingleton = function() {
1397    var counter = 0;
1398    var stylesheet = null;
1399    return {
1400      add: function(style) {
1401        if (counter == 0) {
1402          if (stylesheet = makeStyleTag()) {
1403            injectStyles(stylesheet, style);
1404            insertStyleTag(stylesheet);
1405          }
1406        }
1407        counter++;
1408      },
1409      remove: function() {
1410        counter--;
1411        if (!counter && stylesheet) {
1412          stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1413          stylesheet = null;
1414        }
1415      }
1416    };
1417  };
1418
1419  
vendor: 355 bytes, lines 1419-1432
1419// node_modules/react-style-singleton/dist/es2015/hook.js
1420  var styleHookSingleton = function() {
1421    var sheet = stylesheetSingleton();
1422    return function(styles, isDynamic) {
1423      React18.useEffect(function() {
1424        sheet.add(styles);
1425        return function() {
1426          sheet.remove();
1427        };
1428      }, [styles && isDynamic]);
1429    };
1430  };
1431
1432  
vendor: 308 bytes, lines 1432-1443
1432// node_modules/react-style-singleton/dist/es2015/component.js
1433  var styleSingleton = function() {
1434    var useStyle = styleHookSingleton();
1435    var Sheet = function(_a) {
1436      var styles = _a.styles, dynamic = _a.dynamic;
1437      useStyle(styles, dynamic);
1438      return null;
1439    };
1440    return Sheet;
1441  };
1442
1443  
vendor: 1,063 bytes, lines 1443-1478
1443// node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1444  var zeroGap = {
1445    left: 0,
1446    top: 0,
1447    right: 0,
1448    gap: 0
1449  };
1450  var parse = function(x) {
1451    return parseInt(x || "", 10) || 0;
1452  };
1453  var getOffset = function(gapMode) {
1454    var cs = window.getComputedStyle(document.body);
1455    var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1456    var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1457    var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1458    return [parse(left), parse(top), parse(right)];
1459  };
1460  var getGapWidth = function(gapMode) {
1461    if (gapMode === void 0) {
1462      gapMode = "margin";
1463    }
1464    if (typeof window === "undefined") {
1465      return zeroGap;
1466    }
1467    var offsets = getOffset(gapMode);
1468    var documentWidth = document.documentElement.clientWidth;
1469    var windowWidth = window.innerWidth;
1470    return {
1471      left: offsets[0],
1472      top: offsets[1],
1473      right: offsets[2],
1474      gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1475    };
1476  };
1477
1478  
vendor: 2,723 bytes, lines 1478-1518
1478// node_modules/react-remove-scroll-bar/dist/es2015/component.js
1479  var Style = styleSingleton();
1480  var lockAttribute = "data-scroll-locked";
1481  var getStyles = function(_a, allowRelative, gapMode, important) {
1482    var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1483    if (gapMode === void 0) {
1484      gapMode = "margin";
1485    }
1486    return "\n  .".concat(noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body[").concat(lockAttribute, "] {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([
1487      allowRelative && "position: relative ".concat(important, ";"),
1488      gapMode === "margin" && "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "),
1489      gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1490    ].filter(Boolean).join(""), "\n  }\n  \n  .").concat(zeroRightClassName, " {\n    right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " {\n    margin-right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n    right: 0 ").concat(important, ";\n  }\n  \n  .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n    margin-right: 0 ").concat(important, ";\n  }\n  \n  body[").concat(lockAttribute, "] {\n    ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n  }\n");
1491  };
1492  var getCurrentUseCounter = function() {
1493    var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
1494    return isFinite(counter) ? counter : 0;
1495  };
1496  var useLockAttribute = function() {
1497    React19.useEffect(function() {
1498      document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1499      return function() {
1500        var newCounter = getCurrentUseCounter() - 1;
1501        if (newCounter <= 0) {
1502          document.body.removeAttribute(lockAttribute);
1503        } else {
1504          document.body.setAttribute(lockAttribute, newCounter.toString());
1505        }
1506      };
1507    }, []);
1508  };
1509  var RemoveScrollBar = function(_a) {
1510    var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1511    useLockAttribute();
1512    var gap = React19.useMemo(function() {
1513      return getGapWidth(gapMode);
1514    }, [gapMode]);
1515    return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1516  };
1517
1518  
vendor: 607 bytes, lines 1518-1537
1518// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1519  var passiveSupported = false;
1520  if (typeof window !== "undefined") {
1521    try {
1522      options = Object.defineProperty({}, "passive", {
1523        get: function() {
1524          passiveSupported = true;
1525          return true;
1526        }
1527      });
1528      window.addEventListener("test", options, options);
1529      window.removeEventListener("test", options, options);
1530    } catch (err) {
1531      passiveSupported = false;
1532    }
1533  }
1534  var options;
1535  var nonPassive = passiveSupported ? { passive: false } : false;
1536
1537  
vendor: 3,861 bytes, lines 1537-1637
1537// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1538  var alwaysContainsScroll = function(node) {
1539    return node.tagName === "TEXTAREA";
1540  };
1541  var elementCanBeScrolled = function(node, overflow) {
1542    if (!(node instanceof Element)) {
1543      return false;
1544    }
1545    var styles = window.getComputedStyle(node);
1546    return (
1547      // not-not-scrollable
1548      styles[overflow] !== "hidden" && // contains scroll inside self
1549      !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
1550    );
1551  };
1552  var elementCouldBeVScrolled = function(node) {
1553    return elementCanBeScrolled(node, "overflowY");
1554  };
1555  var elementCouldBeHScrolled = function(node) {
1556    return elementCanBeScrolled(node, "overflowX");
1557  };
1558  var locationCouldBeScrolled = function(axis, node) {
1559    var ownerDocument = node.ownerDocument;
1560    var current = node;
1561    do {
1562      if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
1563        current = current.host;
1564      }
1565      var isScrollable = elementCouldBeScrolled(axis, current);
1566      if (isScrollable) {
1567        var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
1568        if (scrollHeight > clientHeight) {
1569          return true;
1570        }
1571      }
1572      current = current.parentNode;
1573    } while (current && current !== ownerDocument.body);
1574    return false;
1575  };
1576  var getVScrollVariables = function(_a) {
1577    var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
1578    return [
1579      scrollTop,
1580      scrollHeight,
1581      clientHeight
1582    ];
1583  };
1584  var getHScrollVariables = function(_a) {
1585    var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
1586    return [
1587      scrollLeft,
1588      scrollWidth,
1589      clientWidth
1590    ];
1591  };
1592  var elementCouldBeScrolled = function(axis, node) {
1593    return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1594  };
1595  var getScrollVariables = function(axis, node) {
1596    return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1597  };
1598  var getDirectionFactor = function(axis, direction) {
1599    return axis === "h" && direction === "rtl" ? -1 : 1;
1600  };
1601  var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1602    var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1603    var delta = directionFactor * sourceDelta;
1604    var target = event.target;
1605    var targetInLock = endTarget.contains(target);
1606    var shouldCancelScroll = false;
1607    var isDeltaPositive = delta > 0;
1608    var availableScroll = 0;
1609    var availableScrollTop = 0;
1610    do {
1611      if (!target) {
1612        break;
1613      }
1614      var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
1615      var elementScroll = scroll_1 - capacity - directionFactor * position;
1616      if (position || elementScroll) {
1617        if (elementCouldBeScrolled(axis, target)) {
1618          availableScroll += elementScroll;
1619          availableScrollTop += position;
1620        }
1621      }
1622      var parent_1 = target.parentNode;
1623      target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
1624    } while (
1625      // portaled content
1626      !targetInLock && target !== document.body || // self content
1627      targetInLock && (endTarget.contains(target) || endTarget === target)
1628    );
1629    if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
1630      shouldCancelScroll = true;
1631    } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
1632      shouldCancelScroll = true;
1633    }
1634    return shouldCancelScroll;
1635  };
1636
1637  
vendor: 6,930 bytes, lines 1637-1802
1637// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1638  var getTouchXY = function(event) {
1639    return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1640  };
1641  var getDeltaXY = function(event) {
1642    return [event.deltaX, event.deltaY];
1643  };
1644  var extractRef = function(ref) {
1645    return ref && "current" in ref ? ref.current : ref;
1646  };
1647  var deltaCompare = function(x, y) {
1648    return x[0] === y[0] && x[1] === y[1];
1649  };
1650  var generateStyle = function(id) {
1651    return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1652  };
1653  var idCounter = 0;
1654  var lockStack = [];
1655  function RemoveScrollSideCar(props) {
1656    var shouldPreventQueue = React20.useRef([]);
1657    var touchStartRef = React20.useRef([0, 0]);
1658    var activeAxis = React20.useRef();
1659    var id = React20.useState(idCounter++)[0];
1660    var Style2 = React20.useState(styleSingleton)[0];
1661    var lastProps = React20.useRef(props);
1662    React20.useEffect(function() {
1663      lastProps.current = props;
1664    }, [props]);
1665    React20.useEffect(function() {
1666      if (props.inert) {
1667        document.body.classList.add("block-interactivity-".concat(id));
1668        var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1669        allow_1.forEach(function(el) {
1670          return el.classList.add("allow-interactivity-".concat(id));
1671        });
1672        return function() {
1673          document.body.classList.remove("block-interactivity-".concat(id));
1674          allow_1.forEach(function(el) {
1675            return el.classList.remove("allow-interactivity-".concat(id));
1676          });
1677        };
1678      }
1679      return;
1680    }, [props.inert, props.lockRef.current, props.shards]);
1681    var shouldCancelEvent = React20.useCallback(function(event, parent) {
1682      if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
1683        return !lastProps.current.allowPinchZoom;
1684      }
1685      var touch = getTouchXY(event);
1686      var touchStart = touchStartRef.current;
1687      var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1688      var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1689      var currentAxis;
1690      var target = event.target;
1691      var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1692      if ("touches" in event && moveDirection === "h" && target.type === "range") {
1693        return false;
1694      }
1695      var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1696      if (!canBeScrolledInMainDirection) {
1697        return true;
1698      }
1699      if (canBeScrolledInMainDirection) {
1700        currentAxis = moveDirection;
1701      } else {
1702        currentAxis = moveDirection === "v" ? "h" : "v";
1703        canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1704      }
1705      if (!canBeScrolledInMainDirection) {
1706        return false;
1707      }
1708      if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
1709        activeAxis.current = currentAxis;
1710      }
1711      if (!currentAxis) {
1712        return true;
1713      }
1714      var cancelingAxis = activeAxis.current || currentAxis;
1715      return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1716    }, []);
1717    var shouldPrevent = React20.useCallback(function(_event) {
1718      var event = _event;
1719      if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
1720        return;
1721      }
1722      var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1723      var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1724        return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1725      })[0];
1726      if (sourceEvent && sourceEvent.should) {
1727        if (event.cancelable) {
1728          event.preventDefault();
1729        }
1730        return;
1731      }
1732      if (!sourceEvent) {
1733        var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1734          return node.contains(event.target);
1735        });
1736        var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
1737        if (shouldStop) {
1738          if (event.cancelable) {
1739            event.preventDefault();
1740          }
1741        }
1742      }
1743    }, []);
1744    var shouldCancel = React20.useCallback(function(name, delta, target, should) {
1745      var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
1746      shouldPreventQueue.current.push(event);
1747      setTimeout(function() {
1748        shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1749          return e !== event;
1750        });
1751      }, 1);
1752    }, []);
1753    var scrollTouchStart = React20.useCallback(function(event) {
1754      touchStartRef.current = getTouchXY(event);
1755      activeAxis.current = void 0;
1756    }, []);
1757    var scrollWheel = React20.useCallback(function(event) {
1758      shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1759    }, []);
1760    var scrollTouchMove = React20.useCallback(function(event) {
1761      shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1762    }, []);
1763    React20.useEffect(function() {
1764      lockStack.push(Style2);
1765      props.setCallbacks({
1766        onScrollCapture: scrollWheel,
1767        onWheelCapture: scrollWheel,
1768        onTouchMoveCapture: scrollTouchMove
1769      });
1770      document.addEventListener("wheel", shouldPrevent, nonPassive);
1771      document.addEventListener("touchmove", shouldPrevent, nonPassive);
1772      document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1773      return function() {
1774        lockStack = lockStack.filter(function(inst) {
1775          return inst !== Style2;
1776        });
1777        document.removeEventListener("wheel", shouldPrevent, nonPassive);
1778        document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1779        document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1780      };
1781    }, []);
1782    var removeScrollBar = props.removeScrollBar, inert = props.inert;
1783    return React20.createElement(
1784      React20.Fragment,
1785      null,
1786      inert ? React20.createElement(Style2, { styles: generateStyle(id) }) : null,
1787      removeScrollBar ? React20.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
1788    );
1789  }
1790  function getOutermostShadowParent(node) {
1791    var shadowParent = null;
1792    while (node !== null) {
1793      if (node instanceof ShadowRoot) {
1794        shadowParent = node.host;
1795        node = node.host;
1796      }
1797      node = node.parentNode;
1798    }
1799    return shadowParent;
1800  }
1801
1802  
vendor: 169 bytes, lines 1802-1805
1802// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js
1803  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1804
1805  
vendor: 385 bytes, lines 1805-1812
1805// node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
1806  var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
1807    return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
1808  });
1809  ReactRemoveScroll.classNames = RemoveScroll.classNames;
1810  var Combination_default = ReactRemoveScroll;
1811
1812  
vendor: 4,333 bytes, lines 1812-1933
1812// node_modules/aria-hidden/dist/es2015/index.js
1813  var getDefaultParent = function(originalTarget) {
1814    if (typeof document === "undefined") {
1815      return null;
1816    }
1817    var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1818    return sampleTarget.ownerDocument.body;
1819  };
1820  var counterMap = /* @__PURE__ */ new WeakMap();
1821  var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1822  var markerMap = {};
1823  var lockCount = 0;
1824  var unwrapHost = function(node) {
1825    return node && (node.host || unwrapHost(node.parentNode));
1826  };
1827  var correctTargets = function(parent, targets) {
1828    return targets.map(function(target) {
1829      if (parent.contains(target)) {
1830        return target;
1831      }
1832      var correctedTarget = unwrapHost(target);
1833      if (correctedTarget && parent.contains(correctedTarget)) {
1834        return correctedTarget;
1835      }
1836      console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1837      return null;
1838    }).filter(function(x) {
1839      return Boolean(x);
1840    });
1841  };
1842  var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1843    var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1844    if (!markerMap[markerName]) {
1845      markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1846    }
1847    var markerCounter = markerMap[markerName];
1848    var hiddenNodes = [];
1849    var elementsToKeep = /* @__PURE__ */ new Set();
1850    var elementsToStop = new Set(targets);
1851    var keep = function(el) {
1852      if (!el || elementsToKeep.has(el)) {
1853        return;
1854      }
1855      elementsToKeep.add(el);
1856      keep(el.parentNode);
1857    };
1858    targets.forEach(keep);
1859    var deep = function(parent) {
1860      if (!parent || elementsToStop.has(parent)) {
1861        return;
1862      }
1863      Array.prototype.forEach.call(parent.children, function(node) {
1864        if (elementsToKeep.has(node)) {
1865          deep(node);
1866        } else {
1867          try {
1868            var attr = node.getAttribute(controlAttribute);
1869            var alreadyHidden = attr !== null && attr !== "false";
1870            var counterValue = (counterMap.get(node) || 0) + 1;
1871            var markerValue = (markerCounter.get(node) || 0) + 1;
1872            counterMap.set(node, counterValue);
1873            markerCounter.set(node, markerValue);
1874            hiddenNodes.push(node);
1875            if (counterValue === 1 && alreadyHidden) {
1876              uncontrolledNodes.set(node, true);
1877            }
1878            if (markerValue === 1) {
1879              node.setAttribute(markerName, "true");
1880            }
1881            if (!alreadyHidden) {
1882              node.setAttribute(controlAttribute, "true");
1883            }
1884          } catch (e) {
1885            console.error("aria-hidden: cannot operate on ", node, e);
1886          }
1887        }
1888      });
1889    };
1890    deep(parentNode);
1891    elementsToKeep.clear();
1892    lockCount++;
1893    return function() {
1894      hiddenNodes.forEach(function(node) {
1895        var counterValue = counterMap.get(node) - 1;
1896        var markerValue = markerCounter.get(node) - 1;
1897        counterMap.set(node, counterValue);
1898        markerCounter.set(node, markerValue);
1899        if (!counterValue) {
1900          if (!uncontrolledNodes.has(node)) {
1901            node.removeAttribute(controlAttribute);
1902          }
1903          uncontrolledNodes.delete(node);
1904        }
1905        if (!markerValue) {
1906          node.removeAttribute(markerName);
1907        }
1908      });
1909      lockCount--;
1910      if (!lockCount) {
1911        counterMap = /* @__PURE__ */ new WeakMap();
1912        counterMap = /* @__PURE__ */ new WeakMap();
1913        uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1914        markerMap = {};
1915      }
1916    };
1917  };
1918  var hideOthers = function(originalTarget, parentNode, markerName) {
1919    if (markerName === void 0) {
1920      markerName = "data-aria-hidden";
1921    }
1922    var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1923    var activeParentNode = parentNode || getDefaultParent(originalTarget);
1924    if (!activeParentNode) {
1925      return function() {
1926        return null;
1927      };
1928    }
1929    targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
1930    return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1931  };
1932
1933  
vendor: 13,031 bytes, lines 1933-2234
1933// node_modules/@radix-ui/react-dialog/dist/index.mjs
1934  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
1935  var DIALOG_NAME = "Dialog";
1936  var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
1937  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
1938  var Dialog = (props) => {
1939    const {
1940      __scopeDialog,
1941      children,
1942      open: openProp,
1943      defaultOpen,
1944      onOpenChange,
1945      modal = true
1946    } = props;
1947    const triggerRef = React24.useRef(null);
1948    const contentRef = React24.useRef(null);
1949    const [open2, setOpen] = useControllableState({
1950      prop: openProp,
1951      defaultProp: defaultOpen ?? false,
1952      onChange: onOpenChange,
1953      caller: DIALOG_NAME
1954    });
1955    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1956      DialogProvider,
1957      {
1958        scope: __scopeDialog,
1959        triggerRef,
1960        contentRef,
1961        contentId: useId(),
1962        titleId: useId(),
1963        descriptionId: useId(),
1964        open: open2,
1965        onOpenChange: setOpen,
1966        onOpenToggle: React24.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1967        modal,
1968        children
1969      }
1970    );
1971  };
1972  Dialog.displayName = DIALOG_NAME;
1973  var TRIGGER_NAME = "DialogTrigger";
1974  var DialogTrigger = React24.forwardRef(
1975    (props, forwardedRef) => {
1976      const { __scopeDialog, ...triggerProps } = props;
1977      const context2 = useDialogContext(TRIGGER_NAME, __scopeDialog);
1978      const composedTriggerRef = useComposedRefs(forwardedRef, context2.triggerRef);
1979      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1980        Primitive.button,
1981        {
1982          type: "button",
1983          "aria-haspopup": "dialog",
1984          "aria-expanded": context2.open,
1985          "aria-controls": context2.contentId,
1986          "data-state": getState(context2.open),
1987          ...triggerProps,
1988          ref: composedTriggerRef,
1989          onClick: composeEventHandlers(props.onClick, context2.onOpenToggle)
1990        }
1991      );
1992    }
1993  );
1994  DialogTrigger.displayName = TRIGGER_NAME;
1995  var PORTAL_NAME2 = "DialogPortal";
1996  var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
1997    forceMount: void 0
1998  });
1999  var DialogPortal = (props) => {
2000    const { __scopeDialog, forceMount, children, container } = props;
2001    const context2 = useDialogContext(PORTAL_NAME2, __scopeDialog);
2002    return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React24.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Portal, { asChild: true, container, children: child }) })) });
2003  };
2004  DialogPortal.displayName = PORTAL_NAME2;
2005  var OVERLAY_NAME = "DialogOverlay";
2006  var DialogOverlay = React24.forwardRef(
2007    (props, forwardedRef) => {
2008      const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
2009      const { forceMount = portalContext.forceMount, ...overlayProps } = props;
2010      const context2 = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
2011      return context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2012    }
2013  );
2014  DialogOverlay.displayName = OVERLAY_NAME;
2015  var Slot = createSlot("DialogOverlay.RemoveScroll");
2016  var DialogOverlayImpl = React24.forwardRef(
2017    (props, forwardedRef) => {
2018      const { __scopeDialog, ...overlayProps } = props;
2019      const context2 = useDialogContext(OVERLAY_NAME, __scopeDialog);
2020      return (
2021        // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2022        // ie. when `Overlay` and `Content` are siblings
2023        /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context2.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2024          Primitive.div,
2025          {
2026            "data-state": getState(context2.open),
2027            ...overlayProps,
2028            ref: forwardedRef,
2029            style: { pointerEvents: "auto", ...overlayProps.style }
2030          }
2031        ) })
2032      );
2033    }
2034  );
2035  var CONTENT_NAME = "DialogContent";
2036  var DialogContent = React24.forwardRef(
2037    (props, forwardedRef) => {
2038      const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
2039      const { forceMount = portalContext.forceMount, ...contentProps } = props;
2040      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2041      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2042    }
2043  );
2044  DialogContent.displayName = CONTENT_NAME;
2045  var DialogContentModal = React24.forwardRef(
2046    (props, forwardedRef) => {
2047      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2048      const contentRef = React24.useRef(null);
2049      const composedRefs = useComposedRefs(forwardedRef, context2.contentRef, contentRef);
2050      React24.useEffect(() => {
2051        const content = contentRef.current;
2052        if (content) return hideOthers(content);
2053      }, []);
2054      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2055        DialogContentImpl,
2056        {
2057          ...props,
2058          ref: composedRefs,
2059          trapFocus: context2.open,
2060          disableOutsidePointerEvents: true,
2061          onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
2062            event.preventDefault();
2063            context2.triggerRef.current?.focus();
2064          }),
2065          onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
2066            const originalEvent = event.detail.originalEvent;
2067            const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
2068            const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
2069            if (isRightClick) event.preventDefault();
2070          }),
2071          onFocusOutside: composeEventHandlers(
2072            props.onFocusOutside,
2073            (event) => event.preventDefault()
2074          )
2075        }
2076      );
2077    }
2078  );
2079  var DialogContentNonModal = React24.forwardRef(
2080    (props, forwardedRef) => {
2081      const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2082      const hasInteractedOutsideRef = React24.useRef(false);
2083      const hasPointerDownOutsideRef = React24.useRef(false);
2084      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2085        DialogContentImpl,
2086        {
2087          ...props,
2088          ref: forwardedRef,
2089          trapFocus: false,
2090          disableOutsidePointerEvents: false,
2091          onCloseAutoFocus: (event) => {
2092            props.onCloseAutoFocus?.(event);
2093            if (!event.defaultPrevented) {
2094              if (!hasInteractedOutsideRef.current) context2.triggerRef.current?.focus();
2095              event.preventDefault();
2096            }
2097            hasInteractedOutsideRef.current = false;
2098            hasPointerDownOutsideRef.current = false;
2099          },
2100          onInteractOutside: (event) => {
2101            props.onInteractOutside?.(event);
2102            if (!event.defaultPrevented) {
2103              hasInteractedOutsideRef.current = true;
2104              if (event.detail.originalEvent.type === "pointerdown") {
2105                hasPointerDownOutsideRef.current = true;
2106              }
2107            }
2108            const target = event.target;
2109            const targetIsTrigger = context2.triggerRef.current?.contains(target);
2110            if (targetIsTrigger) event.preventDefault();
2111            if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
2112              event.preventDefault();
2113            }
2114          }
2115        }
2116      );
2117    }
2118  );
2119  var DialogContentImpl = React24.forwardRef(
2120    (props, forwardedRef) => {
2121      const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2122      const context2 = useDialogContext(CONTENT_NAME, __scopeDialog);
2123      const contentRef = React24.useRef(null);
2124      const composedRefs = useComposedRefs(forwardedRef, contentRef);
2125      useFocusGuards();
2126      return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2127        /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2128          FocusScope,
2129          {
2130            asChild: true,
2131            loop: true,
2132            trapped: trapFocus,
2133            onMountAutoFocus: onOpenAutoFocus,
2134            onUnmountAutoFocus: onCloseAutoFocus,
2135            children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2136              DismissableLayer,
2137              {
2138                role: "dialog",
2139                id: context2.contentId,
2140                "aria-describedby": context2.descriptionId,
2141                "aria-labelledby": context2.titleId,
2142                "data-state": getState(context2.open),
2143                ...contentProps,
2144                ref: composedRefs,
2145                onDismiss: () => context2.onOpenChange(false)
2146              }
2147            )
2148          }
2149        ),
2150        /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2151          /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TitleWarning, { titleId: context2.titleId }),
2152          /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DescriptionWarning, { contentRef, descriptionId: context2.descriptionId })
2153        ] })
2154      ] });
2155    }
2156  );
2157  var TITLE_NAME = "DialogTitle";
2158  var DialogTitle = React24.forwardRef(
2159    (props, forwardedRef) => {
2160      const { __scopeDialog, ...titleProps } = props;
2161      const context2 = useDialogContext(TITLE_NAME, __scopeDialog);
2162      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.h2, { id: context2.titleId, ...titleProps, ref: forwardedRef });
2163    }
2164  );
2165  DialogTitle.displayName = TITLE_NAME;
2166  var DESCRIPTION_NAME = "DialogDescription";
2167  var DialogDescription = React24.forwardRef(
2168    (props, forwardedRef) => {
2169      const { __scopeDialog, ...descriptionProps } = props;
2170      const context2 = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
2171      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.p, { id: context2.descriptionId, ...descriptionProps, ref: forwardedRef });
2172    }
2173  );
2174  DialogDescription.displayName = DESCRIPTION_NAME;
2175  var CLOSE_NAME = "DialogClose";
2176  var DialogClose = React24.forwardRef(
2177    (props, forwardedRef) => {
2178      const { __scopeDialog, ...closeProps } = props;
2179      const context2 = useDialogContext(CLOSE_NAME, __scopeDialog);
2180      return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2181        Primitive.button,
2182        {
2183          type: "button",
2184          ...closeProps,
2185          ref: forwardedRef,
2186          onClick: composeEventHandlers(props.onClick, () => context2.onOpenChange(false))
2187        }
2188      );
2189    }
2190  );
2191  DialogClose.displayName = CLOSE_NAME;
2192  function getState(open2) {
2193    return open2 ? "open" : "closed";
2194  }
2195  var TITLE_WARNING_NAME = "DialogTitleWarning";
2196  var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
2197    contentName: CONTENT_NAME,
2198    titleName: TITLE_NAME,
2199    docsSlug: "dialog"
2200  });
2201  var TitleWarning = ({ titleId }) => {
2202    const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
2203    const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
2204
2205If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2206
2207For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2208    React24.useEffect(() => {
2209      if (titleId) {
2210        const hasTitle = document.getElementById(titleId);
2211        if (!hasTitle) console.error(MESSAGE);
2212      }
2213    }, [MESSAGE, titleId]);
2214    return null;
2215  };
2216  var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2217  var DescriptionWarning = ({ contentRef, descriptionId }) => {
2218    const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2219    const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2220    React24.useEffect(() => {
2221      const describedById = contentRef.current?.getAttribute("aria-describedby");
2222      if (descriptionId && describedById) {
2223        const hasDescription = document.getElementById(descriptionId);
2224        if (!hasDescription) console.warn(MESSAGE);
2225      }
2226    }, [MESSAGE, contentRef, descriptionId]);
2227    return null;
2228  };
2229  var Root = Dialog;
2230  var Portal2 = DialogPortal;
2231  var Overlay = DialogOverlay;
2232  var Content = DialogContent;
2233
2234  
vendor: 15,495 bytes, lines 2234-2551
2234// node_modules/cmdk/dist/index.mjs
2235  var t = __toESM(require_react(), 1);
2236  var N = '[cmdk-group=""]';
2237  var Y2 = '[cmdk-group-items=""]';
2238  var be = '[cmdk-group-heading=""]';
2239  var le = '[cmdk-item=""]';
2240  var ce = `${le}:not([aria-disabled="true"])`;
2241  var Z = "cmdk-item-select";
2242  var T = "data-value";
2243  var Re = (r2, o, n) => W(r2, o, n);
2244  var ue = t.createContext(void 0);
2245  var K2 = () => t.useContext(ue);
2246  var de = t.createContext(void 0);
2247  var ee = () => t.useContext(de);
2248  var fe = t.createContext(void 0);
2249  var me = t.forwardRef((r2, o) => {
2250    let n = L(() => {
2251      var e, a;
2252      return { search: "", value: (a = (e = r2.value) != null ? e : r2.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
2253    }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r2, $2 = useId(), q = useId(), _ = useId(), I = t.useRef(null), v = ke();
2254    k2(() => {
2255      if (R !== void 0) {
2256        let e = R.trim();
2257        n.current.value = e, E.emit();
2258      }
2259    }, [R]), k2(() => {
2260      v(6, ne);
2261    }, []);
2262    let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
2263      var i, l, g, y;
2264      if (!Object.is(n.current[e], a)) {
2265        if (n.current[e] = a, e === "search") J2(), z(), v(1, W2);
2266        else if (e === "value") {
2267          if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
2268            let h = document.getElementById(_);
2269            h ? h.focus() : (i = document.getElementById($2)) == null || i.focus();
2270          }
2271          if (v(7, () => {
2272            var h;
2273            n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit();
2274          }), s || v(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
2275            let h = a != null ? a : "";
2276            (y = (g = p2.current).onValueChange) == null || y.call(g, h);
2277            return;
2278          }
2279        }
2280        E.emit();
2281      }
2282    }, emit: () => {
2283      f.current.forEach((e) => e());
2284    } }), []), U2 = t.useMemo(() => ({ value: (e, a, s) => {
2285      var i;
2286      a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, { value: a, keywords: s }), n.current.filtered.items.set(e, te(a, s)), v(2, () => {
2287        z(), E.emit();
2288      }));
2289    }, item: (e, a) => (u2.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => {
2290      J2(), z(), n.current.value || W2(), E.emit();
2291    }), () => {
2292      d.current.delete(e), u2.current.delete(e), n.current.filtered.items.delete(e);
2293      let s = M();
2294      v(4, () => {
2295        J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E.emit();
2296      });
2297    }), group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => {
2298      d.current.delete(e), c.current.delete(e);
2299    }), filter: () => p2.current.shouldFilter, label: b || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _, labelId: q, listInnerRef: I }), []);
2300    function te(e, a) {
2301      var i, l;
2302      let s = (l = (i = p2.current) == null ? void 0 : i.filter) != null ? l : Re;
2303      return e ? s(e, n.current.search, a) : 0;
2304    }
2305    function z() {
2306      if (!n.current.search || p2.current.shouldFilter === false) return;
2307      let e = n.current.filtered.items, a = [];
2308      n.current.filtered.groups.forEach((i) => {
2309        let l = c.current.get(i), g = 0;
2310        l.forEach((y) => {
2311          let h = e.get(y);
2312          g = Math.max(h, g);
2313        }), a.push([i, g]);
2314      });
2315      let s = I.current;
2316      V().sort((i, l) => {
2317        var h, F;
2318        let g = i.getAttribute("id"), y = l.getAttribute("id");
2319        return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0);
2320      }).forEach((i) => {
2321        let l = i.closest(Y2);
2322        l ? l.appendChild(i.parentElement === l ? i : i.closest(`${Y2} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`${Y2} > *`));
2323      }), a.sort((i, l) => l[1] - i[1]).forEach((i) => {
2324        var g;
2325        let l = (g = I.current) == null ? void 0 : g.querySelector(`${N}[${T}="${encodeURIComponent(i[0])}"]`);
2326        l == null || l.parentElement.appendChild(l);
2327      });
2328    }
2329    function W2() {
2330      let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T);
2331      E.setState("value", a || void 0);
2332    }
2333    function J2() {
2334      var a, s, i, l;
2335      if (!n.current.search || p2.current.shouldFilter === false) {
2336        n.current.filtered.count = u2.current.size;
2337        return;
2338      }
2339      n.current.filtered.groups = /* @__PURE__ */ new Set();
2340      let e = 0;
2341      for (let g of u2.current) {
2342        let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h);
2343        n.current.filtered.items.set(g, F), F > 0 && e++;
2344      }
2345      for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
2346        n.current.filtered.groups.add(g);
2347        break;
2348      }
2349      n.current.filtered.count = e;
2350    }
2351    function ne() {
2352      var a, s, i;
2353      let e = M();
2354      e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" }));
2355    }
2356    function M() {
2357      var e;
2358      return (e = I.current) == null ? void 0 : e.querySelector(`${le}[aria-selected="true"]`);
2359    }
2360    function V() {
2361      var e;
2362      return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
2363    }
2364    function X2(e) {
2365      let s = V()[e];
2366      s && E.setState("value", s.getAttribute(T));
2367    }
2368    function Q(e) {
2369      var g;
2370      let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e];
2371      (g = p2.current) != null && g.loop && (l = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l && E.setState("value", l.getAttribute(T));
2372    }
2373    function re(e) {
2374      let a = M(), s = a == null ? void 0 : a.closest(N), i;
2375      for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
2376      i ? E.setState("value", i.getAttribute(T)) : Q(e);
2377    }
2378    let oe = () => X2(V().length - 1), ie = (e) => {
2379      e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
2380    }, se = (e) => {
2381      e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1);
2382    };
2383    return t.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
2384      var s;
2385      (s = O.onKeyDown) == null || s.call(O, e);
2386      let a = e.nativeEvent.isComposing || e.keyCode === 229;
2387      if (!(e.defaultPrevented || a)) switch (e.key) {
2388        case "n":
2389        case "j": {
2390          j && e.ctrlKey && ie(e);
2391          break;
2392        }
2393        case "ArrowDown": {
2394          ie(e);
2395          break;
2396        }
2397        case "p":
2398        case "k": {
2399          j && e.ctrlKey && se(e);
2400          break;
2401        }
2402        case "ArrowUp": {
2403          se(e);
2404          break;
2405        }
2406        case "Home": {
2407          e.preventDefault(), X2(0);
2408          break;
2409        }
2410        case "End": {
2411          e.preventDefault(), oe();
2412          break;
2413        }
2414        case "Enter": {
2415          e.preventDefault();
2416          let i = M();
2417          if (i) {
2418            let l = new Event(Z);
2419            i.dispatchEvent(l);
2420          }
2421        }
2422      }
2423    } }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r2, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
2424  });
2425  var he = t.forwardRef((r2, o) => {
2426    var _, I;
2427    let n = useId(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r2), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
2428    k2(() => {
2429      if (!p2) return d.item(n, c == null ? void 0 : c.id);
2430    }, [p2]);
2431    let b = ve(n, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
2432    t.useEffect(() => {
2433      let v = u2.current;
2434      if (!(!v || r2.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
2435    }, [x, r2.onSelect, r2.disabled]);
2436    function C() {
2437      var v, E;
2438      S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current);
2439    }
2440    function S() {
2441      m2.setState("value", b.current, true);
2442    }
2443    if (!x) return null;
2444    let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r2;
2445    return t.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
2446  });
2447  var Ee = t.forwardRef((r2, o) => {
2448    let { heading: n, children: u2, forceMount: c, ...d } = r2, f = useId(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
2449    k2(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b]);
2450    let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
2451    return t.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r2, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
2452  });
2453  var ye = t.forwardRef((r2, o) => {
2454    let { alwaysRender: n, ...u2 } = r2, c = t.useRef(null), d = P((f) => !f.search);
2455    return !n && !d ? null : t.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
2456  });
2457  var Se = t.forwardRef((r2, o) => {
2458    let { onValueChange: n, ...u2 } = r2, c = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
2459    return t.useEffect(() => {
2460      r2.value != null && d.setState("search", r2.value);
2461    }, [r2.value]), t.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r2.value : f, onChange: (m2) => {
2462      c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
2463    } });
2464  });
2465  var Ce = t.forwardRef((r2, o) => {
2466    let { children: n, label: u2 = "Suggestions", ...c } = r2, d = t.useRef(null), f = t.useRef(null), p2 = P((m2) => m2.selectedItemId), b = K2();
2467    return t.useEffect(() => {
2468      if (f.current && d.current) {
2469        let m2 = f.current, R = d.current, x, C = new ResizeObserver(() => {
2470          x = requestAnimationFrame(() => {
2471            let S = m2.offsetHeight;
2472            R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px");
2473          });
2474        });
2475        return C.observe(m2), () => {
2476          cancelAnimationFrame(x), C.unobserve(m2);
2477        };
2478      }
2479    }, []), t.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r2, (m2) => t.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
2480  });
2481  var xe = t.forwardRef((r2, o) => {
2482    let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
2483    return t.createElement(Root, { open: n, onOpenChange: u2 }, t.createElement(Portal2, { container: f }, t.createElement(Overlay, { "cmdk-overlay": "", className: c }), t.createElement(Content, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
2484  });
2485  var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null);
2486  var Pe = t.forwardRef((r2, o) => {
2487    let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
2488    return t.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r2, (f) => t.createElement("div", { "aria-hidden": true }, f)));
2489  });
2490  var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
2491  function we(r2, o) {
2492    let n = r2.nextElementSibling;
2493    for (; n; ) {
2494      if (n.matches(o)) return n;
2495      n = n.nextElementSibling;
2496    }
2497  }
2498  function De(r2, o) {
2499    let n = r2.previousElementSibling;
2500    for (; n; ) {
2501      if (n.matches(o)) return n;
2502      n = n.previousElementSibling;
2503    }
2504  }
2505  function pe(r2) {
2506    let o = t.useRef(r2);
2507    return k2(() => {
2508      o.current = r2;
2509    }), o;
2510  }
2511  var k2 = typeof window == "undefined" ? t.useEffect : t.useLayoutEffect;
2512  function L(r2) {
2513    let o = t.useRef();
2514    return o.current === void 0 && (o.current = r2()), o;
2515  }
2516  function P(r2) {
2517    let o = ee(), n = () => r2(o.snapshot());
2518    return t.useSyncExternalStore(o.subscribe, n, n);
2519  }
2520  function ve(r2, o, n, u2 = []) {
2521    let c = t.useRef(), d = K2();
2522    return k2(() => {
2523      var b;
2524      let f = (() => {
2525        var m2;
2526        for (let R of n) {
2527          if (typeof R == "string") return R.trim();
2528          if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
2529        }
2530      })(), p2 = u2.map((m2) => m2.trim());
2531      d.value(r2, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
2532    }), c;
2533  }
2534  var ke = () => {
2535    let [r2, o] = t.useState(), n = L(() => /* @__PURE__ */ new Map());
2536    return k2(() => {
2537      n.current.forEach((u2) => u2()), n.current = /* @__PURE__ */ new Map();
2538    }, [r2]), (u2, c) => {
2539      n.current.set(u2, c), o({});
2540    };
2541  };
2542  function Me(r2) {
2543    let o = r2.type;
2544    return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
2545  }
2546  function B2({ asChild: r2, children: o }, n) {
2547    return r2 && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
2548  }
2549  var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
2550
2551  
vendor: 587 bytes, lines 2551-2567
2551// node_modules/clsx/dist/clsx.mjs
2552  function r(e) {
2553    var t2, f, n = "";
2554    if ("string" == typeof e || "number" == typeof e) n += e;
2555    else if ("object" == typeof e) if (Array.isArray(e)) {
2556      var o = e.length;
2557      for (t2 = 0; t2 < o; t2++) e[t2] && (f = r(e[t2])) && (n && (n += " "), n += f);
2558    } else for (f in e) e[f] && (n && (n += " "), n += f);
2559    return n;
2560  }
2561  function clsx() {
2562    for (var e, t2, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t2 = r(e)) && (n && (n += " "), n += t2);
2563    return n;
2564  }
2565  var clsx_default = clsx;
2566
2567  
2567// packages/commands/build-module/components/command-menu.mjs
2568  var import_data5 = __toESM(require_data(), 1);
2569  var import_element3 = __toESM(require_element(), 1);
2570  var import_i18n = __toESM(require_i18n(), 1);
2571  var import_components = __toESM(require_components(), 1);
2572  var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
2573
2574  
2574// packages/icons/build-module/icon/index.mjs
2575  var import_element = __toESM(require_element(), 1);
2576  var icon_default = (0, import_element.forwardRef)(
2577    ({ icon, size = 24, ...props }, ref) => {
2578      return (0, import_element.cloneElement)(icon, {
2579        width: size,
2580        height: size,
2581        ...props,
2582        ref
2583      });
2584    }
2585  );
2586
2587  
2587// packages/icons/build-module/library/arrow-right.mjs
2588  var import_primitives = __toESM(require_primitives(), 1);
2589  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
2590  var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });
2591
2592  
2592// packages/icons/build-module/library/search.mjs
2593  var import_primitives2 = __toESM(require_primitives(), 1);
2594  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
2595  var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives2.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
2596
2597  
2597// packages/commands/build-module/store/index.mjs
2598  var import_data3 = __toESM(require_data(), 1);
2599
2600  
2600// packages/commands/build-module/store/reducer.mjs
2601  var import_data = __toESM(require_data(), 1);
2602  function commands(state = {}, action) {
2603    switch (action.type) {
2604      case "REGISTER_COMMAND":
2605        return {
2606          ...state,
2607          [action.name]: {
2608            name: action.name,
2609            label: action.label,
2610            searchLabel: action.searchLabel,
2611            context: action.context,
2612            category: action.category,
2613            callback: action.callback,
2614            icon: action.icon,
2615            keywords: action.keywords
2616          }
2617        };
2618      case "UNREGISTER_COMMAND": {
2619        const { [action.name]: _, ...remainingState } = state;
2620        return remainingState;
2621      }
2622    }
2623    return state;
2624  }
2625  function commandLoaders(state = {}, action) {
2626    switch (action.type) {
2627      case "REGISTER_COMMAND_LOADER":
2628        return {
2629          ...state,
2630          [action.name]: {
2631            name: action.name,
2632            context: action.context,
2633            category: action.category,
2634            hook: action.hook
2635          }
2636        };
2637      case "UNREGISTER_COMMAND_LOADER": {
2638        const { [action.name]: _, ...remainingState } = state;
2639        return remainingState;
2640      }
2641    }
2642    return state;
2643  }
2644  function isOpen(state = false, action) {
2645    switch (action.type) {
2646      case "OPEN":
2647        return true;
2648      case "CLOSE":
2649        return false;
2650    }
2651    return state;
2652  }
2653  function context(state = "root", action) {
2654    switch (action.type) {
2655      case "SET_CONTEXT":
2656        return action.context;
2657    }
2658    return state;
2659  }
2660  function loaderStates(state = {}, action) {
2661    switch (action.type) {
2662      case "SET_LOADER_LOADING":
2663        return {
2664          ...state,
2665          [action.name]: action.isLoading
2666        };
2667    }
2668    return state;
2669  }
2670  var reducer = (0, import_data.combineReducers)({
2671    commands,
2672    commandLoaders,
2673    isOpen,
2674    context,
2675    loaderStates
2676  });
2677  var reducer_default = reducer;
2678
2679  
2679// packages/commands/build-module/store/actions.mjs
2680  var actions_exports = {};
2681  __export(actions_exports, {
2682    close: () => close,
2683    open: () => open,
2684    registerCommand: () => registerCommand,
2685    registerCommandLoader: () => registerCommandLoader,
2686    unregisterCommand: () => unregisterCommand,
2687    unregisterCommandLoader: () => unregisterCommandLoader
2688  });
2689  var REGISTERABLE_CATEGORIES = /* @__PURE__ */ new Set([
2690    "command",
2691    "view",
2692    "edit",
2693    "action"
2694  ]);
2695  function registerCommand(config) {
2696    let { category } = config;
2697    if (!category || !REGISTERABLE_CATEGORIES.has(category)) {
2698      category = "action";
2699    }
2700    return {
2701      type: "REGISTER_COMMAND",
2702      ...config,
2703      category
2704    };
2705  }
2706  function unregisterCommand(name) {
2707    return {
2708      type: "UNREGISTER_COMMAND",
2709      name
2710    };
2711  }
2712  function registerCommandLoader(config) {
2713    let { category } = config;
2714    if (!category || !REGISTERABLE_CATEGORIES.has(category)) {
2715      category = "action";
2716    }
2717    return {
2718      type: "REGISTER_COMMAND_LOADER",
2719      ...config,
2720      category
2721    };
2722  }
2723  function unregisterCommandLoader(name) {
2724    return {
2725      type: "UNREGISTER_COMMAND_LOADER",
2726      name
2727    };
2728  }
2729  function open() {
2730    return {
2731      type: "OPEN"
2732    };
2733  }
2734  function close() {
2735    return {
2736      type: "CLOSE"
2737    };
2738  }
2739
2740  
2740// packages/commands/build-module/store/selectors.mjs
2741  var selectors_exports = {};
2742  __export(selectors_exports, {
2743    getCommandLoaders: () => getCommandLoaders,
2744    getCommands: () => getCommands,
2745    getContext: () => getContext,
2746    isOpen: () => isOpen2
2747  });
2748  var import_data2 = __toESM(require_data(), 1);
2749  var getCommands = (0, import_data2.createSelector)(
2750    (state, contextual = false) => Object.values(state.commands).filter((command) => {
2751      const isContextual = command.context && command.context === state.context;
2752      return contextual ? isContextual : !isContextual;
2753    }),
2754    (state) => [state.commands, state.context]
2755  );
2756  var getCommandLoaders = (0, import_data2.createSelector)(
2757    (state, contextual = false) => Object.values(state.commandLoaders).filter((loader) => {
2758      const isContextual = loader.context && loader.context === state.context;
2759      return contextual ? isContextual : !isContextual;
2760    }),
2761    (state) => [state.commandLoaders, state.context]
2762  );
2763  function isOpen2(state) {
2764    return state.isOpen;
2765  }
2766  function getContext(state) {
2767    return state.context;
2768  }
2769
2770  
2770// packages/commands/build-module/store/private-actions.mjs
2771  var private_actions_exports = {};
2772  __export(private_actions_exports, {
2773    setContext: () => setContext,
2774    setLoaderLoading: () => setLoaderLoading
2775  });
2776  function setContext(context2) {
2777    return {
2778      type: "SET_CONTEXT",
2779      context: context2
2780    };
2781  }
2782  function setLoaderLoading(name, isLoading2) {
2783    return {
2784      type: "SET_LOADER_LOADING",
2785      name,
2786      isLoading: isLoading2
2787    };
2788  }
2789
2790  
2790// packages/commands/build-module/store/private-selectors.mjs
2791  var private_selectors_exports = {};
2792  __export(private_selectors_exports, {
2793    isLoading: () => isLoading
2794  });
2795  function isLoading(state) {
2796    return Object.values(state.loaderStates).some(Boolean);
2797  }
2798
2799  
2799// packages/commands/build-module/lock-unlock.mjs
2800  var import_private_apis = __toESM(require_private_apis(), 1);
2801  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
2802    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
2803    "@wordpress/commands"
2804  );
2805
2806  
2806// packages/commands/build-module/store/index.mjs
2807  var STORE_NAME = "core/commands";
2808  var store = (0, import_data3.createReduxStore)(STORE_NAME, {
2809    reducer: reducer_default,
2810    actions: actions_exports,
2811    selectors: selectors_exports
2812  });
2813  (0, import_data3.register)(store);
2814  unlock(store).registerPrivateActions(private_actions_exports);
2815  unlock(store).registerPrivateSelectors(private_selectors_exports);
2816
2817  
2817// packages/commands/build-module/components/use-recent-commands.mjs
2818  var import_data4 = __toESM(require_data(), 1);
2819  var import_preferences = __toESM(require_preferences(), 1);
2820  var import_element2 = __toESM(require_element(), 1);
2821  var MAX_RECENTLY_SAVED = 30;
2822  var MAX_RECENTLY_DISPLAYED = 5;
2823  var EMPTY_ARRAY = [];
2824  var EMPTY_SET = /* @__PURE__ */ new Set();
2825  function recordUsage(name) {
2826    const current = (0, import_data4.select)(import_preferences.store).get(
2827      "core/commands",
2828      "recentlyUsed"
2829    ) ?? [];
2830    const next = [name, ...current.filter((n) => n !== name)].slice(
2831      0,
2832      MAX_RECENTLY_SAVED
2833    );
2834    (0, import_data4.dispatch)(import_preferences.store).set("core/commands", "recentlyUsed", next);
2835  }
2836  function useLoaderCollector(hook, name, filterNames, onResolved) {
2837    const { setLoaderLoading: setLoaderLoading2 } = unlock((0, import_data4.useDispatch)(store));
2838    const { isLoading: loading, commands: commands2 = [] } = hook({ search: "" }) ?? {};
2839    (0, import_element2.useEffect)(() => {
2840      setLoaderLoading2(name, loading);
2841    }, [setLoaderLoading2, name, loading]);
2842    const filtered = filterNames ? commands2.filter((c) => filterNames.has(c.name)) : commands2;
2843    (0, import_element2.useEffect)(() => {
2844      onResolved(name, filtered);
2845    }, [onResolved, name, filtered]);
2846    (0, import_element2.useEffect)(() => {
2847      return () => onResolved(name, []);
2848    }, [onResolved, name]);
2849  }
2850  function useRecentCommands() {
2851    const {
2852      contextualCommands,
2853      staticCommands,
2854      contextualLoaders,
2855      staticLoaders,
2856      recentlyUsedNames = EMPTY_ARRAY
2857    } = (0, import_data4.useSelect)((select) => {
2858      const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store);
2859      return {
2860        contextualCommands: getCommands2(true),
2861        staticCommands: getCommands2(false),
2862        contextualLoaders: getCommandLoaders2(true),
2863        staticLoaders: getCommandLoaders2(false),
2864        recentlyUsedNames: select(import_preferences.store).get(
2865          "core/commands",
2866          "recentlyUsed"
2867        )
2868      };
2869    }, []);
2870    const [resolvedMap, setResolvedMap] = (0, import_element2.useState)(() => /* @__PURE__ */ new Map());
2871    const onResolved = (0, import_element2.useCallback)((loaderName, cmds) => {
2872      setResolvedMap((prev) => {
2873        const prevCmds = prev.get(loaderName);
2874        if (prevCmds && prevCmds.length === cmds.length && prevCmds.every((c, i) => c.name === cmds[i].name)) {
2875          return prev;
2876        }
2877        const next = new Map(prev);
2878        next.set(loaderName, cmds);
2879        return next;
2880      });
2881    }, []);
2882    const { recentNames, recentSet } = (0, import_element2.useMemo)(() => {
2883      const names = recentlyUsedNames.slice(0, MAX_RECENTLY_DISPLAYED);
2884      return { recentNames: names, recentSet: new Set(names) };
2885    }, [recentlyUsedNames]);
2886    if (!recentlyUsedNames.length) {
2887      return {
2888        commands: [],
2889        loaders: [],
2890        recentSet: EMPTY_SET,
2891        onResolved
2892      };
2893    }
2894    const allStaticCommands = [...contextualCommands, ...staticCommands];
2895    const loaders = [...contextualLoaders, ...staticLoaders];
2896    const allByName = /* @__PURE__ */ new Map();
2897    allStaticCommands.forEach((c) => allByName.set(c.name, c));
2898    for (const cmds of resolvedMap.values()) {
2899      cmds.forEach((c) => {
2900        if (!allByName.has(c.name)) {
2901          allByName.set(c.name, c);
2902        }
2903      });
2904    }
2905    const commands2 = recentNames.map((n) => allByName.get(n)).filter(Boolean);
2906    return { commands: commands2, loaders, recentSet, onResolved };
2907  }
2908
2909  
2909// packages/commands/build-module/components/command-menu.mjs
2910  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
2911  var { withIgnoreIMEEvents } = unlock(import_components.privateApis);
2912  var ITEM_ID_PREFIX = "command-palette-item-";
2913  var inputLabel = (0, import_i18n.__)("Search commands and settings");
2914  var CATEGORY_ICONS = {
2915    view: arrow_right_default
2916  };
2917  var CATEGORY_LABELS = {
2918    command: (0, import_i18n.__)("Command"),
2919    view: (0, import_i18n.__)("View"),
2920    edit: (0, import_i18n.__)("Edit"),
2921    action: (0, import_i18n.__)("Action"),
2922    workflow: (0, import_i18n.__)("Workflow")
2923  };
2924  function isValidIcon(icon) {
2925    return !!icon && (typeof icon === "string" || (0, import_element3.isValidElement)(icon) || typeof icon === "function" || icon instanceof import_element3.Component);
2926  }
2927  function CommandItem({ command, search, category, valuePrefix }) {
2928    const { close: close2 } = (0, import_data5.useDispatch)(store);
2929    const commandCategory = category ?? command.category;
2930    const label = command.searchLabel ?? command.label;
2931    const value = valuePrefix ? `${valuePrefix}${command.name}` : label;
2932    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2933      _e.Item,
2934      {
2935        id: `${ITEM_ID_PREFIX}${value.toLowerCase()}`,
2936        value,
2937        keywords: valuePrefix ? [...command.keywords ?? [], label] : command.keywords,
2938        onSelect: () => {
2939          recordUsage(command.name);
2940          command.callback({ close: close2 });
2941        },
2942        children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2943          import_components.__experimentalHStack,
2944          {
2945            alignment: "left",
2946            className: clsx_default("commands-command-menu__item", {
2947              "has-icon": CATEGORY_ICONS[commandCategory] || command.icon
2948            }),
2949            children: [
2950              CATEGORY_ICONS[commandCategory] ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(icon_default, { icon: CATEGORY_ICONS[commandCategory] }) : isValidIcon(command.icon) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(icon_default, { icon: command.icon }),
2951              /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-label", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2952                import_components.TextHighlight,
2953                {
2954                  text: command.label,
2955                  highlight: search
2956                }
2957              ) }),
2958              CATEGORY_LABELS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[commandCategory] })
2959            ]
2960          }
2961        )
2962      },
2963      command.name
2964    );
2965  }
2966  function CommandMenuLoader({ name, search, hook, category, valuePrefix }) {
2967    const { setLoaderLoading: setLoaderLoading2 } = unlock((0, import_data5.useDispatch)(store));
2968    const { isLoading: loading, commands: commands2 = [] } = hook({ search }) ?? {};
2969    (0, import_element3.useEffect)(() => {
2970      setLoaderLoading2(name, loading);
2971    }, [setLoaderLoading2, name, loading]);
2972    if (!commands2.length) {
2973      return null;
2974    }
2975    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2976      CommandItem,
2977      {
2978        command,
2979        search,
2980        category: command.category ?? category,
2981        valuePrefix
2982      },
2983      command.name
2984    )) });
2985  }
2986  function CommandMenuLoaderWrapper({ hook, ...props }) {
2987    const currentLoaderRef = (0, import_element3.useRef)(hook);
2988    const [key, setKey] = (0, import_element3.useState)(0);
2989    (0, import_element3.useEffect)(() => {
2990      if (currentLoaderRef.current !== hook) {
2991        currentLoaderRef.current = hook;
2992        setKey((prevKey) => prevKey + 1);
2993      }
2994    }, [hook]);
2995    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2996      CommandMenuLoader,
2997      {
2998        hook: currentLoaderRef.current,
2999        ...props
3000      },
3001      key
3002    );
3003  }
3004  function CommandList({ search, commands: commands2, loaders, valuePrefix }) {
3005    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
3006      commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3007        CommandItem,
3008        {
3009          command,
3010          search,
3011          valuePrefix
3012        },
3013        command.name
3014      )),
3015      loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3016        CommandMenuLoaderWrapper,
3017        {
3018          name: loader.name,
3019          search,
3020          hook: loader.hook,
3021          category: loader.category,
3022          valuePrefix
3023        },
3024        loader.name
3025      ))
3026    ] });
3027  }
3028  function RecentLoaderRunner({ hook, name, filterNames, onResolved }) {
3029    useLoaderCollector(hook, name, filterNames, onResolved);
3030    return null;
3031  }
3032  function RecentGroup() {
3033    const { commands: commands2, loaders, recentSet, onResolved } = useRecentCommands();
3034    if (!commands2.length && !loaders.length) {
3035      return null;
3036    }
3037    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Recent"), children: [
3038      loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3039        RecentLoaderRunner,
3040        {
3041          name: loader.name,
3042          hook: loader.hook,
3043          filterNames: recentSet,
3044          onResolved
3045        },
3046        loader.name
3047      )),
3048      commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3049        CommandItem,
3050        {
3051          command,
3052          search: "",
3053          valuePrefix: "recent-"
3054        },
3055        command.name
3056      ))
3057    ] });
3058  }
3059  function SuggestionsGroup() {
3060    const { commands: commands2, loaders } = (0, import_data5.useSelect)((select) => {
3061      const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store);
3062      return {
3063        commands: getCommands2(true),
3064        loaders: getCommandLoaders2(true)
3065      };
3066    }, []);
3067    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(_e.Group, { heading: (0, import_i18n.__)("Suggestions"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CommandList, { search: "", commands: commands2, loaders }) });
3068  }
3069  function ResultsGroup({ search }) {
3070    const { commands: commands2, contextualCommands, loaders, contextualLoaders } = (0, import_data5.useSelect)((select) => {
3071      const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store);
3072      return {
3073        commands: getCommands2(false),
3074        contextualCommands: getCommands2(true),
3075        loaders: getCommandLoaders2(false),
3076        contextualLoaders: getCommandLoaders2(true)
3077      };
3078    }, []);
3079    return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Results"), children: [
3080      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3081        CommandList,
3082        {
3083          search,
3084          commands: commands2,
3085          loaders
3086        }
3087      ),
3088      /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3089        CommandList,
3090        {
3091          search,
3092          commands: contextualCommands,
3093          loaders: contextualLoaders
3094        }
3095      )
3096    ] });
3097  }
3098  function CommandInput({ search, setSearch }) {
3099    const commandMenuInput = (0, import_element3.useRef)();
3100    const _value = P((state) => state.value);
3101    const selectedItemId = _value ? `${ITEM_ID_PREFIX}${_value}` : null;
3102    (0, import_element3.useEffect)(() => {
3103      commandMenuInput.current.focus();
3104    }, []);
3105    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3106      _e.Input,
3107      {
3108        ref: commandMenuInput,
3109        value: search,
3110        onValueChange: setSearch,
3111        placeholder: inputLabel,
3112        "aria-activedescendant": selectedItemId
3113      }
3114    );
3115  }
3116  function CommandMenu() {
3117    const { registerShortcut } = (0, import_data5.useDispatch)(import_keyboard_shortcuts.store);
3118    const [search, setSearch] = (0, import_element3.useState)("");
3119    const { isOpen: paletteIsOpen, loadersLoading } = (0, import_data5.useSelect)(
3120      (select) => ({
3121        isOpen: select(store).isOpen(),
3122        loadersLoading: unlock(select(store)).isLoading()
3123      }),
3124      []
3125    );
3126    const { open: open2, close: close2 } = (0, import_data5.useDispatch)(store);
3127    (0, import_element3.useEffect)(() => {
3128      registerShortcut({
3129        name: "core/commands",
3130        category: "global",
3131        description: (0, import_i18n.__)("Open the command palette."),
3132        keyCombination: {
3133          modifier: "primary",
3134          character: "k"
3135        }
3136      });
3137    }, [registerShortcut]);
3138    (0, import_keyboard_shortcuts.useShortcut)(
3139      "core/commands",
3140      /** @type {React.KeyboardEventHandler} */
3141      withIgnoreIMEEvents((event) => {
3142        if (event.defaultPrevented) {
3143          return;
3144        }
3145        event.preventDefault();
3146        if (paletteIsOpen) {
3147          close2();
3148        } else {
3149          open2();
3150        }
3151      }),
3152      {
3153        bindGlobal: true
3154      }
3155    );
3156    const closeAndReset = () => {
3157      setSearch("");
3158      close2();
3159    };
3160    if (!paletteIsOpen) {
3161      return false;
3162    }
3163    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3164      import_components.Modal,
3165      {
3166        className: "commands-command-menu",
3167        overlayClassName: "commands-command-menu__overlay",
3168        onRequestClose: closeAndReset,
3169        __experimentalHideHeader: true,
3170        size: "medium",
3171        contentLabel: (0, import_i18n.__)("Command palette"),
3172        children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "commands-command-menu__container", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e, { label: inputLabel, loop: true, children: [
3173          /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "commands-command-menu__header", children: [
3174            /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3175              icon_default,
3176              {
3177                className: "commands-command-menu__header-search-icon",
3178                icon: search_default
3179              }
3180            ),
3181            /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3182              CommandInput,
3183              {
3184                search,
3185                setSearch
3186              }
3187            )
3188          ] }),
3189          /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.List, { label: (0, import_i18n.__)("Command suggestions"), children: [
3190            search && !loadersLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }),
3191            !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RecentGroup, {}),
3192            !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SuggestionsGroup, {}),
3193            search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ResultsGroup, { search })
3194          ] })
3195        ] }) })
3196      }
3197    );
3198  }
3199
3200  
3200// packages/commands/build-module/hooks/use-command-context.mjs
3201  var import_element4 = __toESM(require_element(), 1);
3202  var import_data6 = __toESM(require_data(), 1);
3203  function useCommandContext(context2) {
3204    const { getContext: getContext2 } = (0, import_data6.useSelect)(store);
3205    const initialContext = (0, import_element4.useRef)(getContext2());
3206    const { setContext: setContext2 } = unlock((0, import_data6.useDispatch)(store));
3207    (0, import_element4.useEffect)(() => {
3208      setContext2(context2);
3209    }, [context2, setContext2]);
3210    (0, import_element4.useEffect)(() => {
3211      const initialContextRef = initialContext.current;
3212      return () => setContext2(initialContextRef);
3213    }, [setContext2]);
3214  }
3215
3216  
3216// packages/commands/build-module/private-apis.mjs
3217  var privateApis = {};
3218  lock(privateApis, {
3219    useCommandContext
3220  });
3221
3222  
3222// packages/commands/build-module/hooks/use-command.mjs
3223  var import_element5 = __toESM(require_element(), 1);
3224  var import_data7 = __toESM(require_data(), 1);
3225  function useCommand(command) {
3226    const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data7.useDispatch)(store);
3227    const currentCallbackRef = (0, import_element5.useRef)(command.callback);
3228    (0, import_element5.useEffect)(() => {
3229      currentCallbackRef.current = command.callback;
3230    }, [command.callback]);
3231    (0, import_element5.useEffect)(() => {
3232      if (command.disabled) {
3233        return;
3234      }
3235      registerCommand2({
3236        name: command.name,
3237        context: command.context,
3238        category: command.category,
3239        label: command.label,
3240        searchLabel: command.searchLabel,
3241        icon: command.icon,
3242        keywords: command.keywords,
3243        callback: (...args) => currentCallbackRef.current(...args)
3244      });
3245      return () => {
3246        unregisterCommand2(command.name);
3247      };
3248    }, [
3249      command.name,
3250      command.label,
3251      command.searchLabel,
3252      command.icon,
3253      command.context,
3254      command.category,
3255      command.keywords,
3256      command.disabled,
3257      registerCommand2,
3258      unregisterCommand2
3259    ]);
3260  }
3261  function useCommands(commands2) {
3262    const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data7.useDispatch)(store);
3263    const currentCallbacksRef = (0, import_element5.useRef)({});
3264    (0, import_element5.useEffect)(() => {
3265      if (!commands2) {
3266        return;
3267      }
3268      commands2.forEach((command) => {
3269        if (command.callback) {
3270          currentCallbacksRef.current[command.name] = command.callback;
3271        }
3272      });
3273    }, [commands2]);
3274    (0, import_element5.useEffect)(() => {
3275      if (!commands2) {
3276        return;
3277      }
3278      commands2.forEach((command) => {
3279        if (command.disabled) {
3280          return;
3281        }
3282        registerCommand2({
3283          name: command.name,
3284          context: command.context,
3285          category: command.category,
3286          label: command.label,
3287          searchLabel: command.searchLabel,
3288          icon: command.icon,
3289          keywords: command.keywords,
3290          callback: (...args) => {
3291            const callback = currentCallbacksRef.current[command.name];
3292            if (callback) {
3293              callback(...args);
3294            }
3295          }
3296        });
3297      });
3298      return () => {
3299        commands2.forEach((command) => {
3300          unregisterCommand2(command.name);
3301        });
3302      };
3303    }, [commands2, registerCommand2, unregisterCommand2]);
3304  }
3305
3306  
3306// packages/commands/build-module/hooks/use-command-loader.mjs
3307  var import_element6 = __toESM(require_element(), 1);
3308  var import_data8 = __toESM(require_data(), 1);
3309  function useCommandLoader(loader) {
3310    const { registerCommandLoader: registerCommandLoader2, unregisterCommandLoader: unregisterCommandLoader2 } = (0, import_data8.useDispatch)(store);
3311    (0, import_element6.useEffect)(() => {
3312      if (loader.disabled) {
3313        return;
3314      }
3315      registerCommandLoader2({
3316        name: loader.name,
3317        hook: loader.hook,
3318        context: loader.context,
3319        category: loader.category
3320      });
3321      return () => {
3322        unregisterCommandLoader2(loader.name);
3323      };
3324    }, [
3325      loader.name,
3326      loader.hook,
3327      loader.context,
3328      loader.category,
3329      loader.disabled,
3330      registerCommandLoader2,
3331      unregisterCommandLoader2
3332    ]);
3333  }
3334  return __toCommonJS(index_exports);
3335})();
3336(window.wp ||= {}).commands = wp.commands;
3337})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.