PluginProbe
Gutenberg / 23.2.1
Gutenberg v23.2.1
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / routes / styles / content.js

content.js in Gutenberg 23.2.1, at build/routes/styles/content.js

1,268 lines 51.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var __create = Object.create;
2 var __defProp = Object.defineProperty;
3 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 var __getOwnPropNames = Object.getOwnPropertyNames;
5 var __getProtoOf = Object.getPrototypeOf;
6 var __hasOwnProp = Object.prototype.hasOwnProperty;
7 var __commonJS = (cb, mod) => function __require() {
8 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9 };
10 var __copyProps = (to, from, except, desc) => {
11 if (from && typeof from === "object" || typeof from === "function") {
12 for (let key of __getOwnPropNames(from))
13 if (!__hasOwnProp.call(to, key) && key !== except)
14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15 }
16 return to;
17 };
18 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19 // If the importer is in node compatibility mode or this is not an ESM
20 // file that has been converted to a CommonJS file using a Babel-
21 // compatible transform (i.e. "__esModule" has not been set), then set
22 // "default" to the CommonJS "module.exports" for node compatibility.
23 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24 mod
25 ));
26
27 // package-external:@wordpress/i18n
28 var require_i18n = __commonJS({
29 "package-external:@wordpress/i18n"(exports, module) {
30 module.exports = window.wp.i18n;
31 }
32 });
33
34 // package-external:@wordpress/element
35 var require_element = __commonJS({
36 "package-external:@wordpress/element"(exports, module) {
37 module.exports = window.wp.element;
38 }
39 });
40
41 // vendor-external:react
42 var require_react = __commonJS({
43 "vendor-external:react"(exports, module) {
44 module.exports = window.React;
45 }
46 });
47
48 // vendor-external:react/jsx-runtime
49 var require_jsx_runtime = __commonJS({
50 "vendor-external:react/jsx-runtime"(exports, module) {
51 module.exports = window.ReactJSXRuntime;
52 }
53 });
54
55 // package-external:@wordpress/primitives
56 var require_primitives = __commonJS({
57 "package-external:@wordpress/primitives"(exports, module) {
58 module.exports = window.wp.primitives;
59 }
60 });
61
62 // package-external:@wordpress/compose
63 var require_compose = __commonJS({
64 "package-external:@wordpress/compose"(exports, module) {
65 module.exports = window.wp.compose;
66 }
67 });
68
69 // package-external:@wordpress/private-apis
70 var require_private_apis = __commonJS({
71 "package-external:@wordpress/private-apis"(exports, module) {
72 module.exports = window.wp.privateApis;
73 }
74 });
75
76 // package-external:@wordpress/components
77 var require_components = __commonJS({
78 "package-external:@wordpress/components"(exports, module) {
79 module.exports = window.wp.components;
80 }
81 });
82
83 // package-external:@wordpress/editor
84 var require_editor = __commonJS({
85 "package-external:@wordpress/editor"(exports, module) {
86 module.exports = window.wp.editor;
87 }
88 });
89
90 // package-external:@wordpress/data
91 var require_data = __commonJS({
92 "package-external:@wordpress/data"(exports, module) {
93 module.exports = window.wp.data;
94 }
95 });
96
97 // package-external:@wordpress/core-data
98 var require_core_data = __commonJS({
99 "package-external:@wordpress/core-data"(exports, module) {
100 module.exports = window.wp.coreData;
101 }
102 });
103
104 // routes/styles/stage.tsx
105 import { useNavigate, useSearch } from "@wordpress/route";
106
107 // node_modules/clsx/dist/clsx.mjs
108 function r(e) {
109 var t, f, n = "";
110 if ("string" == typeof e || "number" == typeof e) n += e;
111 else if ("object" == typeof e) if (Array.isArray(e)) {
112 var o = e.length;
113 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
114 } else for (f in e) e[f] && (n && (n += " "), n += f);
115 return n;
116 }
117 function clsx() {
118 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
119 return n;
120 }
121 var clsx_default = clsx;
122
123 // node_modules/@base-ui/utils/esm/useRefWithInit.js
124 var React2 = __toESM(require_react(), 1);
125 var UNINITIALIZED = {};
126 function useRefWithInit(init, initArg) {
127 const ref = React2.useRef(UNINITIALIZED);
128 if (ref.current === UNINITIALIZED) {
129 ref.current = init(initArg);
130 }
131 return ref;
132 }
133
134 // node_modules/@base-ui/utils/esm/warn.js
135 var set;
136 if (true) {
137 set = /* @__PURE__ */ new Set();
138 }
139 function warn(...messages) {
140 if (true) {
141 const messageKey = messages.join(" ");
142 if (!set.has(messageKey)) {
143 set.add(messageKey);
144 console.warn(`Base UI: ${messageKey}`);
145 }
146 }
147 }
148
149 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
150 var React5 = __toESM(require_react(), 1);
151
152 // node_modules/@base-ui/utils/esm/useMergedRefs.js
153 function useMergedRefs(a, b, c, d) {
154 const forkRef = useRefWithInit(createForkRef).current;
155 if (didChange(forkRef, a, b, c, d)) {
156 update(forkRef, [a, b, c, d]);
157 }
158 return forkRef.callback;
159 }
160 function useMergedRefsN(refs) {
161 const forkRef = useRefWithInit(createForkRef).current;
162 if (didChangeN(forkRef, refs)) {
163 update(forkRef, refs);
164 }
165 return forkRef.callback;
166 }
167 function createForkRef() {
168 return {
169 callback: null,
170 cleanup: null,
171 refs: []
172 };
173 }
174 function didChange(forkRef, a, b, c, d) {
175 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
176 }
177 function didChangeN(forkRef, newRefs) {
178 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
179 }
180 function update(forkRef, refs) {
181 forkRef.refs = refs;
182 if (refs.every((ref) => ref == null)) {
183 forkRef.callback = null;
184 return;
185 }
186 forkRef.callback = (instance) => {
187 if (forkRef.cleanup) {
188 forkRef.cleanup();
189 forkRef.cleanup = null;
190 }
191 if (instance != null) {
192 const cleanupCallbacks = Array(refs.length).fill(null);
193 for (let i = 0; i < refs.length; i += 1) {
194 const ref = refs[i];
195 if (ref == null) {
196 continue;
197 }
198 switch (typeof ref) {
199 case "function": {
200 const refCleanup = ref(instance);
201 if (typeof refCleanup === "function") {
202 cleanupCallbacks[i] = refCleanup;
203 }
204 break;
205 }
206 case "object": {
207 ref.current = instance;
208 break;
209 }
210 default:
211 }
212 }
213 forkRef.cleanup = () => {
214 for (let i = 0; i < refs.length; i += 1) {
215 const ref = refs[i];
216 if (ref == null) {
217 continue;
218 }
219 switch (typeof ref) {
220 case "function": {
221 const cleanupCallback = cleanupCallbacks[i];
222 if (typeof cleanupCallback === "function") {
223 cleanupCallback();
224 } else {
225 ref(null);
226 }
227 break;
228 }
229 case "object": {
230 ref.current = null;
231 break;
232 }
233 default:
234 }
235 }
236 };
237 }
238 };
239 }
240
241 // node_modules/@base-ui/utils/esm/getReactElementRef.js
242 var React4 = __toESM(require_react(), 1);
243
244 // node_modules/@base-ui/utils/esm/reactVersion.js
245 var React3 = __toESM(require_react(), 1);
246 var majorVersion = parseInt(React3.version, 10);
247 function isReactVersionAtLeast(reactVersionToCheck) {
248 return majorVersion >= reactVersionToCheck;
249 }
250
251 // node_modules/@base-ui/utils/esm/getReactElementRef.js
252 function getReactElementRef(element) {
253 if (!/* @__PURE__ */ React4.isValidElement(element)) {
254 return null;
255 }
256 const reactElement = element;
257 const propsWithRef = reactElement.props;
258 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
259 }
260
261 // node_modules/@base-ui/utils/esm/mergeObjects.js
262 function mergeObjects(a, b) {
263 if (a && !b) {
264 return a;
265 }
266 if (!a && b) {
267 return b;
268 }
269 if (a || b) {
270 return {
271 ...a,
272 ...b
273 };
274 }
275 return void 0;
276 }
277
278 // node_modules/@base-ui/utils/esm/empty.js
279 var EMPTY_ARRAY = Object.freeze([]);
280 var EMPTY_OBJECT = Object.freeze({});
281
282 // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
283 function getStateAttributesProps(state, customMapping) {
284 const props = {};
285 for (const key in state) {
286 const value = state[key];
287 if (customMapping?.hasOwnProperty(key)) {
288 const customProps = customMapping[key](value);
289 if (customProps != null) {
290 Object.assign(props, customProps);
291 }
292 continue;
293 }
294 if (value === true) {
295 props[`data-${key.toLowerCase()}`] = "";
296 } else if (value) {
297 props[`data-${key.toLowerCase()}`] = value.toString();
298 }
299 }
300 return props;
301 }
302
303 // node_modules/@base-ui/react/esm/utils/resolveClassName.js
304 function resolveClassName(className, state) {
305 return typeof className === "function" ? className(state) : className;
306 }
307
308 // node_modules/@base-ui/react/esm/utils/resolveStyle.js
309 function resolveStyle(style, state) {
310 return typeof style === "function" ? style(state) : style;
311 }
312
313 // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
314 var EMPTY_PROPS = {};
315 function mergeProps(a, b, c, d, e) {
316 if (!c && !d && !e && !a) {
317 return createInitialMergedProps(b);
318 }
319 let merged = createInitialMergedProps(a);
320 if (b) {
321 merged = mergeInto(merged, b);
322 }
323 if (c) {
324 merged = mergeInto(merged, c);
325 }
326 if (d) {
327 merged = mergeInto(merged, d);
328 }
329 if (e) {
330 merged = mergeInto(merged, e);
331 }
332 return merged;
333 }
334 function mergePropsN(props) {
335 if (props.length === 0) {
336 return EMPTY_PROPS;
337 }
338 if (props.length === 1) {
339 return createInitialMergedProps(props[0]);
340 }
341 let merged = createInitialMergedProps(props[0]);
342 for (let i = 1; i < props.length; i += 1) {
343 merged = mergeInto(merged, props[i]);
344 }
345 return merged;
346 }
347 function createInitialMergedProps(inputProps) {
348 if (isPropsGetter(inputProps)) {
349 return {
350 ...resolvePropsGetter(inputProps, EMPTY_PROPS)
351 };
352 }
353 return copyInitialProps(inputProps);
354 }
355 function mergeInto(merged, inputProps) {
356 if (isPropsGetter(inputProps)) {
357 return resolvePropsGetter(inputProps, merged);
358 }
359 return mutablyMergeInto(merged, inputProps);
360 }
361 function copyInitialProps(inputProps) {
362 const copiedProps = {
363 ...inputProps
364 };
365 for (const propName in copiedProps) {
366 const propValue = copiedProps[propName];
367 if (isEventHandler(propName, propValue)) {
368 copiedProps[propName] = wrapEventHandler(propValue);
369 }
370 }
371 return copiedProps;
372 }
373 function mutablyMergeInto(mergedProps, externalProps) {
374 if (!externalProps) {
375 return mergedProps;
376 }
377 for (const propName in externalProps) {
378 const externalPropValue = externalProps[propName];
379 switch (propName) {
380 case "style": {
381 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
382 break;
383 }
384 case "className": {
385 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
386 break;
387 }
388 default: {
389 if (isEventHandler(propName, externalPropValue)) {
390 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
391 } else {
392 mergedProps[propName] = externalPropValue;
393 }
394 }
395 }
396 }
397 return mergedProps;
398 }
399 function isEventHandler(key, value) {
400 const code0 = key.charCodeAt(0);
401 const code1 = key.charCodeAt(1);
402 const code2 = key.charCodeAt(2);
403 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
404 }
405 function isPropsGetter(inputProps) {
406 return typeof inputProps === "function";
407 }
408 function resolvePropsGetter(inputProps, previousProps) {
409 if (isPropsGetter(inputProps)) {
410 return inputProps(previousProps);
411 }
412 return inputProps ?? EMPTY_PROPS;
413 }
414 function mergeEventHandlers(ourHandler, theirHandler) {
415 if (!theirHandler) {
416 return ourHandler;
417 }
418 if (!ourHandler) {
419 return wrapEventHandler(theirHandler);
420 }
421 return (...args) => {
422 const event = args[0];
423 if (isSyntheticEvent(event)) {
424 const baseUIEvent = event;
425 makeEventPreventable(baseUIEvent);
426 const result2 = theirHandler(...args);
427 if (!baseUIEvent.baseUIHandlerPrevented) {
428 ourHandler?.(...args);
429 }
430 return result2;
431 }
432 const result = theirHandler(...args);
433 ourHandler?.(...args);
434 return result;
435 };
436 }
437 function wrapEventHandler(handler) {
438 if (!handler) {
439 return handler;
440 }
441 return (...args) => {
442 const event = args[0];
443 if (isSyntheticEvent(event)) {
444 makeEventPreventable(event);
445 }
446 return handler(...args);
447 };
448 }
449 function makeEventPreventable(event) {
450 event.preventBaseUIHandler = () => {
451 event.baseUIHandlerPrevented = true;
452 };
453 return event;
454 }
455 function mergeClassNames(ourClassName, theirClassName) {
456 if (theirClassName) {
457 if (ourClassName) {
458 return theirClassName + " " + ourClassName;
459 }
460 return theirClassName;
461 }
462 return ourClassName;
463 }
464 function isSyntheticEvent(event) {
465 return event != null && typeof event === "object" && "nativeEvent" in event;
466 }
467
468 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
469 var import_react = __toESM(require_react(), 1);
470 function useRenderElement(element, componentProps, params = {}) {
471 const renderProp = componentProps.render;
472 const outProps = useRenderElementProps(componentProps, params);
473 if (params.enabled === false) {
474 return null;
475 }
476 const state = params.state ?? EMPTY_OBJECT;
477 return evaluateRenderProp(element, renderProp, outProps, state);
478 }
479 function useRenderElementProps(componentProps, params = {}) {
480 const {
481 className: classNameProp,
482 style: styleProp,
483 render: renderProp
484 } = componentProps;
485 const {
486 state = EMPTY_OBJECT,
487 ref,
488 props,
489 stateAttributesMapping,
490 enabled = true
491 } = params;
492 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
493 const style = enabled ? resolveStyle(styleProp, state) : void 0;
494 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
495 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
496 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
497 if (typeof document !== "undefined") {
498 if (!enabled) {
499 useMergedRefs(null, null);
500 } else if (Array.isArray(ref)) {
501 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
502 } else {
503 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
504 }
505 }
506 if (!enabled) {
507 return EMPTY_OBJECT;
508 }
509 if (className !== void 0) {
510 outProps.className = mergeClassNames(outProps.className, className);
511 }
512 if (style !== void 0) {
513 outProps.style = mergeObjects(outProps.style, style);
514 }
515 return outProps;
516 }
517 function resolveRenderFunctionProps(props) {
518 if (Array.isArray(props)) {
519 return mergePropsN(props);
520 }
521 return mergeProps(void 0, props);
522 }
523 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
524 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
525 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
526 function evaluateRenderProp(element, render, props, state) {
527 if (render) {
528 if (typeof render === "function") {
529 if (true) {
530 warnIfRenderPropLooksLikeComponent(render);
531 }
532 return render(props, state);
533 }
534 const mergedProps = mergeProps(props, render.props);
535 mergedProps.ref = props.ref;
536 let newElement = render;
537 if (newElement?.$$typeof === REACT_LAZY_TYPE) {
538 const children = React5.Children.toArray(render);
539 newElement = children[0];
540 }
541 if (true) {
542 if (!/* @__PURE__ */ React5.isValidElement(newElement)) {
543 throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
544 }
545 }
546 return /* @__PURE__ */ React5.cloneElement(newElement, mergedProps);
547 }
548 if (element) {
549 if (typeof element === "string") {
550 return renderTag(element, props);
551 }
552 }
553 throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
554 }
555 function warnIfRenderPropLooksLikeComponent(renderFn) {
556 const functionName = renderFn.name;
557 if (functionName.length === 0) {
558 return;
559 }
560 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
561 return;
562 }
563 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
564 return;
565 }
566 warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
567 }
568 function renderTag(Tag, props) {
569 if (Tag === "button") {
570 return /* @__PURE__ */ (0, import_react.createElement)("button", {
571 type: "button",
572 ...props,
573 key: props.key
574 });
575 }
576 if (Tag === "img") {
577 return /* @__PURE__ */ (0, import_react.createElement)("img", {
578 alt: "",
579 ...props,
580 key: props.key
581 });
582 }
583 return /* @__PURE__ */ React5.createElement(Tag, props);
584 }
585
586 // node_modules/@base-ui/react/esm/use-render/useRender.js
587 function useRender(params) {
588 return useRenderElement(params.defaultTagName ?? "div", params, params);
589 }
590
591 // packages/ui/build-module/text/text.mjs
592 var import_element = __toESM(require_element(), 1);
593 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
594 function getRuntime() {
595 const globalScope = globalThis;
596 if (globalScope.__wpStyleRuntime) {
597 return globalScope.__wpStyleRuntime;
598 }
599 globalScope.__wpStyleRuntime = {
600 documents: /* @__PURE__ */ new Map(),
601 styles: /* @__PURE__ */ new Map(),
602 injectedStyles: /* @__PURE__ */ new WeakMap()
603 };
604 if (typeof document !== "undefined") {
605 registerDocument(document);
606 }
607 return globalScope.__wpStyleRuntime;
608 }
609 function documentContainsStyleHash(targetDocument, hash) {
610 if (!targetDocument.head) {
611 return false;
612 }
613 for (const style of targetDocument.head.querySelectorAll(
614 `style[${STYLE_HASH_ATTRIBUTE}]`
615 )) {
616 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
617 return true;
618 }
619 }
620 return false;
621 }
622 function injectStyle(targetDocument, hash, css) {
623 if (!targetDocument.head) {
624 return;
625 }
626 const runtime = getRuntime();
627 let injectedStyles = runtime.injectedStyles.get(targetDocument);
628 if (!injectedStyles) {
629 injectedStyles = /* @__PURE__ */ new Set();
630 runtime.injectedStyles.set(targetDocument, injectedStyles);
631 }
632 if (injectedStyles.has(hash)) {
633 return;
634 }
635 if (documentContainsStyleHash(targetDocument, hash)) {
636 injectedStyles.add(hash);
637 return;
638 }
639 const style = targetDocument.createElement("style");
640 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
641 style.appendChild(targetDocument.createTextNode(css));
642 targetDocument.head.appendChild(style);
643 injectedStyles.add(hash);
644 }
645 function registerDocument(targetDocument) {
646 const runtime = getRuntime();
647 runtime.documents.set(
648 targetDocument,
649 (runtime.documents.get(targetDocument) ?? 0) + 1
650 );
651 for (const [hash, css] of runtime.styles) {
652 injectStyle(targetDocument, hash, css);
653 }
654 return () => {
655 const count = runtime.documents.get(targetDocument);
656 if (count === void 0) {
657 return;
658 }
659 if (count <= 1) {
660 runtime.documents.delete(targetDocument);
661 return;
662 }
663 runtime.documents.set(targetDocument, count - 1);
664 };
665 }
666 function registerStyle(hash, css) {
667 const runtime = getRuntime();
668 runtime.styles.set(hash, css);
669 for (const targetDocument of runtime.documents.keys()) {
670 injectStyle(targetDocument, hash, css);
671 }
672 }
673 if (typeof process === "undefined" || true) {
674 registerStyle("0c8601dd83", '@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}');
675 }
676 var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
677 if (typeof process === "undefined" || true) {
678 registerStyle("1fb29d3a3c", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}");
679 }
680 var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
681 var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
682 const element = useRender({
683 render,
684 defaultTagName: "span",
685 ref,
686 props: mergeProps(props, {
687 className: clsx_default(
688 style_default.text,
689 global_css_defense_default.heading,
690 global_css_defense_default.p,
691 style_default[variant],
692 className
693 )
694 })
695 });
696 return element;
697 });
698
699 // packages/icons/build-module/library/seen.mjs
700 var import_primitives = __toESM(require_primitives(), 1);
701 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
702 var seen_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" }) });
703
704 // packages/ui/build-module/stack/stack.mjs
705 var import_element2 = __toESM(require_element(), 1);
706 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
707 function getRuntime2() {
708 const globalScope = globalThis;
709 if (globalScope.__wpStyleRuntime) {
710 return globalScope.__wpStyleRuntime;
711 }
712 globalScope.__wpStyleRuntime = {
713 documents: /* @__PURE__ */ new Map(),
714 styles: /* @__PURE__ */ new Map(),
715 injectedStyles: /* @__PURE__ */ new WeakMap()
716 };
717 if (typeof document !== "undefined") {
718 registerDocument2(document);
719 }
720 return globalScope.__wpStyleRuntime;
721 }
722 function documentContainsStyleHash2(targetDocument, hash) {
723 if (!targetDocument.head) {
724 return false;
725 }
726 for (const style of targetDocument.head.querySelectorAll(
727 `style[${STYLE_HASH_ATTRIBUTE2}]`
728 )) {
729 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
730 return true;
731 }
732 }
733 return false;
734 }
735 function injectStyle2(targetDocument, hash, css) {
736 if (!targetDocument.head) {
737 return;
738 }
739 const runtime = getRuntime2();
740 let injectedStyles = runtime.injectedStyles.get(targetDocument);
741 if (!injectedStyles) {
742 injectedStyles = /* @__PURE__ */ new Set();
743 runtime.injectedStyles.set(targetDocument, injectedStyles);
744 }
745 if (injectedStyles.has(hash)) {
746 return;
747 }
748 if (documentContainsStyleHash2(targetDocument, hash)) {
749 injectedStyles.add(hash);
750 return;
751 }
752 const style = targetDocument.createElement("style");
753 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
754 style.appendChild(targetDocument.createTextNode(css));
755 targetDocument.head.appendChild(style);
756 injectedStyles.add(hash);
757 }
758 function registerDocument2(targetDocument) {
759 const runtime = getRuntime2();
760 runtime.documents.set(
761 targetDocument,
762 (runtime.documents.get(targetDocument) ?? 0) + 1
763 );
764 for (const [hash, css] of runtime.styles) {
765 injectStyle2(targetDocument, hash, css);
766 }
767 return () => {
768 const count = runtime.documents.get(targetDocument);
769 if (count === void 0) {
770 return;
771 }
772 if (count <= 1) {
773 runtime.documents.delete(targetDocument);
774 return;
775 }
776 runtime.documents.set(targetDocument, count - 1);
777 };
778 }
779 function registerStyle2(hash, css) {
780 const runtime = getRuntime2();
781 runtime.styles.set(hash, css);
782 for (const targetDocument of runtime.documents.keys()) {
783 injectStyle2(targetDocument, hash, css);
784 }
785 }
786 if (typeof process === "undefined" || true) {
787 registerStyle2("b51ff41489", "@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}");
788 }
789 var style_default2 = { "stack": "_19ce0419607e1896__stack" };
790 var gapTokens = {
791 xs: "var(--wpds-dimension-gap-xs, 4px)",
792 sm: "var(--wpds-dimension-gap-sm, 8px)",
793 md: "var(--wpds-dimension-gap-md, 12px)",
794 lg: "var(--wpds-dimension-gap-lg, 16px)",
795 xl: "var(--wpds-dimension-gap-xl, 24px)",
796 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
797 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
798 };
799 var Stack = (0, import_element2.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
800 const style = {
801 gap: gap && gapTokens[gap],
802 alignItems: align,
803 justifyContent: justify,
804 flexDirection: direction,
805 flexWrap: wrap
806 };
807 const element = useRender({
808 render,
809 ref,
810 props: mergeProps(props, { style, className: style_default2.stack })
811 });
812 return element;
813 });
814
815 // packages/admin-ui/build-module/navigable-region/index.mjs
816 var import_element3 = __toESM(require_element(), 1);
817 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
818 var NavigableRegion = (0, import_element3.forwardRef)(
819 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
820 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
821 Tag,
822 {
823 ref,
824 className: clsx_default("admin-ui-navigable-region", className),
825 "aria-label": ariaLabel,
826 role: "region",
827 tabIndex: "-1",
828 ...props,
829 children
830 }
831 );
832 }
833 );
834 NavigableRegion.displayName = "NavigableRegion";
835 var navigable_region_default = NavigableRegion;
836
837 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
838 var import_components = __toESM(require_components(), 1);
839 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
840
841 // packages/admin-ui/build-module/page/header.mjs
842 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
843 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
844 function getRuntime3() {
845 const globalScope = globalThis;
846 if (globalScope.__wpStyleRuntime) {
847 return globalScope.__wpStyleRuntime;
848 }
849 globalScope.__wpStyleRuntime = {
850 documents: /* @__PURE__ */ new Map(),
851 styles: /* @__PURE__ */ new Map(),
852 injectedStyles: /* @__PURE__ */ new WeakMap()
853 };
854 if (typeof document !== "undefined") {
855 registerDocument3(document);
856 }
857 return globalScope.__wpStyleRuntime;
858 }
859 function documentContainsStyleHash3(targetDocument, hash) {
860 if (!targetDocument.head) {
861 return false;
862 }
863 for (const style of targetDocument.head.querySelectorAll(
864 `style[${STYLE_HASH_ATTRIBUTE3}]`
865 )) {
866 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
867 return true;
868 }
869 }
870 return false;
871 }
872 function injectStyle3(targetDocument, hash, css) {
873 if (!targetDocument.head) {
874 return;
875 }
876 const runtime = getRuntime3();
877 let injectedStyles = runtime.injectedStyles.get(targetDocument);
878 if (!injectedStyles) {
879 injectedStyles = /* @__PURE__ */ new Set();
880 runtime.injectedStyles.set(targetDocument, injectedStyles);
881 }
882 if (injectedStyles.has(hash)) {
883 return;
884 }
885 if (documentContainsStyleHash3(targetDocument, hash)) {
886 injectedStyles.add(hash);
887 return;
888 }
889 const style = targetDocument.createElement("style");
890 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
891 style.appendChild(targetDocument.createTextNode(css));
892 targetDocument.head.appendChild(style);
893 injectedStyles.add(hash);
894 }
895 function registerDocument3(targetDocument) {
896 const runtime = getRuntime3();
897 runtime.documents.set(
898 targetDocument,
899 (runtime.documents.get(targetDocument) ?? 0) + 1
900 );
901 for (const [hash, css] of runtime.styles) {
902 injectStyle3(targetDocument, hash, css);
903 }
904 return () => {
905 const count = runtime.documents.get(targetDocument);
906 if (count === void 0) {
907 return;
908 }
909 if (count <= 1) {
910 runtime.documents.delete(targetDocument);
911 return;
912 }
913 runtime.documents.set(targetDocument, count - 1);
914 };
915 }
916 function registerStyle3(hash, css) {
917 const runtime = getRuntime3();
918 runtime.styles.set(hash, css);
919 for (const targetDocument of runtime.documents.keys()) {
920 injectStyle3(targetDocument, hash, css);
921 }
922 }
923 if (typeof process === "undefined" || true) {
924 registerStyle3("aa9c241ccc", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
925 }
926 var style_default3 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
927 function Header({
928 headingLevel = 1,
929 breadcrumbs,
930 badges,
931 visual,
932 title,
933 subTitle,
934 actions,
935 showSidebarToggle = true
936 }) {
937 const HeadingTag = `h${headingLevel}`;
938 return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Stack, { direction: "column", className: style_default3.header, children: [
939 /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
940 Stack,
941 {
942 className: style_default3["header-content"],
943 direction: "row",
944 gap: "sm",
945 justify: "space-between",
946 children: [
947 /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
948 showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
949 SidebarToggleSlot,
950 {
951 bubblesVirtually: true,
952 className: style_default3["sidebar-toggle-slot"]
953 }
954 ),
955 visual && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
956 "div",
957 {
958 className: style_default3["header-visual"],
959 "aria-hidden": "true",
960 children: visual
961 }
962 ),
963 title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
964 Text,
965 {
966 className: style_default3["header-title"],
967 render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(HeadingTag, {}),
968 variant: "heading-lg",
969 children: title
970 }
971 ),
972 breadcrumbs,
973 badges
974 ] }),
975 actions && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
976 Stack,
977 {
978 align: "center",
979 className: style_default3["header-actions"],
980 direction: "row",
981 gap: "sm",
982 children: actions
983 }
984 )
985 ]
986 }
987 ),
988 subTitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
989 Text,
990 {
991 render: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", {}),
992 variant: "body-md",
993 className: style_default3["header-subtitle"],
994 children: subTitle
995 }
996 )
997 ] });
998 }
999
1000 // packages/admin-ui/build-module/page/index.mjs
1001 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
1002 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
1003 function getRuntime4() {
1004 const globalScope = globalThis;
1005 if (globalScope.__wpStyleRuntime) {
1006 return globalScope.__wpStyleRuntime;
1007 }
1008 globalScope.__wpStyleRuntime = {
1009 documents: /* @__PURE__ */ new Map(),
1010 styles: /* @__PURE__ */ new Map(),
1011 injectedStyles: /* @__PURE__ */ new WeakMap()
1012 };
1013 if (typeof document !== "undefined") {
1014 registerDocument4(document);
1015 }
1016 return globalScope.__wpStyleRuntime;
1017 }
1018 function documentContainsStyleHash4(targetDocument, hash) {
1019 if (!targetDocument.head) {
1020 return false;
1021 }
1022 for (const style of targetDocument.head.querySelectorAll(
1023 `style[${STYLE_HASH_ATTRIBUTE4}]`
1024 )) {
1025 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
1026 return true;
1027 }
1028 }
1029 return false;
1030 }
1031 function injectStyle4(targetDocument, hash, css) {
1032 if (!targetDocument.head) {
1033 return;
1034 }
1035 const runtime = getRuntime4();
1036 let injectedStyles = runtime.injectedStyles.get(targetDocument);
1037 if (!injectedStyles) {
1038 injectedStyles = /* @__PURE__ */ new Set();
1039 runtime.injectedStyles.set(targetDocument, injectedStyles);
1040 }
1041 if (injectedStyles.has(hash)) {
1042 return;
1043 }
1044 if (documentContainsStyleHash4(targetDocument, hash)) {
1045 injectedStyles.add(hash);
1046 return;
1047 }
1048 const style = targetDocument.createElement("style");
1049 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
1050 style.appendChild(targetDocument.createTextNode(css));
1051 targetDocument.head.appendChild(style);
1052 injectedStyles.add(hash);
1053 }
1054 function registerDocument4(targetDocument) {
1055 const runtime = getRuntime4();
1056 runtime.documents.set(
1057 targetDocument,
1058 (runtime.documents.get(targetDocument) ?? 0) + 1
1059 );
1060 for (const [hash, css] of runtime.styles) {
1061 injectStyle4(targetDocument, hash, css);
1062 }
1063 return () => {
1064 const count = runtime.documents.get(targetDocument);
1065 if (count === void 0) {
1066 return;
1067 }
1068 if (count <= 1) {
1069 runtime.documents.delete(targetDocument);
1070 return;
1071 }
1072 runtime.documents.set(targetDocument, count - 1);
1073 };
1074 }
1075 function registerStyle4(hash, css) {
1076 const runtime = getRuntime4();
1077 runtime.styles.set(hash, css);
1078 for (const targetDocument of runtime.documents.keys()) {
1079 injectStyle4(targetDocument, hash, css);
1080 }
1081 }
1082 if (typeof process === "undefined" || true) {
1083 registerStyle4("aa9c241ccc", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
1084 }
1085 var style_default4 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
1086 function Page({
1087 headingLevel,
1088 breadcrumbs,
1089 badges,
1090 visual,
1091 title,
1092 subTitle,
1093 children,
1094 className,
1095 actions,
1096 ariaLabel,
1097 hasPadding = false,
1098 showSidebarToggle = true
1099 }) {
1100 const classes = clsx_default(style_default4.page, className);
1101 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
1102 return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
1103 (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1104 Header,
1105 {
1106 headingLevel,
1107 breadcrumbs,
1108 badges,
1109 visual,
1110 title,
1111 subTitle,
1112 actions,
1113 showSidebarToggle
1114 }
1115 ),
1116 hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1117 "div",
1118 {
1119 className: clsx_default(
1120 style_default4.content,
1121 style_default4["has-padding"]
1122 ),
1123 children
1124 }
1125 ) : children
1126 ] });
1127 }
1128 Page.SidebarToggleFill = SidebarToggleFill;
1129 var page_default = Page;
1130
1131 // routes/styles/stage.tsx
1132 var import_i18n = __toESM(require_i18n());
1133 var import_editor = __toESM(require_editor());
1134 var import_compose = __toESM(require_compose());
1135 var import_data = __toESM(require_data());
1136 var import_core_data = __toESM(require_core_data());
1137 var import_components2 = __toESM(require_components());
1138 var import_element4 = __toESM(require_element());
1139 import { useEditorSettings } from "@wordpress/lazy-editor";
1140
1141 // routes/styles/style.scss
1142 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='486e4a323c']")) {
1143 const style = document.createElement("style");
1144 style.setAttribute("data-wp-hash", "486e4a323c");
1145 style.appendChild(document.createTextNode(".routes-styles__page .global-styles-ui-screen-root{box-shadow:none}.routes-styles__page .global-styles-ui-screen-root>div>hr{display:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider .components-tools-panel{border-top:none}.routes-styles__page .global-styles-ui-sidebar__navigator-provider{overflow-y:auto;padding-left:0;padding-right:0}"));
1146 document.head.appendChild(style);
1147 }
1148
1149 // routes/lock-unlock.ts
1150 var import_private_apis = __toESM(require_private_apis());
1151 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
1152 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
1153 "@wordpress/routes"
1154 );
1155
1156 // routes/styles/stage.tsx
1157 var { GlobalStylesUIWrapper, GlobalStylesActionMenu } = unlock(import_editor.privateApis);
1158 function Stage() {
1159 const navigate = useNavigate();
1160 const search = useSearch({ strict: false });
1161 const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
1162 const globalStylesId = (0, import_data.useSelect)(
1163 (select) => select(import_core_data.store).__experimentalGetCurrentGlobalStylesId(),
1164 []
1165 );
1166 const { editorSettings } = useEditorSettings({
1167 stylesId: globalStylesId
1168 });
1169 const section = search.section ?? "/";
1170 const [isStyleBookOpened, setIsStyleBookOpened] = (0, import_element4.useState)(
1171 search.preview === "stylebook"
1172 );
1173 const onChangeSection = (updatedSection) => {
1174 navigate({
1175 search: {
1176 ...search,
1177 section: updatedSection
1178 }
1179 });
1180 };
1181 return /* @__PURE__ */ React.createElement(
1182 page_default,
1183 {
1184 headingLevel: 2,
1185 actions: !isMobileViewport ? /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, null, /* @__PURE__ */ React.createElement(
1186 import_components2.Button,
1187 {
1188 size: "compact",
1189 isPressed: isStyleBookOpened,
1190 icon: seen_default,
1191 label: (0, import_i18n.__)("Style Book"),
1192 onClick: () => {
1193 const newIsStyleBookOpened = !isStyleBookOpened;
1194 setIsStyleBookOpened(newIsStyleBookOpened);
1195 navigate({
1196 search: newIsStyleBookOpened ? { ...search, preview: "stylebook" } : (() => {
1197 const {
1198 preview,
1199 ...restSearch
1200 } = search;
1201 return restSearch;
1202 })()
1203 });
1204 }
1205 }
1206 ), /* @__PURE__ */ React.createElement(
1207 GlobalStylesActionMenu,
1208 {
1209 hideWelcomeGuide: true,
1210 onChangePath: onChangeSection
1211 }
1212 )) : null,
1213 className: "routes-styles__page",
1214 title: (0, import_i18n.__)("Styles")
1215 },
1216 /* @__PURE__ */ React.createElement(
1217 GlobalStylesUIWrapper,
1218 {
1219 path: section,
1220 onPathChange: onChangeSection,
1221 settings: editorSettings
1222 }
1223 )
1224 );
1225 }
1226 var stage = Stage;
1227
1228 // routes/styles/canvas.tsx
1229 var import_editor2 = __toESM(require_editor());
1230 var import_components3 = __toESM(require_components());
1231 import { useNavigate as useNavigate2, useSearch as useSearch2 } from "@wordpress/route";
1232 import { useEditorAssets } from "@wordpress/lazy-editor";
1233 var { StyleBookPreview } = unlock(import_editor2.privateApis);
1234 function Canvas() {
1235 const { isReady: assetsReady } = useEditorAssets();
1236 const navigate = useNavigate2();
1237 const search = useSearch2({ strict: false });
1238 const section = search.section ?? "/";
1239 const onChangeSection = (updatedSection) => {
1240 navigate({
1241 search: {
1242 ...search,
1243 section: updatedSection
1244 }
1245 });
1246 };
1247 if (!assetsReady) {
1248 return /* @__PURE__ */ React.createElement(
1249 "div",
1250 {
1251 style: {
1252 display: "flex",
1253 justifyContent: "center",
1254 alignItems: "center",
1255 height: "100%"
1256 }
1257 },
1258 /* @__PURE__ */ React.createElement(import_components3.Spinner, null)
1259 );
1260 }
1261 return /* @__PURE__ */ React.createElement(StyleBookPreview, { path: section, onPathChange: onChangeSection });
1262 }
1263 var canvas = Canvas;
1264 export {
1265 canvas,
1266 stage
1267 };
1268