| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
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/html-entities 28 var require_html_entities = __commonJS({ 29 "package-external:@wordpress/html-entities"(exports, module) { 30 module.exports = window.wp.htmlEntities; 31 } 32 }); 33 34 // package-external:@wordpress/i18n 35 var require_i18n = __commonJS({ 36 "package-external:@wordpress/i18n"(exports, module) { 37 module.exports = window.wp.i18n; 38 } 39 }); 40 41 // package-external:@wordpress/data 42 var require_data = __commonJS({ 43 "package-external:@wordpress/data"(exports, module) { 44 module.exports = window.wp.data; 45 } 46 }); 47 48 // package-external:@wordpress/core-data 49 var require_core_data = __commonJS({ 50 "package-external:@wordpress/core-data"(exports, module) { 51 module.exports = window.wp.coreData; 52 } 53 }); 54 55 // vendor-external:react 56 var require_react = __commonJS({ 57 "vendor-external:react"(exports, module) { 58 module.exports = window.React; 59 } 60 }); 61 62 // vendor-external:react/jsx-runtime 63 var require_jsx_runtime = __commonJS({ 64 "vendor-external:react/jsx-runtime"(exports, module) { 65 module.exports = window.ReactJSXRuntime; 66 } 67 }); 68 69 // package-external:@wordpress/element 70 var require_element = __commonJS({ 71 "package-external:@wordpress/element"(exports, module) { 72 module.exports = window.wp.element; 73 } 74 }); 75 76 // packages/core-fields/build-module/shared/title/get-item-title.mjs 77 var import_html_entities = __toESM(require_html_entities(), 1); 78 var import_i18n = __toESM(require_i18n(), 1); 79 function getItemTitle(item, fallback = (0, import_i18n.__)("(no title)")) { 80 let title = ""; 81 if (typeof item.title === "string") { 82 title = (0, import_html_entities.decodeEntities)(item.title); 83 } else if (item.title && "rendered" in item.title) { 84 title = (0, import_html_entities.decodeEntities)(item.title.rendered ?? ""); 85 } else if (item.title && "raw" in item.title) { 86 title = (0, import_html_entities.decodeEntities)(item.title.raw ?? ""); 87 } 88 return title || fallback; 89 } 90 91 // packages/core-fields/build-module/page/title/view.mjs 92 var import_i18n3 = __toESM(require_i18n(), 1); 93 var import_data = __toESM(require_data(), 1); 94 var import_core_data = __toESM(require_core_data(), 1); 95 96 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 97 var React4 = __toESM(require_react(), 1); 98 99 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useRefWithInit.mjs 100 var React = __toESM(require_react(), 1); 101 var UNINITIALIZED = {}; 102 function useRefWithInit(init, initArg) { 103 const ref = React.useRef(UNINITIALIZED); 104 if (ref.current === UNINITIALIZED) { 105 ref.current = init(initArg); 106 } 107 return ref; 108 } 109 110 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useMergedRefs.mjs 111 function useMergedRefs(a, b, c, d) { 112 const forkRef = useRefWithInit(createForkRef).current; 113 if (didChange(forkRef, a, b, c, d)) { 114 update(forkRef, [a, b, c, d]); 115 } 116 return forkRef.callback; 117 } 118 function useMergedRefsN(refs) { 119 const forkRef = useRefWithInit(createForkRef).current; 120 if (didChangeN(forkRef, refs)) { 121 update(forkRef, refs); 122 } 123 return forkRef.callback; 124 } 125 function createForkRef() { 126 return { 127 callback: null, 128 cleanup: null, 129 refs: [] 130 }; 131 } 132 function didChange(forkRef, a, b, c, d) { 133 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; 134 } 135 function didChangeN(forkRef, newRefs) { 136 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); 137 } 138 function update(forkRef, refs) { 139 forkRef.refs = refs; 140 if (refs.every((ref) => ref == null)) { 141 forkRef.callback = null; 142 return; 143 } 144 forkRef.callback = (instance) => { 145 if (forkRef.cleanup) { 146 forkRef.cleanup(); 147 forkRef.cleanup = null; 148 } 149 if (instance != null) { 150 const cleanupCallbacks = Array(refs.length).fill(null); 151 for (let i = 0; i < refs.length; i += 1) { 152 const ref = refs[i]; 153 if (ref == null) { 154 continue; 155 } 156 switch (typeof ref) { 157 case "function": { 158 const refCleanup = ref(instance); 159 if (typeof refCleanup === "function") { 160 cleanupCallbacks[i] = refCleanup; 161 } 162 break; 163 } 164 case "object": { 165 ref.current = instance; 166 break; 167 } 168 default: 169 } 170 } 171 forkRef.cleanup = () => { 172 for (let i = 0; i < refs.length; i += 1) { 173 const ref = refs[i]; 174 if (ref == null) { 175 continue; 176 } 177 switch (typeof ref) { 178 case "function": { 179 const cleanupCallback = cleanupCallbacks[i]; 180 if (typeof cleanupCallback === "function") { 181 cleanupCallback(); 182 } else { 183 void ref(null); 184 } 185 break; 186 } 187 case "object": { 188 ref.current = null; 189 break; 190 } 191 default: 192 } 193 } 194 }; 195 } 196 }; 197 } 198 199 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 200 var React3 = __toESM(require_react(), 1); 201 202 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/reactVersion.mjs 203 var React2 = __toESM(require_react(), 1); 204 var majorVersion = parseInt(React2.version, 10); 205 function isReactVersionAtLeast(reactVersionToCheck) { 206 return majorVersion >= reactVersionToCheck; 207 } 208 209 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 210 function getReactElementRef(element) { 211 if (!/* @__PURE__ */ React3.isValidElement(element)) { 212 return null; 213 } 214 const reactElement = element; 215 const propsWithRef = reactElement.props; 216 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; 217 } 218 219 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeObjects.mjs 220 function mergeObjects(a, b) { 221 if (a && !b) { 222 return a; 223 } 224 if (!a && b) { 225 return b; 226 } 227 if (a || b) { 228 return { 229 ...a, 230 ...b 231 }; 232 } 233 return void 0; 234 } 235 236 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/createLogOnce.mjs 237 var loggedMessages; 238 if (true) { 239 loggedMessages = /* @__PURE__ */ new Set(); 240 } 241 function createLogOnce(severity, prefix) { 242 return function logOnce(...messages) { 243 if (true) { 244 const message = messages.join(" "); 245 const output = prefix ? `$prefix}: $message}` : message; 246 const key = `$severity}:$output}`; 247 if (!loggedMessages.has(key)) { 248 loggedMessages.add(key); 249 if (severity === "warn") { 250 console.warn(output); 251 } else { 252 console.error(output); 253 } 254 } 255 } 256 }; 257 } 258 259 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/warn.mjs 260 var warn = createLogOnce("warn", "Base UI"); 261 262 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/empty.mjs 263 var EMPTY_ARRAY = Object.freeze([]); 264 var EMPTY_OBJECT = Object.freeze({}); 265 266 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs 267 function getStateAttributesProps(state, customMapping) { 268 const props = {}; 269 for (const key in state) { 270 const value = state[key]; 271 if (customMapping?.hasOwnProperty(key)) { 272 const customProps = customMapping[key](value); 273 if (customProps != null) { 274 Object.assign(props, customProps); 275 } 276 continue; 277 } 278 if (value === true) { 279 props[`data-$key.toLowerCase()}`] = ""; 280 } else if (value) { 281 props[`data-$key.toLowerCase()}`] = value.toString(); 282 } 283 } 284 return props; 285 } 286 287 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveClassName.mjs 288 function resolveClassName(className, state) { 289 return typeof className === "function" ? className(state) : className; 290 } 291 292 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveStyle.mjs 293 function resolveStyle(style, state) { 294 return typeof style === "function" ? style(state) : style; 295 } 296 297 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/merge-props/mergeProps.mjs 298 var EMPTY_PROPS = {}; 299 function mergeProps(a, b, c, d, e) { 300 if (!c && !d && !e && !a) { 301 return createInitialMergedProps(b); 302 } 303 let merged = createInitialMergedProps(a); 304 if (b) { 305 merged = mergeInto(merged, b); 306 } 307 if (c) { 308 merged = mergeInto(merged, c); 309 } 310 if (d) { 311 merged = mergeInto(merged, d); 312 } 313 if (e) { 314 merged = mergeInto(merged, e); 315 } 316 return merged; 317 } 318 function mergePropsN(props) { 319 if (props.length === 0) { 320 return EMPTY_PROPS; 321 } 322 if (props.length === 1) { 323 return createInitialMergedProps(props[0]); 324 } 325 let merged = createInitialMergedProps(props[0]); 326 for (let i = 1; i < props.length; i += 1) { 327 merged = mergeInto(merged, props[i]); 328 } 329 return merged; 330 } 331 function createInitialMergedProps(inputProps) { 332 if (isPropsGetter(inputProps)) { 333 return { 334 ...inputProps(EMPTY_PROPS) 335 }; 336 } 337 return copyInitialProps(inputProps); 338 } 339 function mergeInto(merged, inputProps) { 340 if (isPropsGetter(inputProps)) { 341 return inputProps(merged); 342 } 343 return mutablyMergeInto(merged, inputProps); 344 } 345 function copyInitialProps(inputProps) { 346 const copiedProps = { 347 ...inputProps 348 }; 349 for (const propName in copiedProps) { 350 const propValue = copiedProps[propName]; 351 if (isEventHandler(propName, propValue)) { 352 copiedProps[propName] = wrapEventHandler(propValue); 353 } 354 } 355 return copiedProps; 356 } 357 function mutablyMergeInto(mergedProps, externalProps) { 358 if (!externalProps) { 359 return mergedProps; 360 } 361 for (const propName in externalProps) { 362 const externalPropValue = externalProps[propName]; 363 switch (propName) { 364 case "style": { 365 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); 366 break; 367 } 368 case "className": { 369 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); 370 break; 371 } 372 default: { 373 if (isEventHandler(propName, externalPropValue)) { 374 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); 375 } else { 376 mergedProps[propName] = externalPropValue; 377 } 378 } 379 } 380 } 381 return mergedProps; 382 } 383 function isEventHandler(key, value) { 384 const code0 = key.charCodeAt(0); 385 const code1 = key.charCodeAt(1); 386 const code2 = key.charCodeAt(2); 387 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); 388 } 389 function isPropsGetter(inputProps) { 390 return typeof inputProps === "function"; 391 } 392 function mergeEventHandlers(ourHandler, theirHandler) { 393 if (!theirHandler) { 394 return ourHandler; 395 } 396 if (!ourHandler) { 397 return wrapEventHandler(theirHandler); 398 } 399 return (...args) => { 400 const event = args[0]; 401 if (isSyntheticEvent(event)) { 402 const baseUIEvent = event; 403 makeEventPreventable(baseUIEvent); 404 const result2 = theirHandler(...args); 405 if (!baseUIEvent.baseUIHandlerPrevented) { 406 ourHandler?.(...args); 407 } 408 return result2; 409 } 410 const result = theirHandler(...args); 411 ourHandler?.(...args); 412 return result; 413 }; 414 } 415 function wrapEventHandler(handler) { 416 if (!handler) { 417 return handler; 418 } 419 return (...args) => { 420 const event = args[0]; 421 if (isSyntheticEvent(event)) { 422 makeEventPreventable(event); 423 } 424 return handler(...args); 425 }; 426 } 427 function makeEventPreventable(event) { 428 event.preventBaseUIHandler = () => { 429 event.baseUIHandlerPrevented = true; 430 }; 431 return event; 432 } 433 function mergeClassNames(ourClassName, theirClassName) { 434 if (theirClassName) { 435 if (ourClassName) { 436 return theirClassName + " " + ourClassName; 437 } 438 return theirClassName; 439 } 440 return ourClassName; 441 } 442 function isSyntheticEvent(event) { 443 return event != null && typeof event === "object" && "nativeEvent" in event; 444 } 445 446 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 447 var import_react = __toESM(require_react(), 1); 448 function useRenderElement(element, componentProps, params = {}) { 449 let renderProp = componentProps.render; 450 if (params.enabled !== false) { 451 renderProp = unwrapLazyRenderProp(renderProp); 452 } 453 const outProps = useRenderElementProps(componentProps, params, renderProp); 454 if (params.enabled === false) { 455 return null; 456 } 457 const state = params.state ?? EMPTY_OBJECT; 458 return evaluateRenderProp(element, renderProp, outProps, state); 459 } 460 function useRenderElementProps(componentProps, params, renderProp) { 461 const { 462 className: classNameProp, 463 style: styleProp 464 } = componentProps; 465 const { 466 state = EMPTY_OBJECT, 467 ref, 468 props, 469 stateAttributesMapping, 470 enabled = true 471 } = params; 472 const className = enabled ? resolveClassName(classNameProp, state) : void 0; 473 const style = enabled ? resolveStyle(styleProp, state) : void 0; 474 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; 475 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; 476 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; 477 if (typeof document !== "undefined") { 478 if (!enabled) { 479 void useMergedRefs(null, null); 480 } else if (Array.isArray(ref)) { 481 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); 482 } else { 483 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); 484 } 485 } 486 if (!enabled) { 487 return EMPTY_OBJECT; 488 } 489 if (className !== void 0) { 490 outProps.className = mergeClassNames(outProps.className, className); 491 } 492 if (style !== void 0) { 493 outProps.style = mergeObjects(outProps.style, style); 494 } 495 return outProps; 496 } 497 function resolveRenderFunctionProps(props) { 498 if (Array.isArray(props)) { 499 return mergePropsN(props); 500 } 501 return mergeProps(void 0, props); 502 } 503 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); 504 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; 505 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; 506 function unwrapLazyRenderProp(render) { 507 if (render?.$$typeof !== REACT_LAZY_TYPE) { 508 return render; 509 } 510 const unwrapped = React4.Children.toArray(render)[0]; 511 return /* @__PURE__ */ React4.isValidElement(unwrapped) ? unwrapped : render; 512 } 513 function evaluateRenderProp(element, render, props, state) { 514 if (render) { 515 if (typeof render === "function") { 516 if (true) { 517 warnIfRenderPropLooksLikeComponent(render); 518 } 519 return render(props, state); 520 } 521 const mergedProps = mergeProps(props, render.props); 522 mergedProps.ref = props.ref; 523 if (true) { 524 if (!/* @__PURE__ */ React4.isValidElement(render)) { 525 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")); 526 } 527 } 528 return /* @__PURE__ */ React4.cloneElement(render, mergedProps); 529 } 530 return renderTag(element, props); 531 } 532 function warnIfRenderPropLooksLikeComponent(renderFn) { 533 const functionName = renderFn.name; 534 if (functionName.length === 0) { 535 return; 536 } 537 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { 538 return; 539 } 540 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { 541 return; 542 } 543 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"); 544 } 545 function renderTag(Tag, props) { 546 if (Tag === "button") { 547 return /* @__PURE__ */ (0, import_react.createElement)("button", { 548 type: "button", 549 ...props, 550 key: props.key 551 }); 552 } 553 if (Tag === "img") { 554 return /* @__PURE__ */ (0, import_react.createElement)("img", { 555 alt: "", 556 ...props, 557 key: props.key 558 }); 559 } 560 return /* @__PURE__ */ React4.createElement(Tag, props); 561 } 562 563 // node_modules/.store/clsx@2.1.1-XOLP1vUL9vEGfpiXm37fAw/node_modules/clsx/dist/clsx.mjs 564 function r(e) { 565 var t, f, n = ""; 566 if ("string" == typeof e || "number" == typeof e) n += e; 567 else if ("object" == typeof e) if (Array.isArray(e)) { 568 var o = e.length; 569 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); 570 } else for (f in e) e[f] && (n && (n += " "), n += f); 571 return n; 572 } 573 function clsx() { 574 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); 575 return n; 576 } 577 var clsx_default = clsx; 578 579 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/use-render/useRender.mjs 580 function useRender(params) { 581 return useRenderElement(params.defaultTagName ?? "div", params, params); 582 } 583 584 // packages/ui/build-module/badge/badge.mjs 585 var import_element2 = __toESM(require_element(), 1); 586 587 // packages/ui/build-module/text/text.mjs 588 var import_element = __toESM(require_element(), 1); 589 var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; 590 function getRuntime() { 591 const globalScope = globalThis; 592 if (globalScope.__wpStyleRuntime) { 593 return globalScope.__wpStyleRuntime; 594 } 595 globalScope.__wpStyleRuntime = { 596 documents: /* @__PURE__ */ new Map(), 597 styles: /* @__PURE__ */ new Map(), 598 injectedStyles: /* @__PURE__ */ new WeakMap() 599 }; 600 if (typeof document !== "undefined") { 601 registerDocument(document); 602 } 603 return globalScope.__wpStyleRuntime; 604 } 605 function documentContainsStyleHash(targetDocument, hash) { 606 if (!targetDocument.head) { 607 return false; 608 } 609 for (const style of targetDocument.head.querySelectorAll( 610 `style[$STYLE_HASH_ATTRIBUTE}]` 611 )) { 612 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { 613 return true; 614 } 615 } 616 return false; 617 } 618 function injectStyle(targetDocument, hash, css) { 619 if (!targetDocument.head) { 620 return; 621 } 622 const runtime = getRuntime(); 623 let injectedStyles = runtime.injectedStyles.get(targetDocument); 624 if (!injectedStyles) { 625 injectedStyles = /* @__PURE__ */ new Set(); 626 runtime.injectedStyles.set(targetDocument, injectedStyles); 627 } 628 if (injectedStyles.has(hash)) { 629 return; 630 } 631 if (documentContainsStyleHash(targetDocument, hash)) { 632 injectedStyles.add(hash); 633 return; 634 } 635 const style = targetDocument.createElement("style"); 636 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); 637 style.appendChild(targetDocument.createTextNode(css)); 638 targetDocument.head.appendChild(style); 639 injectedStyles.add(hash); 640 } 641 function registerDocument(targetDocument) { 642 const runtime = getRuntime(); 643 runtime.documents.set( 644 targetDocument, 645 (runtime.documents.get(targetDocument) ?? 0) + 1 646 ); 647 for (const [hash, css] of runtime.styles) { 648 injectStyle(targetDocument, hash, css); 649 } 650 return () => { 651 const count = runtime.documents.get(targetDocument); 652 if (count === void 0) { 653 return; 654 } 655 if (count <= 1) { 656 runtime.documents.delete(targetDocument); 657 return; 658 } 659 runtime.documents.set(targetDocument, count - 1); 660 }; 661 } 662 function registerStyle(hash, css) { 663 const runtime = getRuntime(); 664 runtime.styles.set(hash, css); 665 for (const targetDocument of runtime.documents.keys()) { 666 injectStyle(targetDocument, hash, css); 667 } 668 } 669 if (typeof process === "undefined" || true) { 670 registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}'); 671 } 672 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" }; 673 if (typeof process === "undefined" || true) { 674 registerStyle("abb19c3171", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 675 } 676 var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li", "span": "_400bf7ee0c6061a9__span" }; 677 var Text = (0, import_element.forwardRef)( 678 function UnforwardedText({ variant = "body-md", render, className, ...props }, ref) { 679 const element = useRender({ 680 render, 681 defaultTagName: "span", 682 ref, 683 props: mergeProps(props, { 684 className: clsx_default( 685 style_default.text, 686 global_css_defense_default.heading, 687 global_css_defense_default.p, 688 style_default[variant], 689 className 690 ) 691 }) 692 }); 693 return element; 694 } 695 ); 696 697 // packages/ui/build-module/badge/badge.mjs 698 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 699 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; 700 function getRuntime2() { 701 const globalScope = globalThis; 702 if (globalScope.__wpStyleRuntime) { 703 return globalScope.__wpStyleRuntime; 704 } 705 globalScope.__wpStyleRuntime = { 706 documents: /* @__PURE__ */ new Map(), 707 styles: /* @__PURE__ */ new Map(), 708 injectedStyles: /* @__PURE__ */ new WeakMap() 709 }; 710 if (typeof document !== "undefined") { 711 registerDocument2(document); 712 } 713 return globalScope.__wpStyleRuntime; 714 } 715 function documentContainsStyleHash2(targetDocument, hash) { 716 if (!targetDocument.head) { 717 return false; 718 } 719 for (const style of targetDocument.head.querySelectorAll( 720 `style[$STYLE_HASH_ATTRIBUTE2}]` 721 )) { 722 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { 723 return true; 724 } 725 } 726 return false; 727 } 728 function injectStyle2(targetDocument, hash, css) { 729 if (!targetDocument.head) { 730 return; 731 } 732 const runtime = getRuntime2(); 733 let injectedStyles = runtime.injectedStyles.get(targetDocument); 734 if (!injectedStyles) { 735 injectedStyles = /* @__PURE__ */ new Set(); 736 runtime.injectedStyles.set(targetDocument, injectedStyles); 737 } 738 if (injectedStyles.has(hash)) { 739 return; 740 } 741 if (documentContainsStyleHash2(targetDocument, hash)) { 742 injectedStyles.add(hash); 743 return; 744 } 745 const style = targetDocument.createElement("style"); 746 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); 747 style.appendChild(targetDocument.createTextNode(css)); 748 targetDocument.head.appendChild(style); 749 injectedStyles.add(hash); 750 } 751 function registerDocument2(targetDocument) { 752 const runtime = getRuntime2(); 753 runtime.documents.set( 754 targetDocument, 755 (runtime.documents.get(targetDocument) ?? 0) + 1 756 ); 757 for (const [hash, css] of runtime.styles) { 758 injectStyle2(targetDocument, hash, css); 759 } 760 return () => { 761 const count = runtime.documents.get(targetDocument); 762 if (count === void 0) { 763 return; 764 } 765 if (count <= 1) { 766 runtime.documents.delete(targetDocument); 767 return; 768 } 769 runtime.documents.set(targetDocument, count - 1); 770 }; 771 } 772 function registerStyle2(hash, css) { 773 const runtime = getRuntime2(); 774 runtime.styles.set(hash, css); 775 for (const targetDocument of runtime.documents.keys()) { 776 injectStyle2(targetDocument, hash, css); 777 } 778 } 779 if (typeof process === "undefined" || true) { 780 registerStyle2("40ea4a6382", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#fae5e1);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c2f8ca);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}"); 781 } 782 var style_default2 = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" }; 783 var Badge = (0, import_element2.forwardRef)( 784 function UnforwardedBadge({ intent = "none", className, ...props }, ref) { 785 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( 786 Text, 787 { 788 ref, 789 className: clsx_default( 790 style_default2.badge, 791 style_default2[`is-$intent}-intent`], 792 className 793 ), 794 ...props, 795 variant: "body-sm" 796 } 797 ); 798 } 799 ); 800 801 // packages/ui/build-module/stack/stack.mjs 802 var import_element3 = __toESM(require_element(), 1); 803 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; 804 function getRuntime3() { 805 const globalScope = globalThis; 806 if (globalScope.__wpStyleRuntime) { 807 return globalScope.__wpStyleRuntime; 808 } 809 globalScope.__wpStyleRuntime = { 810 documents: /* @__PURE__ */ new Map(), 811 styles: /* @__PURE__ */ new Map(), 812 injectedStyles: /* @__PURE__ */ new WeakMap() 813 }; 814 if (typeof document !== "undefined") { 815 registerDocument3(document); 816 } 817 return globalScope.__wpStyleRuntime; 818 } 819 function documentContainsStyleHash3(targetDocument, hash) { 820 if (!targetDocument.head) { 821 return false; 822 } 823 for (const style of targetDocument.head.querySelectorAll( 824 `style[$STYLE_HASH_ATTRIBUTE3}]` 825 )) { 826 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { 827 return true; 828 } 829 } 830 return false; 831 } 832 function injectStyle3(targetDocument, hash, css) { 833 if (!targetDocument.head) { 834 return; 835 } 836 const runtime = getRuntime3(); 837 let injectedStyles = runtime.injectedStyles.get(targetDocument); 838 if (!injectedStyles) { 839 injectedStyles = /* @__PURE__ */ new Set(); 840 runtime.injectedStyles.set(targetDocument, injectedStyles); 841 } 842 if (injectedStyles.has(hash)) { 843 return; 844 } 845 if (documentContainsStyleHash3(targetDocument, hash)) { 846 injectedStyles.add(hash); 847 return; 848 } 849 const style = targetDocument.createElement("style"); 850 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); 851 style.appendChild(targetDocument.createTextNode(css)); 852 targetDocument.head.appendChild(style); 853 injectedStyles.add(hash); 854 } 855 function registerDocument3(targetDocument) { 856 const runtime = getRuntime3(); 857 runtime.documents.set( 858 targetDocument, 859 (runtime.documents.get(targetDocument) ?? 0) + 1 860 ); 861 for (const [hash, css] of runtime.styles) { 862 injectStyle3(targetDocument, hash, css); 863 } 864 return () => { 865 const count = runtime.documents.get(targetDocument); 866 if (count === void 0) { 867 return; 868 } 869 if (count <= 1) { 870 runtime.documents.delete(targetDocument); 871 return; 872 } 873 runtime.documents.set(targetDocument, count - 1); 874 }; 875 } 876 function registerStyle3(hash, css) { 877 const runtime = getRuntime3(); 878 runtime.styles.set(hash, css); 879 for (const targetDocument of runtime.documents.keys()) { 880 injectStyle3(targetDocument, hash, css); 881 } 882 } 883 if (typeof process === "undefined" || true) { 884 registerStyle3("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}"); 885 } 886 var style_default3 = { "stack": "_19ce0419607e1896__stack" }; 887 var gapTokens = { 888 xs: "var(--wpds-dimension-gap-xs, 4px)", 889 sm: "var(--wpds-dimension-gap-sm, 8px)", 890 md: "var(--wpds-dimension-gap-md, 12px)", 891 lg: "var(--wpds-dimension-gap-lg, 16px)", 892 xl: "var(--wpds-dimension-gap-xl, 24px)", 893 "2xl": "var(--wpds-dimension-gap-2xl, 32px)", 894 "3xl": "var(--wpds-dimension-gap-3xl, 40px)" 895 }; 896 var Stack = (0, import_element3.forwardRef)( 897 function UnforwardedStack({ direction, gap, align, justify, wrap, render, ...props }, ref) { 898 const style = { 899 gap: gap && gapTokens[gap], 900 alignItems: align, 901 justifyContent: justify, 902 flexDirection: direction, 903 flexWrap: wrap 904 }; 905 const element = useRender({ 906 render, 907 ref, 908 props: mergeProps(props, { 909 style, 910 className: style_default3.stack 911 }) 912 }); 913 return element; 914 } 915 ); 916 917 // packages/core-fields/build-module/shared/title/view.mjs 918 var import_i18n2 = __toESM(require_i18n(), 1); 919 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); 920 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; 921 function getRuntime4() { 922 const globalScope = globalThis; 923 if (globalScope.__wpStyleRuntime) { 924 return globalScope.__wpStyleRuntime; 925 } 926 globalScope.__wpStyleRuntime = { 927 documents: /* @__PURE__ */ new Map(), 928 styles: /* @__PURE__ */ new Map(), 929 injectedStyles: /* @__PURE__ */ new WeakMap() 930 }; 931 if (typeof document !== "undefined") { 932 registerDocument4(document); 933 } 934 return globalScope.__wpStyleRuntime; 935 } 936 function documentContainsStyleHash4(targetDocument, hash) { 937 if (!targetDocument.head) { 938 return false; 939 } 940 for (const style of targetDocument.head.querySelectorAll( 941 `style[$STYLE_HASH_ATTRIBUTE4}]` 942 )) { 943 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { 944 return true; 945 } 946 } 947 return false; 948 } 949 function injectStyle4(targetDocument, hash, css) { 950 if (!targetDocument.head) { 951 return; 952 } 953 const runtime = getRuntime4(); 954 let injectedStyles = runtime.injectedStyles.get(targetDocument); 955 if (!injectedStyles) { 956 injectedStyles = /* @__PURE__ */ new Set(); 957 runtime.injectedStyles.set(targetDocument, injectedStyles); 958 } 959 if (injectedStyles.has(hash)) { 960 return; 961 } 962 if (documentContainsStyleHash4(targetDocument, hash)) { 963 injectedStyles.add(hash); 964 return; 965 } 966 const style = targetDocument.createElement("style"); 967 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); 968 style.appendChild(targetDocument.createTextNode(css)); 969 targetDocument.head.appendChild(style); 970 injectedStyles.add(hash); 971 } 972 function registerDocument4(targetDocument) { 973 const runtime = getRuntime4(); 974 runtime.documents.set( 975 targetDocument, 976 (runtime.documents.get(targetDocument) ?? 0) + 1 977 ); 978 for (const [hash, css] of runtime.styles) { 979 injectStyle4(targetDocument, hash, css); 980 } 981 return () => { 982 const count = runtime.documents.get(targetDocument); 983 if (count === void 0) { 984 return; 985 } 986 if (count <= 1) { 987 runtime.documents.delete(targetDocument); 988 return; 989 } 990 runtime.documents.set(targetDocument, count - 1); 991 }; 992 } 993 function registerStyle4(hash, css) { 994 const runtime = getRuntime4(); 995 runtime.styles.set(hash, css); 996 for (const targetDocument of runtime.documents.keys()) { 997 injectStyle4(targetDocument, hash, css); 998 } 999 } 1000 if (typeof process === "undefined" || true) { 1001 registerStyle4("cd9f81046b", ".f17c7d5418aade3c__title>span:first-child{display:block;flex-grow:0;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}._86b9872383a1ab5e__pattern-title>span:first-child{flex:1}"); 1002 } 1003 var style_default4 = { "title": "f17c7d5418aade3c__title", "pattern-title": "_86b9872383a1ab5e__pattern-title" }; 1004 function BaseTitleView({ 1005 item, 1006 className, 1007 children 1008 }) { 1009 const renderedTitle = getItemTitle(item); 1010 return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)( 1011 Stack, 1012 { 1013 direction: "row", 1014 align: "center", 1015 justify: "flex-start", 1016 gap: "sm", 1017 className: clsx_default("fields-field__title", style_default4.title, className), 1018 children: [ 1019 /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: renderedTitle || (0, import_i18n2.__)("(no title)") }), 1020 children 1021 ] 1022 } 1023 ); 1024 } 1025 1026 // packages/core-fields/build-module/page/title/view.mjs 1027 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); 1028 var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash"; 1029 function getRuntime5() { 1030 const globalScope = globalThis; 1031 if (globalScope.__wpStyleRuntime) { 1032 return globalScope.__wpStyleRuntime; 1033 } 1034 globalScope.__wpStyleRuntime = { 1035 documents: /* @__PURE__ */ new Map(), 1036 styles: /* @__PURE__ */ new Map(), 1037 injectedStyles: /* @__PURE__ */ new WeakMap() 1038 }; 1039 if (typeof document !== "undefined") { 1040 registerDocument5(document); 1041 } 1042 return globalScope.__wpStyleRuntime; 1043 } 1044 function documentContainsStyleHash5(targetDocument, hash) { 1045 if (!targetDocument.head) { 1046 return false; 1047 } 1048 for (const style of targetDocument.head.querySelectorAll( 1049 `style[$STYLE_HASH_ATTRIBUTE5}]` 1050 )) { 1051 if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) { 1052 return true; 1053 } 1054 } 1055 return false; 1056 } 1057 function injectStyle5(targetDocument, hash, css) { 1058 if (!targetDocument.head) { 1059 return; 1060 } 1061 const runtime = getRuntime5(); 1062 let injectedStyles = runtime.injectedStyles.get(targetDocument); 1063 if (!injectedStyles) { 1064 injectedStyles = /* @__PURE__ */ new Set(); 1065 runtime.injectedStyles.set(targetDocument, injectedStyles); 1066 } 1067 if (injectedStyles.has(hash)) { 1068 return; 1069 } 1070 if (documentContainsStyleHash5(targetDocument, hash)) { 1071 injectedStyles.add(hash); 1072 return; 1073 } 1074 const style = targetDocument.createElement("style"); 1075 style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash); 1076 style.appendChild(targetDocument.createTextNode(css)); 1077 targetDocument.head.appendChild(style); 1078 injectedStyles.add(hash); 1079 } 1080 function registerDocument5(targetDocument) { 1081 const runtime = getRuntime5(); 1082 runtime.documents.set( 1083 targetDocument, 1084 (runtime.documents.get(targetDocument) ?? 0) + 1 1085 ); 1086 for (const [hash, css] of runtime.styles) { 1087 injectStyle5(targetDocument, hash, css); 1088 } 1089 return () => { 1090 const count = runtime.documents.get(targetDocument); 1091 if (count === void 0) { 1092 return; 1093 } 1094 if (count <= 1) { 1095 runtime.documents.delete(targetDocument); 1096 return; 1097 } 1098 runtime.documents.set(targetDocument, count - 1); 1099 }; 1100 } 1101 function registerStyle5(hash, css) { 1102 const runtime = getRuntime5(); 1103 runtime.styles.set(hash, css); 1104 for (const targetDocument of runtime.documents.keys()) { 1105 injectStyle5(targetDocument, hash, css); 1106 } 1107 } 1108 if (typeof process === "undefined" || true) { 1109 registerStyle5("20ed55e94a", "._502d8d4d00cc87a7__badge{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"); 1110 } 1111 var style_default5 = { "badge": "_502d8d4d00cc87a7__badge" }; 1112 function PageTitleView({ 1113 item 1114 }) { 1115 const { frontPageId, postsPageId, privacyPolicyPageId } = (0, import_data.useSelect)( 1116 (select) => { 1117 const { getEntityRecord } = select(import_core_data.store); 1118 const siteSettings = getEntityRecord( 1119 "root", 1120 "site" 1121 ); 1122 return { 1123 frontPageId: siteSettings?.page_on_front, 1124 postsPageId: siteSettings?.page_for_posts, 1125 privacyPolicyPageId: siteSettings?.page_for_privacy_policy 1126 }; 1127 }, 1128 [] 1129 ); 1130 let badge; 1131 if (item.id === frontPageId) { 1132 badge = (0, import_i18n3.__)("Homepage"); 1133 } else if (item.id === postsPageId) { 1134 badge = (0, import_i18n3.__)("Posts Page"); 1135 } else if (item.id === privacyPolicyPageId) { 1136 badge = (0, import_i18n3.__)("Privacy Policy Page"); 1137 } 1138 return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseTitleView, { item, children: badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Badge, { className: style_default5.badge, children: badge }) }); 1139 } 1140 1141 // packages/core-fields/build-module/page/title/field.mjs 1142 var fieldExtensions = { 1143 getValue: ({ item }) => getItemTitle(item), 1144 render: PageTitleView 1145 }; 1146 1147 // packages/core-fields/build-module/page/index.mjs 1148 var fields = { 1149 title: fieldExtensions 1150 }; 1151 var page_default = fields; 1152 export { 1153 page_default as default 1154 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Wed Oct 21 08:20:34 2026 | Cross-referenced by PHPXref |