| [ 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/element 28 var require_element = __commonJS({ 29 "package-external:@wordpress/element"(exports, module) { 30 module.exports = window.wp.element; 31 } 32 }); 33 34 // package-external:@wordpress/data 35 var require_data = __commonJS({ 36 "package-external:@wordpress/data"(exports, module) { 37 module.exports = window.wp.data; 38 } 39 }); 40 41 // package-external:@wordpress/core-data 42 var require_core_data = __commonJS({ 43 "package-external:@wordpress/core-data"(exports, module) { 44 module.exports = window.wp.coreData; 45 } 46 }); 47 48 // package-external:@wordpress/primitives 49 var require_primitives = __commonJS({ 50 "package-external:@wordpress/primitives"(exports, module) { 51 module.exports = window.wp.primitives; 52 } 53 }); 54 55 // vendor-external:react/jsx-runtime 56 var require_jsx_runtime = __commonJS({ 57 "vendor-external:react/jsx-runtime"(exports, module) { 58 module.exports = window.ReactJSXRuntime; 59 } 60 }); 61 62 // vendor-external:react 63 var require_react = __commonJS({ 64 "vendor-external:react"(exports, module) { 65 module.exports = window.React; 66 } 67 }); 68 69 // package-external:@wordpress/i18n 70 var require_i18n = __commonJS({ 71 "package-external:@wordpress/i18n"(exports, module) { 72 module.exports = window.wp.i18n; 73 } 74 }); 75 76 // package-external:@wordpress/html-entities 77 var require_html_entities = __commonJS({ 78 "package-external:@wordpress/html-entities"(exports, module) { 79 module.exports = window.wp.htmlEntities; 80 } 81 }); 82 83 // node_modules/.store/clsx@2.1.1-XOLP1vUL9vEGfpiXm37fAw/node_modules/clsx/dist/clsx.mjs 84 function r(e) { 85 var t, f, n = ""; 86 if ("string" == typeof e || "number" == typeof e) n += e; 87 else if ("object" == typeof e) if (Array.isArray(e)) { 88 var o = e.length; 89 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); 90 } else for (f in e) e[f] && (n && (n += " "), n += f); 91 return n; 92 } 93 function clsx() { 94 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); 95 return n; 96 } 97 var clsx_default = clsx; 98 99 // packages/core-fields/build-module/wp_template/author/view.mjs 100 var import_element4 = __toESM(require_element(), 1); 101 var import_data = __toESM(require_data(), 1); 102 var import_core_data = __toESM(require_core_data(), 1); 103 104 // packages/icons/build-module/library/comment-author-avatar.mjs 105 var import_primitives = __toESM(require_primitives(), 1); 106 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 107 var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 108 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 18.0476V16C8 14.8954 8.89543 14 10 14H14C15.1046 14 16 14.8954 16 16V18.0476" }), 109 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M12 4.75C7.99594 4.75 4.75 7.99593 4.75 12C4.75 16.0041 7.99593 19.25 12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75Z", strokeLinejoin: "round" }), 110 /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M13.75 10C13.75 10.9665 12.9665 11.75 12 11.75C11.0335 11.75 10.25 10.9665 10.25 10C10.25 9.0335 11.0335 8.25 12 8.25C12.9665 8.25 13.75 9.0335 13.75 10Z" }) 111 ] }); 112 113 // packages/icons/build-module/library/globe.mjs 114 var import_primitives2 = __toESM(require_primitives(), 1); 115 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); 116 var globe_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M12 4.75C8.87453 4.75 6.21099 6.72773 5.19257 9.5M18.8074 14.5C19.0937 13.7207 19.25 12.8786 19.25 12C19.25 11.1214 19.0937 10.2793 18.8074 9.5C17.789 6.72773 15.1255 4.75 12 4.75M12 4.75C11 5.5 9 8.63218 9 12C9 15.3678 11 18.5 12 19.25M12 4.75C13 5.5 15 8.63218 15 12C15 15.3678 13 18.5 12 19.25M5.19257 9.5C4.90628 10.2793 4.75 11.1214 4.75 12C4.75 12.8786 4.90629 13.7207 5.19257 14.5C6.21099 17.2723 8.87453 19.25 12 19.25M12 19.25C15.1255 19.25 17.789 17.2723 18.8074 14.5M5.19257 9.5L18.8074 9.5M5.19257 14.5L18.8074 14.5", strokeLinejoin: "round" }) }); 117 118 // packages/icons/build-module/library/layout.mjs 119 var import_primitives3 = __toESM(require_primitives(), 1); 120 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); 121 var layout_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M9.75 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V9.75M9.75 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V9.75M9.75 19.25V9.75M19.25 9.75V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V9.75M19.25 9.75H9.75M9.75 9.75H4.75" }) }); 122 123 // packages/icons/build-module/library/plugins.mjs 124 var import_primitives4 = __toESM(require_primitives(), 1); 125 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); 126 var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M15.3995 11.5711L12.2175 8.38909L10.273 6.44454L7.67678 9.04074C7.3017 9.41581 7.09099 9.92452 7.09099 10.455L7.09099 13.455C7.09099 13.7202 6.98563 13.9745 6.7981 14.1621L5.14645 15.8137C4.95118 16.009 4.95118 16.3256 5.14645 16.5208L7.26777 18.6421C7.46303 18.8374 7.77961 18.8374 7.97487 18.6421L9.62652 16.9905C9.81406 16.8029 10.0684 16.6976 10.3336 16.6976H13.3336C13.8641 16.6976 14.3728 16.4869 14.7478 16.1118L17.344 13.5156L15.3995 11.5711ZM12.2175 8.38909L16.1066 4.5M15.3995 11.5711L19.2886 7.68198" }) }); 127 128 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 129 var React4 = __toESM(require_react(), 1); 130 131 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useRefWithInit.mjs 132 var React = __toESM(require_react(), 1); 133 var UNINITIALIZED = {}; 134 function useRefWithInit(init, initArg) { 135 const ref = React.useRef(UNINITIALIZED); 136 if (ref.current === UNINITIALIZED) { 137 ref.current = init(initArg); 138 } 139 return ref; 140 } 141 142 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useMergedRefs.mjs 143 function useMergedRefs(a, b, c, d) { 144 const forkRef = useRefWithInit(createForkRef).current; 145 if (didChange(forkRef, a, b, c, d)) { 146 update(forkRef, [a, b, c, d]); 147 } 148 return forkRef.callback; 149 } 150 function useMergedRefsN(refs) { 151 const forkRef = useRefWithInit(createForkRef).current; 152 if (didChangeN(forkRef, refs)) { 153 update(forkRef, refs); 154 } 155 return forkRef.callback; 156 } 157 function createForkRef() { 158 return { 159 callback: null, 160 cleanup: null, 161 refs: [] 162 }; 163 } 164 function didChange(forkRef, a, b, c, d) { 165 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; 166 } 167 function didChangeN(forkRef, newRefs) { 168 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); 169 } 170 function update(forkRef, refs) { 171 forkRef.refs = refs; 172 if (refs.every((ref) => ref == null)) { 173 forkRef.callback = null; 174 return; 175 } 176 forkRef.callback = (instance) => { 177 if (forkRef.cleanup) { 178 forkRef.cleanup(); 179 forkRef.cleanup = null; 180 } 181 if (instance != null) { 182 const cleanupCallbacks = Array(refs.length).fill(null); 183 for (let i = 0; i < refs.length; i += 1) { 184 const ref = refs[i]; 185 if (ref == null) { 186 continue; 187 } 188 switch (typeof ref) { 189 case "function": { 190 const refCleanup = ref(instance); 191 if (typeof refCleanup === "function") { 192 cleanupCallbacks[i] = refCleanup; 193 } 194 break; 195 } 196 case "object": { 197 ref.current = instance; 198 break; 199 } 200 default: 201 } 202 } 203 forkRef.cleanup = () => { 204 for (let i = 0; i < refs.length; i += 1) { 205 const ref = refs[i]; 206 if (ref == null) { 207 continue; 208 } 209 switch (typeof ref) { 210 case "function": { 211 const cleanupCallback = cleanupCallbacks[i]; 212 if (typeof cleanupCallback === "function") { 213 cleanupCallback(); 214 } else { 215 void ref(null); 216 } 217 break; 218 } 219 case "object": { 220 ref.current = null; 221 break; 222 } 223 default: 224 } 225 } 226 }; 227 } 228 }; 229 } 230 231 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 232 var React3 = __toESM(require_react(), 1); 233 234 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/reactVersion.mjs 235 var React2 = __toESM(require_react(), 1); 236 var majorVersion = parseInt(React2.version, 10); 237 function isReactVersionAtLeast(reactVersionToCheck) { 238 return majorVersion >= reactVersionToCheck; 239 } 240 241 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 242 function getReactElementRef(element) { 243 if (!/* @__PURE__ */ React3.isValidElement(element)) { 244 return null; 245 } 246 const reactElement = element; 247 const propsWithRef = reactElement.props; 248 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; 249 } 250 251 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeObjects.mjs 252 function mergeObjects(a, b) { 253 if (a && !b) { 254 return a; 255 } 256 if (!a && b) { 257 return b; 258 } 259 if (a || b) { 260 return { 261 ...a, 262 ...b 263 }; 264 } 265 return void 0; 266 } 267 268 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/createLogOnce.mjs 269 var loggedMessages; 270 if (true) { 271 loggedMessages = /* @__PURE__ */ new Set(); 272 } 273 function createLogOnce(severity, prefix) { 274 return function logOnce(...messages) { 275 if (true) { 276 const message = messages.join(" "); 277 const output = prefix ? `$prefix}: $message}` : message; 278 const key = `$severity}:$output}`; 279 if (!loggedMessages.has(key)) { 280 loggedMessages.add(key); 281 if (severity === "warn") { 282 console.warn(output); 283 } else { 284 console.error(output); 285 } 286 } 287 } 288 }; 289 } 290 291 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/warn.mjs 292 var warn = createLogOnce("warn", "Base UI"); 293 294 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/empty.mjs 295 var EMPTY_ARRAY = Object.freeze([]); 296 var EMPTY_OBJECT = Object.freeze({}); 297 298 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs 299 function getStateAttributesProps(state, customMapping) { 300 const props = {}; 301 for (const key in state) { 302 const value = state[key]; 303 if (customMapping?.hasOwnProperty(key)) { 304 const customProps = customMapping[key](value); 305 if (customProps != null) { 306 Object.assign(props, customProps); 307 } 308 continue; 309 } 310 if (value === true) { 311 props[`data-$key.toLowerCase()}`] = ""; 312 } else if (value) { 313 props[`data-$key.toLowerCase()}`] = value.toString(); 314 } 315 } 316 return props; 317 } 318 319 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveClassName.mjs 320 function resolveClassName(className, state) { 321 return typeof className === "function" ? className(state) : className; 322 } 323 324 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveStyle.mjs 325 function resolveStyle(style, state) { 326 return typeof style === "function" ? style(state) : style; 327 } 328 329 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/merge-props/mergeProps.mjs 330 var EMPTY_PROPS = {}; 331 function mergeProps(a, b, c, d, e) { 332 if (!c && !d && !e && !a) { 333 return createInitialMergedProps(b); 334 } 335 let merged = createInitialMergedProps(a); 336 if (b) { 337 merged = mergeInto(merged, b); 338 } 339 if (c) { 340 merged = mergeInto(merged, c); 341 } 342 if (d) { 343 merged = mergeInto(merged, d); 344 } 345 if (e) { 346 merged = mergeInto(merged, e); 347 } 348 return merged; 349 } 350 function mergePropsN(props) { 351 if (props.length === 0) { 352 return EMPTY_PROPS; 353 } 354 if (props.length === 1) { 355 return createInitialMergedProps(props[0]); 356 } 357 let merged = createInitialMergedProps(props[0]); 358 for (let i = 1; i < props.length; i += 1) { 359 merged = mergeInto(merged, props[i]); 360 } 361 return merged; 362 } 363 function createInitialMergedProps(inputProps) { 364 if (isPropsGetter(inputProps)) { 365 return { 366 ...inputProps(EMPTY_PROPS) 367 }; 368 } 369 return copyInitialProps(inputProps); 370 } 371 function mergeInto(merged, inputProps) { 372 if (isPropsGetter(inputProps)) { 373 return inputProps(merged); 374 } 375 return mutablyMergeInto(merged, inputProps); 376 } 377 function copyInitialProps(inputProps) { 378 const copiedProps = { 379 ...inputProps 380 }; 381 for (const propName in copiedProps) { 382 const propValue = copiedProps[propName]; 383 if (isEventHandler(propName, propValue)) { 384 copiedProps[propName] = wrapEventHandler(propValue); 385 } 386 } 387 return copiedProps; 388 } 389 function mutablyMergeInto(mergedProps, externalProps) { 390 if (!externalProps) { 391 return mergedProps; 392 } 393 for (const propName in externalProps) { 394 const externalPropValue = externalProps[propName]; 395 switch (propName) { 396 case "style": { 397 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); 398 break; 399 } 400 case "className": { 401 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); 402 break; 403 } 404 default: { 405 if (isEventHandler(propName, externalPropValue)) { 406 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); 407 } else { 408 mergedProps[propName] = externalPropValue; 409 } 410 } 411 } 412 } 413 return mergedProps; 414 } 415 function isEventHandler(key, value) { 416 const code0 = key.charCodeAt(0); 417 const code1 = key.charCodeAt(1); 418 const code2 = key.charCodeAt(2); 419 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); 420 } 421 function isPropsGetter(inputProps) { 422 return typeof inputProps === "function"; 423 } 424 function mergeEventHandlers(ourHandler, theirHandler) { 425 if (!theirHandler) { 426 return ourHandler; 427 } 428 if (!ourHandler) { 429 return wrapEventHandler(theirHandler); 430 } 431 return (...args) => { 432 const event = args[0]; 433 if (isSyntheticEvent(event)) { 434 const baseUIEvent = event; 435 makeEventPreventable(baseUIEvent); 436 const result2 = theirHandler(...args); 437 if (!baseUIEvent.baseUIHandlerPrevented) { 438 ourHandler?.(...args); 439 } 440 return result2; 441 } 442 const result = theirHandler(...args); 443 ourHandler?.(...args); 444 return result; 445 }; 446 } 447 function wrapEventHandler(handler) { 448 if (!handler) { 449 return handler; 450 } 451 return (...args) => { 452 const event = args[0]; 453 if (isSyntheticEvent(event)) { 454 makeEventPreventable(event); 455 } 456 return handler(...args); 457 }; 458 } 459 function makeEventPreventable(event) { 460 event.preventBaseUIHandler = () => { 461 event.baseUIHandlerPrevented = true; 462 }; 463 return event; 464 } 465 function mergeClassNames(ourClassName, theirClassName) { 466 if (theirClassName) { 467 if (ourClassName) { 468 return theirClassName + " " + ourClassName; 469 } 470 return theirClassName; 471 } 472 return ourClassName; 473 } 474 function isSyntheticEvent(event) { 475 return event != null && typeof event === "object" && "nativeEvent" in event; 476 } 477 478 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 479 var import_react = __toESM(require_react(), 1); 480 function useRenderElement(element, componentProps, params = {}) { 481 let renderProp = componentProps.render; 482 if (params.enabled !== false) { 483 renderProp = unwrapLazyRenderProp(renderProp); 484 } 485 const outProps = useRenderElementProps(componentProps, params, renderProp); 486 if (params.enabled === false) { 487 return null; 488 } 489 const state = params.state ?? EMPTY_OBJECT; 490 return evaluateRenderProp(element, renderProp, outProps, state); 491 } 492 function useRenderElementProps(componentProps, params, renderProp) { 493 const { 494 className: classNameProp, 495 style: styleProp 496 } = componentProps; 497 const { 498 state = EMPTY_OBJECT, 499 ref, 500 props, 501 stateAttributesMapping, 502 enabled = true 503 } = params; 504 const className = enabled ? resolveClassName(classNameProp, state) : void 0; 505 const style = enabled ? resolveStyle(styleProp, state) : void 0; 506 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; 507 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; 508 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; 509 if (typeof document !== "undefined") { 510 if (!enabled) { 511 void useMergedRefs(null, null); 512 } else if (Array.isArray(ref)) { 513 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); 514 } else { 515 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); 516 } 517 } 518 if (!enabled) { 519 return EMPTY_OBJECT; 520 } 521 if (className !== void 0) { 522 outProps.className = mergeClassNames(outProps.className, className); 523 } 524 if (style !== void 0) { 525 outProps.style = mergeObjects(outProps.style, style); 526 } 527 return outProps; 528 } 529 function resolveRenderFunctionProps(props) { 530 if (Array.isArray(props)) { 531 return mergePropsN(props); 532 } 533 return mergeProps(void 0, props); 534 } 535 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); 536 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; 537 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; 538 function unwrapLazyRenderProp(render2) { 539 if (render2?.$$typeof !== REACT_LAZY_TYPE) { 540 return render2; 541 } 542 const unwrapped = React4.Children.toArray(render2)[0]; 543 return /* @__PURE__ */ React4.isValidElement(unwrapped) ? unwrapped : render2; 544 } 545 function evaluateRenderProp(element, render2, props, state) { 546 if (render2) { 547 if (typeof render2 === "function") { 548 if (true) { 549 warnIfRenderPropLooksLikeComponent(render2); 550 } 551 return render2(props, state); 552 } 553 const mergedProps = mergeProps(props, render2.props); 554 mergedProps.ref = props.ref; 555 if (true) { 556 if (!/* @__PURE__ */ React4.isValidElement(render2)) { 557 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")); 558 } 559 } 560 return /* @__PURE__ */ React4.cloneElement(render2, mergedProps); 561 } 562 return renderTag(element, props); 563 } 564 function warnIfRenderPropLooksLikeComponent(renderFn) { 565 const functionName = renderFn.name; 566 if (functionName.length === 0) { 567 return; 568 } 569 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { 570 return; 571 } 572 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { 573 return; 574 } 575 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"); 576 } 577 function renderTag(Tag, props) { 578 if (Tag === "button") { 579 return /* @__PURE__ */ (0, import_react.createElement)("button", { 580 type: "button", 581 ...props, 582 key: props.key 583 }); 584 } 585 if (Tag === "img") { 586 return /* @__PURE__ */ (0, import_react.createElement)("img", { 587 alt: "", 588 ...props, 589 key: props.key 590 }); 591 } 592 return /* @__PURE__ */ React4.createElement(Tag, props); 593 } 594 595 // packages/ui/build-module/icon/icon.mjs 596 var import_element = __toESM(require_element(), 1); 597 var import_primitives5 = __toESM(require_primitives(), 1); 598 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); 599 var Icon = (0, import_element.forwardRef)( 600 function UnforwardedIcon({ icon, size = 24, style, ...restProps }, ref) { 601 const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0; 602 return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( 603 import_primitives5.SVG, 604 { 605 ref, 606 ...icon.props, 607 ...restProps, 608 ...mergedStyle ? { style: mergedStyle } : {}, 609 width: size, 610 height: size 611 } 612 ); 613 } 614 ); 615 616 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/use-render/useRender.mjs 617 function useRender(params) { 618 return useRenderElement(params.defaultTagName ?? "div", params, params); 619 } 620 621 // packages/ui/build-module/text/text.mjs 622 var import_element2 = __toESM(require_element(), 1); 623 var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; 624 function getRuntime() { 625 const globalScope = globalThis; 626 if (globalScope.__wpStyleRuntime) { 627 return globalScope.__wpStyleRuntime; 628 } 629 globalScope.__wpStyleRuntime = { 630 documents: /* @__PURE__ */ new Map(), 631 styles: /* @__PURE__ */ new Map(), 632 injectedStyles: /* @__PURE__ */ new WeakMap() 633 }; 634 if (typeof document !== "undefined") { 635 registerDocument(document); 636 } 637 return globalScope.__wpStyleRuntime; 638 } 639 function documentContainsStyleHash(targetDocument, hash) { 640 if (!targetDocument.head) { 641 return false; 642 } 643 for (const style of targetDocument.head.querySelectorAll( 644 `style[$STYLE_HASH_ATTRIBUTE}]` 645 )) { 646 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { 647 return true; 648 } 649 } 650 return false; 651 } 652 function injectStyle(targetDocument, hash, css) { 653 if (!targetDocument.head) { 654 return; 655 } 656 const runtime = getRuntime(); 657 let injectedStyles = runtime.injectedStyles.get(targetDocument); 658 if (!injectedStyles) { 659 injectedStyles = /* @__PURE__ */ new Set(); 660 runtime.injectedStyles.set(targetDocument, injectedStyles); 661 } 662 if (injectedStyles.has(hash)) { 663 return; 664 } 665 if (documentContainsStyleHash(targetDocument, hash)) { 666 injectedStyles.add(hash); 667 return; 668 } 669 const style = targetDocument.createElement("style"); 670 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); 671 style.appendChild(targetDocument.createTextNode(css)); 672 targetDocument.head.appendChild(style); 673 injectedStyles.add(hash); 674 } 675 function registerDocument(targetDocument) { 676 const runtime = getRuntime(); 677 runtime.documents.set( 678 targetDocument, 679 (runtime.documents.get(targetDocument) ?? 0) + 1 680 ); 681 for (const [hash, css] of runtime.styles) { 682 injectStyle(targetDocument, hash, css); 683 } 684 return () => { 685 const count = runtime.documents.get(targetDocument); 686 if (count === void 0) { 687 return; 688 } 689 if (count <= 1) { 690 runtime.documents.delete(targetDocument); 691 return; 692 } 693 runtime.documents.set(targetDocument, count - 1); 694 }; 695 } 696 function registerStyle(hash, css) { 697 const runtime = getRuntime(); 698 runtime.styles.set(hash, css); 699 for (const targetDocument of runtime.documents.keys()) { 700 injectStyle(targetDocument, hash, css); 701 } 702 } 703 if (typeof process === "undefined" || true) { 704 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)}}}'); 705 } 706 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" }; 707 if (typeof process === "undefined" || true) { 708 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)}"); 709 } 710 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" }; 711 var Text = (0, import_element2.forwardRef)( 712 function UnforwardedText({ variant = "body-md", render: render2, className, ...props }, ref) { 713 const element = useRender({ 714 render: render2, 715 defaultTagName: "span", 716 ref, 717 props: mergeProps(props, { 718 className: clsx_default( 719 style_default.text, 720 global_css_defense_default.heading, 721 global_css_defense_default.p, 722 style_default[variant], 723 className 724 ) 725 }) 726 }); 727 return element; 728 } 729 ); 730 731 // packages/ui/build-module/stack/stack.mjs 732 var import_element3 = __toESM(require_element(), 1); 733 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; 734 function getRuntime2() { 735 const globalScope = globalThis; 736 if (globalScope.__wpStyleRuntime) { 737 return globalScope.__wpStyleRuntime; 738 } 739 globalScope.__wpStyleRuntime = { 740 documents: /* @__PURE__ */ new Map(), 741 styles: /* @__PURE__ */ new Map(), 742 injectedStyles: /* @__PURE__ */ new WeakMap() 743 }; 744 if (typeof document !== "undefined") { 745 registerDocument2(document); 746 } 747 return globalScope.__wpStyleRuntime; 748 } 749 function documentContainsStyleHash2(targetDocument, hash) { 750 if (!targetDocument.head) { 751 return false; 752 } 753 for (const style of targetDocument.head.querySelectorAll( 754 `style[$STYLE_HASH_ATTRIBUTE2}]` 755 )) { 756 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { 757 return true; 758 } 759 } 760 return false; 761 } 762 function injectStyle2(targetDocument, hash, css) { 763 if (!targetDocument.head) { 764 return; 765 } 766 const runtime = getRuntime2(); 767 let injectedStyles = runtime.injectedStyles.get(targetDocument); 768 if (!injectedStyles) { 769 injectedStyles = /* @__PURE__ */ new Set(); 770 runtime.injectedStyles.set(targetDocument, injectedStyles); 771 } 772 if (injectedStyles.has(hash)) { 773 return; 774 } 775 if (documentContainsStyleHash2(targetDocument, hash)) { 776 injectedStyles.add(hash); 777 return; 778 } 779 const style = targetDocument.createElement("style"); 780 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); 781 style.appendChild(targetDocument.createTextNode(css)); 782 targetDocument.head.appendChild(style); 783 injectedStyles.add(hash); 784 } 785 function registerDocument2(targetDocument) { 786 const runtime = getRuntime2(); 787 runtime.documents.set( 788 targetDocument, 789 (runtime.documents.get(targetDocument) ?? 0) + 1 790 ); 791 for (const [hash, css] of runtime.styles) { 792 injectStyle2(targetDocument, hash, css); 793 } 794 return () => { 795 const count = runtime.documents.get(targetDocument); 796 if (count === void 0) { 797 return; 798 } 799 if (count <= 1) { 800 runtime.documents.delete(targetDocument); 801 return; 802 } 803 runtime.documents.set(targetDocument, count - 1); 804 }; 805 } 806 function registerStyle2(hash, css) { 807 const runtime = getRuntime2(); 808 runtime.styles.set(hash, css); 809 for (const targetDocument of runtime.documents.keys()) { 810 injectStyle2(targetDocument, hash, css); 811 } 812 } 813 if (typeof process === "undefined" || true) { 814 registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}"); 815 } 816 var style_default2 = { "stack": "_19ce0419607e1896__stack" }; 817 var gapTokens = { 818 xs: "var(--wpds-dimension-gap-xs, 4px)", 819 sm: "var(--wpds-dimension-gap-sm, 8px)", 820 md: "var(--wpds-dimension-gap-md, 12px)", 821 lg: "var(--wpds-dimension-gap-lg, 16px)", 822 xl: "var(--wpds-dimension-gap-xl, 24px)", 823 "2xl": "var(--wpds-dimension-gap-2xl, 32px)", 824 "3xl": "var(--wpds-dimension-gap-3xl, 40px)" 825 }; 826 var Stack = (0, import_element3.forwardRef)( 827 function UnforwardedStack({ direction, gap, align, justify, wrap, render: render2, ...props }, ref) { 828 const style = { 829 gap: gap && gapTokens[gap], 830 alignItems: align, 831 justifyContent: justify, 832 flexDirection: direction, 833 flexWrap: wrap 834 }; 835 const element = useRender({ 836 render: render2, 837 ref, 838 props: mergeProps(props, { 839 style, 840 className: style_default2.stack 841 }) 842 }); 843 return element; 844 } 845 ); 846 847 // packages/core-fields/build-module/wp_template/author/view.mjs 848 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); 849 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; 850 function getRuntime3() { 851 const globalScope = globalThis; 852 if (globalScope.__wpStyleRuntime) { 853 return globalScope.__wpStyleRuntime; 854 } 855 globalScope.__wpStyleRuntime = { 856 documents: /* @__PURE__ */ new Map(), 857 styles: /* @__PURE__ */ new Map(), 858 injectedStyles: /* @__PURE__ */ new WeakMap() 859 }; 860 if (typeof document !== "undefined") { 861 registerDocument3(document); 862 } 863 return globalScope.__wpStyleRuntime; 864 } 865 function documentContainsStyleHash3(targetDocument, hash) { 866 if (!targetDocument.head) { 867 return false; 868 } 869 for (const style of targetDocument.head.querySelectorAll( 870 `style[$STYLE_HASH_ATTRIBUTE3}]` 871 )) { 872 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { 873 return true; 874 } 875 } 876 return false; 877 } 878 function injectStyle3(targetDocument, hash, css) { 879 if (!targetDocument.head) { 880 return; 881 } 882 const runtime = getRuntime3(); 883 let injectedStyles = runtime.injectedStyles.get(targetDocument); 884 if (!injectedStyles) { 885 injectedStyles = /* @__PURE__ */ new Set(); 886 runtime.injectedStyles.set(targetDocument, injectedStyles); 887 } 888 if (injectedStyles.has(hash)) { 889 return; 890 } 891 if (documentContainsStyleHash3(targetDocument, hash)) { 892 injectedStyles.add(hash); 893 return; 894 } 895 const style = targetDocument.createElement("style"); 896 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); 897 style.appendChild(targetDocument.createTextNode(css)); 898 targetDocument.head.appendChild(style); 899 injectedStyles.add(hash); 900 } 901 function registerDocument3(targetDocument) { 902 const runtime = getRuntime3(); 903 runtime.documents.set( 904 targetDocument, 905 (runtime.documents.get(targetDocument) ?? 0) + 1 906 ); 907 for (const [hash, css] of runtime.styles) { 908 injectStyle3(targetDocument, hash, css); 909 } 910 return () => { 911 const count = runtime.documents.get(targetDocument); 912 if (count === void 0) { 913 return; 914 } 915 if (count <= 1) { 916 runtime.documents.delete(targetDocument); 917 return; 918 } 919 runtime.documents.set(targetDocument, count - 1); 920 }; 921 } 922 function registerStyle3(hash, css) { 923 const runtime = getRuntime3(); 924 runtime.styles.set(hash, css); 925 for (const targetDocument of runtime.documents.keys()) { 926 injectStyle3(targetDocument, hash, css); 927 } 928 } 929 if (typeof process === "undefined" || true) { 930 registerStyle3("e26bdc0796", ".eddbc0a77c8a621a__avatar{align-items:center;block-size:24px;display:flex;flex-shrink:0;inline-size:24px;justify-content:start;overflow:hidden}.eddbc0a77c8a621a__avatar img{block-size:16px;border-radius:100%;inline-size:16px;object-fit:cover;opacity:0}@media not (prefers-reduced-motion){.eddbc0a77c8a621a__avatar img{transition:opacity .1s linear}}.eddbc0a77c8a621a__avatar._5e74dacabd67dfdf__is-loaded img{opacity:1}.c0d40ce1da6dacc2__icon{block-size:24px;display:flex;flex-shrink:0;inline-size:24px}.c0d40ce1da6dacc2__icon svg{fill:currentColor;margin-inline-start:-4px}._9e337be7fe946fd4__name{overflow:hidden;text-overflow:ellipsis}"); 931 } 932 var style_default3 = { "avatar": "eddbc0a77c8a621a__avatar", "is-loaded": "_5e74dacabd67dfdf__is-loaded", "icon": "c0d40ce1da6dacc2__icon", "name": "_9e337be7fe946fd4__name" }; 933 function getIconForSource(originalSource) { 934 switch (originalSource) { 935 case "theme": 936 return layout_default; 937 case "plugin": 938 return plugins_default; 939 case "site": 940 return globe_default; 941 default: 942 return comment_author_avatar_default; 943 } 944 } 945 function TemplateAuthorView({ item }) { 946 const [isImageLoaded, setIsImageLoaded] = (0, import_element4.useState)(false); 947 const originalSource = item.original_source; 948 const icon = getIconForSource(originalSource); 949 const text = item.author_text; 950 const authorId = item.author; 951 const imageUrl = (0, import_data.useSelect)( 952 (select) => { 953 if (originalSource === "site") { 954 const siteData = select(import_core_data.store).getEntityRecord("root", "__unstableBase"); 955 const logoId = siteData?.site_logo; 956 if (!logoId) { 957 return void 0; 958 } 959 return select(import_core_data.store).getEntityRecord("postType", "attachment", logoId)?.source_url; 960 } 961 if (originalSource !== "user" || !authorId) { 962 return void 0; 963 } 964 return select(import_core_data.store).getUser(authorId)?.avatar_urls?.[48]; 965 }, 966 [originalSource, authorId] 967 ); 968 return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Stack, { direction: "row", align: "center", children: [ 969 imageUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( 970 "div", 971 { 972 className: clsx_default(style_default3.avatar, { 973 [style_default3["is-loaded"]]: isImageLoaded 974 }), 975 children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( 976 "img", 977 { 978 onLoad: () => setIsImageLoaded(true), 979 alt: "", 980 src: imageUrl 981 } 982 ) 983 } 984 ), 985 !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: style_default3.icon, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { icon }) }), 986 /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: style_default3.name, children: text }) 987 ] }); 988 } 989 990 // packages/core-fields/build-module/wp_template/author/get-author-elements.mjs 991 var import_data2 = __toESM(require_data(), 1); 992 var import_core_data2 = __toESM(require_core_data(), 1); 993 async function getAuthorElements(postType) { 994 const records = await (0, import_data2.resolveSelect)(import_core_data2.store).getEntityRecords( 995 "postType", 996 postType, 997 { per_page: -1, _fields: "id,author_text" } 998 ); 999 const seen = /* @__PURE__ */ new Set(); 1000 const elements = []; 1001 for (const record of records ?? []) { 1002 const value = record.author_text; 1003 if (value && !seen.has(value)) { 1004 seen.add(value); 1005 elements.push({ value, label: value }); 1006 } 1007 } 1008 return elements; 1009 } 1010 1011 // packages/core-fields/build-module/wp_template/author/field.mjs 1012 var fieldExtensions = { 1013 getValue: ({ item }) => item.author_text, 1014 render: TemplateAuthorView, 1015 getElements: () => getAuthorElements("wp_template") 1016 }; 1017 1018 // packages/core-fields/build-module/wp_template/description/utils.mjs 1019 var import_html_entities = __toESM(require_html_entities(), 1); 1020 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); 1021 var isCustomTemplate = (item) => item.source === "custom" && !item.has_theme_file && !!item.is_custom; 1022 var getValue = ({ item }) => (0, import_html_entities.decodeEntities)(item.description || ""); 1023 var render = ({ item }) => { 1024 const { description } = item; 1025 return description ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { children: (0, import_html_entities.decodeEntities)(description) }) : null; 1026 }; 1027 1028 // packages/core-fields/build-module/wp_template/description/field.mjs 1029 var fieldExtensions2 = { 1030 getValue, 1031 render, 1032 isVisible: isCustomTemplate 1033 }; 1034 1035 // packages/core-fields/build-module/wp_template/description_readonly/field.mjs 1036 var fieldExtensions3 = { 1037 getValue, 1038 render, 1039 // Shown when the description cannot be edited and there is one. 1040 isVisible: (item) => !isCustomTemplate(item) && !!item.description 1041 }; 1042 1043 // packages/core-fields/build-module/wp_template/default_comment_status/field.mjs 1044 var import_i18n = __toESM(require_i18n(), 1); 1045 var fieldExtensions4 = { 1046 getValue: ({ item }) => item.default_comment_status || "", 1047 setValue: ({ value }) => ({ 1048 default_comment_status: value || null 1049 }), 1050 render: ({ item }) => item.default_comment_status === "open" ? (0, import_i18n.__)("Comments open") : (0, import_i18n.__)("Comments closed") 1051 }; 1052 1053 // packages/core-fields/build-module/wp_template/posts_page_title/field.mjs 1054 var fieldExtensions5 = { 1055 getValue: ({ item }) => { 1056 const title = item.title; 1057 if (typeof title === "string") { 1058 return title; 1059 } 1060 return title?.raw ?? ""; 1061 }, 1062 setValue: ({ value }) => ({ title: value }) 1063 }; 1064 1065 // packages/core-fields/build-module/wp_template/posts_per_page/field.mjs 1066 var fieldExtensions6 = { 1067 getValue: ({ item }) => item.posts_per_page ?? 1, 1068 setValue: ({ value }) => ({ posts_per_page: value }) 1069 }; 1070 1071 // packages/core-fields/build-module/shared/title/get-item-title.mjs 1072 var import_html_entities2 = __toESM(require_html_entities(), 1); 1073 var import_i18n2 = __toESM(require_i18n(), 1); 1074 function getItemTitle(item, fallback = (0, import_i18n2.__)("(no title)")) { 1075 let title = ""; 1076 if (typeof item.title === "string") { 1077 title = (0, import_html_entities2.decodeEntities)(item.title); 1078 } else if (item.title && "rendered" in item.title) { 1079 title = (0, import_html_entities2.decodeEntities)(item.title.rendered ?? ""); 1080 } else if (item.title && "raw" in item.title) { 1081 title = (0, import_html_entities2.decodeEntities)(item.title.raw ?? ""); 1082 } 1083 return title || fallback; 1084 } 1085 1086 // packages/core-fields/build-module/shared/title/view.mjs 1087 var import_i18n3 = __toESM(require_i18n(), 1); 1088 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); 1089 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; 1090 function getRuntime4() { 1091 const globalScope = globalThis; 1092 if (globalScope.__wpStyleRuntime) { 1093 return globalScope.__wpStyleRuntime; 1094 } 1095 globalScope.__wpStyleRuntime = { 1096 documents: /* @__PURE__ */ new Map(), 1097 styles: /* @__PURE__ */ new Map(), 1098 injectedStyles: /* @__PURE__ */ new WeakMap() 1099 }; 1100 if (typeof document !== "undefined") { 1101 registerDocument4(document); 1102 } 1103 return globalScope.__wpStyleRuntime; 1104 } 1105 function documentContainsStyleHash4(targetDocument, hash) { 1106 if (!targetDocument.head) { 1107 return false; 1108 } 1109 for (const style of targetDocument.head.querySelectorAll( 1110 `style[$STYLE_HASH_ATTRIBUTE4}]` 1111 )) { 1112 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { 1113 return true; 1114 } 1115 } 1116 return false; 1117 } 1118 function injectStyle4(targetDocument, hash, css) { 1119 if (!targetDocument.head) { 1120 return; 1121 } 1122 const runtime = getRuntime4(); 1123 let injectedStyles = runtime.injectedStyles.get(targetDocument); 1124 if (!injectedStyles) { 1125 injectedStyles = /* @__PURE__ */ new Set(); 1126 runtime.injectedStyles.set(targetDocument, injectedStyles); 1127 } 1128 if (injectedStyles.has(hash)) { 1129 return; 1130 } 1131 if (documentContainsStyleHash4(targetDocument, hash)) { 1132 injectedStyles.add(hash); 1133 return; 1134 } 1135 const style = targetDocument.createElement("style"); 1136 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); 1137 style.appendChild(targetDocument.createTextNode(css)); 1138 targetDocument.head.appendChild(style); 1139 injectedStyles.add(hash); 1140 } 1141 function registerDocument4(targetDocument) { 1142 const runtime = getRuntime4(); 1143 runtime.documents.set( 1144 targetDocument, 1145 (runtime.documents.get(targetDocument) ?? 0) + 1 1146 ); 1147 for (const [hash, css] of runtime.styles) { 1148 injectStyle4(targetDocument, hash, css); 1149 } 1150 return () => { 1151 const count = runtime.documents.get(targetDocument); 1152 if (count === void 0) { 1153 return; 1154 } 1155 if (count <= 1) { 1156 runtime.documents.delete(targetDocument); 1157 return; 1158 } 1159 runtime.documents.set(targetDocument, count - 1); 1160 }; 1161 } 1162 function registerStyle4(hash, css) { 1163 const runtime = getRuntime4(); 1164 runtime.styles.set(hash, css); 1165 for (const targetDocument of runtime.documents.keys()) { 1166 injectStyle4(targetDocument, hash, css); 1167 } 1168 } 1169 if (typeof process === "undefined" || true) { 1170 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}"); 1171 } 1172 var style_default4 = { "title": "f17c7d5418aade3c__title", "pattern-title": "_86b9872383a1ab5e__pattern-title" }; 1173 function BaseTitleView({ 1174 item, 1175 className, 1176 children 1177 }) { 1178 const renderedTitle = getItemTitle(item); 1179 return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)( 1180 Stack, 1181 { 1182 direction: "row", 1183 align: "center", 1184 justify: "flex-start", 1185 gap: "sm", 1186 className: clsx_default("fields-field__title", style_default4.title, className), 1187 children: [ 1188 /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: renderedTitle || (0, import_i18n3.__)("(no title)") }), 1189 children 1190 ] 1191 } 1192 ); 1193 } 1194 function TitleView({ item }) { 1195 return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BaseTitleView, { item }); 1196 } 1197 1198 // packages/core-fields/build-module/wp_template/title/field.mjs 1199 var fieldExtensions7 = { 1200 getValue: ({ item }) => getItemTitle(item), 1201 render: TitleView 1202 }; 1203 1204 // packages/core-fields/build-module/wp_template/index.mjs 1205 var fields = { 1206 author: fieldExtensions, 1207 description: fieldExtensions2, 1208 description_readonly: fieldExtensions3, 1209 posts_page_title: fieldExtensions5, 1210 posts_per_page: fieldExtensions6, 1211 default_comment_status: fieldExtensions4, 1212 title: fieldExtensions7 1213 }; 1214 var wp_template_default = fields; 1215 export { 1216 wp_template_default as default 1217 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Wed Oct 21 08:20:34 2026 | Cross-referenced by PHPXref |