# gutenberg/trunk/build/scripts/block-library/index.js

Gutenberg, version trunk. 85,193 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/trunk/code/build/scripts/block-library/index.js
- Raw: https://pluginprobe.com/plugins/gutenberg/trunk/raw/build/scripts/block-library/index.js
- Modified: 2026-09-30T09:29:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/trunk/code/build/scripts/block-library/index.js#L10-L20`.

````javascript
(function() {
"use strict";
var wp;
(wp ||= {}).blockLibrary = (() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x3, {
    get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
  }) : x3)(function(x3) {
    if (typeof require !== "undefined") return require.apply(this, arguments);
    throw Error('Dynamic require of "' + x3 + '" is not supported');
  });
  var __commonJS = (cb, mod) => function __require2() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var __export = (target, all) => {
    for (var name118 in all)
      __defProp(target, name118, { get: all[name118], enumerable: true });
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from === "object" || typeof from === "function") {
      for (let key of __getOwnPropNames(from))
        if (!__hasOwnProp.call(to, key) && key !== except)
          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    }
    return to;
  };
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
    mod
  ));
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

  // package-external:@wordpress/blocks
  var require_blocks = __commonJS({
    "package-external:@wordpress/blocks"(exports, module) {
      module.exports = window.wp.blocks;
    }
  });

  // package-external:@wordpress/compose
  var require_compose = __commonJS({
    "package-external:@wordpress/compose"(exports, module) {
      module.exports = window.wp.compose;
    }
  });

  // package-external:@wordpress/data
  var require_data = __commonJS({
    "package-external:@wordpress/data"(exports, module) {
      module.exports = window.wp.data;
    }
  });

  // package-external:@wordpress/block-editor
  var require_block_editor = __commonJS({
    "package-external:@wordpress/block-editor"(exports, module) {
      module.exports = window.wp.blockEditor;
    }
  });

  // package-external:@wordpress/server-side-render
  var require_server_side_render = __commonJS({
    "package-external:@wordpress/server-side-render"(exports, module) {
      module.exports = window.wp.serverSideRender;
    }
  });

  // package-external:@wordpress/i18n
  var require_i18n = __commonJS({
    "package-external:@wordpress/i18n"(exports, module) {
      module.exports = window.wp.i18n;
    }
  });

  // node_modules/domelementtype/lib/index.js
  var require_lib = __commonJS({
    "node_modules/domelementtype/lib/index.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
      var ElementType;
      (function(ElementType2) {
        ElementType2["Root"] = "root";
        ElementType2["Text"] = "text";
        ElementType2["Directive"] = "directive";
        ElementType2["Comment"] = "comment";
        ElementType2["Script"] = "script";
        ElementType2["Style"] = "style";
        ElementType2["Tag"] = "tag";
        ElementType2["CDATA"] = "cdata";
        ElementType2["Doctype"] = "doctype";
      })(ElementType = exports.ElementType || (exports.ElementType = {}));
      function isTag(elem) {
        return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
      }
      exports.isTag = isTag;
      exports.Root = ElementType.Root;
      exports.Text = ElementType.Text;
      exports.Directive = ElementType.Directive;
      exports.Comment = ElementType.Comment;
      exports.Script = ElementType.Script;
      exports.Style = ElementType.Style;
      exports.Tag = ElementType.Tag;
      exports.CDATA = ElementType.CDATA;
      exports.Doctype = ElementType.Doctype;
    }
  });

  // node_modules/domhandler/lib/node.js
  var require_node = __commonJS({
    "node_modules/domhandler/lib/node.js"(exports) {
      "use strict";
      var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
        var extendStatics = function(d, b) {
          extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
            d2.__proto__ = b2;
          } || function(d2, b2) {
            for (var p2 in b2) if (Object.prototype.hasOwnProperty.call(b2, p2)) d2[p2] = b2[p2];
          };
          return extendStatics(d, b);
        };
        return function(d, b) {
          if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
          extendStatics(d, b);
          function __257() {
            this.constructor = d;
          }
          d.prototype = b === null ? Object.create(b) : (__257.prototype = b.prototype, new __257());
        };
      })();
      var __assign2 = exports && exports.__assign || function() {
        __assign2 = Object.assign || function(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2))
              t[p2] = s[p2];
          }
          return t;
        };
        return __assign2.apply(this, arguments);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
      var domelementtype_1 = require_lib();
      var Node2 = (
        /** @class */
        (function() {
          function Node3() {
            this.parent = null;
            this.prev = null;
            this.next = null;
            this.startIndex = null;
            this.endIndex = null;
          }
          Object.defineProperty(Node3.prototype, "parentNode", {
            // Read-write aliases for properties
            /**
             * Same as {@link parent}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.parent;
            },
            set: function(parent) {
              this.parent = parent;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node3.prototype, "previousSibling", {
            /**
             * Same as {@link prev}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.prev;
            },
            set: function(prev) {
              this.prev = prev;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Node3.prototype, "nextSibling", {
            /**
             * Same as {@link next}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.next;
            },
            set: function(next2) {
              this.next = next2;
            },
            enumerable: false,
            configurable: true
          });
          Node3.prototype.cloneNode = function(recursive) {
            if (recursive === void 0) {
              recursive = false;
            }
            return cloneNode(this, recursive);
          };
          return Node3;
        })()
      );
      exports.Node = Node2;
      var DataNode = (
        /** @class */
        (function(_super) {
          __extends(DataNode2, _super);
          function DataNode2(data) {
            var _this = _super.call(this) || this;
            _this.data = data;
            return _this;
          }
          Object.defineProperty(DataNode2.prototype, "nodeValue", {
            /**
             * Same as {@link data}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.data;
            },
            set: function(data) {
              this.data = data;
            },
            enumerable: false,
            configurable: true
          });
          return DataNode2;
        })(Node2)
      );
      exports.DataNode = DataNode;
      var Text3 = (
        /** @class */
        (function(_super) {
          __extends(Text4, _super);
          function Text4() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Text;
            return _this;
          }
          Object.defineProperty(Text4.prototype, "nodeType", {
            get: function() {
              return 3;
            },
            enumerable: false,
            configurable: true
          });
          return Text4;
        })(DataNode)
      );
      exports.Text = Text3;
      var Comment2 = (
        /** @class */
        (function(_super) {
          __extends(Comment3, _super);
          function Comment3() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Comment;
            return _this;
          }
          Object.defineProperty(Comment3.prototype, "nodeType", {
            get: function() {
              return 8;
            },
            enumerable: false,
            configurable: true
          });
          return Comment3;
        })(DataNode)
      );
      exports.Comment = Comment2;
      var ProcessingInstruction2 = (
        /** @class */
        (function(_super) {
          __extends(ProcessingInstruction3, _super);
          function ProcessingInstruction3(name118, data) {
            var _this = _super.call(this, data) || this;
            _this.name = name118;
            _this.type = domelementtype_1.ElementType.Directive;
            return _this;
          }
          Object.defineProperty(ProcessingInstruction3.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          return ProcessingInstruction3;
        })(DataNode)
      );
      exports.ProcessingInstruction = ProcessingInstruction2;
      var NodeWithChildren = (
        /** @class */
        (function(_super) {
          __extends(NodeWithChildren2, _super);
          function NodeWithChildren2(children) {
            var _this = _super.call(this) || this;
            _this.children = children;
            return _this;
          }
          Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
            // Aliases
            /** First child of the node. */
            get: function() {
              var _a;
              return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
            /** Last child of the node. */
            get: function() {
              return this.children.length > 0 ? this.children[this.children.length - 1] : null;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
            /**
             * Same as {@link children}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.children;
            },
            set: function(children) {
              this.children = children;
            },
            enumerable: false,
            configurable: true
          });
          return NodeWithChildren2;
        })(Node2)
      );
      exports.NodeWithChildren = NodeWithChildren;
      var CDATA = (
        /** @class */
        (function(_super) {
          __extends(CDATA2, _super);
          function CDATA2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.CDATA;
            return _this;
          }
          Object.defineProperty(CDATA2.prototype, "nodeType", {
            get: function() {
              return 4;
            },
            enumerable: false,
            configurable: true
          });
          return CDATA2;
        })(NodeWithChildren)
      );
      exports.CDATA = CDATA;
      var Document = (
        /** @class */
        (function(_super) {
          __extends(Document2, _super);
          function Document2() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.type = domelementtype_1.ElementType.Root;
            return _this;
          }
          Object.defineProperty(Document2.prototype, "nodeType", {
            get: function() {
              return 9;
            },
            enumerable: false,
            configurable: true
          });
          return Document2;
        })(NodeWithChildren)
      );
      exports.Document = Document;
      var Element3 = (
        /** @class */
        (function(_super) {
          __extends(Element4, _super);
          function Element4(name118, attribs, children, type) {
            if (children === void 0) {
              children = [];
            }
            if (type === void 0) {
              type = name118 === "script" ? domelementtype_1.ElementType.Script : name118 === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
            }
            var _this = _super.call(this, children) || this;
            _this.name = name118;
            _this.attribs = attribs;
            _this.type = type;
            return _this;
          }
          Object.defineProperty(Element4.prototype, "nodeType", {
            get: function() {
              return 1;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element4.prototype, "tagName", {
            // DOM Level 1 aliases
            /**
             * Same as {@link name}.
             * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
             */
            get: function() {
              return this.name;
            },
            set: function(name118) {
              this.name = name118;
            },
            enumerable: false,
            configurable: true
          });
          Object.defineProperty(Element4.prototype, "attributes", {
            get: function() {
              var _this = this;
              return Object.keys(this.attribs).map(function(name118) {
                var _a, _b;
                return {
                  name: name118,
                  value: _this.attribs[name118],
                  namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name118],
                  prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name118]
                };
              });
            },
            enumerable: false,
            configurable: true
          });
          return Element4;
        })(NodeWithChildren)
      );
      exports.Element = Element3;
      function isTag(node) {
        return (0, domelementtype_1.isTag)(node);
      }
      exports.isTag = isTag;
      function isCDATA(node) {
        return node.type === domelementtype_1.ElementType.CDATA;
      }
      exports.isCDATA = isCDATA;
      function isText(node) {
        return node.type === domelementtype_1.ElementType.Text;
      }
      exports.isText = isText;
      function isComment(node) {
        return node.type === domelementtype_1.ElementType.Comment;
      }
      exports.isComment = isComment;
      function isDirective(node) {
        return node.type === domelementtype_1.ElementType.Directive;
      }
      exports.isDirective = isDirective;
      function isDocument(node) {
        return node.type === domelementtype_1.ElementType.Root;
      }
      exports.isDocument = isDocument;
      function hasChildren(node) {
        return Object.prototype.hasOwnProperty.call(node, "children");
      }
      exports.hasChildren = hasChildren;
      function cloneNode(node, recursive) {
        if (recursive === void 0) {
          recursive = false;
        }
        var result;
        if (isText(node)) {
          result = new Text3(node.data);
        } else if (isComment(node)) {
          result = new Comment2(node.data);
        } else if (isTag(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_1 = new Element3(node.name, __assign2({}, node.attribs), children);
          children.forEach(function(child) {
            return child.parent = clone_1;
          });
          if (node.namespace != null) {
            clone_1.namespace = node.namespace;
          }
          if (node["x-attribsNamespace"]) {
            clone_1["x-attribsNamespace"] = __assign2({}, node["x-attribsNamespace"]);
          }
          if (node["x-attribsPrefix"]) {
            clone_1["x-attribsPrefix"] = __assign2({}, node["x-attribsPrefix"]);
          }
          result = clone_1;
        } else if (isCDATA(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_2 = new CDATA(children);
          children.forEach(function(child) {
            return child.parent = clone_2;
          });
          result = clone_2;
        } else if (isDocument(node)) {
          var children = recursive ? cloneChildren(node.children) : [];
          var clone_3 = new Document(children);
          children.forEach(function(child) {
            return child.parent = clone_3;
          });
          if (node["x-mode"]) {
            clone_3["x-mode"] = node["x-mode"];
          }
          result = clone_3;
        } else if (isDirective(node)) {
          var instruction = new ProcessingInstruction2(node.name, node.data);
          if (node["x-name"] != null) {
            instruction["x-name"] = node["x-name"];
            instruction["x-publicId"] = node["x-publicId"];
            instruction["x-systemId"] = node["x-systemId"];
          }
          result = instruction;
        } else {
          throw new Error("Not implemented yet: ".concat(node.type));
        }
        result.startIndex = node.startIndex;
        result.endIndex = node.endIndex;
        if (node.sourceCodeLocation != null) {
          result.sourceCodeLocation = node.sourceCodeLocation;
        }
        return result;
      }
      exports.cloneNode = cloneNode;
      function cloneChildren(childs) {
        var children = childs.map(function(child) {
          return cloneNode(child, true);
        });
        for (var i = 1; i < children.length; i++) {
          children[i].prev = children[i - 1];
          children[i - 1].next = children[i];
        }
        return children;
      }
    }
  });

  // node_modules/domhandler/lib/index.js
  var require_lib2 = __commonJS({
    "node_modules/domhandler/lib/index.js"(exports) {
      "use strict";
      var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m3, k2, k22) {
        if (k22 === void 0) k22 = k2;
        var desc = Object.getOwnPropertyDescriptor(m3, k2);
        if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) {
          desc = { enumerable: true, get: function() {
            return m3[k2];
          } };
        }
        Object.defineProperty(o, k22, desc);
      }) : (function(o, m3, k2, k22) {
        if (k22 === void 0) k22 = k2;
        o[k22] = m3[k2];
      }));
      var __exportStar = exports && exports.__exportStar || function(m3, exports2) {
        for (var p2 in m3) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m3, p2);
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.DomHandler = void 0;
      var domelementtype_1 = require_lib();
      var node_js_1 = require_node();
      __exportStar(require_node(), exports);
      var defaultOpts = {
        withStartIndices: false,
        withEndIndices: false,
        xmlMode: false
      };
      var DomHandler = (
        /** @class */
        (function() {
          function DomHandler2(callback, options2, elementCB) {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
            if (typeof options2 === "function") {
              elementCB = options2;
              options2 = defaultOpts;
            }
            if (typeof callback === "object") {
              options2 = callback;
              callback = void 0;
            }
            this.callback = callback !== null && callback !== void 0 ? callback : null;
            this.options = options2 !== null && options2 !== void 0 ? options2 : defaultOpts;
            this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
          }
          DomHandler2.prototype.onparserinit = function(parser) {
            this.parser = parser;
          };
          DomHandler2.prototype.onreset = function() {
            this.dom = [];
            this.root = new node_js_1.Document(this.dom);
            this.done = false;
            this.tagStack = [this.root];
            this.lastNode = null;
            this.parser = null;
          };
          DomHandler2.prototype.onend = function() {
            if (this.done)
              return;
            this.done = true;
            this.parser = null;
            this.handleCallback(null);
          };
          DomHandler2.prototype.onerror = function(error2) {
            this.handleCallback(error2);
          };
          DomHandler2.prototype.onclosetag = function() {
            this.lastNode = null;
            var elem = this.tagStack.pop();
            if (this.options.withEndIndices) {
              elem.endIndex = this.parser.endIndex;
            }
            if (this.elementCB)
              this.elementCB(elem);
          };
          DomHandler2.prototype.onopentag = function(name118, attribs) {
            var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
            var element = new node_js_1.Element(name118, attribs, void 0, type);
            this.addNode(element);
            this.tagStack.push(element);
          };
          DomHandler2.prototype.ontext = function(data) {
            var lastNode = this.lastNode;
            if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
              lastNode.data += data;
              if (this.options.withEndIndices) {
                lastNode.endIndex = this.parser.endIndex;
              }
            } else {
              var node = new node_js_1.Text(data);
              this.addNode(node);
              this.lastNode = node;
            }
          };
          DomHandler2.prototype.oncomment = function(data) {
            if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
              this.lastNode.data += data;
              return;
            }
            var node = new node_js_1.Comment(data);
            this.addNode(node);
            this.lastNode = node;
          };
          DomHandler2.prototype.oncommentend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.oncdatastart = function() {
            var text = new node_js_1.Text("");
            var node = new node_js_1.CDATA([text]);
            this.addNode(node);
            text.parent = node;
            this.lastNode = text;
          };
          DomHandler2.prototype.oncdataend = function() {
            this.lastNode = null;
          };
          DomHandler2.prototype.onprocessinginstruction = function(name118, data) {
            var node = new node_js_1.ProcessingInstruction(name118, data);
            this.addNode(node);
          };
          DomHandler2.prototype.handleCallback = function(error2) {
            if (typeof this.callback === "function") {
              this.callback(error2, this.dom);
            } else if (error2) {
              throw error2;
            }
          };
          DomHandler2.prototype.addNode = function(node) {
            var parent = this.tagStack[this.tagStack.length - 1];
            var previousSibling = parent.children[parent.children.length - 1];
            if (this.options.withStartIndices) {
              node.startIndex = this.parser.startIndex;
            }
            if (this.options.withEndIndices) {
              node.endIndex = this.parser.endIndex;
            }
            parent.children.push(node);
            if (previousSibling) {
              node.prev = previousSibling;
              previousSibling.next = node;
            }
            node.parent = parent;
            this.lastNode = null;
          };
          return DomHandler2;
        })()
      );
      exports.DomHandler = DomHandler;
      exports.default = DomHandler;
    }
  });

  // node_modules/html-dom-parser/lib/client/constants.js
  var require_constants = __commonJS({
    "node_modules/html-dom-parser/lib/client/constants.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = exports.CARRIAGE_RETURN_PLACEHOLDER = exports.CARRIAGE_RETURN_REGEX = exports.CARRIAGE_RETURN = exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES = void 0;
      exports.CASE_SENSITIVE_TAG_NAMES = [
        "animateMotion",
        "animateTransform",
        "clipPath",
        "feBlend",
        "feColorMatrix",
        "feComponentTransfer",
        "feComposite",
        "feConvolveMatrix",
        "feDiffuseLighting",
        "feDisplacementMap",
        "feDropShadow",
        "feFlood",
        "feFuncA",
        "feFuncB",
        "feFuncG",
        "feFuncR",
        "feGaussianBlur",
        "feImage",
        "feMerge",
        "feMergeNode",
        "feMorphology",
        "feOffset",
        "fePointLight",
        "feSpecularLighting",
        "feSpotLight",
        "feTile",
        "feTurbulence",
        "foreignObject",
        "linearGradient",
        "radialGradient",
        "textPath"
      ];
      exports.CASE_SENSITIVE_TAG_NAMES_MAP = exports.CASE_SENSITIVE_TAG_NAMES.reduce(function(accumulator, tagName) {
        accumulator[tagName.toLowerCase()] = tagName;
        return accumulator;
      }, {});
      exports.CARRIAGE_RETURN = "\r";
      exports.CARRIAGE_RETURN_REGEX = new RegExp(exports.CARRIAGE_RETURN, "g");
      exports.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__");
      exports.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(exports.CARRIAGE_RETURN_PLACEHOLDER, "g");
    }
  });

  // node_modules/html-dom-parser/lib/client/utilities.js
  var require_utilities = __commonJS({
    "node_modules/html-dom-parser/lib/client/utilities.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.formatAttributes = formatAttributes;
      exports.escapeSpecialCharacters = escapeSpecialCharacters;
      exports.revertEscapedCharacters = revertEscapedCharacters;
      exports.formatDOM = formatDOM;
      var domhandler_1 = require_lib2();
      var constants_1 = require_constants();
      function getCaseSensitiveTagName(tagName) {
        return constants_1.CASE_SENSITIVE_TAG_NAMES_MAP[tagName];
      }
      function formatAttributes(attributes2) {
        var map = {};
        var index2 = 0;
        var attributesLength = attributes2.length;
        for (; index2 < attributesLength; index2++) {
          var attribute = attributes2[index2];
          map[attribute.name] = attribute.value;
        }
        return map;
      }
      function formatTagName(tagName) {
        tagName = tagName.toLowerCase();
        var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
        if (caseSensitiveTagName) {
          return caseSensitiveTagName;
        }
        return tagName;
      }
      function escapeSpecialCharacters(html) {
        return html.replace(constants_1.CARRIAGE_RETURN_REGEX, constants_1.CARRIAGE_RETURN_PLACEHOLDER);
      }
      function revertEscapedCharacters(text) {
        return text.replace(constants_1.CARRIAGE_RETURN_PLACEHOLDER_REGEX, constants_1.CARRIAGE_RETURN);
      }
      function formatDOM(nodes, parent, directive) {
        if (parent === void 0) {
          parent = null;
        }
        var domNodes = [];
        var current;
        var index2 = 0;
        var nodesLength = nodes.length;
        for (; index2 < nodesLength; index2++) {
          var node = nodes[index2];
          switch (node.nodeType) {
            case 1: {
              var tagName = formatTagName(node.nodeName);
              current = new domhandler_1.Element(tagName, formatAttributes(node.attributes));
              current.children = formatDOM(
                // template children are on content
                tagName === "template" ? node.content.childNodes : node.childNodes,
                current
              );
              break;
            }
            case 3:
              current = new domhandler_1.Text(revertEscapedCharacters(node.nodeValue));
              break;
            case 8:
              current = new domhandler_1.Comment(node.nodeValue);
              break;
            default:
              continue;
          }
          var prev = domNodes[index2 - 1] || null;
          if (prev) {
            prev.next = current;
          }
          current.parent = parent;
          current.prev = prev;
          current.next = null;
          domNodes.push(current);
        }
        if (directive) {
          current = new domhandler_1.ProcessingInstruction(directive.substring(0, directive.indexOf(" ")).toLowerCase(), directive);
          current.next = domNodes[0] || null;
          current.parent = parent;
          domNodes.unshift(current);
          if (domNodes[1]) {
            domNodes[1].prev = domNodes[0];
          }
        }
        return domNodes;
      }
    }
  });

  // node_modules/html-dom-parser/lib/client/domparser.js
  var require_domparser = __commonJS({
    "node_modules/html-dom-parser/lib/client/domparser.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = domparser;
      var utilities_1 = require_utilities();
      var HTML = "html";
      var HEAD = "head";
      var BODY = "body";
      var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/;
      var HEAD_TAG_REGEX = /<head[^]*>/i;
      var BODY_TAG_REGEX = /<body[^]*>/i;
      var parseFromDocument = function(html, tagName) {
        throw new Error("This browser does not support `document.implementation.createHTMLDocument`");
      };
      var parseFromString = function(html, tagName) {
        throw new Error("This browser does not support `DOMParser.prototype.parseFromString`");
      };
      var DOMParser = typeof window === "object" && window.DOMParser;
      if (typeof DOMParser === "function") {
        domParser_1 = new DOMParser();
        mimeType_1 = "text/html";
        parseFromString = function(html, tagName) {
          if (tagName) {
            html = "<".concat(tagName, ">").concat(html, "</").concat(tagName, ">");
          }
          return domParser_1.parseFromString(html, mimeType_1);
        };
        parseFromDocument = parseFromString;
      }
      var domParser_1;
      var mimeType_1;
      if (typeof document === "object" && document.implementation) {
        htmlDocument_1 = document.implementation.createHTMLDocument();
        parseFromDocument = function(html, tagName) {
          if (tagName) {
            var element = htmlDocument_1.documentElement.querySelector(tagName);
            if (element) {
              element.innerHTML = html;
            }
            return htmlDocument_1;
          }
          htmlDocument_1.documentElement.innerHTML = html;
          return htmlDocument_1;
        };
      }
      var htmlDocument_1;
      var template = typeof document === "object" && document.createElement("template");
      var parseFromTemplate;
      if (template && template.content) {
        parseFromTemplate = function(html) {
          template.innerHTML = html;
          return template.content.childNodes;
        };
      }
      function domparser(html) {
        var _a, _b;
        html = (0, utilities_1.escapeSpecialCharacters)(html);
        var match = html.match(FIRST_TAG_REGEX);
        var firstTagName = match && match[1] ? match[1].toLowerCase() : "";
        switch (firstTagName) {
          case HTML: {
            var doc = parseFromString(html);
            if (!HEAD_TAG_REGEX.test(html)) {
              var element = doc.querySelector(HEAD);
              (_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
            }
            if (!BODY_TAG_REGEX.test(html)) {
              var element = doc.querySelector(BODY);
              (_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element);
            }
            return doc.querySelectorAll(HTML);
          }
          case HEAD:
          case BODY: {
            var elements = parseFromDocument(html).querySelectorAll(firstTagName);
            if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
              return elements[0].parentNode.childNodes;
            }
            return elements;
          }
          // low-level tag or text
          default: {
            if (parseFromTemplate) {
              return parseFromTemplate(html);
            }
            var element = parseFromDocument(html, BODY).querySelector(BODY);
            return element.childNodes;
          }
        }
      }
    }
  });

  // node_modules/html-dom-parser/lib/client/html-to-dom.js
  var require_html_to_dom = __commonJS({
    "node_modules/html-dom-parser/lib/client/html-to-dom.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = HTMLDOMParser;
      var domparser_1 = __importDefault(require_domparser());
      var utilities_1 = require_utilities();
      var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/;
      function HTMLDOMParser(html) {
        if (typeof html !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!html) {
          return [];
        }
        var match = html.match(DIRECTIVE_REGEX);
        var directive = match ? match[1] : void 0;
        return (0, utilities_1.formatDOM)((0, domparser_1.default)(html), null, directive);
      }
    }
  });

  // node_modules/react-property/lib/possibleStandardNamesOptimized.js
  var require_possibleStandardNamesOptimized = __commonJS({
    "node_modules/react-property/lib/possibleStandardNamesOptimized.js"(exports) {
      var SAME = 0;
      exports.SAME = SAME;
      var CAMELCASE = 1;
      exports.CAMELCASE = CAMELCASE;
      exports.possibleStandardNames = {
        accept: 0,
        acceptCharset: 1,
        "accept-charset": "acceptCharset",
        accessKey: 1,
        action: 0,
        allowFullScreen: 1,
        alt: 0,
        as: 0,
        async: 0,
        autoCapitalize: 1,
        autoComplete: 1,
        autoCorrect: 1,
        autoFocus: 1,
        autoPlay: 1,
        autoSave: 1,
        capture: 0,
        cellPadding: 1,
        cellSpacing: 1,
        challenge: 0,
        charSet: 1,
        checked: 0,
        children: 0,
        cite: 0,
        class: "className",
        classID: 1,
        className: 1,
        cols: 0,
        colSpan: 1,
        content: 0,
        contentEditable: 1,
        contextMenu: 1,
        controls: 0,
        controlsList: 1,
        coords: 0,
        crossOrigin: 1,
        dangerouslySetInnerHTML: 1,
        data: 0,
        dateTime: 1,
        default: 0,
        defaultChecked: 1,
        defaultValue: 1,
        defer: 0,
        dir: 0,
        disabled: 0,
        disablePictureInPicture: 1,
        disableRemotePlayback: 1,
        download: 0,
        draggable: 0,
        encType: 1,
        enterKeyHint: 1,
        for: "htmlFor",
        form: 0,
        formMethod: 1,
        formAction: 1,
        formEncType: 1,
        formNoValidate: 1,
        formTarget: 1,
        frameBorder: 1,
        headers: 0,
        height: 0,
        hidden: 0,
        high: 0,
        href: 0,
        hrefLang: 1,
        htmlFor: 1,
        httpEquiv: 1,
        "http-equiv": "httpEquiv",
        icon: 0,
        id: 0,
        innerHTML: 1,
        inputMode: 1,
        integrity: 0,
        is: 0,
        itemID: 1,
        itemProp: 1,
        itemRef: 1,
        itemScope: 1,
        itemType: 1,
        keyParams: 1,
        keyType: 1,
        kind: 0,
        label: 0,
        lang: 0,
        list: 0,
        loop: 0,
        low: 0,
        manifest: 0,
        marginWidth: 1,
        marginHeight: 1,
        max: 0,
        maxLength: 1,
        media: 0,
        mediaGroup: 1,
        method: 0,
        min: 0,
        minLength: 1,
        multiple: 0,
        muted: 0,
        name: 0,
        noModule: 1,
        nonce: 0,
        noValidate: 1,
        open: 0,
        optimum: 0,
        pattern: 0,
        placeholder: 0,
        playsInline: 1,
        poster: 0,
        preload: 0,
        profile: 0,
        radioGroup: 1,
        readOnly: 1,
        referrerPolicy: 1,
        rel: 0,
        required: 0,
        reversed: 0,
        role: 0,
        rows: 0,
        rowSpan: 1,
        sandbox: 0,
        scope: 0,
        scoped: 0,
        scrolling: 0,
        seamless: 0,
        selected: 0,
        shape: 0,
        size: 0,
        sizes: 0,
        span: 0,
        spellCheck: 1,
        src: 0,
        srcDoc: 1,
        srcLang: 1,
        srcSet: 1,
        start: 0,
        step: 0,
        style: 0,
        summary: 0,
        tabIndex: 1,
        target: 0,
        title: 0,
        type: 0,
        useMap: 1,
        value: 0,
        width: 0,
        wmode: 0,
        wrap: 0,
        about: 0,
        accentHeight: 1,
        "accent-height": "accentHeight",
        accumulate: 0,
        additive: 0,
        alignmentBaseline: 1,
        "alignment-baseline": "alignmentBaseline",
        allowReorder: 1,
        alphabetic: 0,
        amplitude: 0,
        arabicForm: 1,
        "arabic-form": "arabicForm",
        ascent: 0,
        attributeName: 1,
        attributeType: 1,
        autoReverse: 1,
        azimuth: 0,
        baseFrequency: 1,
        baselineShift: 1,
        "baseline-shift": "baselineShift",
        baseProfile: 1,
        bbox: 0,
        begin: 0,
        bias: 0,
        by: 0,
        calcMode: 1,
        capHeight: 1,
        "cap-height": "capHeight",
        clip: 0,
        clipPath: 1,
        "clip-path": "clipPath",
        clipPathUnits: 1,
        clipRule: 1,
        "clip-rule": "clipRule",
        color: 0,
        colorInterpolation: 1,
        "color-interpolation": "colorInterpolation",
        colorInterpolationFilters: 1,
        "color-interpolation-filters": "colorInterpolationFilters",
        colorProfile: 1,
        "color-profile": "colorProfile",
        colorRendering: 1,
        "color-rendering": "colorRendering",
        contentScriptType: 1,
        contentStyleType: 1,
        cursor: 0,
        cx: 0,
        cy: 0,
        d: 0,
        datatype: 0,
        decelerate: 0,
        descent: 0,
        diffuseConstant: 1,
        direction: 0,
        display: 0,
        divisor: 0,
        dominantBaseline: 1,
        "dominant-baseline": "dominantBaseline",
        dur: 0,
        dx: 0,
        dy: 0,
        edgeMode: 1,
        elevation: 0,
        enableBackground: 1,
        "enable-background": "enableBackground",
        end: 0,
        exponent: 0,
        externalResourcesRequired: 1,
        fill: 0,
        fillOpacity: 1,
        "fill-opacity": "fillOpacity",
        fillRule: 1,
        "fill-rule": "fillRule",
        filter: 0,
        filterRes: 1,
        filterUnits: 1,
        floodOpacity: 1,
        "flood-opacity": "floodOpacity",
        floodColor: 1,
        "flood-color": "floodColor",
        focusable: 0,
        fontFamily: 1,
        "font-family": "fontFamily",
        fontSize: 1,
        "font-size": "fontSize",
        fontSizeAdjust: 1,
        "font-size-adjust": "fontSizeAdjust",
        fontStretch: 1,
        "font-stretch": "fontStretch",
        fontStyle: 1,
        "font-style": "fontStyle",
        fontVariant: 1,
        "font-variant": "fontVariant",
        fontWeight: 1,
        "font-weight": "fontWeight",
        format: 0,
        from: 0,
        fx: 0,
        fy: 0,
        g1: 0,
        g2: 0,
        glyphName: 1,
        "glyph-name": "glyphName",
        glyphOrientationHorizontal: 1,
        "glyph-orientation-horizontal": "glyphOrientationHorizontal",
        glyphOrientationVertical: 1,
        "glyph-orientation-vertical": "glyphOrientationVertical",
        glyphRef: 1,
        gradientTransform: 1,
        gradientUnits: 1,
        hanging: 0,
        horizAdvX: 1,
        "horiz-adv-x": "horizAdvX",
        horizOriginX: 1,
        "horiz-origin-x": "horizOriginX",
        ideographic: 0,
        imageRendering: 1,
        "image-rendering": "imageRendering",
        in2: 0,
        in: 0,
        inlist: 0,
        intercept: 0,
        k1: 0,
        k2: 0,
        k3: 0,
        k4: 0,
        k: 0,
        kernelMatrix: 1,
        kernelUnitLength: 1,
        kerning: 0,
        keyPoints: 1,
        keySplines: 1,
        keyTimes: 1,
        lengthAdjust: 1,
        letterSpacing: 1,
        "letter-spacing": "letterSpacing",
        lightingColor: 1,
        "lighting-color": "lightingColor",
        limitingConeAngle: 1,
        local: 0,
        markerEnd: 1,
        "marker-end": "markerEnd",
        markerHeight: 1,
        markerMid: 1,
        "marker-mid": "markerMid",
        markerStart: 1,
        "marker-start": "markerStart",
        markerUnits: 1,
        markerWidth: 1,
        mask: 0,
        maskContentUnits: 1,
        maskUnits: 1,
        mathematical: 0,
        mode: 0,
        numOctaves: 1,
        offset: 0,
        opacity: 0,
        operator: 0,
        order: 0,
        orient: 0,
        orientation: 0,
        origin: 0,
        overflow: 0,
        overlinePosition: 1,
        "overline-position": "overlinePosition",
        overlineThickness: 1,
        "overline-thickness": "overlineThickness",
        paintOrder: 1,
        "paint-order": "paintOrder",
        panose1: 0,
        "panose-1": "panose1",
        pathLength: 1,
        patternContentUnits: 1,
        patternTransform: 1,
        patternUnits: 1,
        pointerEvents: 1,
        "pointer-events": "pointerEvents",
        points: 0,
        pointsAtX: 1,
        pointsAtY: 1,
        pointsAtZ: 1,
        prefix: 0,
        preserveAlpha: 1,
        preserveAspectRatio: 1,
        primitiveUnits: 1,
        property: 0,
        r: 0,
        radius: 0,
        refX: 1,
        refY: 1,
        renderingIntent: 1,
        "rendering-intent": "renderingIntent",
        repeatCount: 1,
        repeatDur: 1,
        requiredExtensions: 1,
        requiredFeatures: 1,
        resource: 0,
        restart: 0,
        result: 0,
        results: 0,
        rotate: 0,
        rx: 0,
        ry: 0,
        scale: 0,
        security: 0,
        seed: 0,
        shapeRendering: 1,
        "shape-rendering": "shapeRendering",
        slope: 0,
        spacing: 0,
        specularConstant: 1,
        specularExponent: 1,
        speed: 0,
        spreadMethod: 1,
        startOffset: 1,
        stdDeviation: 1,
        stemh: 0,
        stemv: 0,
        stitchTiles: 1,
        stopColor: 1,
        "stop-color": "stopColor",
        stopOpacity: 1,
        "stop-opacity": "stopOpacity",
        strikethroughPosition: 1,
        "strikethrough-position": "strikethroughPosition",
        strikethroughThickness: 1,
        "strikethrough-thickness": "strikethroughThickness",
        string: 0,
        stroke: 0,
        strokeDasharray: 1,
        "stroke-dasharray": "strokeDasharray",
        strokeDashoffset: 1,
        "stroke-dashoffset": "strokeDashoffset",
        strokeLinecap: 1,
        "stroke-linecap": "strokeLinecap",
        strokeLinejoin: 1,
        "stroke-linejoin": "strokeLinejoin",
        strokeMiterlimit: 1,
        "stroke-miterlimit": "strokeMiterlimit",
        strokeWidth: 1,
        "stroke-width": "strokeWidth",
        strokeOpacity: 1,
        "stroke-opacity": "strokeOpacity",
        suppressContentEditableWarning: 1,
        suppressHydrationWarning: 1,
        surfaceScale: 1,
        systemLanguage: 1,
        tableValues: 1,
        targetX: 1,
        targetY: 1,
        textAnchor: 1,
        "text-anchor": "textAnchor",
        textDecoration: 1,
        "text-decoration": "textDecoration",
        textLength: 1,
        textRendering: 1,
        "text-rendering": "textRendering",
        to: 0,
        transform: 0,
        typeof: 0,
        u1: 0,
        u2: 0,
        underlinePosition: 1,
        "underline-position": "underlinePosition",
        underlineThickness: 1,
        "underline-thickness": "underlineThickness",
        unicode: 0,
        unicodeBidi: 1,
        "unicode-bidi": "unicodeBidi",
        unicodeRange: 1,
        "unicode-range": "unicodeRange",
        unitsPerEm: 1,
        "units-per-em": "unitsPerEm",
        unselectable: 0,
        vAlphabetic: 1,
        "v-alphabetic": "vAlphabetic",
        values: 0,
        vectorEffect: 1,
        "vector-effect": "vectorEffect",
        version: 0,
        vertAdvY: 1,
        "vert-adv-y": "vertAdvY",
        vertOriginX: 1,
        "vert-origin-x": "vertOriginX",
        vertOriginY: 1,
        "vert-origin-y": "vertOriginY",
        vHanging: 1,
        "v-hanging": "vHanging",
        vIdeographic: 1,
        "v-ideographic": "vIdeographic",
        viewBox: 1,
        viewTarget: 1,
        visibility: 0,
        vMathematical: 1,
        "v-mathematical": "vMathematical",
        vocab: 0,
        widths: 0,
        wordSpacing: 1,
        "word-spacing": "wordSpacing",
        writingMode: 1,
        "writing-mode": "writingMode",
        x1: 0,
        x2: 0,
        x: 0,
        xChannelSelector: 1,
        xHeight: 1,
        "x-height": "xHeight",
        xlinkActuate: 1,
        "xlink:actuate": "xlinkActuate",
        xlinkArcrole: 1,
        "xlink:arcrole": "xlinkArcrole",
        xlinkHref: 1,
        "xlink:href": "xlinkHref",
        xlinkRole: 1,
        "xlink:role": "xlinkRole",
        xlinkShow: 1,
        "xlink:show": "xlinkShow",
        xlinkTitle: 1,
        "xlink:title": "xlinkTitle",
        xlinkType: 1,
        "xlink:type": "xlinkType",
        xmlBase: 1,
        "xml:base": "xmlBase",
        xmlLang: 1,
        "xml:lang": "xmlLang",
        xmlns: 0,
        "xml:space": "xmlSpace",
        xmlnsXlink: 1,
        "xmlns:xlink": "xmlnsXlink",
        xmlSpace: 1,
        y1: 0,
        y2: 0,
        y: 0,
        yChannelSelector: 1,
        z: 0,
        zoomAndPan: 1
      };
    }
  });

  // node_modules/react-property/lib/index.js
  var require_lib3 = __commonJS({
    "node_modules/react-property/lib/index.js"(exports) {
      "use strict";
      var RESERVED = 0;
      var STRING = 1;
      var BOOLEANISH_STRING = 2;
      var BOOLEAN = 3;
      var OVERLOADED_BOOLEAN = 4;
      var NUMERIC = 5;
      var POSITIVE_NUMERIC = 6;
      function getPropertyInfo(name118) {
        return properties.hasOwnProperty(name118) ? properties[name118] : null;
      }
      function PropertyInfoRecord(name118, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
        this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
        this.attributeName = attributeName;
        this.attributeNamespace = attributeNamespace;
        this.mustUseProperty = mustUseProperty;
        this.propertyName = name118;
        this.type = type;
        this.sanitizeURL = sanitizeURL;
        this.removeEmptyString = removeEmptyString;
      }
      var properties = {};
      var reservedProps = [
        "children",
        "dangerouslySetInnerHTML",
        // TODO: This prevents the assignment of defaultValue to regular
        // elements (not just inputs). Now that ReactDOMInput assigns to the
        // defaultValue property -- do we need this?
        "defaultValue",
        "defaultChecked",
        "innerHTML",
        "suppressContentEditableWarning",
        "suppressHydrationWarning",
        "style"
      ];
      reservedProps.forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          RESERVED,
          false,
          // mustUseProperty
          name118,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        ["acceptCharset", "accept-charset"],
        ["className", "class"],
        ["htmlFor", "for"],
        ["httpEquiv", "http-equiv"]
      ].forEach(([name118, attributeName]) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["contentEditable", "draggable", "spellCheck", "value"].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          BOOLEANISH_STRING,
          false,
          // mustUseProperty
          name118.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "autoReverse",
        "externalResourcesRequired",
        "focusable",
        "preserveAlpha"
      ].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          BOOLEANISH_STRING,
          false,
          // mustUseProperty
          name118,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "allowFullScreen",
        "async",
        // Note: there is a special case that prevents it from being written to the DOM
        // on the client side because the browsers are inconsistent. Instead we call focus().
        "autoFocus",
        "autoPlay",
        "controls",
        "default",
        "defer",
        "disabled",
        "disablePictureInPicture",
        "disableRemotePlayback",
        "formNoValidate",
        "hidden",
        "loop",
        "noModule",
        "noValidate",
        "open",
        "playsInline",
        "readOnly",
        "required",
        "reversed",
        "scoped",
        "seamless",
        // Microdata
        "itemScope"
      ].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          BOOLEAN,
          false,
          // mustUseProperty
          name118.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "checked",
        // Note: `option.selected` is not updated if `select.multiple` is
        // disabled with `removeAttribute`. We have special logic for handling this.
        "multiple",
        "muted",
        "selected"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          BOOLEAN,
          true,
          // mustUseProperty
          name118,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "capture",
        "download"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          OVERLOADED_BOOLEAN,
          false,
          // mustUseProperty
          name118,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "cols",
        "rows",
        "size",
        "span"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          POSITIVE_NUMERIC,
          false,
          // mustUseProperty
          name118,
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["rowSpan", "start"].forEach((name118) => {
        properties[name118] = new PropertyInfoRecord(
          name118,
          NUMERIC,
          false,
          // mustUseProperty
          name118.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      var CAMELIZE = /[\-\:]([a-z])/g;
      var capitalize2 = (token) => token[1].toUpperCase();
      [
        "accent-height",
        "alignment-baseline",
        "arabic-form",
        "baseline-shift",
        "cap-height",
        "clip-path",
        "clip-rule",
        "color-interpolation",
        "color-interpolation-filters",
        "color-profile",
        "color-rendering",
        "dominant-baseline",
        "enable-background",
        "fill-opacity",
        "fill-rule",
        "flood-color",
        "flood-opacity",
        "font-family",
        "font-size",
        "font-size-adjust",
        "font-stretch",
        "font-style",
        "font-variant",
        "font-weight",
        "glyph-name",
        "glyph-orientation-horizontal",
        "glyph-orientation-vertical",
        "horiz-adv-x",
        "horiz-origin-x",
        "image-rendering",
        "letter-spacing",
        "lighting-color",
        "marker-end",
        "marker-mid",
        "marker-start",
        "overline-position",
        "overline-thickness",
        "paint-order",
        "panose-1",
        "pointer-events",
        "rendering-intent",
        "shape-rendering",
        "stop-color",
        "stop-opacity",
        "strikethrough-position",
        "strikethrough-thickness",
        "stroke-dasharray",
        "stroke-dashoffset",
        "stroke-linecap",
        "stroke-linejoin",
        "stroke-miterlimit",
        "stroke-opacity",
        "stroke-width",
        "text-anchor",
        "text-decoration",
        "text-rendering",
        "underline-position",
        "underline-thickness",
        "unicode-bidi",
        "unicode-range",
        "units-per-em",
        "v-alphabetic",
        "v-hanging",
        "v-ideographic",
        "v-mathematical",
        "vector-effect",
        "vert-adv-y",
        "vert-origin-x",
        "vert-origin-y",
        "word-spacing",
        "writing-mode",
        "xmlns:xlink",
        "x-height"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name118 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name118] = new PropertyInfoRecord(
          name118,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "xlink:actuate",
        "xlink:arcrole",
        "xlink:role",
        "xlink:show",
        "xlink:title",
        "xlink:type"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name118 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name118] = new PropertyInfoRecord(
          name118,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          "http://www.w3.org/1999/xlink",
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      [
        "xml:base",
        "xml:lang",
        "xml:space"
        // NOTE: if you add a camelCased prop to this list,
        // you'll need to set attributeName to name.toLowerCase()
        // instead in the assignment below.
      ].forEach((attributeName) => {
        const name118 = attributeName.replace(CAMELIZE, capitalize2);
        properties[name118] = new PropertyInfoRecord(
          name118,
          STRING,
          false,
          // mustUseProperty
          attributeName,
          "http://www.w3.org/XML/1998/namespace",
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      ["tabIndex", "crossOrigin"].forEach((attributeName) => {
        properties[attributeName] = new PropertyInfoRecord(
          attributeName,
          STRING,
          false,
          // mustUseProperty
          attributeName.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          false,
          // sanitizeURL
          false
          // removeEmptyString
        );
      });
      var xlinkHref = "xlinkHref";
      properties[xlinkHref] = new PropertyInfoRecord(
        "xlinkHref",
        STRING,
        false,
        // mustUseProperty
        "xlink:href",
        "http://www.w3.org/1999/xlink",
        true,
        // sanitizeURL
        false
        // removeEmptyString
      );
      ["src", "href", "action", "formAction"].forEach((attributeName) => {
        properties[attributeName] = new PropertyInfoRecord(
          attributeName,
          STRING,
          false,
          // mustUseProperty
          attributeName.toLowerCase(),
          // attributeName
          null,
          // attributeNamespace
          true,
          // sanitizeURL
          true
          // removeEmptyString
        );
      });
      var {
        CAMELCASE,
        SAME,
        possibleStandardNames: possibleStandardNamesOptimized
      } = require_possibleStandardNamesOptimized();
      var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
      var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
      var isCustomAttribute = RegExp.prototype.test.bind(
        // eslint-disable-next-line no-misleading-character-class
        new RegExp("^(data|aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$")
      );
      var possibleStandardNames = Object.keys(
        possibleStandardNamesOptimized
      ).reduce((accumulator, standardName) => {
        const propName = possibleStandardNamesOptimized[standardName];
        if (propName === SAME) {
          accumulator[standardName] = standardName;
        } else if (propName === CAMELCASE) {
          accumulator[standardName.toLowerCase()] = standardName;
        } else {
          accumulator[standardName] = propName;
        }
        return accumulator;
      }, {});
      exports.BOOLEAN = BOOLEAN;
      exports.BOOLEANISH_STRING = BOOLEANISH_STRING;
      exports.NUMERIC = NUMERIC;
      exports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;
      exports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;
      exports.RESERVED = RESERVED;
      exports.STRING = STRING;
      exports.getPropertyInfo = getPropertyInfo;
      exports.isCustomAttribute = isCustomAttribute;
      exports.possibleStandardNames = possibleStandardNames;
    }
  });

  // vendor-external:react
  var require_react = __commonJS({
    "vendor-external:react"(exports, module) {
      module.exports = window.React;
    }
  });

  // node_modules/inline-style-parser/cjs/index.js
  var require_cjs = __commonJS({
    "node_modules/inline-style-parser/cjs/index.js"(exports, module) {
      "use strict";
      var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
      var NEWLINE_REGEX = /\n/g;
      var WHITESPACE_REGEX = /^\s*/;
      var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
      var COLON_REGEX = /^:\s*/;
      var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
      var SEMICOLON_REGEX = /^[;\s]*/;
      var TRIM_REGEX = /^\s+|\s+$/g;
      var NEWLINE = "\n";
      var FORWARD_SLASH = "/";
      var ASTERISK = "*";
      var EMPTY_STRING = "";
      var TYPE_COMMENT = "comment";
      var TYPE_DECLARATION = "declaration";
      function index2(style2, options2) {
        if (typeof style2 !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!style2) return [];
        options2 = options2 || {};
        var lineno = 1;
        var column = 1;
        function updatePosition(str) {
          var lines = str.match(NEWLINE_REGEX);
          if (lines) lineno += lines.length;
          var i = str.lastIndexOf(NEWLINE);
          column = ~i ? str.length - i : column + str.length;
        }
        function position() {
          var start = { line: lineno, column };
          return function(node) {
            node.position = new Position(start);
            whitespace();
            return node;
          };
        }
        function Position(start) {
          this.start = start;
          this.end = { line: lineno, column };
          this.source = options2.source;
        }
        Position.prototype.content = style2;
        function error2(msg) {
          var err = new Error(
            options2.source + ":" + lineno + ":" + column + ": " + msg
          );
          err.reason = msg;
          err.filename = options2.source;
          err.line = lineno;
          err.column = column;
          err.source = style2;
          if (options2.silent) ;
          else {
            throw err;
          }
        }
        function match(re) {
          var m3 = re.exec(style2);
          if (!m3) return;
          var str = m3[0];
          updatePosition(str);
          style2 = style2.slice(str.length);
          return m3;
        }
        function whitespace() {
          match(WHITESPACE_REGEX);
        }
        function comments(rules) {
          var c2;
          rules = rules || [];
          while (c2 = comment()) {
            if (c2 !== false) {
              rules.push(c2);
            }
          }
          return rules;
        }
        function comment() {
          var pos = position();
          if (FORWARD_SLASH != style2.charAt(0) || ASTERISK != style2.charAt(1)) return;
          var i = 2;
          while (EMPTY_STRING != style2.charAt(i) && (ASTERISK != style2.charAt(i) || FORWARD_SLASH != style2.charAt(i + 1))) {
            ++i;
          }
          i += 2;
          if (EMPTY_STRING === style2.charAt(i - 1)) {
            return error2("End of comment missing");
          }
          var str = style2.slice(2, i - 2);
          column += 2;
          updatePosition(str);
          style2 = style2.slice(i);
          column += 2;
          return pos({
            type: TYPE_COMMENT,
            comment: str
          });
        }
        function declaration() {
          var pos = position();
          var prop = match(PROPERTY_REGEX);
          if (!prop) return;
          comment();
          if (!match(COLON_REGEX)) return error2("property missing ':'");
          var val = match(VALUE_REGEX);
          var ret = pos({
            type: TYPE_DECLARATION,
            property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
            value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
          });
          match(SEMICOLON_REGEX);
          return ret;
        }
        function declarations() {
          var decls = [];
          comments(decls);
          var decl;
          while (decl = declaration()) {
            if (decl !== false) {
              decls.push(decl);
              comments(decls);
            }
          }
          return decls;
        }
        whitespace();
        return declarations();
      }
      function trim(str) {
        return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
      }
      module.exports = index2;
    }
  });

  // node_modules/style-to-object/cjs/index.js
  var require_cjs2 = __commonJS({
    "node_modules/style-to-object/cjs/index.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = StyleToObject;
      var inline_style_parser_1 = __importDefault(require_cjs());
      function StyleToObject(style2, iterator) {
        let styleObject = null;
        if (!style2 || typeof style2 !== "string") {
          return styleObject;
        }
        const declarations = (0, inline_style_parser_1.default)(style2);
        const hasIterator = typeof iterator === "function";
        declarations.forEach((declaration) => {
          if (declaration.type !== "declaration") {
            return;
          }
          const { property, value } = declaration;
          if (hasIterator) {
            iterator(property, value, declaration);
          } else if (value) {
            styleObject = styleObject || {};
            styleObject[property] = value;
          }
        });
        return styleObject;
      }
    }
  });

  // node_modules/style-to-js/cjs/utilities.js
  var require_utilities2 = __commonJS({
    "node_modules/style-to-js/cjs/utilities.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.camelCase = void 0;
      var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
      var HYPHEN_REGEX = /-([a-z])/g;
      var NO_HYPHEN_REGEX = /^[^-]+$/;
      var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
      var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
      var skipCamelCase = function(property) {
        return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
      };
      var capitalize2 = function(match, character) {
        return character.toUpperCase();
      };
      var trimHyphen = function(match, prefix) {
        return "".concat(prefix, "-");
      };
      var camelCase = function(property, options2) {
        if (options2 === void 0) {
          options2 = {};
        }
        if (skipCamelCase(property)) {
          return property;
        }
        property = property.toLowerCase();
        if (options2.reactCompat) {
          property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
        } else {
          property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
        }
        return property.replace(HYPHEN_REGEX, capitalize2);
      };
      exports.camelCase = camelCase;
    }
  });

  // node_modules/style-to-js/cjs/index.js
  var require_cjs3 = __commonJS({
    "node_modules/style-to-js/cjs/index.js"(exports, module) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      var style_to_object_1 = __importDefault(require_cjs2());
      var utilities_1 = require_utilities2();
      function StyleToJS(style2, options2) {
        var output = {};
        if (!style2 || typeof style2 !== "string") {
          return output;
        }
        (0, style_to_object_1.default)(style2, function(property, value) {
          if (property && value) {
            output[(0, utilities_1.camelCase)(property, options2)] = value;
          }
        });
        return output;
      }
      StyleToJS.default = StyleToJS;
      module.exports = StyleToJS;
    }
  });

  // node_modules/html-react-parser/lib/utilities.js
  var require_utilities3 = __commonJS({
    "node_modules/html-react-parser/lib/utilities.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0;
      exports.isCustomComponent = isCustomComponent;
      exports.setStyleProp = setStyleProp;
      var react_1 = require_react();
      var style_to_js_1 = __importDefault(require_cjs3());
      var RESERVED_SVG_MATHML_ELEMENTS = /* @__PURE__ */ new Set([
        "annotation-xml",
        "color-profile",
        "font-face",
        "font-face-src",
        "font-face-uri",
        "font-face-format",
        "font-face-name",
        "missing-glyph"
      ]);
      function isCustomComponent(tagName, props) {
        if (!tagName.includes("-")) {
          return Boolean(props && typeof props.is === "string");
        }
        if (RESERVED_SVG_MATHML_ELEMENTS.has(tagName)) {
          return false;
        }
        return true;
      }
      var styleOptions = {
        reactCompat: true
      };
      function setStyleProp(style2, props) {
        if (typeof style2 !== "string") {
          return;
        }
        if (!style2.trim()) {
          props.style = {};
          return;
        }
        try {
          props.style = (0, style_to_js_1.default)(style2, styleOptions);
        } catch (error2) {
          props.style = {};
        }
      }
      exports.PRESERVE_CUSTOM_ATTRIBUTES = Number(react_1.version.split(".")[0]) >= 16;
      exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([
        "tr",
        "tbody",
        "thead",
        "tfoot",
        "colgroup",
        "table",
        "head",
        "html",
        "frameset"
      ]);
      var canTextBeChildOfNode = function(node) {
        return !exports.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(node.name);
      };
      exports.canTextBeChildOfNode = canTextBeChildOfNode;
      var returnFirstArg = function(arg) {
        return arg;
      };
      exports.returnFirstArg = returnFirstArg;
    }
  });

  // node_modules/html-react-parser/lib/attributes-to-props.js
  var require_attributes_to_props = __commonJS({
    "node_modules/html-react-parser/lib/attributes-to-props.js"(exports) {
      "use strict";
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = attributesToProps2;
      var react_property_1 = require_lib3();
      var utilities_1 = require_utilities3();
      var UNCONTROLLED_COMPONENT_ATTRIBUTES = ["checked", "value"];
      var UNCONTROLLED_COMPONENT_NAMES = ["input", "select", "textarea"];
      var valueOnlyInputs = {
        reset: true,
        submit: true
      };
      function attributesToProps2(attributes2, nodeName) {
        if (attributes2 === void 0) {
          attributes2 = {};
        }
        var props = {};
        var isInputValueOnly = Boolean(attributes2.type && valueOnlyInputs[attributes2.type]);
        for (var attributeName in attributes2) {
          var attributeValue = attributes2[attributeName];
          if ((0, react_property_1.isCustomAttribute)(attributeName)) {
            props[attributeName] = attributeValue;
            continue;
          }
          var attributeNameLowerCased = attributeName.toLowerCase();
          var propName = getPropName(attributeNameLowerCased);
          if (propName) {
            var propertyInfo = (0, react_property_1.getPropertyInfo)(propName);
            if (UNCONTROLLED_COMPONENT_ATTRIBUTES.includes(propName) && UNCONTROLLED_COMPONENT_NAMES.includes(nodeName) && !isInputValueOnly) {
              propName = getPropName("default" + attributeNameLowerCased);
            }
            props[propName] = attributeValue;
            switch (propertyInfo && propertyInfo.type) {
              case react_property_1.BOOLEAN:
                props[propName] = true;
                break;
              case react_property_1.OVERLOADED_BOOLEAN:
                if (attributeValue === "") {
                  props[propName] = true;
                }
                break;
            }
            continue;
          }
          if (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES) {
            props[attributeName] = attributeValue;
          }
        }
        (0, utilities_1.setStyleProp)(attributes2.style, props);
        return props;
      }
      function getPropName(attributeName) {
        return react_property_1.possibleStandardNames[attributeName];
      }
    }
  });

  // node_modules/html-react-parser/lib/dom-to-react.js
  var require_dom_to_react = __commonJS({
    "node_modules/html-react-parser/lib/dom-to-react.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.default = domToReact2;
      var react_1 = require_react();
      var attributes_to_props_1 = __importDefault(require_attributes_to_props());
      var utilities_1 = require_utilities3();
      var React51 = {
        cloneElement: react_1.cloneElement,
        createElement: react_1.createElement,
        isValidElement: react_1.isValidElement
      };
      function domToReact2(nodes, options2) {
        if (options2 === void 0) {
          options2 = {};
        }
        var reactElements = [];
        var hasReplace = typeof options2.replace === "function";
        var transform = options2.transform || utilities_1.returnFirstArg;
        var _a = options2.library || React51, cloneElement5 = _a.cloneElement, createElement3 = _a.createElement, isValidElement3 = _a.isValidElement;
        var nodesLength = nodes.length;
        for (var index2 = 0; index2 < nodesLength; index2++) {
          var node = nodes[index2];
          if (hasReplace) {
            var replaceElement = options2.replace(node, index2);
            if (isValidElement3(replaceElement)) {
              if (nodesLength > 1) {
                replaceElement = cloneElement5(replaceElement, {
                  key: replaceElement.key || index2
                });
              }
              reactElements.push(transform(replaceElement, node, index2));
              continue;
            }
          }
          if (node.type === "text") {
            var isWhitespace = !node.data.trim().length;
            if (isWhitespace && node.parent && !(0, utilities_1.canTextBeChildOfNode)(node.parent)) {
              continue;
            }
            if (options2.trim && isWhitespace) {
              continue;
            }
            reactElements.push(transform(node.data, node, index2));
            continue;
          }
          var element = node;
          var props = {};
          if (skipAttributesToProps(element)) {
            (0, utilities_1.setStyleProp)(element.attribs.style, element.attribs);
            props = element.attribs;
          } else if (element.attribs) {
            props = (0, attributes_to_props_1.default)(element.attribs, element.name);
          }
          var children = void 0;
          switch (node.type) {
            case "script":
            case "style":
              if (node.children[0]) {
                props.dangerouslySetInnerHTML = {
                  __html: node.children[0].data
                };
              }
              break;
            case "tag":
              if (node.name === "textarea" && node.children[0]) {
                props.defaultValue = node.children[0].data;
              } else if (node.children && node.children.length) {
                children = domToReact2(node.children, options2);
              }
              break;
            // skip all other cases (e.g., comment)
            default:
              continue;
          }
          if (nodesLength > 1) {
            props.key = index2;
          }
          reactElements.push(transform(createElement3(node.name, props, children), node, index2));
        }
        return reactElements.length === 1 ? reactElements[0] : reactElements;
      }
      function skipAttributesToProps(node) {
        return utilities_1.PRESERVE_CUSTOM_ATTRIBUTES && node.type === "tag" && (0, utilities_1.isCustomComponent)(node.name, node.attribs);
      }
    }
  });

  // node_modules/html-react-parser/lib/index.js
  var require_lib4 = __commonJS({
    "node_modules/html-react-parser/lib/index.js"(exports) {
      "use strict";
      var __importDefault = exports && exports.__importDefault || function(mod) {
        return mod && mod.__esModule ? mod : { "default": mod };
      };
      Object.defineProperty(exports, "__esModule", { value: true });
      exports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;
      exports.default = HTMLReactParser2;
      var html_dom_parser_1 = __importDefault(require_html_to_dom());
      exports.htmlToDOM = html_dom_parser_1.default;
      var attributes_to_props_1 = __importDefault(require_attributes_to_props());
      exports.attributesToProps = attributes_to_props_1.default;
      var dom_to_react_1 = __importDefault(require_dom_to_react());
      exports.domToReact = dom_to_react_1.default;
      var domhandler_1 = require_lib2();
      Object.defineProperty(exports, "Comment", { enumerable: true, get: function() {
        return domhandler_1.Comment;
      } });
      Object.defineProperty(exports, "Element", { enumerable: true, get: function() {
        return domhandler_1.Element;
      } });
      Object.defineProperty(exports, "ProcessingInstruction", { enumerable: true, get: function() {
        return domhandler_1.ProcessingInstruction;
      } });
      Object.defineProperty(exports, "Text", { enumerable: true, get: function() {
        return domhandler_1.Text;
      } });
      var domParserOptions = { lowerCaseAttributeNames: false };
      function HTMLReactParser2(html, options2) {
        if (typeof html !== "string") {
          throw new TypeError("First argument must be a string");
        }
        if (!html) {
          return [];
        }
        return (0, dom_to_react_1.default)((0, html_dom_parser_1.default)(html, (options2 === null || options2 === void 0 ? void 0 : options2.htmlparser2) || domParserOptions), options2);
      }
    }
  });

  // package-external:@wordpress/dom
  var require_dom = __commonJS({
    "package-external:@wordpress/dom"(exports, module) {
      module.exports = window.wp.dom;
    }
  });

  // vendor-external:react/jsx-runtime
  var require_jsx_runtime = __commonJS({
    "vendor-external:react/jsx-runtime"(exports, module) {
      module.exports = window.ReactJSXRuntime;
    }
  });

  // package-external:@wordpress/element
  var require_element = __commonJS({
    "package-external:@wordpress/element"(exports, module) {
      module.exports = window.wp.element;
    }
  });

  // package-external:@wordpress/primitives
  var require_primitives = __commonJS({
    "package-external:@wordpress/primitives"(exports, module) {
      module.exports = window.wp.primitives;
    }
  });

  // package-external:@wordpress/components
  var require_components = __commonJS({
    "package-external:@wordpress/components"(exports, module) {
      module.exports = window.wp.components;
    }
  });

  // package-external:@wordpress/blob
  var require_blob = __commonJS({
    "package-external:@wordpress/blob"(exports, module) {
      module.exports = window.wp.blob;
    }
  });

  // package-external:@wordpress/core-data
  var require_core_data = __commonJS({
    "package-external:@wordpress/core-data"(exports, module) {
      module.exports = window.wp.coreData;
    }
  });

  // package-external:@wordpress/url
  var require_url = __commonJS({
    "package-external:@wordpress/url"(exports, module) {
      module.exports = window.wp.url;
    }
  });

  // package-external:@wordpress/html-entities
  var require_html_entities = __commonJS({
    "package-external:@wordpress/html-entities"(exports, module) {
      module.exports = window.wp.htmlEntities;
    }
  });

  // vendor-external:react-dom
  var require_react_dom = __commonJS({
    "vendor-external:react-dom"(exports, module) {
      module.exports = window.ReactDOM;
    }
  });

  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  var require_use_sync_external_store_shim_development = __commonJS({
    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
      "use strict";
      (function() {
        function is(x3, y2) {
          return x3 === y2 && (0 !== x3 || 1 / x3 === 1 / y2) || x3 !== x3 && y2 !== y2;
        }
        function useSyncExternalStore$2(subscribe2, getSnapshot2) {
          didWarnOld18Alpha || void 0 === React51.startTransition || (didWarnOld18Alpha = true, console.error(
            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
          ));
          var value = getSnapshot2();
          if (!didWarnUncachedGetSnapshot) {
            var cachedValue = getSnapshot2();
            objectIs(value, cachedValue) || (console.error(
              "The result of getSnapshot should be cached to avoid an infinite loop"
            ), didWarnUncachedGetSnapshot = true);
          }
          cachedValue = useState91({
            inst: { value, getSnapshot: getSnapshot2 }
          });
          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
          useLayoutEffect5(
            function() {
              inst.value = value;
              inst.getSnapshot = getSnapshot2;
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
            },
            [subscribe2, value, getSnapshot2]
          );
          useEffect69(
            function() {
              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              return subscribe2(function() {
                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
              });
            },
            [subscribe2]
          );
          useDebugValue(value);
          return value;
        }
        function checkIfSnapshotChanged(inst) {
          var latestGetSnapshot = inst.getSnapshot;
          inst = inst.value;
          try {
            var nextValue = latestGetSnapshot();
            return !objectIs(inst, nextValue);
          } catch (error2) {
            return true;
          }
        }
        function useSyncExternalStore$1(subscribe2, getSnapshot2) {
          return getSnapshot2();
        }
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
        var React51 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState91 = React51.useState, useEffect69 = React51.useEffect, useLayoutEffect5 = React51.useLayoutEffect, useDebugValue = React51.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
        exports.useSyncExternalStore = void 0 !== React51.useSyncExternalStore ? React51.useSyncExternalStore : shim;
        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
      })();
    }
  });

  // node_modules/use-sync-external-store/shim/index.js
  var require_shim = __commonJS({
    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
      "use strict";
      if (false) {
        module.exports = null;
      } else {
        module.exports = require_use_sync_external_store_shim_development();
      }
    }
  });

  // package-external:@wordpress/private-apis
  var require_private_apis = __commonJS({
    "package-external:@wordpress/private-apis"(exports, module) {
      module.exports = window.wp.privateApis;
    }
  });

  // package-external:@wordpress/a11y
  var require_a11y = __commonJS({
    "package-external:@wordpress/a11y"(exports, module) {
      module.exports = window.wp.a11y;
    }
  });

  // package-external:@wordpress/notices
  var require_notices = __commonJS({
    "package-external:@wordpress/notices"(exports, module) {
      module.exports = window.wp.notices;
    }
  });

  // package-external:@wordpress/keycodes
  var require_keycodes = __commonJS({
    "package-external:@wordpress/keycodes"(exports, module) {
      module.exports = window.wp.keycodes;
    }
  });

  // package-external:@wordpress/deprecated
  var require_deprecated = __commonJS({
    "package-external:@wordpress/deprecated"(exports, module) {
      module.exports = window.wp.deprecated;
    }
  });

  // package-external:@wordpress/rich-text
  var require_rich_text = __commonJS({
    "package-external:@wordpress/rich-text"(exports, module) {
      module.exports = window.wp.richText;
    }
  });

  // package-external:@wordpress/date
  var require_date = __commonJS({
    "package-external:@wordpress/date"(exports, module) {
      module.exports = window.wp.date;
    }
  });

  // package-external:@wordpress/api-fetch
  var require_api_fetch = __commonJS({
    "package-external:@wordpress/api-fetch"(exports, module) {
      module.exports = window.wp.apiFetch;
    }
  });

  // package-external:@wordpress/hooks
  var require_hooks = __commonJS({
    "package-external:@wordpress/hooks"(exports, module) {
      module.exports = window.wp.hooks;
    }
  });

  // package-external:@wordpress/style-engine
  var require_style_engine = __commonJS({
    "package-external:@wordpress/style-engine"(exports, module) {
      module.exports = window.wp.styleEngine;
    }
  });

  // node_modules/fast-deep-equal/es6/index.js
  var require_es6 = __commonJS({
    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
      "use strict";
      module.exports = function equal(a, b) {
        if (a === b) return true;
        if (a && b && typeof a == "object" && typeof b == "object") {
          if (a.constructor !== b.constructor) return false;
          var length, i, keys;
          if (Array.isArray(a)) {
            length = a.length;
            if (length != b.length) return false;
            for (i = length; i-- !== 0; )
              if (!equal(a[i], b[i])) return false;
            return true;
          }
          if (a instanceof Map && b instanceof Map) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            for (i of a.entries())
              if (!equal(i[1], b.get(i[0]))) return false;
            return true;
          }
          if (a instanceof Set && b instanceof Set) {
            if (a.size !== b.size) return false;
            for (i of a.entries())
              if (!b.has(i[0])) return false;
            return true;
          }
          if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
            length = a.length;
            if (length != b.length) return false;
            for (i = length; i-- !== 0; )
              if (a[i] !== b[i]) return false;
            return true;
          }
          if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
          if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
          if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
          keys = Object.keys(a);
          length = keys.length;
          if (length !== Object.keys(b).length) return false;
          for (i = length; i-- !== 0; )
            if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
          for (i = length; i-- !== 0; ) {
            var key = keys[i];
            if (!equal(a[key], b[key])) return false;
          }
          return true;
        }
        return a !== a && b !== b;
      };
    }
  });

  // node_modules/remove-accents/index.js
  var require_remove_accents = __commonJS({
    "node_modules/remove-accents/index.js"(exports, module) {
      var characterMap = {
        "\xC0": "A",
        "\xC1": "A",
        "\xC2": "A",
        "\xC3": "A",
        "\xC4": "A",
        "\xC5": "A",
        "\u1EA4": "A",
        "\u1EAE": "A",
        "\u1EB2": "A",
        "\u1EB4": "A",
        "\u1EB6": "A",
        "\xC6": "AE",
        "\u1EA6": "A",
        "\u1EB0": "A",
        "\u0202": "A",
        "\u1EA2": "A",
        "\u1EA0": "A",
        "\u1EA8": "A",
        "\u1EAA": "A",
        "\u1EAC": "A",
        "\xC7": "C",
        "\u1E08": "C",
        "\xC8": "E",
        "\xC9": "E",
        "\xCA": "E",
        "\xCB": "E",
        "\u1EBE": "E",
        "\u1E16": "E",
        "\u1EC0": "E",
        "\u1E14": "E",
        "\u1E1C": "E",
        "\u0206": "E",
        "\u1EBA": "E",
        "\u1EBC": "E",
        "\u1EB8": "E",
        "\u1EC2": "E",
        "\u1EC4": "E",
        "\u1EC6": "E",
        "\xCC": "I",
        "\xCD": "I",
        "\xCE": "I",
        "\xCF": "I",
        "\u1E2E": "I",
        "\u020A": "I",
        "\u1EC8": "I",
        "\u1ECA": "I",
        "\xD0": "D",
        "\xD1": "N",
        "\xD2": "O",
        "\xD3": "O",
        "\xD4": "O",
        "\xD5": "O",
        "\xD6": "O",
        "\xD8": "O",
        "\u1ED0": "O",
        "\u1E4C": "O",
        "\u1E52": "O",
        "\u020E": "O",
        "\u1ECE": "O",
        "\u1ECC": "O",
        "\u1ED4": "O",
        "\u1ED6": "O",
        "\u1ED8": "O",
        "\u1EDC": "O",
        "\u1EDE": "O",
        "\u1EE0": "O",
        "\u1EDA": "O",
        "\u1EE2": "O",
        "\xD9": "U",
        "\xDA": "U",
        "\xDB": "U",
        "\xDC": "U",
        "\u1EE6": "U",
        "\u1EE4": "U",
        "\u1EEC": "U",
        "\u1EEE": "U",
        "\u1EF0": "U",
        "\xDD": "Y",
        "\xE0": "a",
        "\xE1": "a",
        "\xE2": "a",
        "\xE3": "a",
        "\xE4": "a",
        "\xE5": "a",
        "\u1EA5": "a",
        "\u1EAF": "a",
        "\u1EB3": "a",
        "\u1EB5": "a",
        "\u1EB7": "a",
        "\xE6": "ae",
        "\u1EA7": "a",
        "\u1EB1": "a",
        "\u0203": "a",
        "\u1EA3": "a",
        "\u1EA1": "a",
        "\u1EA9": "a",
        "\u1EAB": "a",
        "\u1EAD": "a",
        "\xE7": "c",
        "\u1E09": "c",
        "\xE8": "e",
        "\xE9": "e",
        "\xEA": "e",
        "\xEB": "e",
        "\u1EBF": "e",
        "\u1E17": "e",
        "\u1EC1": "e",
        "\u1E15": "e",
        "\u1E1D": "e",
        "\u0207": "e",
        "\u1EBB": "e",
        "\u1EBD": "e",
        "\u1EB9": "e",
        "\u1EC3": "e",
        "\u1EC5": "e",
        "\u1EC7": "e",
        "\xEC": "i",
        "\xED": "i",
        "\xEE": "i",
        "\xEF": "i",
        "\u1E2F": "i",
        "\u020B": "i",
        "\u1EC9": "i",
        "\u1ECB": "i",
        "\xF0": "d",
        "\xF1": "n",
        "\xF2": "o",
        "\xF3": "o",
        "\xF4": "o",
        "\xF5": "o",
        "\xF6": "o",
        "\xF8": "o",
        "\u1ED1": "o",
        "\u1E4D": "o",
        "\u1E53": "o",
        "\u020F": "o",
        "\u1ECF": "o",
        "\u1ECD": "o",
        "\u1ED5": "o",
        "\u1ED7": "o",
        "\u1ED9": "o",
        "\u1EDD": "o",
        "\u1EDF": "o",
        "\u1EE1": "o",
        "\u1EDB": "o",
        "\u1EE3": "o",
        "\xF9": "u",
        "\xFA": "u",
        "\xFB": "u",
        "\xFC": "u",
        "\u1EE7": "u",
        "\u1EE5": "u",
        "\u1EED": "u",
        "\u1EEF": "u",
        "\u1EF1": "u",
        "\xFD": "y",
        "\xFF": "y",
        "\u0100": "A",
        "\u0101": "a",
        "\u0102": "A",
        "\u0103": "a",
        "\u0104": "A",
        "\u0105": "a",
        "\u0106": "C",
        "\u0107": "c",
        "\u0108": "C",
        "\u0109": "c",
        "\u010A": "C",
        "\u010B": "c",
        "\u010C": "C",
        "\u010D": "c",
        "C\u0306": "C",
        "c\u0306": "c",
        "\u010E": "D",
        "\u010F": "d",
        "\u0110": "D",
        "\u0111": "d",
        "\u0112": "E",
        "\u0113": "e",
        "\u0114": "E",
        "\u0115": "e",
        "\u0116": "E",
        "\u0117": "e",
        "\u0118": "E",
        "\u0119": "e",
        "\u011A": "E",
        "\u011B": "e",
        "\u011C": "G",
        "\u01F4": "G",
        "\u011D": "g",
        "\u01F5": "g",
        "\u011E": "G",
        "\u011F": "g",
        "\u0120": "G",
        "\u0121": "g",
        "\u0122": "G",
        "\u0123": "g",
        "\u0124": "H",
        "\u0125": "h",
        "\u0126": "H",
        "\u0127": "h",
        "\u1E2A": "H",
        "\u1E2B": "h",
        "\u0128": "I",
        "\u0129": "i",
        "\u012A": "I",
        "\u012B": "i",
        "\u012C": "I",
        "\u012D": "i",
        "\u012E": "I",
        "\u012F": "i",
        "\u0130": "I",
        "\u0131": "i",
        "\u0132": "IJ",
        "\u0133": "ij",
        "\u0134": "J",
        "\u0135": "j",
        "\u0136": "K",
        "\u0137": "k",
        "\u1E30": "K",
        "\u1E31": "k",
        "K\u0306": "K",
        "k\u0306": "k",
        "\u0139": "L",
        "\u013A": "l",
        "\u013B": "L",
        "\u013C": "l",
        "\u013D": "L",
        "\u013E": "l",
        "\u013F": "L",
        "\u0140": "l",
        "\u0141": "l",
        "\u0142": "l",
        "\u1E3E": "M",
        "\u1E3F": "m",
        "M\u0306": "M",
        "m\u0306": "m",
        "\u0143": "N",
        "\u0144": "n",
        "\u0145": "N",
        "\u0146": "n",
        "\u0147": "N",
        "\u0148": "n",
        "\u0149": "n",
        "N\u0306": "N",
        "n\u0306": "n",
        "\u014C": "O",
        "\u014D": "o",
        "\u014E": "O",
        "\u014F": "o",
        "\u0150": "O",
        "\u0151": "o",
        "\u0152": "OE",
        "\u0153": "oe",
        "P\u0306": "P",
        "p\u0306": "p",
        "\u0154": "R",
        "\u0155": "r",
        "\u0156": "R",
        "\u0157": "r",
        "\u0158": "R",
        "\u0159": "r",
        "R\u0306": "R",
        "r\u0306": "r",
        "\u0212": "R",
        "\u0213": "r",
        "\u015A": "S",
        "\u015B": "s",
        "\u015C": "S",
        "\u015D": "s",
        "\u015E": "S",
        "\u0218": "S",
        "\u0219": "s",
        "\u015F": "s",
        "\u0160": "S",
        "\u0161": "s",
        "\u0162": "T",
        "\u0163": "t",
        "\u021B": "t",
        "\u021A": "T",
        "\u0164": "T",
        "\u0165": "t",
        "\u0166": "T",
        "\u0167": "t",
        "T\u0306": "T",
        "t\u0306": "t",
        "\u0168": "U",
        "\u0169": "u",
        "\u016A": "U",
        "\u016B": "u",
        "\u016C": "U",
        "\u016D": "u",
        "\u016E": "U",
        "\u016F": "u",
        "\u0170": "U",
        "\u0171": "u",
        "\u0172": "U",
        "\u0173": "u",
        "\u0216": "U",
        "\u0217": "u",
        "V\u0306": "V",
        "v\u0306": "v",
        "\u0174": "W",
        "\u0175": "w",
        "\u1E82": "W",
        "\u1E83": "w",
        "X\u0306": "X",
        "x\u0306": "x",
        "\u0176": "Y",
        "\u0177": "y",
        "\u0178": "Y",
        "Y\u0306": "Y",
        "y\u0306": "y",
        "\u0179": "Z",
        "\u017A": "z",
        "\u017B": "Z",
        "\u017C": "z",
        "\u017D": "Z",
        "\u017E": "z",
        "\u017F": "s",
        "\u0192": "f",
        "\u01A0": "O",
        "\u01A1": "o",
        "\u01AF": "U",
        "\u01B0": "u",
        "\u01CD": "A",
        "\u01CE": "a",
        "\u01CF": "I",
        "\u01D0": "i",
        "\u01D1": "O",
        "\u01D2": "o",
        "\u01D3": "U",
        "\u01D4": "u",
        "\u01D5": "U",
        "\u01D6": "u",
        "\u01D7": "U",
        "\u01D8": "u",
        "\u01D9": "U",
        "\u01DA": "u",
        "\u01DB": "U",
        "\u01DC": "u",
        "\u1EE8": "U",
        "\u1EE9": "u",
        "\u1E78": "U",
        "\u1E79": "u",
        "\u01FA": "A",
        "\u01FB": "a",
        "\u01FC": "AE",
        "\u01FD": "ae",
        "\u01FE": "O",
        "\u01FF": "o",
        "\xDE": "TH",
        "\xFE": "th",
        "\u1E54": "P",
        "\u1E55": "p",
        "\u1E64": "S",
        "\u1E65": "s",
        "X\u0301": "X",
        "x\u0301": "x",
        "\u0403": "\u0413",
        "\u0453": "\u0433",
        "\u040C": "\u041A",
        "\u045C": "\u043A",
        "A\u030B": "A",
        "a\u030B": "a",
        "E\u030B": "E",
        "e\u030B": "e",
        "I\u030B": "I",
        "i\u030B": "i",
        "\u01F8": "N",
        "\u01F9": "n",
        "\u1ED2": "O",
        "\u1ED3": "o",
        "\u1E50": "O",
        "\u1E51": "o",
        "\u1EEA": "U",
        "\u1EEB": "u",
        "\u1E80": "W",
        "\u1E81": "w",
        "\u1EF2": "Y",
        "\u1EF3": "y",
        "\u0200": "A",
        "\u0201": "a",
        "\u0204": "E",
        "\u0205": "e",
        "\u0208": "I",
        "\u0209": "i",
        "\u020C": "O",
        "\u020D": "o",
        "\u0210": "R",
        "\u0211": "r",
        "\u0214": "U",
        "\u0215": "u",
        "B\u030C": "B",
        "b\u030C": "b",
        "\u010C\u0323": "C",
        "\u010D\u0323": "c",
        "\xCA\u030C": "E",
        "\xEA\u030C": "e",
        "F\u030C": "F",
        "f\u030C": "f",
        "\u01E6": "G",
        "\u01E7": "g",
        "\u021E": "H",
        "\u021F": "h",
        "J\u030C": "J",
        "\u01F0": "j",
        "\u01E8": "K",
        "\u01E9": "k",
        "M\u030C": "M",
        "m\u030C": "m",
        "P\u030C": "P",
        "p\u030C": "p",
        "Q\u030C": "Q",
        "q\u030C": "q",
        "\u0158\u0329": "R",
        "\u0159\u0329": "r",
        "\u1E66": "S",
        "\u1E67": "s",
        "V\u030C": "V",
        "v\u030C": "v",
        "W\u030C": "W",
        "w\u030C": "w",
        "X\u030C": "X",
        "x\u030C": "x",
        "Y\u030C": "Y",
        "y\u030C": "y",
        "A\u0327": "A",
        "a\u0327": "a",
        "B\u0327": "B",
        "b\u0327": "b",
        "\u1E10": "D",
        "\u1E11": "d",
        "\u0228": "E",
        "\u0229": "e",
        "\u0190\u0327": "E",
        "\u025B\u0327": "e",
        "\u1E28": "H",
        "\u1E29": "h",
        "I\u0327": "I",
        "i\u0327": "i",
        "\u0197\u0327": "I",
        "\u0268\u0327": "i",
        "M\u0327": "M",
        "m\u0327": "m",
        "O\u0327": "O",
        "o\u0327": "o",
        "Q\u0327": "Q",
        "q\u0327": "q",
        "U\u0327": "U",
        "u\u0327": "u",
        "X\u0327": "X",
        "x\u0327": "x",
        "Z\u0327": "Z",
        "z\u0327": "z",
        "\u0439": "\u0438",
        "\u0419": "\u0418",
        "\u0451": "\u0435",
        "\u0401": "\u0415"
      };
      var chars = Object.keys(characterMap).join("|");
      var allAccents = new RegExp(chars, "g");
      var firstAccent = new RegExp(chars, "");
      function matcher(match) {
        return characterMap[match];
      }
      var removeAccents2 = function(string) {
        return string.replace(allAccents, matcher);
      };
      var hasAccents = function(string) {
        return !!string.match(firstAccent);
      };
      module.exports = removeAccents2;
      module.exports.has = hasAccents;
      module.exports.remove = removeAccents2;
    }
  });

  // package-external:@wordpress/upload-media
  var require_upload_media = __commonJS({
    "package-external:@wordpress/upload-media"(exports, module) {
      module.exports = window.wp.uploadMedia;
    }
  });

  // package-external:@wordpress/escape-html
  var require_escape_html = __commonJS({
    "package-external:@wordpress/escape-html"(exports, module) {
      module.exports = window.wp.escapeHtml;
    }
  });

  // package-external:@wordpress/wordcount
  var require_wordcount = __commonJS({
    "package-external:@wordpress/wordcount"(exports, module) {
      module.exports = window.wp.wordcount;
    }
  });

  // package-external:@wordpress/patterns
  var require_patterns = __commonJS({
    "package-external:@wordpress/patterns"(exports, module) {
      module.exports = window.wp.patterns;
    }
  });

  // package-external:@wordpress/autop
  var require_autop = __commonJS({
    "package-external:@wordpress/autop"(exports, module) {
      module.exports = window.wp.autop;
    }
  });

  // package-external:@wordpress/shortcode
  var require_shortcode = __commonJS({
    "package-external:@wordpress/shortcode"(exports, module) {
      module.exports = window.wp.shortcode;
    }
  });

  // packages/block-library/build-module/index.mjs
  var index_exports = {};
  __export(index_exports, {
    __experimentalGetCoreBlocks: () => __experimentalGetCoreBlocks,
    __experimentalRegisterExperimentalCoreBlocks: () => __experimentalRegisterExperimentalCoreBlocks,
    privateApis: () => privateApis4,
    registerCoreBlocks: () => registerCoreBlocks
  });
  var import_blocks112 = __toESM(require_blocks(), 1);
  var import_compose67 = __toESM(require_compose(), 1);
  var import_data172 = __toESM(require_data(), 1);
  var import_block_editor292 = __toESM(require_block_editor(), 1);
  var import_server_side_render7 = __toESM(require_server_side_render(), 1);
  var import_i18n270 = __toESM(require_i18n(), 1);

  // node_modules/clsx/dist/clsx.mjs
  function r(e3) {
    var t, f, n = "";
    if ("string" == typeof e3 || "number" == typeof e3) n += e3;
    else if ("object" == typeof e3) if (Array.isArray(e3)) {
      var o = e3.length;
      for (t = 0; t < o; t++) e3[t] && (f = r(e3[t])) && (n && (n += " "), n += f);
    } else for (f in e3) e3[f] && (n && (n += " "), n += f);
    return n;
  }
  function clsx() {
    for (var e3, t, f = 0, n = "", o = arguments.length; f < o; f++) (e3 = arguments[f]) && (t = r(e3)) && (n && (n += " "), n += t);
    return n;
  }
  var clsx_default = clsx;

  // node_modules/html-react-parser/esm/index.mjs
  var import_lib = __toESM(require_lib4(), 1);
  var import_lib2 = __toESM(require_lib4(), 1);
  var esm_default = import_lib.default.default || import_lib.default;

  // packages/block-library/build-module/utils/html-renderer.mjs
  var import_dom = __toESM(require_dom(), 1);
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
  var HtmlRenderer = ({ wrapperProps = {}, html = "" }) => {
    const options2 = {
      replace: ({ name: name118, type, attribs, parent, children }) => {
        if (type === "tag" && name118) {
          const parsedProps = (0, import_lib2.attributesToProps)(attribs || {});
          const TagName2 = name118;
          if (!parent) {
            const mergedProps = {
              ...parsedProps,
              ...wrapperProps,
              className: clsx_default(
                parsedProps.className,
                wrapperProps.className
              ),
              style: {
                ...parsedProps.style || {},
                ...wrapperProps.style || {}
              }
            };
            return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TagName2, { ...mergedProps, children: (0, import_lib2.domToReact)(children, options2) });
          }
        }
      }
    };
    const sanitizedContent = (0, import_dom.safeHTML)(html);
    const parsedContent = esm_default(sanitizedContent, options2);
    return parsedContent;
  };
  var html_renderer_default = HtmlRenderer;

  // packages/block-library/build-module/accordion/index.mjs
  var accordion_exports = {};
  __export(accordion_exports, {
    init: () => init,
    metadata: () => block_default,
    name: () => name,
    settings: () => settings
  });
  var import_i18n2 = __toESM(require_i18n(), 1);

  // packages/icons/build-module/icon/index.mjs
  var import_element = __toESM(require_element(), 1);
  var icon_default = (0, import_element.forwardRef)(
    ({ icon: icon2, size = 24, style: style2, ...props }, ref) => {
      const intrinsicStyle = icon2.props.style;
      const mergedStyle = intrinsicStyle || style2 ? { ...intrinsicStyle, ...style2 } : void 0;
      return (0, import_element.cloneElement)(icon2, {
        width: size,
        height: size,
        ...props,
        // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
        // stroke-based icons) is preserved unless the consumer overrides
        // the same property explicitly.
        ...mergedStyle ? { style: mergedStyle } : {},
        ref
      });
    }
  );

  // packages/icons/build-module/library/accordion-heading.mjs
  var import_primitives = __toESM(require_primitives(), 1);
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
  var accordion_heading_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives.Path, { d: "M4.755 14.5L7 12L4.755 9.5M10 12H20", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/accordion-item.mjs
  var import_primitives2 = __toESM(require_primitives(), 1);
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
  var accordion_item_default = /* @__PURE__ */ (0, import_jsx_runtime3.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_runtime3.jsx)(import_primitives2.Path, { d: "M4.755 10.5L7 8L4.755 5.5M10 12H19.5M10 16H19.5M10 8H19.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/accordion.mjs
  var import_primitives3 = __toESM(require_primitives(), 1);
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
  var accordion_default = /* @__PURE__ */ (0, import_jsx_runtime4.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_runtime4.jsx)(import_primitives3.Path, { d: "M4.755 10.5L7 8L4.755 5.5M4.755 18.5L7 16L4.755 13.5M10 8H20M10 16H20", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/add-submenu.mjs
  var import_primitives4 = __toESM(require_primitives(), 1);
  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
  var add_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime5.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_runtime5.jsx)(import_primitives4.Path, { d: "M10.5 17H8C5.23858 17 3 14.7614 3 12C3 9.23858 5.23858 7 8 7H11M8.5 19.5L10.5 17L8.5 14.5M13.5 12H21.5M13.5 7H21.5M13.5 17H21.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/align-center.mjs
  var import_primitives5 = __toESM(require_primitives(), 1);
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
  var align_center_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { d: "M7.5 5H16.5M4 12H20M7.5 19H16.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/align-left.mjs
  var import_primitives6 = __toESM(require_primitives(), 1);
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
  var align_left_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives6.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_runtime7.jsx)(import_primitives6.Path, { d: "M4 5H13M4 12H20M4 19H13", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/align-none.mjs
  var import_primitives7 = __toESM(require_primitives(), 1);
  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
  var align_none_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_primitives7.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_runtime8.jsx)(import_primitives7.Path, { d: "M5 5H19M5 19H19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives7.Rect, { x: "5", y: "9", width: "14", height: "6", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/align-right.mjs
  var import_primitives8 = __toESM(require_primitives(), 1);
  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
  var align_right_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives8.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_runtime9.jsx)(import_primitives8.Path, { d: "M11 5H20M4 12H20M11 19H20", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/archive.mjs
  var import_primitives9 = __toESM(require_primitives(), 1);
  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
  var archive_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives9.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_runtime10.jsx)(import_primitives9.Path, { d: "M8.5 11H15.5M8.5 14.5H15.5M20.25 17.5V8.5C20.25 7.80964 19.6904 7.25 19 7.25H13.3463C12.8352 7.25 12.3755 6.93881 12.1857 6.46424L11.8143 5.53576C11.6245 5.06119 11.1648 4.75 10.6537 4.75H5C4.30964 4.75 3.75 5.30964 3.75 6V17.5C3.75 18.1904 4.30964 18.75 5 18.75H19C19.6904 18.75 20.25 18.1904 20.25 17.5Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/audio.mjs
  var import_primitives10 = __toESM(require_primitives(), 1);
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_primitives10.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_runtime11.jsx)(import_primitives10.Path, { d: "M13.25 16.5C13.25 18.0188 12.0188 19.25 10.5 19.25C8.98122 19.25 7.75 18.0188 7.75 16.5C7.75 14.9812 8.98122 13.75 10.5 13.75C12.0188 13.75 13.25 14.9812 13.25 16.5Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives10.Path, { d: "M10.5 19.25C12.0188 19.25 13.25 18.0188 13.25 16.5C13.25 14.9812 12.0188 13.75 10.5 13.75C8.98122 13.75 7.75 14.9812 7.75 16.5C7.75 18.0188 8.98122 19.25 10.5 19.25ZM10.5 19.25C13.4867 19.25 13.75 16.5 13.75 15.1379V7.99998C13.75 4.9108 16.4 5.00254 18 5.00233", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/block-default.mjs
  var import_primitives11 = __toESM(require_primitives(), 1);
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
  var block_default_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_primitives11.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_runtime12.jsx)(import_primitives11.Path, { d: "M3.75 10C3.75 9.30964 4.30964 8.75 5 8.75H19C19.6904 8.75 20.25 9.30964 20.25 10V18C20.25 18.6904 19.6904 19.25 19 19.25H5C4.30964 19.25 3.75 18.6904 3.75 18V10Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives11.Path, { d: "M10.5 6.5V9H6.5V6.5H10.5ZM17.5 6.5V9H13.5V6.5H17.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/block-table.mjs
  var import_primitives12 = __toESM(require_primitives(), 1);
  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
  var block_table_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives12.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_runtime13.jsx)(import_primitives12.Path, { d: "M4.75 9.5V6C4.75 5.30964 5.30964 4.75 6 4.75L18 4.75C18.6904 4.75 19.25 5.30964 19.25 6V9.5M4.75 9.5H12M4.75 9.5V14.5M19.25 9.5H12M19.25 9.5V14.5M12 9.5V14.5M12 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V14.5M12 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V14.5M12 19.25V14.5M12 14.5H19.25M12 14.5H4.75", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/breadcrumbs.mjs
  var import_primitives13 = __toESM(require_primitives(), 1);
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
  var breadcrumbs_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives13.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_runtime14.jsx)(import_primitives13.Path, { d: "M6.25 11.25H4.75V12.75H6.25V11.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.Path, { d: "M19.25 11.25H17.75V12.75H19.25V11.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives13.Path, { d: "M10.755 14.5L13 12L10.755 9.5M4.75 11.25H6.25V12.75H4.75V11.25ZM17.75 11.25H19.25V12.75H17.75V11.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/button.mjs
  var import_primitives14 = __toESM(require_primitives(), 1);
  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
  var button_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives14.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_runtime15.jsx)(import_primitives14.Path, { d: "M8 11.75H16M5 16.25H19C19.6904 16.25 20.25 15.6904 20.25 15V8.5C20.25 7.80964 19.6904 7.25 19 7.25H5C4.30964 7.25 3.75 7.80964 3.75 8.5V15C3.75 15.6904 4.30964 16.25 5 16.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/buttons.mjs
  var import_primitives15 = __toESM(require_primitives(), 1);
  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
  var buttons_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives15.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_runtime16.jsx)(import_primitives15.Path, { d: "M9.5 7.25H14.5M9.5 16.75H14.5M7 19.75H17C17.6904 19.75 18.25 19.1904 18.25 18.5V15C18.25 14.3096 17.6904 13.75 17 13.75H7C6.30964 13.75 5.75 14.3096 5.75 15V18.5C5.75 19.1904 6.30964 19.75 7 19.75ZM7 10.25H17C17.6904 10.25 18.25 9.69036 18.25 9V5.5C18.25 4.80964 17.6904 4.25 17 4.25H7C6.30964 4.25 5.75 4.80964 5.75 5.5V9C5.75 9.69036 6.30964 10.25 7 10.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/calendar.mjs
  var import_primitives16 = __toESM(require_primitives(), 1);
  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
  var calendar_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_primitives16.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_runtime17.jsx)(import_primitives16.Path, { d: "M4.75 7.25L4.75 18C4.75 18.6904 5.30964 19.25 6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V7.25V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25ZM19.25 7.25H4.75M7.25 10.75H9.25M11 10.75H13M14.75 10.75H16.75M7.25 14.5H9.25M11 14.5H13M14.75 14.5H16.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives16.Path, { d: "M18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25H19.25V6C19.25 5.30964 18.6904 4.75 18 4.75Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/caption.mjs
  var import_primitives17 = __toESM(require_primitives(), 1);
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
  var caption_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives17.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_runtime18.jsx)(import_primitives17.Path, { d: "M8 15.25H10M11 15.25H13M14 15.25H16M6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/category.mjs
  var import_primitives18 = __toESM(require_primitives(), 1);
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
  var category_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_primitives18.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_runtime19.jsx)(import_primitives18.Path, { d: "M4.75 6C4.75 5.30964 5.30964 4.75 6 4.75H9C9.69036 4.75 10.25 5.30964 10.25 6V9C10.25 9.69036 9.69036 10.25 9 10.25H6C5.30964 10.25 4.75 9.69036 4.75 9V6Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { d: "M4.75 15C4.75 14.3096 5.30964 13.75 6 13.75H9C9.69036 13.75 10.25 14.3096 10.25 15V18C10.25 18.6904 9.69036 19.25 9 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V15Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { d: "M13.75 6C13.75 5.30964 14.3096 4.75 15 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V9C19.25 9.69036 18.6904 10.25 18 10.25H15C14.3096 10.25 13.75 9.69036 13.75 9V6Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives18.Path, { d: "M13.75 15C13.75 14.3096 14.3096 13.75 15 13.75H18C18.6904 13.75 19.25 14.3096 19.25 15V18C19.25 18.6904 18.6904 19.25 18 19.25H15C14.3096 19.25 13.75 18.6904 13.75 18V15Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/chevron-down.mjs
  var import_primitives19 = __toESM(require_primitives(), 1);
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
  var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives19.Path, { d: "M7 11L12 15L17 11", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/chevron-left-small.mjs
  var import_primitives20 = __toESM(require_primitives(), 1);
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives20.Path, { d: "M13.5 8.5L10.5 12L13.5 15.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/chevron-left.mjs
  var import_primitives21 = __toESM(require_primitives(), 1);
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives21.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_runtime22.jsx)(import_primitives21.Path, { d: "M14 6.5L9 12L14 17.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/chevron-right-small.mjs
  var import_primitives22 = __toESM(require_primitives(), 1);
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives22.Path, { d: "M10.5 8.5L13.5 12L10.5 15.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/chevron-right.mjs
  var import_primitives23 = __toESM(require_primitives(), 1);
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives23.Path, { d: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/chevron-up.mjs
  var import_primitives24 = __toESM(require_primitives(), 1);
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
  var chevron_up_default = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_primitives24.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_runtime25.jsx)(import_primitives24.Path, { d: "M7 13L12 9L17 13", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/classic.mjs
  var import_primitives25 = __toESM(require_primitives(), 1);
  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
  var classic_default = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_primitives25.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_runtime26.jsx)(import_primitives25.Path, { d: "M5 10H7M8 10H10M11 10H13M14 10H16M17 10H19M5 14H7M8 14H16M17 14H19M4 18.25H20C20.6904 18.25 21.25 17.6904 21.25 17V7C21.25 6.30964 20.6904 5.75 20 5.75H4C3.30964 5.75 2.75 6.30964 2.75 7V17C2.75 17.6904 3.30964 18.25 4 18.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/close.mjs
  var import_primitives26 = __toESM(require_primitives(), 1);
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
  var close_default = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_primitives26.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_runtime27.jsx)(import_primitives26.Path, { d: "M5 19L19 5M19 19L5 5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/code.mjs
  var import_primitives27 = __toESM(require_primitives(), 1);
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
  var code_default = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_primitives27.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_runtime28.jsx)(import_primitives27.Path, { d: "M7.99997 7L3.70708 11.2929C3.31655 11.6834 3.31655 12.3166 3.70708 12.7071L7.99997 17M16 17L20.2929 12.7071C20.6834 12.3166 20.6834 11.6834 20.2929 11.2929L16 7", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/column.mjs
  var import_primitives28 = __toESM(require_primitives(), 1);
  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
  var column_default = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_primitives28.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_runtime29.jsx)(import_primitives28.Path, { d: "M14.75 5.75H19C19.6904 5.75 20.25 6.30964 20.25 7V17C20.25 17.6904 19.6904 18.25 19 18.25H14.75M14.75 5.75V18.25M14.75 5.75H9.25M14.75 18.25H9.25M9.25 18.25H5C4.30964 18.25 3.75 17.6904 3.75 17V7C3.75 6.30964 4.30964 5.75 5 5.75H9.25M9.25 18.25V5.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_primitives28.Path, { d: "M14.75 18.25V5.75H9.25V18.25H14.75Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/columns.mjs
  var import_primitives29 = __toESM(require_primitives(), 1);
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
  var columns_default = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_primitives29.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_runtime30.jsx)(import_primitives29.Path, { d: "M14.75 5.75H19C19.6904 5.75 20.25 6.30964 20.25 7V17C20.25 17.6904 19.6904 18.25 19 18.25H14.75M14.75 5.75V18.25M14.75 5.75H9.25M14.75 18.25H9.25M9.25 18.25H5C4.30964 18.25 3.75 17.6904 3.75 17V7C3.75 6.30964 4.30964 5.75 5 5.75H9.25M9.25 18.25V5.75", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/comment-author-avatar.mjs
  var import_primitives30 = __toESM(require_primitives(), 1);
  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_primitives30.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_runtime31.jsx)(import_primitives30.Path, { d: "M8 18.0476V16C8 14.8954 8.89543 14 10 14H14C15.1046 14 16 14.8954 16 16V18.0476", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.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", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_primitives30.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", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/comment-author-name.mjs
  var import_primitives31 = __toESM(require_primitives(), 1);
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
  var comment_author_name_default = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_primitives31.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_runtime32.jsx)(import_primitives31.Path, { d: "M8 16.25H18C18.6904 16.25 19.25 15.6904 19.25 15V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V16.25V18.6596C4.75 19.1225 5.32471 19.3369 5.62784 18.9871L8 16.25ZM8 16.25V15C8 13.8954 8.89543 13 10 13H14C15.1046 13 16 13.8954 16 15V16.25", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_primitives31.Path, { d: "M13.75 9C13.75 9.9665 12.9665 10.75 12 10.75C11.0335 10.75 10.25 9.9665 10.25 9C10.25 8.0335 11.0335 7.25 12 7.25C12.9665 7.25 13.75 8.0335 13.75 9Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/comment-content.mjs
  var import_primitives32 = __toESM(require_primitives(), 1);
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
  var comment_content_default = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_primitives32.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_runtime33.jsx)(import_primitives32.Path, { d: "M8 12H12M8 9H16M4.75 16.25V6C4.75 5.30964 5.30964 4.75 6 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V15C19.25 15.6904 18.6904 16.25 18 16.25H8L5.62784 18.9871C5.32471 19.3369 4.75 19.1225 4.75 18.6596V16.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/comment-edit-link.mjs
  var import_primitives33 = __toESM(require_primitives(), 1);
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
  var comment_edit_link_default = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_primitives33.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_runtime34.jsx)(import_primitives33.Path, { d: "M13.25 6.5V5.25C13.25 4.97386 13.0261 4.75 12.75 4.75H5.25C4.97386 4.75 4.75 4.97386 4.75 5.25V13.0086C4.75 13.0977 4.85771 13.1423 4.92071 13.0793L7 11H8.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.Path, { d: "M7 19.25H14", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_primitives33.Path, { d: "M12 15L9.5 15.5L10 13L18 5L20 7L12 15Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/comment-reply-link.mjs
  var import_primitives34 = __toESM(require_primitives(), 1);
  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
  var comment_reply_link_default = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_primitives34.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_runtime35.jsx)(import_primitives34.Path, { d: "M13.25 6.5V5.25C13.25 4.97386 13.0261 4.75 12.75 4.75H5.25C4.97386 4.75 4.75 4.97386 4.75 5.25V13.0086C4.75 13.0977 4.85771 13.1423 4.92071 13.0793L7 11H8.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_primitives34.Path, { d: "M14.25 17L10.75 13L14.25 9M10.75 13H17.25C20.25 13 20.5 15.8 20.5 19", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/comment.mjs
  var import_primitives35 = __toESM(require_primitives(), 1);
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
  var comment_default = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_primitives35.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_runtime36.jsx)(import_primitives35.Path, { d: "M18 5.5H6C5.30964 5.5 4.75 6.05964 4.75 6.75V16V18.4096C4.75 18.8725 5.32471 19.0869 5.62784 18.7371L8 16H18C18.6904 16 19.25 15.4404 19.25 14.75V6.75C19.25 6.05964 18.6904 5.5 18 5.5Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/contents.mjs
  var import_primitives36 = __toESM(require_primitives(), 1);
  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
  var contents_default = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_primitives36.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_runtime37.jsx)(import_primitives36.Path, { d: "M19.25 10V8C19.25 7.30964 18.6904 6.75 18 6.75H16M19.25 14V16C19.25 16.6904 18.6904 17.25 18 17.25H16M13.5 17.25H10.5M8 17.25H6C5.30964 17.25 4.75 16.6904 4.75 16V14M13.5 6.75H10.5M8 6.75H6C5.30964 6.75 4.75 7.30964 4.75 8V10", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/cover.mjs
  var import_primitives37 = __toESM(require_primitives(), 1);
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
  var cover_default = /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_primitives37.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_runtime38.jsx)(import_primitives37.Path, { d: "M20.25 18.75V5.25C20.25 4.42157 19.5784 3.75 18.75 3.75H5.25C4.42157 3.75 3.75 4.42157 3.75 5.25V18.75C3.75 19.5784 4.42157 20.25 5.25 20.25H18.75C19.5784 20.25 20.25 19.5784 20.25 18.75Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_primitives37.Path, { d: "M11.5 13.4V3.75H16.5V13.4L14 10.3L11.5 13.4Z", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/crop.mjs
  var import_primitives38 = __toESM(require_primitives(), 1);
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
  var crop_default = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_primitives38.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_runtime39.jsx)(import_primitives38.Path, { d: "M6.75 6.75V16C6.75 16.6904 7.30964 17.25 8 17.25H17.25M6.75 6.75H4M6.75 6.75V4M17.25 17.25V20M17.25 17.25H20M17.25 14.75V8C17.25 7.30964 16.6904 6.75 16 6.75H9.25", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/custom-link.mjs
  var import_primitives39 = __toESM(require_primitives(), 1);
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
  var custom_link_default = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_primitives39.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_runtime40.jsx)(import_primitives39.Path, { d: "M8.5 8.75H7C5.20507 8.75 3.75 10.2051 3.75 12C3.75 13.7949 5.20507 15.25 7 15.25H8.5M7.5 12H12.5M11.5 15.25H13C14.7949 15.25 16.25 13.7949 16.25 12C16.25 10.2051 14.7949 8.75 13 8.75H11.5M7.75 6.5V6C7.75 5.30964 8.30964 4.75 9 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H9C8.30964 19.25 7.75 18.6904 7.75 18V17.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/custom-post-type.mjs
  var import_primitives40 = __toESM(require_primitives(), 1);
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
  var custom_post_type_default = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_primitives40.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_runtime41.jsx)(import_primitives40.Path, { d: "M8 12V8M8 4V8M8 8H12M8 8H4M8 8L10.8284 10.8284M8 8L5.17157 5.17157M8 8L10.8284 5.17157M8 8L5.17157 10.8284M4 15H20M4 19H13", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/details.mjs
  var import_primitives41 = __toESM(require_primitives(), 1);
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
  var details_default = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_primitives41.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_runtime42.jsx)(import_primitives41.Path, { d: "M4 17.5H20M4 12H20M10 6.5H20", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_primitives41.Path, { d: "M4.75 8V5L6.75 6.5L4.75 8Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/error.mjs
  var import_primitives42 = __toESM(require_primitives(), 1);
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
  var error_default = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_primitives42.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_runtime43.jsx)(import_primitives42.Path, { d: "M12 9L12 14M12 15.5V17M11.1284 5.04947L3.83827 18.0097C3.46331 18.6763 3.94502 19.5 4.70985 19.5H19.2902C20.055 19.5 20.5367 18.6763 20.1617 18.0097L12.8716 5.04947C12.4893 4.36982 11.5107 4.36982 11.1284 5.04947Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/external.mjs
  var import_primitives43 = __toESM(require_primitives(), 1);
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
  var external_default = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_primitives43.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_runtime44.jsx)(import_primitives43.Path, { d: "M9.5 6.25H6.5C5.80964 6.25 5.25 6.80964 5.25 7.5V17.5C5.25 18.1904 5.80964 18.75 6.5 18.75H16.5C17.1904 18.75 17.75 18.1904 17.75 17.5V14.5M11.5 12.5L18.75 5.25M12.5 5.25H18.75V11.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/file.mjs
  var import_primitives44 = __toESM(require_primitives(), 1);
  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
  var file_default = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_primitives44.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_runtime45.jsx)(import_primitives44.Path, { d: "M3.75 6V17.5C3.75 18.1904 4.30964 18.75 5 18.75H19C19.6904 18.75 20.25 18.1904 20.25 17.5V8.5C20.25 7.80964 19.6904 7.25 19 7.25H13.3463C12.8352 7.25 12.3755 6.93881 12.1857 6.46424L11.8143 5.53576C11.6245 5.06119 11.1648 4.75 10.6537 4.75H5C4.30964 4.75 3.75 5.30964 3.75 6Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/flip-horizontal.mjs
  var import_primitives45 = __toESM(require_primitives(), 1);
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
  var flip_horizontal_default = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_primitives45.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_runtime46.jsx)(import_primitives45.Path, { d: "M9 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V6C4.75 5.30964 5.30964 4.75 6 4.75H9M15 4.75L16.5 4.75M15 19.25H16.5M12 22V2M19.25 16.5V14.5M19.25 13V11M19.25 9.5V7.5M18 4.75C18.6904 4.75 19.25 5.30964 19.25 6M18 19.25C18.6904 19.25 19.25 18.6904 19.25 18", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/flip-vertical.mjs
  var import_primitives46 = __toESM(require_primitives(), 1);
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
  var flip_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_primitives46.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_runtime47.jsx)(import_primitives46.Path, { d: "M4.75 9L4.75 6C4.75 5.30964 5.30964 4.75 6 4.75L18 4.75C18.6904 4.75 19.25 5.30964 19.25 6L19.25 9M19.25 15L19.25 16.5M4.75 15L4.75 16.5M2 12L22 12M7.5 19.25L9.5 19.25M11 19.25L13 19.25M14.5 19.25L16.5 19.25M19.25 18C19.25 18.6904 18.6904 19.25 18 19.25M4.75 18C4.75 18.6904 5.30964 19.25 6 19.25", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/footer.mjs
  var import_primitives47 = __toESM(require_primitives(), 1);
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
  var footer_default = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_primitives47.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_runtime48.jsx)(import_primitives47.Path, { d: "M9.75 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V14.25M9.75 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V14.25M9.75 4.75V14.25M19.25 14.25V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V14.25M19.25 14.25H9.75M9.75 14.25H4.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_primitives47.Path, { d: "M19.25 15.5V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V15.5C4.75 14.8096 5.30964 14.25 6 14.25H18C18.6904 14.25 19.25 14.8096 19.25 15.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-indent-rtl.mjs
  var import_primitives48 = __toESM(require_primitives(), 1);
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
  var format_indent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_primitives48.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_runtime49.jsx)(import_primitives48.Path, { d: "M20 8H4M13.5 16H4M20 13L17 16L20 19", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/format-indent.mjs
  var import_primitives49 = __toESM(require_primitives(), 1);
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
  var format_indent_default = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_primitives49.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_runtime50.jsx)(import_primitives49.Path, { d: "M4 8H20M10.5 16H20M4 13L7 16L4 19", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/format-list-bullets-rtl.mjs
  var import_primitives50 = __toESM(require_primitives(), 1);
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_primitives50.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_runtime51.jsx)(import_primitives50.Path, { d: "M13 8H4M13 16H4", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { d: "M18 9.25C17.3096 9.25 16.75 8.69036 16.75 8C16.75 7.30964 17.3096 6.75 18 6.75C18.6904 6.75 19.25 7.30964 19.25 8C19.25 8.69036 18.6904 9.25 18 9.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { d: "M18 17.25C17.3096 17.25 16.75 16.6904 16.75 16C16.75 15.3096 17.3096 14.75 18 14.75C18.6904 14.75 19.25 15.3096 19.25 16C19.25 16.6904 18.6904 17.25 18 17.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { d: "M18 9.25C17.3096 9.25 16.75 8.69036 16.75 8C16.75 7.30964 17.3096 6.75 18 6.75C18.6904 6.75 19.25 7.30964 19.25 8C19.25 8.69036 18.6904 9.25 18 9.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_primitives50.Path, { d: "M18 17.25C17.3096 17.25 16.75 16.6904 16.75 16C16.75 15.3096 17.3096 14.75 18 14.75C18.6904 14.75 19.25 15.3096 19.25 16C19.25 16.6904 18.6904 17.25 18 17.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-list-bullets.mjs
  var import_primitives51 = __toESM(require_primitives(), 1);
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
  var format_list_bullets_default = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_primitives51.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_runtime52.jsx)(import_primitives51.Path, { d: "M11 8H20M11 16H20", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M6 9.25C6.69036 9.25 7.25 8.69036 7.25 8C7.25 7.30964 6.69036 6.75 6 6.75C5.30964 6.75 4.75 7.30964 4.75 8C4.75 8.69036 5.30964 9.25 6 9.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M6 17.25C6.69036 17.25 7.25 16.6904 7.25 16C7.25 15.3096 6.69036 14.75 6 14.75C5.30964 14.75 4.75 15.3096 4.75 16C4.75 16.6904 5.30964 17.25 6 17.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M6 9.25C6.69036 9.25 7.25 8.69036 7.25 8C7.25 7.30964 6.69036 6.75 6 6.75C5.30964 6.75 4.75 7.30964 4.75 8C4.75 8.69036 5.30964 9.25 6 9.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_primitives51.Path, { d: "M6 17.25C6.69036 17.25 7.25 16.6904 7.25 16C7.25 15.3096 6.69036 14.75 6 14.75C5.30964 14.75 4.75 15.3096 4.75 16C4.75 16.6904 5.30964 17.25 6 17.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-list-numbered-rtl.mjs
  var import_primitives52 = __toESM(require_primitives(), 1);
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
  var format_list_numbered_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_primitives52.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_runtime53.jsx)(import_primitives52.Path, { d: "M13 8H4M13 16H4", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.Path, { d: "M20.1241 17.5H18.1241C18.1241 15.4333 20.1241 15.95 20.1241 14.4C20.1241 13.625 19.1241 12.975 18.1241 13.75", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_primitives52.Path, { d: "M19 10V5.5L17.5 6", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-list-numbered.mjs
  var import_primitives53 = __toESM(require_primitives(), 1);
  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
  var format_list_numbered_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_primitives53.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_runtime54.jsx)(import_primitives53.Path, { d: "M11 8H20M11 16H20", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.Path, { d: "M6.62408 17.5H4.62408C4.62408 15.4333 6.62408 15.95 6.62408 14.4C6.62408 13.625 5.62408 12.975 4.62408 13.75", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives53.Path, { d: "M5.5 10V5.5L4 6", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-ltr.mjs
  var import_primitives54 = __toESM(require_primitives(), 1);
  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
  var format_ltr_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_primitives54.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_runtime55.jsx)(import_primitives54.Path, { d: "M7.75 20V4.75L11.75 4.75M11.75 20V4.75M11.75 4.75H15.5M17.5 8.5L20.5 12L17.5 15.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives54.Path, { d: "M2.75 9C2.75 11.3472 4.65279 13.25 7 13.25H7.75V4.75H7C4.65279 4.75 2.75 6.65279 2.75 9Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-outdent-rtl.mjs
  var import_primitives55 = __toESM(require_primitives(), 1);
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
  var format_outdent_rtl_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_primitives55.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_runtime56.jsx)(import_primitives55.Path, { d: "M16 13L19 16L16 19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives55.Path, { d: "M4 8H20M4 16H13.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/format-outdent.mjs
  var import_primitives56 = __toESM(require_primitives(), 1);
  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
  var format_outdent_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_primitives56.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_runtime57.jsx)(import_primitives56.Path, { d: "M8 13L5 16L8 19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives56.Path, { d: "M20 8H4M20 16H10.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/fullscreen.mjs
  var import_primitives57 = __toESM(require_primitives(), 1);
  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
  var fullscreen_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives57.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_runtime58.jsx)(import_primitives57.Path, { d: "M4.75 10V4.75H10M4.75 4.75L10 10M14 19.25H19.25V14M19.25 19.25L14 14", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/gallery.mjs
  var import_primitives58 = __toESM(require_primitives(), 1);
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
  var gallery_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_primitives58.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_runtime59.jsx)(import_primitives58.Path, { d: "M20.25 6.75V19C20.25 19.6904 19.6904 20.25 19 20.25H6.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives58.Path, { d: "M17.25 12.596L14.2948 9.6397C14.2558 9.60064 14.1925 9.60063 14.1534 9.63969L10.5584 13.2347C10.5245 13.2686 10.4713 13.2737 10.4316 13.2469L7.39239 11.1909C7.35761 11.1674 7.31184 11.1681 7.27781 11.1927L3.75 13.7408M17.25 12.596V5C17.25 4.30964 16.6904 3.75 16 3.75H5C4.30964 3.75 3.75 4.30964 3.75 5V13.7408M17.25 12.596V16C17.25 16.6904 16.6904 17.25 16 17.25H5C4.30964 17.25 3.75 16.6904 3.75 16V13.7408", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/grid.mjs
  var import_primitives59 = __toESM(require_primitives(), 1);
  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
  var grid_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives59.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_runtime60.jsx)(import_primitives59.Path, { d: "M12 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V12M12 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V12M12 4.75V19.25M12 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V12M12 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V12M19.25 12H4.75", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/group.mjs
  var import_primitives60 = __toESM(require_primitives(), 1);
  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
  var group_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_primitives60.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_runtime61.jsx)(import_primitives60.Path, { d: "M4.75 11C4.75 10.3096 5.30964 9.75 6 9.75H13C13.6904 9.75 14.25 10.3096 14.25 11V18C14.25 18.6904 13.6904 19.25 13 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V11Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives60.Path, { d: "M9.75 6C9.75 5.30964 10.3096 4.75 11 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V13C19.25 13.6904 18.6904 14.25 18 14.25H11C10.3096 14.25 9.75 13.6904 9.75 13V6Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/header.mjs
  var import_primitives61 = __toESM(require_primitives(), 1);
  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
  var header_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_primitives61.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_runtime62.jsx)(import_primitives61.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", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives61.Path, { d: "M19.25 8.5V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V8.5C4.75 9.19036 5.30964 9.75 6 9.75H18C18.6904 9.75 19.25 9.19036 19.25 8.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-1.mjs
  var import_primitives62 = __toESM(require_primitives(), 1);
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
  var heading_level_1_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_primitives62.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_runtime63.jsx)(import_primitives62.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives62.Path, { d: "M17 17C17 16.1556 17 10.213 17 7.75L14 8.55556", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-2.mjs
  var import_primitives63 = __toESM(require_primitives(), 1);
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
  var heading_level_2_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_primitives63.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_runtime64.jsx)(import_primitives63.Path, { d: "M19.1415 16.25H14.75C14.75 11.7122 19.25 12.9034 19.25 9.5C19.25 7.79832 16.9457 6.29831 14.75 8", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives63.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-3.mjs
  var import_primitives64 = __toESM(require_primitives(), 1);
  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
  var heading_level_3_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_primitives64.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_runtime65.jsx)(import_primitives64.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives64.Path, { d: "M14.5 15.4934C17 17.1638 19.5 15.8275 19.5 13.823C19.5 13.2323 19.2366 12.6658 18.7678 12.2481C18.2989 11.8305 17.663 11.5958 17 11.5958M17 11.5958C17.663 11.5958 18.2989 11.3612 18.7678 10.9435C19.2366 10.5258 19.5 9.95933 19.5 9.36864C19.5 7.69825 17.125 6.58466 15 7.69825M17 11.5958H16.75", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-4.mjs
  var import_primitives65 = __toESM(require_primitives(), 1);
  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
  var heading_level_4_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_primitives65.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_runtime66.jsx)(import_primitives65.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives65.Path, { d: "M19.25 17V12.75M19.25 9V12.75M15 7V7.5L13.75 12.75H19.25", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-5.mjs
  var import_primitives66 = __toESM(require_primitives(), 1);
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
  var heading_level_5_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_primitives66.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_runtime67.jsx)(import_primitives66.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives66.Path, { d: "M14 15.4934C16.5 17.1638 19 15.8275 19 13.823C19 13.2323 18.7366 12.6658 18.2678 12.2482C17.7989 11.8305 17.163 11.5958 16.5 11.5958H14.25L14.75 7.75H18", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading-level-6.mjs
  var import_primitives67 = __toESM(require_primitives(), 1);
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
  var heading_level_6_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_primitives67.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_runtime68.jsx)(import_primitives67.Path, { d: "M5.25 12H11M5.25 12V7.75M5.25 12L5.25 16.25M11 12V7.75M11 12V16.25", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives67.Path, { d: "M19.0092 8.10342C17.1095 7.1899 15.4694 8.08711 14.7634 9.38026C14.0574 10.6734 13.8551 12.0834 14.0986 13.62C14.177 14.1146 14.3884 14.8582 14.9041 15.3039C15.4198 15.7496 16.1193 16 16.8486 16C17.578 16 18.2775 15.7496 18.7932 15.3039C19.3089 14.8582 19.5986 14.2537 19.5986 13.6234C19.5986 12.9931 19.3089 12.3918 18.7932 11.9461C18.2775 11.5004 17.578 11.25 16.8486 11.25C16.1193 11.25 15.4198 11.5004 14.9041 11.9461C14.3884 12.3918 14.0986 12.9931 14.0986 13.6234", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/heading.mjs
  var import_primitives68 = __toESM(require_primitives(), 1);
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
  var heading_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives68.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_runtime69.jsx)(import_primitives68.Path, { d: "M6.75 5.25H17.25V16.375L12 12L6.75 16.375V5.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/home.mjs
  var import_primitives69 = __toESM(require_primitives(), 1);
  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
  var home_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives69.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_runtime70.jsx)(import_primitives69.Path, { d: "M13.75 19.25H19.25V8.5L12 5L4.75 8.5V19.25H10.25M13.75 19.25V13.7H10.25V19.25M13.75 19.25H10.25", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/html.mjs
  var import_primitives70 = __toESM(require_primitives(), 1);
  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
  var html_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives70.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_runtime71.jsx)(import_primitives70.Path, { d: "M1.5 15V12M1.5 9V12M1.5 12H5.5M5.5 12V9M5.5 12V15M6.75 9.75H9M11.25 9.75H9M9 9.75V15M19.5 9V14.25H22.5M12.5 15V9.75H12.75L14.5 12H15L16.75 9.75H17V15", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/image.mjs
  var import_primitives71 = __toESM(require_primitives(), 1);
  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
  var image_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives71.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_runtime72.jsx)(import_primitives71.Path, { d: "M19.25 14.2513L16.0707 11.0707C16.0317 11.0317 15.9683 11.0317 15.9293 11.0707L12.0584 14.9416C12.0245 14.9755 11.9713 14.9806 11.9316 14.9537L8.65791 12.7392C8.62313 12.7156 8.57736 12.7163 8.54332 12.7409L4.75 15.4808M19.25 14.2513V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V15.4808M19.25 14.2513V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V15.4808", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/keyboard-return.mjs
  var import_primitives72 = __toESM(require_primitives(), 1);
  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
  var keyboard_return_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives72.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_runtime73.jsx)(import_primitives72.Path, { d: "M8.25 21L4.75 17L8.25 13M4.75 17H14.125C17.5077 17 20.25 14.2577 20.25 10.875C20.25 7.49226 17.5077 4.75 14.125 4.75H12", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/layout.mjs
  var import_primitives73 = __toESM(require_primitives(), 1);
  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
  var layout_default = /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_primitives73.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_runtime74.jsx)(import_primitives73.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", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/link-off.mjs
  var import_primitives74 = __toESM(require_primitives(), 1);
  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
  var link_off_default = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_primitives74.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_runtime75.jsx)(import_primitives74.Path, { d: "M9.5 12H12.5M10 7.75H8.25C5.90279 7.75 4 9.65279 4 12C4 14.3472 5.90279 16.25 8.25 16.25H10.2333M14 16.25H15.75C18.0972 16.25 20 14.3472 20 12C20 9.65279 18.0972 7.75 15.75 7.75H14.7667M8.5 19.5L16.5 4.5", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/link.mjs
  var import_primitives75 = __toESM(require_primitives(), 1);
  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
  var link_default = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_primitives75.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_runtime76.jsx)(import_primitives75.Path, { d: "M9.5 12L14.5 12M10 7.75H8.25C5.90279 7.75 4 9.65279 4 12C4 14.3472 5.90279 16.25 8.25 16.25H10M14 16.25H15.75C18.0972 16.25 20 14.3472 20 12C20 9.65279 18.0972 7.75 15.75 7.75L14 7.75", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/list-item.mjs
  var import_primitives76 = __toESM(require_primitives(), 1);
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
  var list_item_default = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_primitives76.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_runtime77.jsx)(import_primitives76.Path, { d: "M12 12H20", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_primitives76.Path, { d: "M6 13.25C6.69036 13.25 7.25 12.6904 7.25 12C7.25 11.3096 6.69036 10.75 6 10.75C5.30964 10.75 4.75 11.3096 4.75 12C4.75 12.6904 5.30964 13.25 6 13.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/list.mjs
  var import_primitives77 = __toESM(require_primitives(), 1);
  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
  var list_default = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_primitives77.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_runtime78.jsx)(import_primitives77.Path, { d: "M4 17.5H20M12 12H20M4 6.5H20", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_primitives77.Path, { d: "M6 13.25C6.69036 13.25 7.25 12.6904 7.25 12C7.25 11.3096 6.69036 10.75 6 10.75C5.30964 10.75 4.75 11.3096 4.75 12C4.75 12.6904 5.30964 13.25 6 13.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/login.mjs
  var import_primitives78 = __toESM(require_primitives(), 1);
  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
  var login_default = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_primitives78.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_runtime79.jsx)(import_primitives78.Path, { d: "M7.75 6.5V6C7.75 5.30964 8.30964 4.75 9 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H9C8.30964 19.25 7.75 18.6904 7.75 18V17.5M5 12H14.5M11.5 15L14.5 12L11.5 9", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/loop.mjs
  var import_primitives79 = __toESM(require_primitives(), 1);
  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
  var loop_default = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_primitives79.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_runtime80.jsx)(import_primitives79.Path, { d: "M9.63852 15.2138C9.21283 15.3979 8.74333 15.5 8.25 15.5C6.317 15.5 4.75 13.933 4.75 12C4.75 10.067 6.317 8.5 8.25 8.5C10.183 8.5 11.5 9.75 12 12C12.5 14.25 13.817 15.5 15.75 15.5C17.683 15.5 19.25 13.933 19.25 12C19.25 10.067 17.683 8.5 15.75 8.5C15.2567 8.5 14.7872 8.60207 14.3615 8.78624", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/map-marker.mjs
  var import_primitives80 = __toESM(require_primitives(), 1);
  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
  var map_marker_default = /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_primitives80.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_runtime81.jsx)(import_primitives80.Path, { d: "M6.75 10.37C6.75 7.4705 9.10051 5.12 12 5.12C14.8995 5.12 17.25 7.4705 17.25 10.37C17.25 13.2695 14 17 12 19.25C10 17 6.75 13.2695 6.75 10.37Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_primitives80.Path, { d: "M12 12A1.5 1.5 0 1 0 12 9A1.5 1.5 0 0 0 12 12Z", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/math.mjs
  var import_primitives81 = __toESM(require_primitives(), 1);
  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
  var math_default = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_primitives81.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_runtime82.jsx)(import_primitives81.Path, { d: "M3 14H5L6.8916 16.3645C6.93974 16.4247 7.03496 16.4101 7.06289 16.3383L10.2521 8.13755C10.4015 7.75318 10.7717 7.5 11.1841 7.5H19M17 11L14.5 13.5M12 16L14.5 13.5M14.5 13.5L17 16M14.5 13.5L12 11", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/media-and-text.mjs
  var import_primitives82 = __toESM(require_primitives(), 1);
  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
  var media_and_text_default = /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_primitives82.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_runtime83.jsx)(import_primitives82.Path, { d: "M14 8H21M14 12H21M14 16H21", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_primitives82.Rect, { x: "3", y: "6", width: "8", height: "12", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/media.mjs
  var import_primitives83 = __toESM(require_primitives(), 1);
  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
  var media_default = /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_primitives83.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_runtime84.jsx)(import_primitives83.Path, { d: "M14 12.375V6.51534C14 6.21609 13.7879 5.95882 13.4941 5.9018L11.8239 5.57758C11.5677 5.52784 11.341 5.37988 11.1924 5.1653L10.3985 4.01913C10.2818 3.85057 10.0898 3.75 9.88474 3.75H8.11526C7.91022 3.75 7.71822 3.85057 7.60147 4.01913L6.80758 5.1653C6.65896 5.37988 6.43232 5.52784 6.17608 5.57758L4.5059 5.9018C4.21213 5.95882 4 6.21609 4 6.51534V12.375C4 12.7202 4.27982 13 4.625 13H13.375C13.7202 13 14 12.7202 14 12.375Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Circle, { cx: "9", cy: "9", r: "1", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M20 17.25V9", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M17 10H20V9H17V10Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M11.75 18.5C12.4404 18.5 13 17.9404 13 17.25V16H11.75C11.0596 16 10.5 16.5596 10.5 17.25C10.5 17.9404 11.0596 18.5 11.75 18.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_primitives83.Path, { d: "M18.75 18.5C19.4404 18.5 20 17.9404 20 17.25V16H18.75C18.0596 16 17.5 16.5596 17.5 17.25C17.5 17.9404 18.0596 18.5 18.75 18.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/menu.mjs
  var import_primitives84 = __toESM(require_primitives(), 1);
  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
  var menu_default = /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_primitives84.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_runtime85.jsx)(import_primitives84.Path, { d: "M5 12H19M5 18.25H19M5 5.75H19", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/more-vertical.mjs
  var import_primitives85 = __toESM(require_primitives(), 1);
  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_primitives85.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_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_primitives85.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/more.mjs
  var import_primitives86 = __toESM(require_primitives(), 1);
  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
  var more_default = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives86.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_runtime87.jsx)(import_primitives86.Path, { d: "M4 10H20M4 14H8M10 14H14M16 14H20", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/navigation-overlay.mjs
  var import_primitives87 = __toESM(require_primitives(), 1);
  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
  var navigation_overlay_default = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_primitives87.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_runtime88.jsx)(import_primitives87.Path, { d: "M4.75 9.25V16C4.75 16.6904 5.30964 17.25 6 17.25H8M4.75 9.25V6C4.75 5.30964 5.30964 4.75 6 4.75H16C16.6904 4.75 17.25 5.30964 17.25 6V8M4.75 9.25H8", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_primitives87.Path, { d: "M10.75 11.25C10.75 10.9739 10.9739 10.75 11.25 10.75H18.75C19.0261 10.75 19.25 10.9739 19.25 11.25V18.75C19.25 19.0261 19.0261 19.25 18.75 19.25H11.25C10.9739 19.25 10.75 19.0261 10.75 18.75V11.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/navigation.mjs
  var import_primitives88 = __toESM(require_primitives(), 1);
  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
  var navigation_default = /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_primitives88.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_runtime89.jsx)(import_primitives88.Path, { d: "M9 16L13.5 12.8421L15 8L10.5 11.1579L9 16Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_primitives88.Path, { d: "M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/next.mjs
  var import_primitives89 = __toESM(require_primitives(), 1);
  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
  var next_default = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_primitives89.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_runtime90.jsx)(import_primitives89.Path, { d: "M7 17.5L12 12L7 6.5M13 17.5L18 12L13 6.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/overlay-text.mjs
  var import_primitives90 = __toESM(require_primitives(), 1);
  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
  var overlay_text_default = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_primitives90.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_runtime91.jsx)(import_primitives90.Path, { d: "M19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25H8.65766L9.51577 16.6757M9.51577 16.6757L11.8243 9.75H12.3784L14.6869 16.6757L15.6386 19.5305C15.681 19.658 15.7027 19.7915 15.7027 19.9258V20M14.6869 16.6757H9.51577", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/page-break.mjs
  var import_primitives91 = __toESM(require_primitives(), 1);
  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
  var page_break_default = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_primitives91.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_runtime92.jsx)(import_primitives91.Path, { d: "M7.25 9L7.25 6C7.25 5.30964 7.80964 4.75 8.5 4.75H15.5C16.1904 4.75 16.75 5.30964 16.75 6V9M7.25 15V18C7.25 18.6904 7.80964 19.25 8.5 19.25H15.5C16.1904 19.25 16.75 18.6904 16.75 18V15M4 12H20", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/page.mjs
  var import_primitives92 = __toESM(require_primitives(), 1);
  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
  var page_default = /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_primitives92.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_runtime93.jsx)(import_primitives92.Path, { d: "M8.5 8.25H15.5M8.5 11.75H15.5M8.5 15.25H15.5M18.25 18V6C18.25 5.30964 17.6904 4.75 17 4.75H7C6.30964 4.75 5.75 5.30964 5.75 6L5.75 18C5.75 18.6904 6.30964 19.25 7 19.25H17C17.6904 19.25 18.25 18.6904 18.25 18Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/pages.mjs
  var import_primitives93 = __toESM(require_primitives(), 1);
  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
  var pages_default = /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_primitives93.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_runtime94.jsx)(import_primitives93.Path, { d: "M7.75 20.25H19C19.6904 20.25 20.25 19.6904 20.25 19V5.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_primitives93.Path, { d: "M7.5 6.25H14.5M7.5 9.75H14.5M7.5 13.25H14.5M17.25 16V4C17.25 3.30964 16.6904 2.75 16 2.75H6C5.30964 2.75 4.75 3.30964 4.75 4L4.75 16C4.75 16.6904 5.30964 17.25 6 17.25H16C16.6904 17.25 17.25 16.6904 17.25 16Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/paragraph.mjs
  var import_primitives94 = __toESM(require_primitives(), 1);
  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
  var paragraph_default = /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_primitives94.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_runtime95.jsx)(import_primitives94.Path, { d: "M10.75 20V4.75L14.75 4.75M14.75 20V4.75M14.75 4.75H18.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_primitives94.Path, { d: "M5.75 9C5.75 11.3472 7.65279 13.25 10 13.25H10.75V4.75H10C7.65279 4.75 5.75 6.65279 5.75 9Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/pencil.mjs
  var import_primitives95 = __toESM(require_primitives(), 1);
  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
  var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_primitives95.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_runtime96.jsx)(import_primitives95.Path, { d: "M5 19.25H12", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_primitives95.Path, { d: "M10 15L7.5 15.5L8 13L16 5L18 7L10 15Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/pin.mjs
  var import_primitives96 = __toESM(require_primitives(), 1);
  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
  var pin_default = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_primitives96.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_runtime97.jsx)(import_primitives96.Path, { d: "M5 19L10 14M13.5355 17.5355L6.46447 10.4645C7.731 9.19794 9.50794 8.75292 11.1332 9.12941L14.5 4.50002L19.5 9.50002L14.8706 12.8669C15.2471 14.4921 14.8021 16.269 13.5355 17.5355Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/playlist-track.mjs
  var import_primitives97 = __toESM(require_primitives(), 1);
  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
  var playlist_track_default = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_primitives97.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_runtime98.jsx)(import_primitives97.Path, { d: "M16.25 13.5V10.5L18.25 12L16.25 13.5Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.Path, { d: "M11.25 16.5C11.25 18.0188 10.0188 19.25 8.5 19.25C6.98122 19.25 5.75 18.0188 5.75 16.5C5.75 14.9812 6.98122 13.75 8.5 13.75C10.0188 13.75 11.25 14.9812 11.25 16.5Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_primitives97.Path, { d: "M8.5 19.25C10.0188 19.25 11.25 18.0188 11.25 16.5C11.25 14.9812 10.0188 13.75 8.5 13.75C6.98122 13.75 5.75 14.9812 5.75 16.5C5.75 18.0188 6.98122 19.25 8.5 19.25ZM8.5 19.25C11.4867 19.25 11.75 16.5 11.75 15.1379V7.99998C11.75 4.9108 14.4 5.00254 16 5.00233", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/playlist.mjs
  var import_primitives98 = __toESM(require_primitives(), 1);
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
  var playlist_default = /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_primitives98.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_runtime99.jsx)(import_primitives98.Path, { d: "M15 10L20 10M15 15L20 15", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.Path, { d: "M11.25 16.5C11.25 18.0188 10.0188 19.25 8.5 19.25C6.98122 19.25 5.75 18.0188 5.75 16.5C5.75 14.9812 6.98122 13.75 8.5 13.75C10.0188 13.75 11.25 14.9812 11.25 16.5Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_primitives98.Path, { d: "M8.5 19.25C10.0188 19.25 11.25 18.0188 11.25 16.5C11.25 14.9812 10.0188 13.75 8.5 13.75C6.98122 13.75 5.75 14.9812 5.75 16.5C5.75 18.0188 6.98122 19.25 8.5 19.25ZM8.5 19.25C11.4867 19.25 11.75 16.5 11.75 15.1379V7.99998C11.75 4.9108 14.4 5.00254 16 5.00233", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/plugins.mjs
  var import_primitives99 = __toESM(require_primitives(), 1);
  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
  var plugins_default = /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_primitives99.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_runtime100.jsx)(import_primitives99.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", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/plus.mjs
  var import_primitives100 = __toESM(require_primitives(), 1);
  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
  var plus_default = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_primitives100.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_runtime101.jsx)(import_primitives100.Path, { d: "M12 18V6M18 12H6", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/position-center.mjs
  var import_primitives101 = __toESM(require_primitives(), 1);
  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
  var position_center_default = /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_primitives101.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_runtime102.jsx)(import_primitives101.Path, { d: "M5 4.75H19M5 19.25H19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_primitives101.Rect, { x: "7", y: "9", width: "10", height: "6", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/position-left.mjs
  var import_primitives102 = __toESM(require_primitives(), 1);
  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
  var position_left_default = /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_primitives102.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_runtime103.jsx)(import_primitives102.Path, { d: "M5 4.75H13M5 19.25H13", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_primitives102.Rect, { x: "5", y: "9", width: "14", height: "6", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/position-right.mjs
  var import_primitives103 = __toESM(require_primitives(), 1);
  var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
  var position_right_default = /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_primitives103.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_runtime104.jsx)(import_primitives103.Path, { d: "M11 4.75H19M11 19.25H19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_primitives103.Rect, { x: "5", y: "9", width: "14", height: "6", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/post-author.mjs
  var import_primitives104 = __toESM(require_primitives(), 1);
  var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
  var post_author_default = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_primitives104.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_runtime105.jsx)(import_primitives104.Path, { d: "M4 15H20M4 19H13M4.75 12V11C4.75 9.89543 5.64543 9 6.75 9H10.75C11.8546 9 12.75 9.89543 12.75 11V12M10.5 4.5C10.5 5.4665 9.7165 6.25 8.75 6.25C7.7835 6.25 7 5.4665 7 4.5C7 3.5335 7.7835 2.75 8.75 2.75C9.7165 2.75 10.5 3.5335 10.5 4.5Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-categories.mjs
  var import_primitives105 = __toESM(require_primitives(), 1);
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
  var post_categories_default = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_primitives105.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_runtime106.jsx)(import_primitives105.Path, { d: "M4 5H20M4 9H13M6 19.25H9C9.69036 19.25 10.25 18.6904 10.25 18V15C10.25 14.3096 9.69036 13.75 9 13.75H6C5.30964 13.75 4.75 14.3096 4.75 15V18C4.75 18.6904 5.30964 19.25 6 19.25ZM15 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V15C19.25 14.3096 18.6904 13.75 18 13.75H15C14.3096 13.75 13.75 14.3096 13.75 15V18C13.75 18.6904 14.3096 19.25 15 19.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-comments-count.mjs
  var import_primitives106 = __toESM(require_primitives(), 1);
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
  var post_comments_count_default = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_primitives106.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_runtime107.jsx)(import_primitives106.Path, { d: "M4 5H20M4 9H13M17.5 13L17.3636 14.5M17.3636 14.5L17.1364 17M17.3636 14.5H15.75M17.3636 14.5H19.8636M17.1364 17L17 18.5M17.1364 17H15.5M17.1364 17H19.6364M20 13L19.8636 14.5M19.8636 14.5L19.6364 17M19.8636 14.5H21.25M19.6364 17L19.5 18.5M19.6364 17H21M6 13H12.5C13.1904 13 13.75 13.5596 13.75 14.25V18.291C13.75 18.9813 13.1904 19.541 12.5 19.541H7.76724L5.6268 21.9948C5.32306 22.343 4.75 22.1282 4.75 21.6662V19.541V14.25C4.75 13.5596 5.30964 13 6 13Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-comments-form.mjs
  var import_primitives107 = __toESM(require_primitives(), 1);
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
  var post_comments_form_default = /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_primitives107.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_runtime108.jsx)(import_primitives107.Path, { d: "M4 5H20M4 9H13", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_primitives107.Path, { d: "M12.5 13H6C5.30964 13 4.75 13.5596 4.75 14.25V19.541V21.6662C4.75 22.1282 5.32306 22.343 5.6268 21.9948L7.76724 19.541H12.5C13.1904 19.541 13.75 18.9813 13.75 18.291V14.25C13.75 13.5596 13.1904 13 12.5 13Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/post-comments.mjs
  var import_primitives108 = __toESM(require_primitives(), 1);
  var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
  var post_comments_default = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_primitives108.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_runtime109.jsx)(import_primitives108.Path, { d: "M12 13H18.5C19.1904 13 19.75 13.5596 19.75 14.25V19.541V21.6662C19.75 22.1282 19.1769 22.343 18.8732 21.9948L16.7328 19.541H12C11.3096 19.541 10.75 18.9813 10.75 18.291V14.25C10.75 13.5596 11.3096 13 12 13Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-content.mjs
  var import_primitives109 = __toESM(require_primitives(), 1);
  var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
  var post_content_default = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_primitives109.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_runtime110.jsx)(import_primitives109.Path, { d: "M4 14H20M4 18H20M4 10H20M4 6H13", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-date.mjs
  var import_primitives110 = __toESM(require_primitives(), 1);
  var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1);
  var post_date_default = /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_primitives110.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_runtime111.jsx)(import_primitives110.Path, { d: "M4.75 7.25L4.75 18C4.75 18.6904 5.30964 19.25 6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V7.25V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25ZM19.25 7.25H4.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.Path, { d: "M18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V7.25H19.25V6C19.25 5.30964 18.6904 4.75 18 4.75Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_primitives110.Path, { d: "M13 15.0988H11C11 13.0322 13 13.5489 13 11.9989C13 11.2239 12 10.5738 11 11.3488", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/post-excerpt.mjs
  var import_primitives111 = __toESM(require_primitives(), 1);
  var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1);
  var post_excerpt_default = /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_primitives111.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_runtime112.jsx)(import_primitives111.Path, { d: "M4 15H20M4 19H13", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_primitives111.Path, { d: "M7.75 7.25H4.75V6M7.75 7.25V9.5C7.75 10.3921 7.08772 11.25 5 11.25M7.75 7.25V6M4.75 6V4.75H7.75V6M4.75 6H7.75M13 7.25H10V6M13 7.25V9.5C13 10.3921 12.3377 11.25 10.25 11.25M13 7.25V6M10 6V4.75H13V6M10 6H13", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/post-featured-image.mjs
  var import_primitives112 = __toESM(require_primitives(), 1);
  var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1);
  var post_featured_image_default = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_primitives112.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_runtime113.jsx)(import_primitives112.Path, { d: "M19.25 9.25131L14.0498 7.02135C14.0187 7.00803 13.983 7.01131 13.9549 7.03006L11.0501 8.96658C11.0193 8.98714 10.9796 8.98896 10.947 8.97131L8.65525 7.72992C8.62147 7.71163 8.5802 7.7143 8.54907 7.73679L4.75 10.4808M19.25 9.25131V5C19.25 4.30964 18.6904 3.75 18 3.75H6C5.30964 3.75 4.75 4.30964 4.75 5V10.4808M19.25 9.25131V10C19.25 10.6904 18.6904 11.25 18 11.25H5.51917C5.09437 11.25 4.75 10.9056 4.75 10.4808M4 15H20M4 19H13", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-list.mjs
  var import_primitives113 = __toESM(require_primitives(), 1);
  var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1);
  var post_list_default = /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_primitives113.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_runtime114.jsx)(import_primitives113.Path, { d: "M7 10H8.5M10 10H17M7 14H8.5M10 14H17M6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/post-terms.mjs
  var import_primitives114 = __toESM(require_primitives(), 1);
  var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1);
  var post_terms_default = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_primitives114.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_runtime115.jsx)(import_primitives114.Path, { d: "M4 15H20M4 19H13M4.75 3.85V8.11432C4.75 8.24693 4.80268 8.37411 4.89645 8.46788L8.82502 12.3964C9.02028 12.5917 9.33686 12.5917 9.53212 12.3964L13.3964 8.53212C13.5917 8.33686 13.5917 8.02028 13.3964 7.82502L9.46788 3.89645C9.37411 3.80268 9.24693 3.75 9.11432 3.75H4.85C4.79477 3.75 4.75 3.79477 4.75 3.85Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/preformatted.mjs
  var import_primitives115 = __toESM(require_primitives(), 1);
  var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1);
  var preformatted_default = /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_primitives115.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_runtime116.jsx)(import_primitives115.Path, { d: "M18 4H6C4.9 4 4 4.9 4 6V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V6C20 4.9 19.1 4 18 4ZM18.5 18C18.5 18.3 18.3 18.5 18 18.5H6C5.7 18.5 5.5 18.3 5.5 18V6C5.5 5.7 5.7 5.5 6 5.5H18C18.3 5.5 18.5 5.7 18.5 6V18ZM7 16.5H13V15H7V16.5ZM11 12.5H17V11H11V12.5ZM9 11H7V12.5H9V11ZM15 16.5H17V15H15V16.5Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_primitives115.Path, { d: "M7 11.75H9M11 11.75H17M15 15.75H17M7 15.75H13M6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/previous.mjs
  var import_primitives116 = __toESM(require_primitives(), 1);
  var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1);
  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_primitives116.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_runtime117.jsx)(import_primitives116.Path, { d: "M17 6.5L12 12L17 17.5M11 6.5L6 12L11 17.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/published.mjs
  var import_primitives117 = __toESM(require_primitives(), 1);
  var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
  var published_default = /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_primitives117.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_runtime118.jsx)(import_primitives117.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_primitives117.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/pull-left.mjs
  var import_primitives118 = __toESM(require_primitives(), 1);
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
  var pull_left_default = /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_primitives118.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_runtime119.jsx)(import_primitives118.Path, { d: "M10 18L4 18L4 6L10 6L10 18Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_primitives118.Path, { d: "M13 9.25H20M20 14.75H13", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/pull-right.mjs
  var import_primitives119 = __toESM(require_primitives(), 1);
  var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1);
  var pull_right_default = /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_primitives119.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_runtime120.jsx)(import_primitives119.Path, { d: "M20 18L14 18L14 6L20 6L20 18Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_primitives119.Path, { d: "M4 9.25H11M11 14.75H4", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/pullquote.mjs
  var import_primitives120 = __toESM(require_primitives(), 1);
  var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1);
  var pullquote_default = /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_primitives120.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_runtime121.jsx)(import_primitives120.Path, { d: "M4 4.75H20M4 19.25H20", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_primitives120.Path, { d: "M4.75 9.75C4.75 9.19772 5.19772 8.75 5.75 8.75H18.25C18.8023 8.75 19.25 9.19772 19.25 9.75V14.25C19.25 14.8023 18.8023 15.25 18.25 15.25H5.75C5.19771 15.25 4.75 14.8023 4.75 14.25V9.75Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/query-pagination-next.mjs
  var import_primitives121 = __toESM(require_primitives(), 1);
  var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_next_default = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_primitives121.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_runtime122.jsx)(import_primitives121.Path, { d: "M7 12H9M11 12H13M16 9.5L18 12L16 14.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/query-pagination-numbers.mjs
  var import_primitives122 = __toESM(require_primitives(), 1);
  var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_numbers_default = /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_primitives122.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_runtime123.jsx)(import_primitives122.Path, { d: "M8 14.25C8 13.85 8 10.9167 8 9.75L6.5 10.25", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.Path, { d: "M11 12H13", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_primitives122.Path, { d: "M17.5 13.5H15.5C15.5 11.4333 17.5 11.95 17.5 10.4C17.5 9.62503 16.5 8.975 15.5 9.74999", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/query-pagination-previous.mjs
  var import_primitives123 = __toESM(require_primitives(), 1);
  var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_previous_default = /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_primitives123.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_runtime124.jsx)(import_primitives123.Path, { d: "M11 12L13 12M15 12H17M8 14.5L6 12L8 9.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/query-pagination.mjs
  var import_primitives124 = __toESM(require_primitives(), 1);
  var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1);
  var query_pagination_default = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_primitives124.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_runtime125.jsx)(import_primitives124.Path, { d: "M9 12L11 12M13 12H15M18 9.5L20 12L18 14.5M6 14.5L4 12L6 9.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/quote.mjs
  var import_primitives125 = __toESM(require_primitives(), 1);
  var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1);
  var quote_default = /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_primitives125.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_runtime126.jsx)(import_primitives125.Path, { d: "M10 11.25V6.75H4.75V11.25H10ZM10 11.25V16C10 17.5 9.5 19 6 19M19 11.25V6.75H13.75V11.25H19ZM19 11.25V16C19 17.5 18.5 19 15 19", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.Path, { d: "M10 6.75V11.25H4.75V6.75H10Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_primitives125.Path, { d: "M19 6.75V11.25H13.75V6.75H19Z", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/remove-submenu.mjs
  var import_primitives126 = __toESM(require_primitives(), 1);
  var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1);
  var remove_submenu_default = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_primitives126.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_runtime127.jsx)(import_primitives126.Path, { d: "M10.5 17H8C5.23858 17 3 14.7614 3 12C3 9.23858 5.23858 7 8 7H11M8.5 19.5L10.5 17L8.5 14.5M13.5 12H17.1143M21.5 12H20M13.5 7H19.4M13.5 17H14.8286M21.5 17H18M13 21L14.8286 17M21 3.5L19.4 7M19.4 7L17.1143 12M17.1143 12L14.8286 17", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/reset.mjs
  var import_primitives127 = __toESM(require_primitives(), 1);
  var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1);
  var reset_default = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_primitives127.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_runtime128.jsx)(import_primitives127.Path, { d: "M7 12H17", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/resize-corner-ne.mjs
  var import_primitives128 = __toESM(require_primitives(), 1);
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
  var resize_corner_ne_default = /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_primitives128.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_runtime129.jsx)(import_primitives128.Path, { d: "M11.5 18.75H5.25V12.5M5.25 18.75L18.75 5.25M18.75 11.5V5.25H12.5", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/rotate-right.mjs
  var import_primitives129 = __toESM(require_primitives(), 1);
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
  var rotate_right_default = /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_primitives129.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_runtime130.jsx)(import_primitives129.Path, { d: "M12 19.25C7.99593 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99593 4.75 12 4.75L14 4.75M12 2L14 4.75L12 7.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_primitives129.Path, { d: "M9.22553 18.6981C12.9248 20.2304 17.1658 18.4737 18.6981 14.7745C19.7261 12.2927 19.2738 9.56712 17.7477 7.57918", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/row.mjs
  var import_primitives130 = __toESM(require_primitives(), 1);
  var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1);
  var row_default = /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_primitives130.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_runtime131.jsx)(import_primitives130.Path, { d: "M20 16.75L15 16.75C14.3096 16.75 13.75 16.1904 13.75 15.5L13.75 8.5C13.75 7.80964 14.3096 7.25 15 7.25L20 7.25M4 7.25L9 7.25C9.69036 7.25 10.25 7.80964 10.25 8.5L10.25 15.5C10.25 16.1904 9.69036 16.75 9 16.75L4 16.75", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/rss.mjs
  var import_primitives131 = __toESM(require_primitives(), 1);
  var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
  var rss_default = /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_primitives131.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_runtime132.jsx)(import_primitives131.Path, { d: "M6.25 17.75L6.25 19.25L4.75 19.25L4.75 17.75L6.25 17.75Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_primitives131.Path, { d: "M4.75 11H5C9.41828 11 13 14.5817 13 19V19.25M19 19.25V19C19 11.268 12.732 5 5 5H4.75", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/search.mjs
  var import_primitives132 = __toESM(require_primitives(), 1);
  var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
  var search_default = /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_primitives132.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_runtime133.jsx)(import_primitives132.Path, { d: "M5 19L9.28769 14.7123M18.25 11C18.25 13.8995 15.8995 16.25 13 16.25C10.1005 16.25 7.75 13.8995 7.75 11C7.75 8.10051 10.1005 5.75 13 5.75C15.8995 5.75 18.25 8.10051 18.25 11Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/separator.mjs
  var import_primitives133 = __toESM(require_primitives(), 1);
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
  var separator_default = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_primitives133.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_runtime134.jsx)(import_primitives133.Path, { d: "M3.75 7V11.75M3.75 16.5V11.75M3.75 11.75H20.25M20.25 11.75V16.5M20.25 11.75V7", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/share.mjs
  var import_primitives134 = __toESM(require_primitives(), 1);
  var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
  var share_default = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_primitives134.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_runtime135.jsx)(import_primitives134.Path, { d: "M15.75 5.69118V7C15.75 7.13807 15.8619 7.25 16 7.25H18C18.1381 7.25 18.25 7.13807 18.25 7V5C18.25 4.86193 18.1381 4.75 18 4.75H16C15.8619 4.75 15.75 4.86193 15.75 5V5.69118ZM15.75 5.69118L8.25 11.4265M15.75 18.3088V19C15.75 19.1381 15.8619 19.25 16 19.25H18C18.1381 19.25 18.25 19.1381 18.25 19V17C18.25 16.8619 18.1381 16.75 18 16.75H16C15.8619 16.75 15.75 16.8619 15.75 17V18.3088ZM15.75 18.3088L8.25 12.5735M8.25 11.4265V11C8.25 10.8619 8.13807 10.75 8 10.75H6C5.86193 10.75 5.75 10.8619 5.75 11V13C5.75 13.1381 5.86193 13.25 6 13.25H8C8.13807 13.25 8.25 13.1381 8.25 13V12.5735M8.25 11.4265V12.5735", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/shortcode.mjs
  var import_primitives135 = __toESM(require_primitives(), 1);
  var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
  var shortcode_default = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_primitives135.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_runtime136.jsx)(import_primitives135.Path, { d: "M8 4.75H4.75V19.25H8M16 4.75H19.25V19.25H16M10 17L14 7", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/sidebar.mjs
  var import_primitives136 = __toESM(require_primitives(), 1);
  var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1);
  var sidebar_default = /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_primitives136.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_runtime137.jsx)(import_primitives136.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", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_primitives136.Path, { d: "M6 19.25H9.75V9.75H4.75V18C4.75 18.6904 5.30964 19.25 6 19.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/site-logo.mjs
  var import_primitives137 = __toESM(require_primitives(), 1);
  var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1);
  var site_logo_default = /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_primitives137.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_runtime138.jsx)(import_primitives137.Path, { d: "M5.07325 14.1472L8.71429 12L12.5 13.3333L15.75 11C15.75 11 17.934 11.9169 19.2032 12.8281M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/square.mjs
  var import_primitives138 = __toESM(require_primitives(), 1);
  var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1);
  var square_default = /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_primitives138.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_runtime139.jsx)(import_primitives138.Path, { d: "M5.75 12V18.25H12M12 5.75H18.25V12", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/stack.mjs
  var import_primitives139 = __toESM(require_primitives(), 1);
  var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1);
  var stack_default = /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_primitives139.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_runtime140.jsx)(import_primitives139.Path, { d: "M7.25 20L7.25 15C7.25 14.3096 7.80965 13.75 8.5 13.75L15.5 13.75C16.1904 13.75 16.75 14.3096 16.75 15L16.75 20M16.75 4L16.75 9C16.75 9.69035 16.1904 10.25 15.5 10.25L8.5 10.25C7.80964 10.25 7.25 9.69036 7.25 9L7.25 4", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/symbol-filled.mjs
  var import_primitives140 = __toESM(require_primitives(), 1);
  var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1);
  var symbol_filled_default = /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_primitives140.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_runtime141.jsx)(import_primitives140.Path, { d: "M15.2071 6.20711L20.2929 11.2929C20.6834 11.6834 20.6834 12.3166 20.2929 12.7071L15.2071 17.7929C14.8166 18.1834 14.1834 18.1834 13.7929 17.7929L8.70711 12.7071C8.31658 12.3166 8.31658 11.6834 8.70711 11.2929L13.7929 6.20711C14.1834 5.81658 14.8166 5.81658 15.2071 6.20711Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_primitives140.Path, { d: "M9.5 5.5L3.70711 11.2929C3.31658 11.6834 3.31658 12.3166 3.70711 12.7071L9.5 18.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/symbol.mjs
  var import_primitives141 = __toESM(require_primitives(), 1);
  var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1);
  var symbol_default = /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_primitives141.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_runtime142.jsx)(import_primitives141.Path, { d: "M15.2071 6.20711L20.2929 11.2929C20.6834 11.6834 20.6834 12.3166 20.2929 12.7071L15.2071 17.7929C14.8166 18.1834 14.1834 18.1834 13.7929 17.7929L8.70711 12.7071C8.31658 12.3166 8.31658 11.6834 8.70711 11.2929L13.7929 6.20711C14.1834 5.81658 14.8166 5.81658 15.2071 6.20711Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_primitives141.Path, { d: "M9.5 5.5L3.70711 11.2929C3.31658 11.6834 3.31658 12.3166 3.70711 12.7071L9.5 18.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/tab-list.mjs
  var import_primitives142 = __toESM(require_primitives(), 1);
  var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1);
  var tab_list_default = /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_primitives142.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_runtime143.jsx)(import_primitives142.Path, { d: "M10.25 13.25H4.75V11.25C4.75 10.6977 5.19772 10.25 5.75 10.25H9.25C9.80228 10.25 10.25 10.6977 10.25 11.25V13.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_primitives142.Path, { d: "M13.75 14L13.75 11.25C13.75 10.6977 14.1977 10.25 14.75 10.25H18.25C18.8023 10.25 19.25 10.6977 19.25 11.25V14", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/tab-panel.mjs
  var import_primitives143 = __toESM(require_primitives(), 1);
  var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1);
  var tab_panel_default = /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_primitives143.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_runtime144.jsx)(import_primitives143.Path, { d: "M4.75 10L4.75 7.25C4.75 6.69772 5.19772 6.25 5.75 6.25H9.25C9.80228 6.25 10.25 6.69772 10.25 7.25V10", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_primitives143.Path, { d: "M4 13H20M4 17H13", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-column-after.mjs
  var import_primitives144 = __toESM(require_primitives(), 1);
  var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1);
  var table_column_after_default = /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_primitives144.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_runtime145.jsx)(import_primitives144.Path, { d: "M9.75 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V9.5M9.75 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H9.75M9.75 4.75V9.5M9.75 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V14.5M9.75 19.25V14.5M9.75 14.5H4.75M9.75 14.5V9.5M4.75 14.5V9.5M9.75 9.5H4.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_primitives144.Path, { d: "M17.5 12H14.5M11.5 12H14.5M14.5 12V9M14.5 12V15", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-column-before.mjs
  var import_primitives145 = __toESM(require_primitives(), 1);
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
  var table_column_before_default = /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_primitives145.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_runtime146.jsx)(import_primitives145.Path, { d: "M14.25 19.25L18 19.25C18.6904 19.25 19.25 18.6904 19.25 18L19.25 14.5M14.25 19.25L6 19.25C5.30964 19.25 4.75 18.6904 4.75 18L4.75 6C4.75 5.30964 5.30965 4.75 6 4.75L14.25 4.75M14.25 19.25L14.25 14.5M14.25 4.75L18 4.75C18.6904 4.75 19.25 5.30964 19.25 6L19.25 9.5M14.25 4.75L14.25 9.5M14.25 9.5L19.25 9.5M14.25 9.5L14.25 14.5M19.25 9.5L19.25 14.5M14.25 14.5L19.25 14.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_primitives145.Path, { d: "M6.5 12L9.5 12M12.5 12L9.5 12M9.5 12L9.5 15M9.5 12L9.5 9", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-column-delete.mjs
  var import_primitives146 = __toESM(require_primitives(), 1);
  var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1);
  var table_column_delete_default = /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_primitives146.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_runtime147.jsx)(import_primitives146.Path, { d: "M9.75 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25H9.75M9.75 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H9.75M9.75 4.75V19.25", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_primitives146.Path, { d: "M16.6213 14.1213L14.5 12M12.3787 9.87868L14.5 12M14.5 12L16.6213 9.87868M14.5 12L12.3787 14.1213", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-of-contents.mjs
  var import_primitives147 = __toESM(require_primitives(), 1);
  var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1);
  var table_of_contents_default = /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_primitives147.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_runtime148.jsx)(import_primitives147.Path, { d: "M11 8H20M15 16H20", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M6 9.25C6.69036 9.25 7.25 8.69036 7.25 8C7.25 7.30964 6.69036 6.75 6 6.75C5.30964 6.75 4.75 7.30964 4.75 8C4.75 8.69036 5.30964 9.25 6 9.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M6 17.25C6.69036 17.25 7.25 16.6904 7.25 16C7.25 15.3096 6.69036 14.75 6 14.75C5.30964 14.75 4.75 15.3096 4.75 16C4.75 16.6904 5.30964 17.25 6 17.25Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M6 9.25C6.69036 9.25 7.25 8.69036 7.25 8C7.25 7.30964 6.69036 6.75 6 6.75C5.30964 6.75 4.75 7.30964 4.75 8C4.75 8.69036 5.30964 9.25 6 9.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M6 17.25C6.69036 17.25 7.25 16.6904 7.25 16C7.25 15.3096 6.69036 14.75 6 14.75C5.30964 14.75 4.75 15.3096 4.75 16C4.75 16.6904 5.30964 17.25 6 17.25Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_primitives147.Path, { d: "M11 17.25C11.6904 17.25 12.25 16.6904 12.25 16C12.25 15.3096 11.6904 14.75 11 14.75C10.3096 14.75 9.75 15.3096 9.75 16C9.75 16.6904 10.3096 17.25 11 17.25Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-row-after.mjs
  var import_primitives148 = __toESM(require_primitives(), 1);
  var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1);
  var table_row_after_default = /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_primitives148.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_runtime149.jsx)(import_primitives148.Path, { d: "M19.25 9.75L19.25 6C19.25 5.30964 18.6904 4.75 18 4.75L14.5 4.75M19.25 9.75L19.25 18C19.25 18.6904 18.6904 19.25 18 19.25L6 19.25C5.30964 19.25 4.75 18.6904 4.75 18L4.75 9.75M19.25 9.75L14.5 9.75M4.75 9.75L4.75 6C4.75 5.30964 5.30964 4.75 6 4.75L9.5 4.75M4.75 9.75L9.5 9.75M9.5 9.75L9.5 4.75M9.5 9.75L14.5 9.75M9.5 4.75L14.5 4.75M14.5 9.75L14.5 4.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_primitives148.Path, { d: "M12 17.5L12 14.5M12 11.5L12 14.5M12 14.5L15 14.5M12 14.5L9 14.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-row-before.mjs
  var import_primitives149 = __toESM(require_primitives(), 1);
  var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1);
  var table_row_before_default = /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_primitives149.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_runtime150.jsx)(import_primitives149.Path, { d: "M4.75 14.25L4.75 18C4.75 18.6904 5.30964 19.25 6 19.25L9.5 19.25M4.75 14.25L4.75 6C4.75 5.30964 5.30964 4.75 6 4.75L18 4.75C18.6904 4.75 19.25 5.30964 19.25 6L19.25 14.25M4.75 14.25L9.5 14.25M19.25 14.25L19.25 18C19.25 18.6904 18.6904 19.25 18 19.25L14.5 19.25M19.25 14.25L14.5 14.25M14.5 14.25L14.5 19.25M14.5 14.25L9.5 14.25M14.5 19.25L9.5 19.25M9.5 14.25L9.5 19.25", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_primitives149.Path, { d: "M12 6.5L12 9.5M12 12.5L12 9.5M12 9.5L9 9.5M12 9.5L15 9.5", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table-row-delete.mjs
  var import_primitives150 = __toESM(require_primitives(), 1);
  var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1);
  var table_row_delete_default = /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_primitives150.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_runtime151.jsx)(import_primitives150.Path, { d: "M19.25 9.75L19.25 6C19.25 5.30964 18.6904 4.75 18 4.75L6 4.75C5.30964 4.75 4.75 5.30964 4.75 6L4.75 9.75M19.25 9.75L19.25 18C19.25 18.6904 18.6904 19.25 18 19.25L6 19.25C5.30964 19.25 4.75 18.6904 4.75 18L4.75 9.75M19.25 9.75L4.75 9.75", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_primitives150.Path, { d: "M9.87868 16.6213L12 14.5M14.1213 12.3787L12 14.5M12 14.5L14.1213 16.6213M12 14.5L9.87868 12.3787", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/table.mjs
  var import_primitives151 = __toESM(require_primitives(), 1);
  var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1);
  var table_default = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_primitives151.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_runtime152.jsx)(import_primitives151.Path, { d: "M19.25 12V6C19.25 5.30964 18.6904 4.75 18 4.75H12M19.25 12V18C19.25 18.6904 18.6904 19.25 18 19.25H12M19.25 12H4.75M4.75 12V18C4.75 18.6904 5.30964 19.25 6 19.25H12M4.75 12V6C4.75 5.30964 5.30964 4.75 6 4.75H12M12 4.75V19.25", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/tabs.mjs
  var import_primitives152 = __toESM(require_primitives(), 1);
  var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1);
  var tabs_default = /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_primitives152.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_runtime153.jsx)(import_primitives152.Path, { d: "M4 13H20M4 17H13", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.Path, { d: "M10.25 9.25H4.75V7.25C4.75 6.69772 5.19772 6.25 5.75 6.25H9.25C9.80228 6.25 10.25 6.69772 10.25 7.25V9.25Z", fill: "currentColor", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_primitives152.Path, { d: "M13.75 10L13.75 7.25C13.75 6.69772 14.1977 6.25 14.75 6.25H18.25C18.8023 6.25 19.25 6.69772 19.25 7.25V10", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/tag.mjs
  var import_primitives153 = __toESM(require_primitives(), 1);
  var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1);
  var tag_default = /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_primitives153.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_runtime154.jsx)(import_primitives153.Path, { d: "M4.75 12.5429V4.85C4.75 4.79477 4.79477 4.75 4.85 4.75H12.5429C12.6755 4.75 12.8027 4.80268 12.8964 4.89645L20.1464 12.1464C20.3417 12.3417 20.3417 12.6583 20.1464 12.8536L12.8536 20.1464C12.6583 20.3417 12.3417 20.3417 12.1464 20.1464L4.89645 12.8964C4.80268 12.8027 4.75 12.6755 4.75 12.5429Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_primitives153.Path, { d: "M9.75 8.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z", fill: "currentColor", stroke: "none" })
  ] });

  // packages/icons/build-module/library/term-count.mjs
  var import_primitives154 = __toESM(require_primitives(), 1);
  var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
  var term_count_default = /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(import_primitives154.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_runtime155.jsx)(import_primitives154.Path, { d: "M4.75 12.5429V4.85C4.75 4.79477 4.79477 4.75 4.85 4.75H12.5429C12.6755 4.75 12.8027 4.80268 12.8964 4.89645L20.1464 12.1464C20.3417 12.3417 20.3417 12.6583 20.1464 12.8536L12.8536 20.1464C12.6583 20.3417 12.3417 20.3417 12.1464 20.1464L4.89645 12.8964C4.80268 12.8027 4.75 12.6755 4.75 12.5429Z", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_primitives154.Path, { d: "M14.1563 12.7915L12.7421 14.2057C11.2807 12.7443 13.0603 11.6955 11.9643 10.5995C11.4163 10.0515 10.2495 10.2989 10.0904 11.554", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/term-description.mjs
  var import_primitives155 = __toESM(require_primitives(), 1);
  var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1);
  var term_description_default = /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(import_primitives155.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_runtime156.jsx)(import_primitives155.Path, { d: "M4 15H11M4 19H8M12 15H20M9 19H15M4.75 12V11.7703L5.59234 9.24324M5.59234 9.24324L7.50676 3.5H7.96622L9.88063 9.24324L10.723 11.7703V12M9.88063 9.24324H5.59234", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/term-name.mjs
  var import_primitives156 = __toESM(require_primitives(), 1);
  var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1);
  var term_name_default = /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(import_primitives156.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_runtime157.jsx)(import_primitives156.Path, { d: "M14.5 14.5L9 9M12.8964 4.89645L20.1464 12.1464C20.3417 12.3417 20.3417 12.6583 20.1464 12.8536L12.8536 20.1464C12.6583 20.3417 12.3417 20.3417 12.1464 20.1464L4.89645 12.8964C4.80268 12.8027 4.75 12.6755 4.75 12.5429V4.85C4.75 4.79477 4.79477 4.75 4.85 4.75H12.5429C12.6755 4.75 12.8027 4.80268 12.8964 4.89645Z", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/time.mjs
  var import_primitives157 = __toESM(require_primitives(), 1);
  var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1);
  var time_default = /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(import_primitives157.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_runtime158.jsx)(import_primitives157.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(import_primitives157.Path, { d: "M15 15L11.75 12.25V8", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/title.mjs
  var import_primitives158 = __toESM(require_primitives(), 1);
  var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1);
  var title_default = /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(import_primitives158.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_runtime159.jsx)(import_primitives158.Path, { d: "M4 15H20M4 19H13M4 4.5H7M7 4.5H10M7 4.5V12", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/upload.mjs
  var import_primitives159 = __toESM(require_primitives(), 1);
  var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
  var upload_default = /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(import_primitives159.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_runtime160.jsx)(import_primitives159.Path, { d: "M4.75 15V19.25H12M12 19.25V4.5M12 19.25H19.25V15M17.5 10L12 4.5L6.5 10", vectorEffect: "non-scaling-stroke" }) });

  // packages/icons/build-module/library/verse.mjs
  var import_primitives160 = __toESM(require_primitives(), 1);
  var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1);
  var verse_default = /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(import_primitives160.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_runtime161.jsx)(import_primitives160.Path, { d: "M8.5 14C9 12 12.5 7.5 17 5.5", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_primitives160.Path, { d: "M8 14C7.66667 11.1667 9 5 17 3C17.1667 4.66667 17.2 8.6 16 11C14.8 13.4 10.1667 14 8 14ZM8 14L7 16", strokeLinecap: "round", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(import_primitives160.Path, { d: "M5 19.25H12", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/video.mjs
  var import_primitives161 = __toESM(require_primitives(), 1);
  var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1);
  var video_default = /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(import_primitives161.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_runtime162.jsx)(import_primitives161.Path, { d: "M10 15L15 12L10 9V15Z", fill: "currentColor", stroke: "none" }),
    /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_primitives161.Path, { d: "M4.75 6C4.75 5.30964 5.30964 4.75 6 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V6Z", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/icons/build-module/library/word-count.mjs
  var import_primitives162 = __toESM(require_primitives(), 1);
  var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1);
  var word_count_default = /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(import_primitives162.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_runtime163.jsx)(import_primitives162.Path, { d: "M6.28261 7.75L6.09288 9.93182M6.09288 9.93182L5.77668 13.5682M6.09288 9.93182H3.84783M6.09288 9.93182H9.57115M5.77668 13.5682L5.58696 15.75M5.77668 13.5682H3.5M5.77668 13.5682H9.25494M9.76087 7.75L9.57115 9.93182M9.57115 9.93182L9.25494 13.5682M9.57115 9.93182H11.5M9.25494 13.5682L9.06522 15.75M9.25494 13.5682H11.1522", vectorEffect: "non-scaling-stroke" }),
    /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_primitives162.Path, { d: "M19 7.75C19 7.75 19 11.8033 19 13.0386C19 14.2739 19.1824 15 20.5 15M19 11.2941C19 9.23529 17.8235 8.41176 16.3824 8.41176C14.7905 8.41176 13.5 9.64706 13.5 11.7059C13.5 13.7647 14.7905 15 16.3824 15C17.5592 15 19 13.7647 19 12.1176", vectorEffect: "non-scaling-stroke" })
  ] });

  // packages/block-library/build-module/accordion/edit.mjs
  var import_block_editor2 = __toESM(require_block_editor(), 1);
  var import_i18n = __toESM(require_i18n(), 1);
  var import_components = __toESM(require_components(), 1);
  var import_data2 = __toESM(require_data(), 1);
  var import_blocks = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/utils/hooks.mjs
  var import_data = __toESM(require_data(), 1);
  var import_element2 = __toESM(require_element(), 1);
  var import_blob = __toESM(require_blob(), 1);
  var import_block_editor = __toESM(require_block_editor(), 1);
  var import_core_data = __toESM(require_core_data(), 1);
  var import_compose = __toESM(require_compose(), 1);
  function useCanEditEntity(kind, name118, recordId) {
    return (0, import_data.useSelect)(
      (select10) => select10(import_core_data.store).canUser("update", {
        kind,
        name: name118,
        id: recordId
      }),
      [kind, name118, recordId]
    );
  }
  function useUploadMediaFromBlobURL(args = {}) {
    const latestArgsRef = (0, import_element2.useRef)(args);
    const hasUploadStartedRef = (0, import_element2.useRef)(false);
    const { getSettings: getSettings2 } = (0, import_data.useSelect)(import_block_editor.store);
    (0, import_element2.useLayoutEffect)(() => {
      latestArgsRef.current = args;
    });
    (0, import_element2.useEffect)(() => {
      if (hasUploadStartedRef.current) {
        return;
      }
      if (!latestArgsRef.current.url || !(0, import_blob.isBlobURL)(latestArgsRef.current.url)) {
        return;
      }
      const file = (0, import_blob.getBlobByURL)(latestArgsRef.current.url);
      if (!file) {
        return;
      }
      const { url, allowedTypes, onChange, onError } = latestArgsRef.current;
      const { mediaUpload } = getSettings2();
      if (!mediaUpload) {
        return;
      }
      hasUploadStartedRef.current = true;
      mediaUpload({
        filesList: [file],
        allowedTypes,
        onFileChange: ([media]) => {
          if ((0, import_blob.isBlobURL)(media?.url)) {
            return;
          }
          (0, import_blob.revokeBlobURL)(url);
          onChange(media);
          hasUploadStartedRef.current = false;
        },
        onError: (message) => {
          (0, import_blob.revokeBlobURL)(url);
          onError(message);
          hasUploadStartedRef.current = false;
        }
      });
    }, [getSettings2]);
  }
  function useDefaultAvatar() {
    const avatarURL = (0, import_data.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings?.avatarURL ?? "";
    }, []);
    return avatarURL;
  }
  function useToolsPanelDropdownMenuProps() {
    const isMobile = (0, import_compose.useViewportMatch)("medium", "<");
    return !isMobile ? {
      popoverProps: {
        placement: "left-start",
        // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
        offset: 259
      }
    } : {};
  }

  // packages/block-library/build-module/accordion/edit.mjs
  var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1);
  var ACCORDION_BLOCK_NAME = "core/accordion-item";
  var ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading";
  var ACCORDION_BLOCK = {
    name: ACCORDION_BLOCK_NAME
  };
  function Edit({
    attributes: {
      autoclose,
      iconPosition,
      showIcon,
      headingLevel,
      levelOptions
    },
    clientId,
    setAttributes,
    isSelected: isSingleSelected
  }) {
    const registry = (0, import_data2.useRegistry)();
    const { getBlockOrder } = (0, import_data2.useSelect)(import_block_editor2.store);
    const blockProps = (0, import_block_editor2.useBlockProps)({
      role: "group"
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { updateBlockAttributes, insertBlock } = (0, import_data2.useDispatch)(import_block_editor2.store);
    const blockEditingMode = (0, import_block_editor2.useBlockEditingMode)();
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const innerBlocksProps = (0, import_block_editor2.useInnerBlocksProps)(blockProps, {
      defaultBlock: ACCORDION_BLOCK,
      directInsert: true
    });
    const addAccordionItemBlock = () => {
      const newAccordionItem = (0, import_blocks.createBlock)(ACCORDION_BLOCK_NAME, {}, [
        (0, import_blocks.createBlock)(ACCORDION_HEADING_BLOCK_NAME, {
          level: headingLevel
        }),
        (0, import_blocks.createBlock)("core/accordion-panel", {})
      ]);
      insertBlock(newAccordionItem, void 0, clientId);
    };
    const updateHeadingLevel = (newHeadingLevel) => {
      const innerBlockClientIds = getBlockOrder(clientId);
      const accordionHeaderClientIds = [];
      innerBlockClientIds.forEach((contentClientId) => {
        const headerClientIds = getBlockOrder(contentClientId);
        accordionHeaderClientIds.push(...headerClientIds);
      });
      registry.batch(() => {
        setAttributes({ headingLevel: newHeadingLevel });
        updateBlockAttributes(accordionHeaderClientIds, {
          level: newHeadingLevel
        });
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(import_jsx_runtime164.Fragment, { children: [
      isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(import_jsx_runtime164.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_block_editor2.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_components.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
          import_block_editor2.HeadingLevelDropdown,
          {
            value: headingLevel,
            options: levelOptions,
            onChange: updateHeadingLevel
          }
        ) }) }),
        /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_block_editor2.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_components.ToolbarButton, { onClick: addAccordionItemBlock, children: (0, import_i18n.__)("Add item") }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(import_block_editor2.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(
        import_components.__experimentalToolsPanel,
        {
          label: (0, import_i18n.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoclose: false,
              showIcon: true,
              iconPosition: "right"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Auto-close"),
                isShownByDefault: true,
                hasValue: () => !!autoclose,
                onDeselect: () => setAttributes({ autoclose: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
                  import_components.ToggleControl,
                  {
                    label: (0, import_i18n.__)("Auto-close"),
                    onChange: (value) => {
                      setAttributes({
                        autoclose: value
                      });
                    },
                    checked: autoclose,
                    help: (0, import_i18n.__)(
                      "Automatically close accordions when a new one is opened."
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Show icon"),
                isShownByDefault: true,
                hasValue: () => !showIcon,
                onDeselect: () => setAttributes({ showIcon: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
                  import_components.ToggleControl,
                  {
                    label: (0, import_i18n.__)("Show icon"),
                    onChange: (value) => {
                      setAttributes({
                        showIcon: value,
                        iconPosition: value ? iconPosition : "right"
                      });
                    },
                    checked: showIcon,
                    help: (0, import_i18n.__)(
                      "Display a plus icon next to the accordion header."
                    )
                  }
                )
              }
            ),
            showIcon && /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
              import_components.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n.__)("Icon Position"),
                isShownByDefault: true,
                hasValue: () => iconPosition !== "right",
                onDeselect: () => setAttributes({ iconPosition: "right" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(
                  import_components.__experimentalToggleGroupControl,
                  {
                    isBlock: true,
                    label: (0, import_i18n.__)("Icon Position"),
                    value: iconPosition,
                    onChange: (value) => {
                      setAttributes({ iconPosition: value });
                    },
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
                        import_components.__experimentalToggleGroupControlOption,
                        {
                          label: (0, import_i18n.__)("Left"),
                          value: "left"
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
                        import_components.__experimentalToggleGroupControlOption,
                        {
                          label: (0, import_i18n.__)("Right"),
                          value: "right"
                        }
                      )
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }, "setting"),
      /* @__PURE__ */ (0, import_jsx_runtime164.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/accordion/save.mjs
  var import_block_editor3 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1);
  function save() {
    const blockProps = import_block_editor3.useBlockProps.save({
      role: "group"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("div", { ...import_block_editor3.useInnerBlocksProps.save(blockProps) });
  }

  // packages/block-library/build-module/accordion/block.json
  var block_default = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion",
    title: "Accordion",
    category: "design",
    description: "Displays a foldable layout that groups content in collapsible sections.",
    example: {},
    supports: {
      anchor: true,
      html: false,
      align: ["wide", "full"],
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        background: true,
        gradients: true,
        link: true,
        heading: true,
        button: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      spacing: {
        padding: true,
        margin: ["top", "bottom"],
        blockGap: true
      },
      shadow: true,
      layout: true,
      ariaLabel: true,
      interactivity: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      contentRole: true,
      listView: true
    },
    attributes: {
      iconPosition: {
        type: "string",
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      },
      autoclose: {
        type: "boolean",
        default: false
      },
      headingLevel: {
        type: "number",
        default: 3
      },
      levelOptions: {
        type: "array"
      }
    },
    providesContext: {
      "core/accordion-icon-position": "iconPosition",
      "core/accordion-show-icon": "showIcon",
      "core/accordion-heading-level": "headingLevel"
    },
    allowedBlocks: ["core/accordion-item"],
    textdomain: "default",
    viewScriptModule: "@wordpress/block-library/accordion/view"
  };

  // packages/block-library/build-module/utils/init-block.mjs
  var import_blocks2 = __toESM(require_blocks(), 1);
  function initBlock(block) {
    if (!block) {
      return;
    }
    const { metadata, settings: settings117, name: name118 } = block;
    return (0, import_blocks2.registerBlockType)({ name: name118, ...metadata }, settings117);
  }

  // packages/block-library/build-module/accordion/index.mjs
  var { name } = block_default;
  var TEMPLATE = [["core/accordion-item"]];
  var settings = {
    icon: accordion_default,
    example: {
      innerBlocks: [
        {
          name: "core/accordion-item",
          innerBlocks: [
            {
              name: "core/accordion-heading",
              attributes: {
                title: (0, import_i18n2.__)(
                  "Lorem ipsum dolor sit amet, consectetur."
                )
              }
            }
          ]
        },
        {
          name: "core/accordion-item",
          innerBlocks: [
            {
              name: "core/accordion-heading",
              attributes: {
                title: (0, import_i18n2.__)(
                  "Suspendisse commodo lacus, interdum et."
                )
              }
            }
          ]
        }
      ]
    },
    template: TEMPLATE,
    templateInsertUpdatesSelection: true,
    edit: Edit,
    save
  };
  var init = () => initBlock({ name, metadata: block_default, settings });

  // packages/block-library/build-module/accordion-item/index.mjs
  var accordion_item_exports = {};
  __export(accordion_item_exports, {
    init: () => init2,
    metadata: () => block_default2,
    name: () => name2,
    settings: () => settings2
  });

  // packages/block-library/build-module/accordion-item/edit.mjs
  var import_i18n3 = __toESM(require_i18n(), 1);
  var import_block_editor4 = __toESM(require_block_editor(), 1);
  var import_data3 = __toESM(require_data(), 1);
  var import_components2 = __toESM(require_components(), 1);
  var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1);
  function Edit2({
    attributes: attributes2,
    clientId,
    setAttributes,
    isSelected: isSingleSelected
  }) {
    const { openByDefault } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { isSelected } = (0, import_data3.useSelect)(
      (select10) => {
        if (isSingleSelected || openByDefault) {
          return { isSelected: true };
        }
        return {
          isSelected: select10(import_block_editor4.store).hasSelectedInnerBlock(
            clientId,
            true
          )
        };
      },
      [clientId, isSingleSelected, openByDefault]
    );
    const blockProps = (0, import_block_editor4.useBlockProps)({
      className: clsx_default({
        "is-open": openByDefault || isSelected
      })
    });
    const innerBlocksProps = (0, import_block_editor4.useInnerBlocksProps)(blockProps, {
      templateLock: "all",
      directInsert: true
    });
    return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(import_jsx_runtime166.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(import_block_editor4.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
        import_components2.__experimentalToolsPanel,
        {
          label: (0, import_i18n3.__)("Settings"),
          resetAll: () => {
            setAttributes({ openByDefault: false });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
            import_components2.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n3.__)("Open by default"),
              isShownByDefault: true,
              hasValue: () => !!openByDefault,
              onDeselect: () => {
                setAttributes({ openByDefault: false });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
                import_components2.ToggleControl,
                {
                  label: (0, import_i18n3.__)("Open by default"),
                  onChange: (value) => {
                    setAttributes({
                      openByDefault: value
                    });
                  },
                  checked: openByDefault,
                  help: (0, import_i18n3.__)(
                    "Accordion content will be displayed by default."
                  )
                }
              )
            }
          )
        }
      ) }, "setting"),
      /* @__PURE__ */ (0, import_jsx_runtime166.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/accordion-item/save.mjs
  var import_block_editor5 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1);
  function save2({ attributes: attributes2 }) {
    const { openByDefault } = attributes2;
    const blockProps = import_block_editor5.useBlockProps.save({
      className: clsx_default({
        "is-open": openByDefault
      })
    });
    const innerBlocksProps = import_block_editor5.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-item/block.json
  var block_default2 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-item",
    title: "Accordion Item",
    category: "design",
    description: "Wraps the heading and panel in one unit.",
    parent: ["core/accordion"],
    allowedBlocks: ["core/accordion-heading", "core/accordion-panel"],
    supports: {
      html: false,
      background: {
        gradient: true
      },
      color: {
        background: true,
        gradients: true,
        link: true,
        heading: true,
        button: true
      },
      interactivity: true,
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        blockGap: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      shadow: true,
      layout: {
        allowEditing: false
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      contentRole: true
    },
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      }
    },
    providesContext: {
      "core/accordion-open-by-default": "openByDefault"
    },
    textdomain: "default",
    style: "wp-block-accordion-item"
  };

  // packages/block-library/build-module/accordion-item/index.mjs
  var { name: name2 } = block_default2;
  var TEMPLATE2 = [["core/accordion-heading"], ["core/accordion-panel"]];
  var settings2 = {
    icon: accordion_item_default,
    template: TEMPLATE2,
    templateInsertUpdatesSelection: true,
    edit: Edit2,
    save: save2
  };
  var init2 = () => initBlock({ name: name2, metadata: block_default2, settings: settings2 });

  // packages/block-library/build-module/accordion-heading/index.mjs
  var accordion_heading_exports = {};
  __export(accordion_heading_exports, {
    init: () => init3,
    metadata: () => block_default3,
    name: () => name3,
    settings: () => settings3
  });

  // packages/block-library/build-module/accordion-heading/edit.mjs
  var import_i18n4 = __toESM(require_i18n(), 1);
  var import_element3 = __toESM(require_element(), 1);
  var import_block_editor6 = __toESM(require_block_editor(), 1);
  var import_data4 = __toESM(require_data(), 1);
  var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1);
  function Edit3({ attributes: attributes2, setAttributes, context }) {
    const { title } = attributes2;
    const {
      "core/accordion-icon-position": iconPosition,
      "core/accordion-show-icon": showIcon,
      "core/accordion-heading-level": headingLevel
    } = context;
    const TagName2 = "h" + headingLevel;
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data4.useDispatch)(import_block_editor6.store);
    (0, import_element3.useEffect)(() => {
      if (iconPosition !== void 0 && showIcon !== void 0) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          iconPosition,
          showIcon
        });
      }
    }, [
      iconPosition,
      showIcon,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const [fluidTypographySettings, layout] = (0, import_block_editor6.useSettings)(
      "typography.fluid",
      "layout"
    );
    const typographyProps = (0, import_block_editor6.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const blockProps = (0, import_block_editor6.useBlockProps)({
      className: clsx_default({
        "has-icon": showIcon,
        "has-icon-left": showIcon && iconPosition === "left",
        "has-icon-right": showIcon && iconPosition === "right"
      })
    });
    const spacingProps = (0, import_block_editor6.__experimentalGetSpacingClassesAndStyles)(attributes2);
    return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
      "button",
      {
        className: "wp-block-accordion-heading__toggle",
        style: spacingProps.style,
        tabIndex: "-1",
        children: [
          showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            import_block_editor6.RichText,
            {
              withoutInteractiveFormatting: true,
              disableLineBreaks: true,
              tagName: "span",
              value: title,
              onChange: (newTitle) => setAttributes({ title: newTitle }),
              placeholder: (0, import_i18n4.__)("Accordion title"),
              className: "wp-block-accordion-heading__toggle-title",
              style: {
                letterSpacing: typographyProps.style.letterSpacing,
                textDecoration: typographyProps.style.textDecoration
              }
            }
          ),
          showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/accordion-heading/save.mjs
  var import_block_editor7 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1);
  function save3({ attributes: attributes2 }) {
    const { level, title, iconPosition, showIcon } = attributes2;
    const TagName2 = "h" + (level || 3);
    const typographyProps = (0, import_block_editor7.getTypographyClassesAndStyles)(attributes2);
    const blockProps = import_block_editor7.useBlockProps.save({
      className: clsx_default({
        "has-icon": showIcon,
        "has-icon-left": showIcon && iconPosition === "left",
        "has-icon-right": showIcon && iconPosition === "right"
      })
    });
    const spacingProps = (0, import_block_editor7.__experimentalGetSpacingClassesAndStyles)(attributes2);
    return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(
      "button",
      {
        type: "button",
        className: "wp-block-accordion-heading__toggle",
        style: spacingProps.style,
        children: [
          showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            import_block_editor7.RichText.Content,
            {
              className: "wp-block-accordion-heading__toggle-title",
              tagName: "span",
              value: title,
              style: {
                letterSpacing: typographyProps.style.letterSpacing,
                textDecoration: typographyProps.style.textDecoration
              }
            }
          ),
          showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
            "span",
            {
              className: "wp-block-accordion-heading__toggle-icon",
              "aria-hidden": "true",
              children: "+"
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/accordion-heading/block.json
  var block_default3 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-heading",
    title: "Accordion Heading",
    category: "design",
    description: "Displays a heading that toggles the accordion panel.",
    parent: ["core/accordion-item"],
    usesContext: [
      "core/accordion-icon-position",
      "core/accordion-show-icon",
      "core/accordion-heading-level"
    ],
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false,
      lock: false
    },
    selectors: {
      spacing: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle",
      typography: {
        letterSpacing: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title",
        textDecoration: ".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"
      }
    },
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    textdomain: "default"
  };

  // packages/block-library/build-module/accordion-heading/deprecated.mjs
  var import_block_editor8 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1);
  var v1 = {
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false
    },
    save({ attributes: attributes2 }) {
      const { level, title, iconPosition, showIcon } = attributes2;
      const TagName2 = "h" + (level || 3);
      const blockProps = import_block_editor8.useBlockProps.save();
      const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
      return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
        "button",
        {
          className: "wp-block-accordion-heading__toggle",
          style: spacingProps.style,
          children: [
            showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              import_block_editor8.RichText.Content,
              {
                className: "wp-block-accordion-heading__toggle-title",
                tagName: "span",
                value: title
              }
            ),
            showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            )
          ]
        }
      ) });
    }
  };
  var v2 = {
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false,
      lock: false
    },
    save({ attributes: attributes2 }) {
      const { level, title, iconPosition, showIcon } = attributes2;
      const TagName2 = "h" + (level || 3);
      const typographyProps = (0, import_block_editor8.getTypographyClassesAndStyles)(attributes2);
      const blockProps = import_block_editor8.useBlockProps.save();
      const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
      return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
        "button",
        {
          className: "wp-block-accordion-heading__toggle",
          style: spacingProps.style,
          children: [
            showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              import_block_editor8.RichText.Content,
              {
                className: "wp-block-accordion-heading__toggle-title",
                tagName: "span",
                value: title,
                style: {
                  letterSpacing: typographyProps.style.letterSpacing,
                  textDecoration: typographyProps.style.textDecoration
                }
              }
            ),
            showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            )
          ]
        }
      ) });
    }
  };
  var v3 = {
    attributes: {
      openByDefault: {
        type: "boolean",
        default: false
      },
      title: {
        type: "rich-text",
        source: "rich-text",
        selector: ".wp-block-accordion-heading__toggle-title",
        role: "content"
      },
      level: {
        type: "number"
      },
      iconPosition: {
        type: "string",
        enum: ["left", "right"],
        default: "right"
      },
      showIcon: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      color: {
        background: true,
        gradients: true
      },
      align: false,
      interactivity: true,
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        },
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-accordion-heading__toggle"
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontFamily: true
        }
      },
      shadow: true,
      visibility: false,
      lock: false
    },
    save({ attributes: attributes2 }) {
      const { level, title, iconPosition, showIcon } = attributes2;
      const TagName2 = "h" + (level || 3);
      const typographyProps = (0, import_block_editor8.getTypographyClassesAndStyles)(attributes2);
      const blockProps = import_block_editor8.useBlockProps.save();
      const spacingProps = (0, import_block_editor8.__experimentalGetSpacingClassesAndStyles)(attributes2);
      return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
        "button",
        {
          type: "button",
          className: "wp-block-accordion-heading__toggle",
          style: spacingProps.style,
          children: [
            showIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              import_block_editor8.RichText.Content,
              {
                className: "wp-block-accordion-heading__toggle-title",
                tagName: "span",
                value: title,
                style: {
                  letterSpacing: typographyProps.style.letterSpacing,
                  textDecoration: typographyProps.style.textDecoration
                }
              }
            ),
            showIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
              "span",
              {
                className: "wp-block-accordion-heading__toggle-icon",
                "aria-hidden": "true",
                children: "+"
              }
            )
          ]
        }
      ) });
    }
  };
  var deprecated_default = [v3, v2, v1];

  // packages/block-library/build-module/accordion-heading/index.mjs
  var { name: name3 } = block_default3;
  var settings3 = {
    icon: accordion_heading_default,
    edit: Edit3,
    save: save3,
    deprecated: deprecated_default
  };
  var init3 = () => initBlock({ name: name3, metadata: block_default3, settings: settings3 });

  // packages/block-library/build-module/accordion-panel/index.mjs
  var accordion_panel_exports = {};
  __export(accordion_panel_exports, {
    init: () => init4,
    metadata: () => block_default4,
    name: () => name4,
    settings: () => settings4
  });

  // packages/block-library/build-module/accordion-panel/edit.mjs
  var import_block_editor9 = __toESM(require_block_editor(), 1);
  var import_data5 = __toESM(require_data(), 1);
  var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1);
  function Edit4({ attributes: attributes2, context, clientId, isSelected }) {
    const { allowedBlocks, templateLock } = attributes2;
    const openByDefault = context["core/accordion-open-by-default"];
    const { hasSelection } = (0, import_data5.useSelect)(
      (select10) => {
        if (isSelected || openByDefault) {
          return { hasSelection: true };
        }
        const {
          getBlockRootClientId,
          isBlockSelected,
          hasSelectedInnerBlock
        } = select10(import_block_editor9.store);
        const rootClientId = getBlockRootClientId(clientId);
        return {
          hasSelection: isBlockSelected(rootClientId) || hasSelectedInnerBlock(rootClientId, true)
        };
      },
      [clientId, isSelected, openByDefault]
    );
    const blockProps = (0, import_block_editor9.useBlockProps)({
      hidden: !hasSelection,
      role: "region"
    });
    const innerBlocksProps = (0, import_block_editor9.useInnerBlocksProps)(blockProps, {
      allowedBlocks,
      templateLock
    });
    return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-panel/save.mjs
  var import_block_editor10 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1);
  function save4() {
    const blockProps = import_block_editor10.useBlockProps.save({
      role: "region"
    });
    const innerBlocksProps = import_block_editor10.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/accordion-panel/block.json
  var block_default4 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/accordion-panel",
    title: "Accordion Panel",
    category: "design",
    description: "Contains the hidden or revealed content beneath the heading.",
    parent: ["core/accordion-item"],
    usesContext: ["core/accordion-open-by-default"],
    supports: {
      __experimentalOnEnter: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        background: true,
        gradients: true,
        link: true,
        heading: true,
        button: true
      },
      interactivity: true,
      spacing: {
        padding: true,
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: true,
      layout: {
        allowEditing: false
      },
      visibility: false,
      contentRole: true,
      allowedBlocks: true,
      lock: false
    },
    attributes: {
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false],
        default: false
      }
    },
    textdomain: "default",
    style: "wp-block-accordion-panel"
  };

  // packages/block-library/build-module/accordion-panel/index.mjs
  var { name: name4 } = block_default4;
  var TEMPLATE3 = [["core/paragraph", {}]];
  var settings4 = {
    icon: contents_default,
    template: TEMPLATE3,
    edit: Edit4,
    save: save4
  };
  var init4 = () => initBlock({ name: name4, metadata: block_default4, settings: settings4 });

  // packages/block-library/build-module/archives/index.mjs
  var archives_exports = {};
  __export(archives_exports, {
    init: () => init5,
    metadata: () => block_default5,
    name: () => name5,
    settings: () => settings5
  });

  // packages/block-library/build-module/archives/block.json
  var block_default5 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/archives",
    title: "Archives",
    category: "widgets",
    description: "Display a date archive of your posts.",
    textdomain: "default",
    attributes: {
      displayAsDropdown: {
        type: "boolean",
        default: false
      },
      showLabel: {
        type: "boolean",
        default: true
      },
      showPostCounts: {
        type: "boolean",
        default: false
      },
      type: {
        type: "string",
        default: "monthly"
      }
    },
    supports: {
      anchor: true,
      align: true,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/archives/edit.mjs
  var import_components3 = __toESM(require_components(), 1);
  var import_i18n5 = __toESM(require_i18n(), 1);
  var import_block_editor11 = __toESM(require_block_editor(), 1);
  var import_server_side_render = __toESM(require_server_side_render(), 1);
  var import_compose2 = __toESM(require_compose(), 1);
  var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1);
  function ArchivesEdit({ attributes: attributes2, setAttributes, name: name118 }) {
    const { showLabel, showPostCounts, displayAsDropdown, type } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error: error2 } = (0, import_server_side_render.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name118
    });
    const disabledRef = (0, import_compose2.useDisabled)();
    const blockProps = (0, import_block_editor11.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(import_jsx_runtime173.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_block_editor11.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime173.jsxs)(
        import_components3.__experimentalToolsPanel,
        {
          label: (0, import_i18n5.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayAsDropdown: false,
              showLabel: true,
              showPostCounts: false,
              type: "monthly"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Display as dropdown"),
                isShownByDefault: true,
                hasValue: () => displayAsDropdown,
                onDeselect: () => setAttributes({ displayAsDropdown: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Display as dropdown"),
                    checked: displayAsDropdown,
                    onChange: () => setAttributes({
                      displayAsDropdown: !displayAsDropdown
                    })
                  }
                )
              }
            ),
            displayAsDropdown && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Show label"),
                isShownByDefault: true,
                hasValue: () => !showLabel,
                onDeselect: () => setAttributes({ showLabel: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Show label"),
                    checked: showLabel,
                    onChange: () => setAttributes({
                      showLabel: !showLabel
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Show post counts"),
                isShownByDefault: true,
                hasValue: () => showPostCounts,
                onDeselect: () => setAttributes({ showPostCounts: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
                  import_components3.ToggleControl,
                  {
                    label: (0, import_i18n5.__)("Show post counts"),
                    checked: showPostCounts,
                    onChange: () => setAttributes({
                      showPostCounts: !showPostCounts
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
              import_components3.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n5.__)("Group by"),
                isShownByDefault: true,
                hasValue: () => type !== "monthly",
                onDeselect: () => setAttributes({ type: "monthly" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
                  import_components3.SelectControl,
                  {
                    label: (0, import_i18n5.__)("Group by"),
                    options: [
                      { label: (0, import_i18n5.__)("Year"), value: "yearly" },
                      { label: (0, import_i18n5.__)("Month"), value: "monthly" },
                      { label: (0, import_i18n5.__)("Week"), value: "weekly" },
                      { label: (0, import_i18n5.__)("Day"), value: "daily" }
                    ],
                    value: type,
                    onChange: (value) => setAttributes({ type: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_components3.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("p", { children: (0, import_i18n5.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n5.__)("Error: %s"),
        error2
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/archives/index.mjs
  var { name: name5 } = block_default5;
  var settings5 = {
    icon: archive_default,
    example: {},
    edit: ArchivesEdit
  };
  var init5 = () => initBlock({ name: name5, metadata: block_default5, settings: settings5 });

  // packages/block-library/build-module/avatar/index.mjs
  var avatar_exports = {};
  __export(avatar_exports, {
    init: () => init6,
    metadata: () => block_default6,
    name: () => name6,
    settings: () => settings6
  });

  // packages/block-library/build-module/avatar/block.json
  var block_default6 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/avatar",
    title: "Avatar",
    category: "theme",
    description: "Add a user\u2019s avatar.",
    textdomain: "default",
    attributes: {
      userId: {
        type: "number"
      },
      size: {
        type: "number",
        default: 96
      },
      isLink: {
        type: "boolean",
        default: false
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["postType", "postId", "commentId"],
    supports: {
      anchor: true,
      html: false,
      align: true,
      alignWide: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        radius: true,
        width: true,
        color: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      border: ".wp-block-avatar img",
      filter: {
        duotone: ".wp-block-avatar img"
      }
    },
    editorStyle: "wp-block-avatar-editor",
    style: "wp-block-avatar"
  };

  // packages/block-library/build-module/avatar/edit.mjs
  var import_block_editor12 = __toESM(require_block_editor(), 1);
  var import_components5 = __toESM(require_components(), 1);
  var import_i18n8 = __toESM(require_i18n(), 1);
  var import_url = __toESM(require_url(), 1);

  // packages/block-library/build-module/avatar/hooks.mjs
  var import_core_data2 = __toESM(require_core_data(), 1);
  var import_i18n6 = __toESM(require_i18n(), 1);
  var import_data6 = __toESM(require_data(), 1);
  function getAvatarSizes(sizes) {
    const minSize = sizes ? sizes[0] : 24;
    const maxSize = sizes ? sizes[sizes.length - 1] : 96;
    const maxSizeBuffer = Math.floor(maxSize * 2.5);
    return {
      minSize,
      maxSize: maxSizeBuffer
    };
  }
  function useCommentAvatar({ commentId }) {
    const [avatars] = (0, import_core_data2.useEntityProp)(
      "root",
      "comment",
      "author_avatar_urls",
      commentId
    );
    const [authorName] = (0, import_core_data2.useEntityProp)(
      "root",
      "comment",
      "author_name",
      commentId
    );
    const avatarUrls = avatars ? Object.values(avatars) : null;
    const sizes = avatars ? Object.keys(avatars) : null;
    const { minSize, maxSize } = getAvatarSizes(sizes);
    const defaultAvatar = useDefaultAvatar();
    return {
      src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
      minSize,
      maxSize,
      alt: authorName ? (
        // translators: %s: Author name.
        (0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorName)
      ) : (0, import_i18n6.__)("Default Avatar")
    };
  }
  function useUserAvatar({ userId, postId, postType }) {
    const { authorDetails } = (0, import_data6.useSelect)(
      (select10) => {
        const { getEditedEntityRecord, getUser } = select10(import_core_data2.store);
        if (userId) {
          return {
            authorDetails: getUser(userId)
          };
        }
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorDetails: _authorId ? getUser(_authorId) : null
        };
      },
      [postType, postId, userId]
    );
    const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null;
    const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null;
    const { minSize, maxSize } = getAvatarSizes(sizes);
    const defaultAvatar = useDefaultAvatar();
    return {
      src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
      minSize,
      maxSize,
      alt: authorDetails ? (
        // translators: %s: Author name.
        (0, import_i18n6.sprintf)((0, import_i18n6.__)("%s Avatar"), authorDetails?.name)
      ) : (0, import_i18n6.__)("Default Avatar")
    };
  }

  // packages/block-library/build-module/avatar/user-control.mjs
  var import_i18n7 = __toESM(require_i18n(), 1);
  var import_components4 = __toESM(require_components(), 1);
  var import_data7 = __toESM(require_data(), 1);
  var import_core_data3 = __toESM(require_core_data(), 1);
  var import_element4 = __toESM(require_element(), 1);
  var import_compose3 = __toESM(require_compose(), 1);
  var import_html_entities = __toESM(require_html_entities(), 1);
  var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1);
  var AUTHORS_QUERY = {
    who: "authors",
    per_page: 100,
    _fields: "id,name",
    context: "view"
  };
  function UserControl({ value, onChange }) {
    const [filterValue, setFilterValue] = (0, import_element4.useState)("");
    const { authors, isLoading } = (0, import_data7.useSelect)(
      (select10) => {
        const { getUsers, isResolving } = select10(import_core_data3.store);
        const query = { ...AUTHORS_QUERY };
        if (filterValue) {
          query.search = filterValue;
          query.search_columns = ["name"];
        }
        return {
          authors: getUsers(query),
          isLoading: isResolving("getUsers", [query])
        };
      },
      [filterValue]
    );
    const options2 = (0, import_element4.useMemo)(() => {
      return (authors ?? []).map((author) => {
        return {
          value: author.id,
          label: (0, import_html_entities.decodeEntities)(author.name)
        };
      });
    }, [authors]);
    return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
      import_components4.ComboboxControl,
      {
        label: (0, import_i18n7.__)("User"),
        help: (0, import_i18n7.__)(
          "Select the avatar user to display, if it is blank it will use the post/page author."
        ),
        value,
        onChange,
        options: options2,
        onFilterValueChange: (0, import_compose3.debounce)(setFilterValue, 300),
        isLoading
      }
    );
  }

  // packages/block-library/build-module/avatar/edit.mjs
  var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1);
  var AvatarInspectorControls = ({
    setAttributes,
    avatar,
    attributes: attributes2,
    selectUser
  }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_block_editor12.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
      import_components5.__experimentalToolsPanel,
      {
        label: (0, import_i18n8.__)("Settings"),
        resetAll: () => {
          setAttributes({
            size: 96,
            isLink: false,
            linkTarget: "_self",
            userId: void 0
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Image size"),
              isShownByDefault: true,
              hasValue: () => attributes2?.size !== 96,
              onDeselect: () => setAttributes({ size: 96 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
                import_components5.RangeControl,
                {
                  label: (0, import_i18n8.__)("Image size"),
                  onChange: (newSize) => setAttributes({
                    size: newSize
                  }),
                  min: avatar.minSize,
                  max: avatar.maxSize,
                  initialPosition: attributes2?.size,
                  value: attributes2?.size
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Link to user profile"),
              isShownByDefault: true,
              hasValue: () => attributes2?.isLink,
              onDeselect: () => setAttributes({ isLink: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
                import_components5.ToggleControl,
                {
                  label: (0, import_i18n8.__)("Link to user profile"),
                  onChange: () => setAttributes({ isLink: !attributes2.isLink }),
                  checked: attributes2.isLink
                }
              )
            }
          ),
          attributes2.isLink && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => attributes2?.linkTarget !== "_self",
              onDeselect: () => setAttributes({ linkTarget: "_self" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
                import_components5.ToggleControl,
                {
                  label: (0, import_i18n8.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: attributes2.linkTarget === "_blank"
                }
              )
            }
          ),
          selectUser && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
            import_components5.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n8.__)("User"),
              isShownByDefault: true,
              hasValue: () => !!attributes2?.userId,
              onDeselect: () => setAttributes({ userId: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
                UserControl,
                {
                  value: attributes2?.userId,
                  onChange: (value) => {
                    setAttributes({
                      userId: value
                    });
                  }
                }
              )
            }
          )
        ]
      }
    ) });
  };
  var AvatarLinkWrapper = ({ children, isLink }) => isLink ? /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
    "a",
    {
      href: "#avatar-pseudo-link",
      className: "wp-block-avatar__link",
      onClick: (event) => event.preventDefault(),
      children
    }
  ) : children;
  var ResizableAvatar = ({
    setAttributes,
    attributes: attributes2,
    avatar,
    blockProps,
    isSelected
  }) => {
    const borderProps = (0, import_block_editor12.__experimentalUseBorderProps)(attributes2);
    const doubledSizedSrc = (0, import_url.addQueryArgs)(
      (0, import_url.removeQueryArgs)(avatar?.src, ["s"]),
      {
        s: attributes2?.size * 2
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AvatarLinkWrapper, { isLink: attributes2.isLink, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
      import_components5.ResizableBox,
      {
        size: {
          width: attributes2.size,
          height: attributes2.size
        },
        showHandle: isSelected,
        onResizeStop: (event, direction, elt, delta) => {
          setAttributes({
            size: parseInt(
              attributes2.size + (delta.height || delta.width),
              10
            )
          });
        },
        lockAspectRatio: true,
        enable: {
          top: false,
          right: !(0, import_i18n8.isRTL)(),
          bottom: true,
          left: (0, import_i18n8.isRTL)()
        },
        minWidth: avatar.minSize,
        maxWidth: avatar.maxSize,
        children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
          "img",
          {
            src: doubledSizedSrc,
            alt: avatar.alt,
            className: clsx_default(
              "avatar",
              "avatar-" + attributes2.size,
              "photo",
              "wp-block-avatar__image",
              borderProps.className
            ),
            style: borderProps.style
          }
        )
      }
    ) }) });
  };
  var CommentEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
    const { commentId } = context;
    const blockProps = (0, import_block_editor12.useBlockProps)();
    const avatar = useCommentAvatar({ commentId });
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(import_jsx_runtime175.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        AvatarInspectorControls,
        {
          avatar,
          setAttributes,
          attributes: attributes2,
          selectUser: false
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        ResizableAvatar,
        {
          attributes: attributes2,
          avatar,
          blockProps,
          isSelected,
          setAttributes
        }
      )
    ] });
  };
  var UserEdit = ({ attributes: attributes2, context, setAttributes, isSelected }) => {
    const { postId, postType } = context;
    const avatar = useUserAvatar({
      userId: attributes2?.userId,
      postId,
      postType
    });
    const blockProps = (0, import_block_editor12.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(import_jsx_runtime175.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        AvatarInspectorControls,
        {
          selectUser: true,
          attributes: attributes2,
          avatar,
          setAttributes
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
        ResizableAvatar,
        {
          attributes: attributes2,
          avatar,
          blockProps,
          isSelected,
          setAttributes
        }
      )
    ] });
  };
  function Edit5(props) {
    if (props?.context?.commentId || props?.context?.commentId === null) {
      return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(CommentEdit, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(UserEdit, { ...props });
  }

  // packages/block-library/build-module/avatar/index.mjs
  var { name: name6 } = block_default6;
  var settings6 = {
    icon: comment_author_avatar_default,
    edit: Edit5,
    example: {}
  };
  var init6 = () => initBlock({ name: name6, metadata: block_default6, settings: settings6 });

  // packages/block-library/build-module/audio/index.mjs
  var audio_exports = {};
  __export(audio_exports, {
    init: () => init7,
    metadata: () => block_default8,
    name: () => name7,
    settings: () => settings7
  });

  // packages/block-library/build-module/audio/deprecated.mjs
  var import_block_editor13 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1);
  var deprecated_default2 = [
    {
      attributes: {
        src: {
          type: "string",
          source: "attribute",
          selector: "audio",
          attribute: "src"
        },
        caption: {
          type: "string",
          source: "html",
          selector: "figcaption"
        },
        id: {
          type: "number"
        },
        autoplay: {
          type: "boolean",
          source: "attribute",
          selector: "audio",
          attribute: "autoplay"
        },
        loop: {
          type: "boolean",
          source: "attribute",
          selector: "audio",
          attribute: "loop"
        },
        preload: {
          type: "string",
          source: "attribute",
          selector: "audio",
          attribute: "preload"
        }
      },
      supports: {
        align: true
      },
      save({ attributes: attributes2 }) {
        const { autoplay, caption, loop, preload, src } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)("figure", { children: [
          /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
            "audio",
            {
              controls: "controls",
              src,
              autoPlay: autoplay,
              loop,
              preload
            }
          ),
          !import_block_editor13.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
            import_block_editor13.RichText.Content,
            {
              tagName: "figcaption",
              value: caption
            }
          )
        ] });
      }
    }
  ];

  // packages/block-library/build-module/audio/edit.mjs
  var import_blob2 = __toESM(require_blob(), 1);
  var import_components7 = __toESM(require_components(), 1);

  // packages/ui/build-module/badge/badge.mjs
  var import_element6 = __toESM(require_element(), 1);

  // node_modules/@base-ui/utils/useControlled.mjs
  var React = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/createLogOnce.mjs
  var loggedMessages;
  if (true) {
    loggedMessages = /* @__PURE__ */ new Set();
  }
  function createLogOnce(severity, prefix) {
    return function logOnce(...messages) {
      if (true) {
        const message = messages.join(" ");
        const output = prefix ? `${prefix}: ${message}` : message;
        const key = `${severity}:${output}`;
        if (!loggedMessages.has(key)) {
          loggedMessages.add(key);
          if (severity === "warn") {
            console.warn(output);
          } else {
            console.error(output);
          }
        }
      }
    };
  }

  // node_modules/@base-ui/utils/error.mjs
  var error = createLogOnce("error", "Base UI");

  // node_modules/@base-ui/utils/useControlled.mjs
  function useControlled({
    controlled,
    default: defaultProp,
    name: name118,
    state = "value"
  }) {
    const {
      current: isControlled
    } = React.useRef(controlled !== void 0);
    const [valueState, setValue] = React.useState(defaultProp);
    const value = isControlled && controlled !== void 0 ? controlled : valueState;
    if (true) {
      React.useEffect(() => {
        if (isControlled !== (controlled !== void 0)) {
          error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name118} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name118} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
        }
      }, [state, name118, controlled]);
      const {
        current: defaultValue
      } = React.useRef(defaultProp);
      React.useEffect(() => {
        if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {
          error([`A component is changing the default ${state} state of an uncontrolled ${name118} after being initialized. To suppress this warning opt to use a controlled ${name118}.`].join("\n"));
        }
      }, [defaultProp]);
    }
    const setValueIfUncontrolled = React.useCallback((newValue) => {
      if (!isControlled) {
        setValue(newValue);
      }
    }, []);
    return [value, setValueIfUncontrolled];
  }
  function serializeToDevModeString(input) {
    let nextId = 0;
    const seen = /* @__PURE__ */ new WeakMap();
    try {
      const result = JSON.stringify(input, function replacer(key, value) {
        if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) {
          return void 0;
        }
        if (typeof value === "bigint") {
          return `__bigint__:${value}`;
        }
        if (value !== null && typeof value === "object") {
          const id = seen.get(value);
          if (id !== void 0) {
            return `__object__:${id}`;
          }
          seen.set(value, nextId);
          nextId += 1;
        }
        return value;
      });
      return result ?? `__top__:${typeof input}`;
    } catch {
      return "__unserializable__";
    }
  }

  // node_modules/@base-ui/utils/safeReact.mjs
  var React2 = __toESM(require_react(), 1);
  var SafeReact = {
    ...React2
  };

  // node_modules/@base-ui/utils/useRefWithInit.mjs
  var React3 = __toESM(require_react(), 1);
  var UNINITIALIZED = {};
  function useRefWithInit(init117, initArg) {
    const ref = React3.useRef(UNINITIALIZED);
    if (ref.current === UNINITIALIZED) {
      ref.current = init117(initArg);
    }
    return ref;
  }

  // node_modules/@base-ui/utils/useStableCallback.mjs
  var useInsertionEffect = SafeReact.useInsertionEffect;
  var useSafeInsertionEffect = (
    // React 17 doesn't have useInsertionEffect.
    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
  );
  function useStableCallback(callback) {
    const stable = useRefWithInit(createStableCallback).current;
    stable.next = callback;
    useSafeInsertionEffect(stable.effect);
    return stable.trampoline;
  }
  function createStableCallback() {
    const stable = {
      next: void 0,
      callback: assertNotCalled,
      trampoline: (...args) => stable.callback?.(...args),
      effect: () => {
        stable.callback = stable.next;
      }
    };
    return stable;
  }
  function assertNotCalled() {
    if (true) {
      throw (
        /* minify-error-disabled */
        new Error("Base UI: Cannot call an event handler while rendering.")
      );
    }
  }

  // node_modules/@base-ui/utils/warn.mjs
  var warn = createLogOnce("warn", "Base UI");

  // node_modules/@base-ui/utils/empty.mjs
  function NOOP() {
  }
  var EMPTY_ARRAY = Object.freeze([]);
  var EMPTY_OBJECT = Object.freeze({});

  // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
  var React6 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
  var React4 = __toESM(require_react(), 1);
  var noop = () => {
  };
  var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;

  // node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
  var React5 = __toESM(require_react(), 1);
  var CompositeListContext = /* @__PURE__ */ React5.createContext({
    register: () => {
    },
    unregister: () => {
    },
    subscribeMapChange: () => () => {
    },
    nextIndexRef: {
      current: 0
    }
  });
  if (true) CompositeListContext.displayName = "CompositeListContext";
  function useCompositeListContext() {
    return React5.useContext(CompositeListContext);
  }

  // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
  var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1);
  function CompositeList(props) {
    const {
      children,
      elementsRef,
      labelsRef,
      onMapChange: onMapChangeProp
    } = props;
    const onMapChange = useStableCallback(onMapChangeProp);
    const [, setMapTick] = React6.useState(false);
    const listeners = useRefWithInit(createListeners).current;
    const map = useRefWithInit(createMap).current;
    const nextIndexRef = React6.useRef(0);
    const isDirtyRef = React6.useRef(true);
    const itemsRef = React6.useRef(null);
    const mutationObserverRef = React6.useRef(null);
    const scheduleMapUpdate = useStableCallback(() => {
      if (isDirtyRef.current) {
        return;
      }
      isDirtyRef.current = true;
      setMapTick((tick) => !tick);
    });
    const register = useStableCallback((node, registration) => {
      map.set(node, registration);
      scheduleMapUpdate();
    });
    const unregister = useStableCallback((node) => {
      map.delete(node);
      scheduleMapUpdate();
    });
    const syncRefs = useStableCallback((items) => {
      const nextMap = /* @__PURE__ */ new Map();
      elementsRef.current.length = 0;
      if (labelsRef) {
        labelsRef.current.length = 0;
      }
      items.forEach((item) => {
        nextMap.set(item.element, {
          ...item.registration.metadata ?? {},
          index: item.index
        });
        elementsRef.current[item.index] = item.element;
        if (labelsRef) {
          labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent;
        }
      });
      nextIndexRef.current = elementsRef.current.length;
      return nextMap;
    });
    function observe(sortedNodes) {
      mutationObserverRef.current?.disconnect();
      mutationObserverRef.current = null;
      if (typeof MutationObserver !== "function" || sortedNodes.length < 2) {
        return;
      }
      const mutationObserver = new MutationObserver((entries) => {
        if (!hasMovedNode(entries)) {
          return;
        }
        let previousConnectedNode = null;
        for (const node of sortedNodes) {
          if (!node.isConnected) {
            continue;
          }
          if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
            mutationObserver.disconnect();
            scheduleMapUpdate();
            return;
          }
          previousConnectedNode = node;
        }
      });
      mutationObserverRef.current = mutationObserver;
      const roots = /* @__PURE__ */ new Set();
      for (let i = 1; i < sortedNodes.length; i += 1) {
        const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
        if (root) {
          roots.add(root);
        }
      }
      roots.forEach((root) => mutationObserver.observe(root, {
        childList: true
      }));
    }
    const flush = useStableCallback(() => {
      const [items, automaticNodes] = getCompositeListSnapshot(map);
      const nextMap = syncRefs(items);
      const previousItems = itemsRef.current;
      const changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => {
        const previousItem = previousItems[index2];
        return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
      });
      observe(automaticNodes);
      itemsRef.current = items;
      isDirtyRef.current = false;
      if (!changed) {
        return;
      }
      listeners.forEach((listener) => listener(nextMap));
      onMapChange(nextMap);
    });
    useIsoLayoutEffect(() => {
      if (!isDirtyRef.current && itemsRef.current) {
        syncRefs(itemsRef.current);
      }
      return () => {
        elementsRef.current = [];
        if (labelsRef) {
          labelsRef.current = [];
        }
      };
    }, [elementsRef, labelsRef, syncRefs]);
    useIsoLayoutEffect(() => {
      if (isDirtyRef.current) {
        flush();
      }
    });
    useIsoLayoutEffect(() => {
      return () => {
        mutationObserverRef.current?.disconnect();
        isDirtyRef.current = true;
      };
    }, []);
    const subscribeMapChange = useStableCallback((fn) => {
      listeners.add(fn);
      return () => {
        listeners.delete(fn);
      };
    });
    const contextValue = React6.useMemo(() => ({
      register,
      unregister,
      subscribeMapChange,
      nextIndexRef
    }), [register, unregister, subscribeMapChange, nextIndexRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(CompositeListContext.Provider, {
      value: contextValue,
      children
    });
  }
  function createMap() {
    return /* @__PURE__ */ new Map();
  }
  function createListeners() {
    return /* @__PURE__ */ new Set();
  }
  function getCompositeListSnapshot(map) {
    const reservedIndices = /* @__PURE__ */ new Set();
    const items = [];
    const automaticItems = [];
    map.forEach((registration, node) => {
      if (!node.isConnected) {
        return;
      }
      const index2 = registration.index;
      const item = {
        index: index2 ?? -1,
        element: node,
        registration
      };
      if (index2 === null) {
        automaticItems.push(item);
      } else if (index2 >= 0) {
        reservedIndices.add(index2);
        items.push(item);
      }
    });
    let nextAutomaticIndex = 0;
    automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element));
    automaticItems.forEach((item) => {
      while (reservedIndices.has(nextAutomaticIndex)) {
        nextAutomaticIndex += 1;
      }
      item.index = nextAutomaticIndex;
      items.push(item);
      nextAutomaticIndex += 1;
    });
    if (reservedIndices.size > 0) {
      items.sort((a, b) => a.index - b.index);
    }
    return [items, automaticItems.map((item) => item.element)];
  }
  function getCommonAncestor(firstNode, lastNode) {
    let ancestor = firstNode.parentElement;
    while (ancestor && !ancestor.contains(lastNode)) {
      ancestor = ancestor.parentElement;
    }
    return ancestor;
  }
  function hasMovedNode(entries) {
    for (const entry of entries) {
      for (let i = 0; i < entry.removedNodes.length; i += 1) {
        if (entry.removedNodes[i].isConnected) {
          return true;
        }
      }
    }
    return false;
  }
  function sortByDocumentPosition(a, b) {
    return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
  }

  // node_modules/@base-ui/react/internals/useRenderElement.mjs
  var React9 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/useMergedRefs.mjs
  function useMergedRefs(a, b, c2, d) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChange(forkRef, a, b, c2, d)) {
      update(forkRef, [a, b, c2, d]);
    }
    return forkRef.callback;
  }
  function useMergedRefsN(refs) {
    const forkRef = useRefWithInit(createForkRef).current;
    if (didChangeN(forkRef, refs)) {
      update(forkRef, refs);
    }
    return forkRef.callback;
  }
  function createForkRef() {
    return {
      callback: null,
      cleanup: null,
      refs: []
    };
  }
  function didChange(forkRef, a, b, c2, d) {
    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d;
  }
  function didChangeN(forkRef, newRefs) {
    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
  }
  function update(forkRef, refs) {
    forkRef.refs = refs;
    if (refs.every((ref) => ref == null)) {
      forkRef.callback = null;
      return;
    }
    forkRef.callback = (instance) => {
      if (forkRef.cleanup) {
        forkRef.cleanup();
        forkRef.cleanup = null;
      }
      if (instance != null) {
        const cleanupCallbacks = Array(refs.length).fill(null);
        for (let i = 0; i < refs.length; i += 1) {
          const ref = refs[i];
          if (ref == null) {
            continue;
          }
          switch (typeof ref) {
            case "function": {
              const refCleanup = ref(instance);
              if (typeof refCleanup === "function") {
                cleanupCallbacks[i] = refCleanup;
              }
              break;
            }
            case "object": {
              ref.current = instance;
              break;
            }
            default:
          }
        }
        forkRef.cleanup = () => {
          for (let i = 0; i < refs.length; i += 1) {
            const ref = refs[i];
            if (ref == null) {
              continue;
            }
            switch (typeof ref) {
              case "function": {
                const cleanupCallback = cleanupCallbacks[i];
                if (typeof cleanupCallback === "function") {
                  cleanupCallback();
                } else {
                  void ref(null);
                }
                break;
              }
              case "object": {
                ref.current = null;
                break;
              }
              default:
            }
          }
        };
      }
    };
  }

  // node_modules/@base-ui/utils/getReactElementRef.mjs
  var React8 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/reactVersion.mjs
  var React7 = __toESM(require_react(), 1);
  var majorVersion = parseInt(React7.version, 10);
  function isReactVersionAtLeast(reactVersionToCheck) {
    return majorVersion >= reactVersionToCheck;
  }

  // node_modules/@base-ui/utils/getReactElementRef.mjs
  function getReactElementRef(element) {
    if (!/* @__PURE__ */ React8.isValidElement(element)) {
      return null;
    }
    const reactElement = element;
    const propsWithRef = reactElement.props;
    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
  }

  // node_modules/@base-ui/utils/mergeObjects.mjs
  function mergeObjects(a, b) {
    if (a && !b) {
      return a;
    }
    if (!a && b) {
      return b;
    }
    if (a || b) {
      return {
        ...a,
        ...b
      };
    }
    return void 0;
  }

  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
  function getStateAttributesProps(state, customMapping) {
    const props = {};
    for (const key in state) {
      const value = state[key];
      if (customMapping?.hasOwnProperty(key)) {
        const customProps = customMapping[key](value);
        if (customProps != null) {
          Object.assign(props, customProps);
        }
        continue;
      }
      if (value === true) {
        props[`data-${key.toLowerCase()}`] = "";
      } else if (value) {
        props[`data-${key.toLowerCase()}`] = value.toString();
      }
    }
    return props;
  }

  // node_modules/@base-ui/react/utils/resolveClassName.mjs
  function resolveClassName(className, state) {
    return typeof className === "function" ? className(state) : className;
  }

  // node_modules/@base-ui/react/utils/resolveStyle.mjs
  function resolveStyle(style2, state) {
    return typeof style2 === "function" ? style2(state) : style2;
  }

  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
  var EMPTY_PROPS = {};
  function mergeProps(a, b, c2, d, e3) {
    if (!c2 && !d && !e3 && !a) {
      return createInitialMergedProps(b);
    }
    let merged = createInitialMergedProps(a);
    if (b) {
      merged = mergeInto(merged, b);
    }
    if (c2) {
      merged = mergeInto(merged, c2);
    }
    if (d) {
      merged = mergeInto(merged, d);
    }
    if (e3) {
      merged = mergeInto(merged, e3);
    }
    return merged;
  }
  function mergePropsN(props) {
    if (props.length === 0) {
      return EMPTY_PROPS;
    }
    if (props.length === 1) {
      return createInitialMergedProps(props[0]);
    }
    let merged = createInitialMergedProps(props[0]);
    for (let i = 1; i < props.length; i += 1) {
      merged = mergeInto(merged, props[i]);
    }
    return merged;
  }
  function createInitialMergedProps(inputProps) {
    if (isPropsGetter(inputProps)) {
      return {
        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
      };
    }
    return copyInitialProps(inputProps);
  }
  function mergeInto(merged, inputProps) {
    if (isPropsGetter(inputProps)) {
      return resolvePropsGetter(inputProps, merged);
    }
    return mutablyMergeInto(merged, inputProps);
  }
  function copyInitialProps(inputProps) {
    const copiedProps = {
      ...inputProps
    };
    for (const propName in copiedProps) {
      const propValue = copiedProps[propName];
      if (isEventHandler(propName, propValue)) {
        copiedProps[propName] = wrapEventHandler(propValue);
      }
    }
    return copiedProps;
  }
  function mutablyMergeInto(mergedProps, externalProps) {
    if (!externalProps) {
      return mergedProps;
    }
    for (const propName in externalProps) {
      const externalPropValue = externalProps[propName];
      switch (propName) {
        case "style": {
          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
          break;
        }
        case "className": {
          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
          break;
        }
        default: {
          if (isEventHandler(propName, externalPropValue)) {
            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
          } else {
            mergedProps[propName] = externalPropValue;
          }
        }
      }
    }
    return mergedProps;
  }
  function isEventHandler(key, value) {
    const code0 = key.charCodeAt(0);
    const code1 = key.charCodeAt(1);
    const code2 = key.charCodeAt(2);
    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
  }
  function isPropsGetter(inputProps) {
    return typeof inputProps === "function";
  }
  function resolvePropsGetter(inputProps, previousProps) {
    if (isPropsGetter(inputProps)) {
      return inputProps(previousProps);
    }
    return inputProps ?? EMPTY_PROPS;
  }
  function mergeEventHandlers(ourHandler, theirHandler) {
    if (!theirHandler) {
      return ourHandler;
    }
    if (!ourHandler) {
      return wrapEventHandler(theirHandler);
    }
    return (...args) => {
      const event = args[0];
      if (isSyntheticEvent(event)) {
        const baseUIEvent = event;
        makeEventPreventable(baseUIEvent);
        const result2 = theirHandler(...args);
        if (!baseUIEvent.baseUIHandlerPrevented) {
          ourHandler?.(...args);
        }
        return result2;
      }
      const result = theirHandler(...args);
      ourHandler?.(...args);
      return result;
    };
  }
  function wrapEventHandler(handler) {
    if (!handler) {
      return handler;
    }
    return (...args) => {
      const event = args[0];
      if (isSyntheticEvent(event)) {
        makeEventPreventable(event);
      }
      return handler(...args);
    };
  }
  function makeEventPreventable(event) {
    event.preventBaseUIHandler = () => {
      event.baseUIHandlerPrevented = true;
    };
    return event;
  }
  function mergeClassNames(ourClassName, theirClassName) {
    if (theirClassName) {
      if (ourClassName) {
        return theirClassName + " " + ourClassName;
      }
      return theirClassName;
    }
    return ourClassName;
  }
  function isSyntheticEvent(event) {
    return event != null && typeof event === "object" && "nativeEvent" in event;
  }

  // node_modules/@base-ui/react/internals/useRenderElement.mjs
  var import_react = __toESM(require_react(), 1);
  function useRenderElement(element, componentProps, params = {}) {
    let renderProp = componentProps.render;
    if (params.enabled !== false) {
      renderProp = unwrapLazyRenderProp(renderProp);
    }
    const outProps = useRenderElementProps(componentProps, params, renderProp);
    if (params.enabled === false) {
      return null;
    }
    const state = params.state ?? EMPTY_OBJECT;
    return evaluateRenderProp(element, renderProp, outProps, state);
  }
  function useRenderElementProps(componentProps, params, renderProp) {
    const {
      className: classNameProp,
      style: styleProp
    } = componentProps;
    const {
      state = EMPTY_OBJECT,
      ref,
      props,
      stateAttributesMapping: stateAttributesMapping4,
      enabled = true
    } = params;
    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
    const style2 = enabled ? resolveStyle(styleProp, state) : void 0;
    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping4) : EMPTY_OBJECT;
    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
    if (typeof document !== "undefined") {
      if (!enabled) {
        void useMergedRefs(null, null);
      } else if (Array.isArray(ref)) {
        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
      } else {
        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
      }
    }
    if (!enabled) {
      return EMPTY_OBJECT;
    }
    if (className !== void 0) {
      outProps.className = mergeClassNames(outProps.className, className);
    }
    if (style2 !== void 0) {
      outProps.style = mergeObjects(outProps.style, style2);
    }
    return outProps;
  }
  function resolveRenderFunctionProps(props) {
    if (Array.isArray(props)) {
      return mergePropsN(props);
    }
    return mergeProps(void 0, props);
  }
  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
  function unwrapLazyRenderProp(render) {
    if (render?.$$typeof !== REACT_LAZY_TYPE) {
      return render;
    }
    const unwrapped = React9.Children.toArray(render)[0];
    return /* @__PURE__ */ React9.isValidElement(unwrapped) ? unwrapped : render;
  }
  function evaluateRenderProp(element, render, props, state) {
    if (render) {
      if (typeof render === "function") {
        if (true) {
          warnIfRenderPropLooksLikeComponent(render);
        }
        return render(props, state);
      }
      const mergedProps = mergeProps(props, render.props);
      mergedProps.ref = props.ref;
      if (true) {
        if (!/* @__PURE__ */ React9.isValidElement(render)) {
          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"));
        }
      }
      return /* @__PURE__ */ React9.cloneElement(render, mergedProps);
    }
    if (element) {
      if (typeof element === "string") {
        return renderTag(element, props);
      }
    }
    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
  }
  function warnIfRenderPropLooksLikeComponent(renderFn) {
    const functionName = renderFn.name;
    if (functionName.length === 0) {
      return;
    }
    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
      return;
    }
    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
      return;
    }
    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");
  }
  function renderTag(Tag, props) {
    if (Tag === "button") {
      return /* @__PURE__ */ (0, import_react.createElement)("button", {
        type: "button",
        ...props,
        key: props.key
      });
    }
    if (Tag === "img") {
      return /* @__PURE__ */ (0, import_react.createElement)("img", {
        alt: "",
        ...props,
        key: props.key
      });
    }
    return /* @__PURE__ */ React9.createElement(Tag, props);
  }

  // node_modules/@base-ui/utils/useId.mjs
  var React10 = __toESM(require_react(), 1);
  var globalId = 0;
  function useGlobalId(idOverride, prefix = "mui") {
    const [defaultId, setDefaultId] = React10.useState(idOverride);
    const id = idOverride || defaultId;
    React10.useEffect(() => {
      if (defaultId == null) {
        globalId += 1;
        setDefaultId(`${prefix}-${globalId}`);
      }
    }, [defaultId, prefix]);
    return id;
  }
  var maybeReactUseId = SafeReact.useId;
  function useId(idOverride, prefix) {
    if (maybeReactUseId !== void 0) {
      const reactId = maybeReactUseId();
      return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
    }
    return useGlobalId(idOverride, prefix);
  }

  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
  function useBaseUiId(idOverride) {
    return useId(idOverride, "base-ui");
  }

  // node_modules/@base-ui/react/internals/reason-parts.mjs
  var reason_parts_exports = {};
  __export(reason_parts_exports, {
    cancelOpen: () => cancelOpen,
    chipRemovePress: () => chipRemovePress,
    clearPress: () => clearPress,
    closePress: () => closePress,
    closeWatcher: () => closeWatcher,
    decrementPress: () => decrementPress,
    disabled: () => disabled,
    drag: () => drag,
    escapeKey: () => escapeKey,
    focusOut: () => focusOut,
    imperativeAction: () => imperativeAction,
    incrementPress: () => incrementPress,
    initial: () => initial,
    inputBlur: () => inputBlur,
    inputChange: () => inputChange,
    inputClear: () => inputClear,
    inputPaste: () => inputPaste,
    inputPress: () => inputPress,
    itemPress: () => itemPress,
    keyboard: () => keyboard,
    linkPress: () => linkPress,
    listNavigation: () => listNavigation,
    missing: () => missing,
    none: () => none,
    outsidePress: () => outsidePress,
    pointer: () => pointer,
    scrub: () => scrub,
    siblingOpen: () => siblingOpen,
    swipe: () => swipe,
    trackPress: () => trackPress,
    triggerFocus: () => triggerFocus,
    triggerHover: () => triggerHover,
    triggerPress: () => triggerPress,
    wheel: () => wheel,
    windowResize: () => windowResize
  });
  var none = "none";
  var triggerPress = "trigger-press";
  var triggerHover = "trigger-hover";
  var triggerFocus = "trigger-focus";
  var outsidePress = "outside-press";
  var itemPress = "item-press";
  var closePress = "close-press";
  var linkPress = "link-press";
  var clearPress = "clear-press";
  var chipRemovePress = "chip-remove-press";
  var trackPress = "track-press";
  var incrementPress = "increment-press";
  var decrementPress = "decrement-press";
  var inputChange = "input-change";
  var inputClear = "input-clear";
  var inputBlur = "input-blur";
  var inputPaste = "input-paste";
  var inputPress = "input-press";
  var focusOut = "focus-out";
  var escapeKey = "escape-key";
  var closeWatcher = "close-watcher";
  var listNavigation = "list-navigation";
  var keyboard = "keyboard";
  var pointer = "pointer";
  var drag = "drag";
  var wheel = "wheel";
  var scrub = "scrub";
  var cancelOpen = "cancel-open";
  var siblingOpen = "sibling-open";
  var disabled = "disabled";
  var missing = "missing";
  var initial = "initial";
  var imperativeAction = "imperative-action";
  var swipe = "swipe";
  var windowResize = "window-resize";

  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
  function createChangeEventDetails(reason, event, trigger, customProperties) {
    let canceled = false;
    let allowPropagation = false;
    const custom = customProperties ?? EMPTY_OBJECT;
    const details = {
      reason,
      event: event ?? new Event("base-ui"),
      cancel() {
        canceled = true;
      },
      allowPropagation() {
        allowPropagation = true;
      },
      get isCanceled() {
        return canceled;
      },
      get isPropagationAllowed() {
        return allowPropagation;
      },
      trigger,
      ...custom
    };
    return details;
  }

  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
  var React12 = __toESM(require_react(), 1);

  // node_modules/@base-ui/utils/useOnMount.mjs
  var React11 = __toESM(require_react(), 1);
  function useOnMount(fn) {
    React11.useEffect(fn, EMPTY_ARRAY);
  }

  // node_modules/@base-ui/utils/useAnimationFrame.mjs
  var EMPTY = null;
  var LAST_RAF = globalThis.requestAnimationFrame;
  var Scheduler = class {
    /* This implementation uses an array as a backing data-structure for frame callbacks.
     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
     * be much more efficient if there is a call pattern that alterns as
     * "request-cancel-request-cancel-…".
     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
    callbacks = [];
    callbacksCount = 0;
    nextId = 1;
    startId = 1;
    isScheduled = false;
    tick = (timestamp) => {
      this.isScheduled = false;
      const currentCallbacks = this.callbacks;
      const currentCallbacksCount = this.callbacksCount;
      this.callbacks = [];
      this.callbacksCount = 0;
      this.startId = this.nextId;
      if (currentCallbacksCount > 0) {
        for (let i = 0; i < currentCallbacks.length; i += 1) {
          currentCallbacks[i]?.(timestamp);
        }
      }
    };
    request(fn) {
      const id = this.nextId;
      this.nextId += 1;
      this.callbacks.push(fn);
      this.callbacksCount += 1;
      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
      if (!this.isScheduled || didRAFChange) {
        requestAnimationFrame(this.tick);
        this.isScheduled = true;
      }
      return id;
    }
    cancel(id) {
      const index2 = id - this.startId;
      if (index2 < 0 || index2 >= this.callbacks.length) {
        return;
      }
      if (this.callbacks[index2] === null) {
        return;
      }
      this.callbacks[index2] = null;
      this.callbacksCount -= 1;
    }
  };
  var scheduler = new Scheduler();
  var AnimationFrame = class _AnimationFrame {
    static create() {
      return new _AnimationFrame();
    }
    static request(fn) {
      return scheduler.request(fn);
    }
    static cancel(id) {
      return scheduler.cancel(id);
    }
    currentId = EMPTY;
    /**
     * Executes `fn` after `delay`, clearing any previously scheduled call.
     */
    request(fn) {
      this.cancel();
      this.currentId = scheduler.request(() => {
        this.currentId = EMPTY;
        fn();
      });
    }
    cancel = () => {
      if (this.currentId !== EMPTY) {
        scheduler.cancel(this.currentId);
        this.currentId = EMPTY;
      }
    };
    disposeEffect = () => {
      return this.cancel;
    };
  };
  function useAnimationFrame() {
    const timeout = useRefWithInit(AnimationFrame.create).current;
    useOnMount(timeout.disposeEffect);
    return timeout;
  }

  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
  function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
    const [transitionStatus, setTransitionStatus] = React12.useState(open && enableIdleState ? "idle" : void 0);
    const [mounted, setMounted] = React12.useState(open && !animateInitialOpen);
    if (open && !mounted) {
      setMounted(true);
      setTransitionStatus("starting");
    }
    if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
      setTransitionStatus("ending");
    }
    if (!open && !mounted && transitionStatus === "ending") {
      setTransitionStatus(void 0);
    }
    useIsoLayoutEffect(() => {
      if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
        const frame = AnimationFrame.request(() => {
          setTransitionStatus("ending");
        });
        return () => {
          AnimationFrame.cancel(frame);
        };
      }
      return void 0;
    }, [open, mounted, transitionStatus, deferEndingState]);
    useIsoLayoutEffect(() => {
      if (!open || enableIdleState) {
        return void 0;
      }
      const frame = AnimationFrame.request(() => {
        setTransitionStatus(void 0);
      });
      return () => {
        AnimationFrame.cancel(frame);
      };
    }, [enableIdleState, open]);
    useIsoLayoutEffect(() => {
      if (!open || !enableIdleState) {
        return void 0;
      }
      if (open && mounted && transitionStatus !== "idle") {
        setTransitionStatus("starting");
      }
      const frame = AnimationFrame.request(() => {
        setTransitionStatus("idle");
      });
      return () => {
        AnimationFrame.cancel(frame);
      };
    }, [enableIdleState, open, mounted, transitionStatus]);
    return {
      mounted,
      setMounted,
      transitionStatus
    };
  }

  // node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
  var React13 = __toESM(require_react(), 1);
  function useCompositeListItem(params = {}) {
    const {
      guess,
      label,
      metadata,
      textRef,
      index: externalIndex
    } = params;
    const {
      register,
      unregister,
      subscribeMapChange,
      nextIndexRef
    } = useCompositeListContext();
    const indexRef = React13.useRef(-1);
    const [internalIndex, setInternalIndex] = React13.useState(externalIndex == null && guess ? () => {
      if (indexRef.current === -1) {
        const newIndex = nextIndexRef.current;
        nextIndexRef.current += 1;
        indexRef.current = newIndex;
      }
      return indexRef.current;
    } : -1);
    const index2 = externalIndex ?? internalIndex;
    const componentRef = React13.useRef(null);
    const ref = React13.useCallback((node) => {
      const previousNode = componentRef.current;
      if (previousNode) {
        unregister(previousNode);
      }
      componentRef.current = node;
      if (node) {
        register(node, {
          metadata: metadata ?? null,
          index: externalIndex ?? null,
          label,
          textRef
        });
      }
    }, [externalIndex, register, unregister, metadata, label, textRef]);
    useIsoLayoutEffect(() => {
      if (externalIndex != null) {
        return void 0;
      }
      return subscribeMapChange((map) => {
        const i = componentRef.current ? map.get(componentRef.current)?.index : null;
        if (i != null) {
          setInternalIndex(i);
        }
      });
    }, [externalIndex, subscribeMapChange]);
    return {
      ref,
      index: index2
    };
  }

  // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
  var TransitionStatusDataAttributes_exports = {};
  __export(TransitionStatusDataAttributes_exports, {
    endingStyle: () => endingStyle,
    startingStyle: () => startingStyle
  });
  var startingStyle = "data-starting-style";
  var endingStyle = "data-ending-style";

  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
  var STARTING_HOOK = {
    [startingStyle]: ""
  };
  var ENDING_HOOK = {
    [endingStyle]: ""
  };
  var transitionStatusMapping = {
    transitionStatus(value) {
      if (value === "starting") {
        return STARTING_HOOK;
      }
      if (value === "ending") {
        return ENDING_HOOK;
      }
      return null;
    }
  };

  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
  var React16 = __toESM(require_react(), 1);

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
  function hasWindow() {
    return typeof window !== "undefined";
  }
  function getNodeName(node) {
    if (isNode(node)) {
      return (node.nodeName || "").toLowerCase();
    }
    return "#document";
  }
  function getWindow(node) {
    var _node$ownerDocument;
    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
  }
  function getDocumentElement(node) {
    var _ref;
    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
  }
  function isNode(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof Node || value instanceof getWindow(value).Node;
  }
  function isHTMLElement(value) {
    if (!hasWindow()) {
      return false;
    }
    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
  }
  function isShadowRoot(value) {
    if (!hasWindow() || typeof ShadowRoot === "undefined") {
      return false;
    }
    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
  }
  function isLastTraversableNode(node) {
    return /^(html|body|#document)$/.test(getNodeName(node));
  }
  function getComputedStyle2(element) {
    return getWindow(element).getComputedStyle(element);
  }
  function getParentNode(node) {
    if (getNodeName(node) === "html") {
      return node;
    }
    const result = (
      // Step into the shadow DOM of the parent of a slotted node.
      node.assignedSlot || // DOM Element detected.
      node.parentNode || // ShadowRoot detected.
      isShadowRoot(node) && node.host || // Fallback.
      getDocumentElement(node)
    );
    return isShadowRoot(result) ? result.host : result;
  }

  // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
  var React14 = __toESM(require_react(), 1);
  var CompositeRootContext = /* @__PURE__ */ React14.createContext(void 0);
  if (true) CompositeRootContext.displayName = "CompositeRootContext";
  function useCompositeRootContext(optional = false) {
    const context = React14.useContext(CompositeRootContext);
    if (context === void 0 && !optional) {
      throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
    }
    return context;
  }

  // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
  var React15 = __toESM(require_react(), 1);
  function useFocusableWhenDisabled(parameters) {
    const {
      focusableWhenDisabled,
      disabled: disabled2,
      composite = false,
      tabIndex: tabIndexProp = 0,
      isNativeButton
    } = parameters;
    const isFocusableComposite = composite && focusableWhenDisabled !== false;
    const isNonFocusableComposite = composite && focusableWhenDisabled === false;
    const props = React15.useMemo(() => {
      const additionalProps = {
        // allow Tabbing away from focusableWhenDisabled elements
        onKeyDown(event) {
          if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
            event.preventDefault();
          }
        }
      };
      if (!composite) {
        additionalProps.tabIndex = tabIndexProp;
        if (!isNativeButton && disabled2) {
          additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
        }
      }
      if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
        additionalProps["aria-disabled"] = disabled2;
      }
      if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
        additionalProps.disabled = disabled2;
      }
      return additionalProps;
    }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
    return {
      props
    };
  }

  // node_modules/@base-ui/utils/owner.mjs
  function ownerDocument(node) {
    return node?.ownerDocument || document;
  }

  // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
  function dispatchClickWithModifiers(target, sourceEvent, {
    detail = 0
  } = {}) {
    target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
      bubbles: true,
      cancelable: true,
      composed: true,
      detail,
      shiftKey: sourceEvent.shiftKey,
      ctrlKey: sourceEvent.ctrlKey,
      altKey: sourceEvent.altKey,
      metaKey: sourceEvent.metaKey
    }));
  }

  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
  function useButton(parameters = {}) {
    const {
      disabled: disabled2 = false,
      focusableWhenDisabled,
      tabIndex = 0,
      native: isNativeButton = true,
      composite: compositeProp
    } = parameters;
    const elementRef = React16.useRef(null);
    const compositeRootContext = useCompositeRootContext(true);
    const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
    const {
      props: focusableWhenDisabledProps
    } = useFocusableWhenDisabled({
      focusableWhenDisabled,
      disabled: disabled2,
      composite: isCompositeItem,
      tabIndex,
      isNativeButton
    });
    if (true) {
      React16.useEffect(() => {
        if (!elementRef.current) {
          return;
        }
        const isButtonTag = isButtonElement(elementRef.current);
        if (isNativeButton) {
          if (!isButtonTag) {
            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
            const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
            error(`${message}${ownerStackMessage}`);
          }
        } else if (isButtonTag) {
          const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
          const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
          error(`${message}${ownerStackMessage}`);
        }
      }, [isNativeButton]);
    }
    const updateDisabled = React16.useCallback(() => {
      const element = elementRef.current;
      if (!isButtonElement(element)) {
        return;
      }
      if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
        element.disabled = false;
      }
    }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
    useIsoLayoutEffect(updateDisabled, [updateDisabled]);
    const getButtonProps = React16.useCallback((externalProps = {}) => {
      const {
        onClick: externalOnClick,
        onMouseDown: externalOnMouseDown,
        onKeyUp: externalOnKeyUp,
        onKeyDown: externalOnKeyDown,
        onPointerDown: externalOnPointerDown,
        ...otherExternalProps
      } = externalProps;
      return mergeProps({
        onClick(event) {
          if (disabled2) {
            event.preventDefault();
            return;
          }
          externalOnClick?.(event);
        },
        onMouseDown(event) {
          if (!disabled2) {
            externalOnMouseDown?.(event);
          }
        },
        onKeyDown(event) {
          if (disabled2) {
            return;
          }
          makeEventPreventable(event);
          externalOnKeyDown?.(event);
          if (event.baseUIHandlerPrevented) {
            return;
          }
          const isCurrentTarget = event.target === event.currentTarget;
          const currentTarget = event.currentTarget;
          const isButton = isButtonElement(currentTarget);
          const isLink = !isNativeButton && isValidLinkElement(currentTarget);
          const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
          const isEnterKey = event.key === "Enter";
          const isSpaceKey = event.key === " ";
          const role = currentTarget.getAttribute("role");
          const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
          if (isCurrentTarget && isCompositeItem && isSpaceKey) {
            if (event.defaultPrevented && isTextNavigationRole) {
              return;
            }
            event.preventDefault();
            if (!isNativeButton || isButton) {
              event.preventBaseUIHandler();
              dispatchClickWithModifiers(currentTarget, event);
            }
            return;
          }
          if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
            if (isCurrentTarget && isLink && isSpaceKey) {
              event.preventDefault();
            }
            return;
          }
          if (event.defaultPrevented) {
            return;
          }
          event.preventDefault();
          if (isEnterKey) {
            event.preventBaseUIHandler();
            dispatchClickWithModifiers(currentTarget, event);
          }
        },
        onKeyUp(event) {
          if (disabled2) {
            return;
          }
          makeEventPreventable(event);
          externalOnKeyUp?.(event);
          if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
            event.preventDefault();
            return;
          }
          if (event.baseUIHandlerPrevented) {
            return;
          }
          if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
            event.preventBaseUIHandler();
            dispatchClickWithModifiers(event.currentTarget, event);
          }
        },
        onPointerDown(event) {
          if (disabled2) {
            event.preventDefault();
            return;
          }
          externalOnPointerDown?.(event);
        }
      }, isNativeButton ? {
        type: "button"
      } : {
        role: "button"
      }, focusableWhenDisabledProps, otherExternalProps);
    }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
    const buttonRef = useStableCallback((element) => {
      elementRef.current = element;
      updateDisabled();
    });
    return {
      getButtonProps,
      buttonRef
    };
  }
  function isButtonElement(elem) {
    return isHTMLElement(elem) && elem.tagName === "BUTTON";
  }
  function isValidLinkElement(elem) {
    return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
  }

  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
  var React17 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
  var ReactDOM = __toESM(require_react_dom(), 1);

  // node_modules/@base-ui/react/utils/resolveRef.mjs
  function resolveRef(maybeRef) {
    if (maybeRef == null) {
      return maybeRef;
    }
    return "current" in maybeRef ? maybeRef.current : maybeRef;
  }

  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
  var pendingCallbacks = null;
  function flushBeforePaint(fn) {
    if (!pendingCallbacks) {
      const callbacks = [];
      pendingCallbacks = callbacks;
      queueMicrotask(() => {
        pendingCallbacks = null;
        ReactDOM.flushSync(() => {
          for (const callback of callbacks) {
            callback();
          }
        });
      });
    }
    pendingCallbacks.push(fn);
  }
  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
    const frame = useAnimationFrame();
    return useStableCallback((fnToExecute, signal = null) => {
      frame.cancel();
      const element = resolveRef(elementOrRef);
      if (element == null) {
        return;
      }
      const resolvedElement = element;
      const done = () => {
        if (!batch) {
          ReactDOM.flushSync(fnToExecute);
          return;
        }
        flushBeforePaint(() => {
          if (!signal?.aborted) {
            fnToExecute();
          }
        });
      };
      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
        fnToExecute();
        return;
      }
      function exec() {
        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
          if (!signal?.aborted) {
            done();
          }
        }, () => {
          if (signal?.aborted) {
            return;
          }
          const currentAnimations = resolvedElement.getAnimations();
          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
            exec();
            return;
          }
          done();
        });
      }
      if (waitForStartingStyleRemoved) {
        const startingStyleAttribute = startingStyle;
        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
          frame.request(exec);
          return;
        }
        const attributeObserver = new MutationObserver(() => {
          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
            attributeObserver.disconnect();
            exec();
          }
        });
        attributeObserver.observe(resolvedElement, {
          attributes: true,
          attributeFilter: [startingStyleAttribute]
        });
        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
          once: true
        });
        return;
      }
      frame.request(exec);
    });
  }

  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
  function useOpenChangeComplete(parameters) {
    const {
      enabled = true,
      open,
      ref,
      batch = false,
      onComplete: onCompleteParam
    } = parameters;
    const onComplete = useStableCallback(onCompleteParam);
    const runOnceAnimationsFinish = useAnimationsFinished(ref, open, batch);
    React17.useEffect(() => {
      if (!enabled) {
        return void 0;
      }
      const abortController = new AbortController();
      runOnceAnimationsFinish(onComplete, abortController.signal);
      return () => {
        abortController.abort();
      };
    }, [enabled, open, onComplete, runOnceAnimationsFinish]);
  }

  // node_modules/@base-ui/utils/useTimeout.mjs
  var EMPTY2 = 0;
  var Timeout = class _Timeout {
    static create() {
      return new _Timeout();
    }
    currentId = EMPTY2;
    /**
     * Executes `fn` after `delay`, clearing any previously scheduled call.
     */
    start(delay, fn) {
      this.clear();
      this.currentId = setTimeout(() => {
        this.currentId = EMPTY2;
        fn();
      }, delay);
    }
    isStarted() {
      return this.currentId !== EMPTY2;
    }
    clear = () => {
      if (this.currentId !== EMPTY2) {
        clearTimeout(this.currentId);
        this.currentId = EMPTY2;
      }
    };
    disposeEffect = () => {
      return this.clear;
    };
  };
  function useTimeout() {
    const timeout = useRefWithInit(Timeout.create).current;
    useOnMount(timeout.disposeEffect);
    return timeout;
  }

  // node_modules/@base-ui/utils/shadowDom.mjs
  function activeElement(doc) {
    let element = doc.activeElement;
    while (element?.shadowRoot?.activeElement != null) {
      element = element.shadowRoot.activeElement;
    }
    return element;
  }
  function contains(parent, child) {
    if (!parent || !child) {
      return false;
    }
    const rootNode = child.getRootNode?.();
    if (parent.contains(child)) {
      return true;
    }
    if (rootNode && isShadowRoot(rootNode)) {
      let next2 = child;
      while (next2) {
        if (parent === next2) {
          return true;
        }
        next2 = next2.parentNode || next2.host;
      }
    }
    return false;
  }
  function getTarget(event) {
    if ("composedPath" in event) {
      return event.composedPath()[0] ?? event.target;
    }
    return event.target;
  }

  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
  var round = Math.round;

  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
  function isIndexOutOfListBounds(list, index2) {
    return index2 < 0 || index2 >= list.length;
  }
  function getMinListIndex(listRef, disabledIndices) {
    return findNonDisabledListIndex(listRef.current, {
      disabledIndices
    });
  }
  function getMaxListIndex(listRef, disabledIndices) {
    return findNonDisabledListIndex(listRef.current, {
      decrement: true,
      startingIndex: listRef.current.length,
      disabledIndices
    });
  }
  function findNonDisabledListIndex(list, {
    startingIndex = -1,
    decrement = false,
    disabledIndices,
    amount = 1
  } = {}) {
    let index2 = startingIndex;
    do {
      index2 += decrement ? -amount : amount;
    } while (index2 >= 0 && index2 <= list.length - 1 && isListIndexDisabled(list, index2, disabledIndices));
    return index2;
  }
  function isListIndexDisabled(list, index2, disabledIndices) {
    const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index2) : disabledIndices?.includes(index2) ?? false;
    if (isExplicitlyDisabled) {
      return true;
    }
    const element = list[index2];
    if (!element) {
      return false;
    }
    if (!isElementVisible(element)) {
      return true;
    }
    if (element.matches(":disabled")) {
      return true;
    }
    return !disabledIndices && (element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true");
  }
  function isHiddenByStyles(styles) {
    return styles.visibility === "hidden" || styles.visibility === "collapse";
  }
  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
      return false;
    }
    if (typeof element.checkVisibility === "function") {
      return element.checkVisibility();
    }
    return styles.display !== "none" && styles.display !== "contents";
  }

  // node_modules/@base-ui/utils/useForcedRerendering.mjs
  var React18 = __toESM(require_react(), 1);
  function useForcedRerendering() {
    const [, setState] = React18.useState({});
    return React18.useCallback(() => {
      setState({});
    }, []);
  }

  // node_modules/@base-ui/react/internals/composite/composite.mjs
  var ARROW_UP = "ArrowUp";
  var ARROW_DOWN = "ArrowDown";
  var ARROW_LEFT = "ArrowLeft";
  var ARROW_RIGHT = "ArrowRight";
  var HOME = "Home";
  var END = "End";
  var COMPOSITE_KEYS = /* @__PURE__ */ new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);
  var SHIFT = "Shift";
  var MODIFIER_KEYS = [SHIFT, "Control", "Alt", "Meta"];
  function isInputElement(element) {
    return isHTMLElement(element) && element.tagName === "INPUT";
  }
  function isNativeInput(element) {
    if (isInputElement(element) && element.selectionStart != null) {
      return true;
    }
    if (isHTMLElement(element) && element.tagName === "TEXTAREA") {
      return true;
    }
    return false;
  }
  function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {
    if (!scrollContainer || !element || !element.scrollTo) {
      return;
    }
    let targetX = scrollContainer.scrollLeft;
    let targetY = scrollContainer.scrollTop;
    const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;
    const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;
    if (isOverflowingX && orientation !== "vertical") {
      const elementOffsetLeft = getOffset(scrollContainer, element, "left");
      const containerStyles = getStyles(scrollContainer);
      const elementStyles = getStyles(element);
      if (direction === "ltr") {
        if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {
          targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;
        } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {
          targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;
        }
      }
      if (direction === "rtl") {
        if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {
          targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;
        } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {
          targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;
        }
      }
    }
    if (isOverflowingY && orientation !== "horizontal") {
      const elementOffsetTop = getOffset(scrollContainer, element, "top");
      const containerStyles = getStyles(scrollContainer);
      const elementStyles = getStyles(element);
      if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {
        targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;
      } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {
        targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;
      }
    }
    scrollContainer.scrollTo({
      left: targetX,
      top: targetY,
      behavior: "auto"
    });
  }
  function getOffset(ancestor, element, side) {
    const propName = side === "left" ? "offsetLeft" : "offsetTop";
    let result = 0;
    while (element.offsetParent) {
      result += element[propName];
      if (element.offsetParent === ancestor) {
        break;
      }
      element = element.offsetParent;
    }
    return result;
  }
  function getStyles(element) {
    const styles = getComputedStyle(element);
    return {
      scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,
      scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,
      scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,
      scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,
      scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,
      scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,
      scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,
      scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0
    };
  }

  // node_modules/@base-ui/utils/inertValue.mjs
  function inertValue(value) {
    if (isReactVersionAtLeast(19)) {
      return value;
    }
    return value ? "true" : void 0;
  }

  // node_modules/@base-ui/react/internals/useValueChanged.mjs
  var React19 = __toESM(require_react(), 1);
  function useValueChanged(value, onChange) {
    const valueRef = React19.useRef(value);
    const onChangeCallback = useStableCallback(onChange);
    useIsoLayoutEffect(() => {
      if (valueRef.current !== value) {
        onChangeCallback(valueRef.current);
      }
      valueRef.current = value;
    }, [value, onChangeCallback]);
  }

  // node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
  var React20 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
  var valid = "data-valid";
  var invalid = "data-invalid";

  // node_modules/@base-ui/react/internals/field-constants/constants.mjs
  var DEFAULT_VALIDITY_STATE = {
    badInput: false,
    customError: false,
    patternMismatch: false,
    rangeOverflow: false,
    rangeUnderflow: false,
    stepMismatch: false,
    tooLong: false,
    tooShort: false,
    typeMismatch: false,
    valid: null,
    valueMissing: false
  };
  var DEFAULT_FIELD_STATE_ATTRIBUTES = {
    valid: null,
    touched: false,
    dirty: false,
    filled: false,
    focused: false
  };
  var DEFAULT_FIELD_ROOT_STATE = {
    disabled: false,
    ...DEFAULT_FIELD_STATE_ATTRIBUTES
  };
  var fieldValidityMapping = {
    valid(value) {
      if (value === null) {
        return null;
      }
      if (value) {
        return {
          [valid]: ""
        };
      }
      return {
        [invalid]: ""
      };
    }
  };

  // node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
  var DEFAULT_FIELD_ROOT_CONTEXT = {
    invalid: void 0,
    name: void 0,
    validityData: {
      state: DEFAULT_VALIDITY_STATE,
      errors: [],
      error: "",
      value: "",
      initialValue: null
    },
    setValidityData: NOOP,
    disabled: void 0,
    setTouched: NOOP,
    setDirty: NOOP,
    setFilled: NOOP,
    setFocused: NOOP,
    validationMode: "onSubmit",
    shouldValidateOnChange: () => false,
    state: DEFAULT_FIELD_ROOT_STATE,
    registerFieldControl: NOOP,
    validation: {
      getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,
      inputRef: {
        current: null
      },
      registeredInputs: /* @__PURE__ */ new Map(),
      registerInput: NOOP,
      getInputControl: () => null,
      commit: async () => {
      },
      change: NOOP
    }
  };
  var FieldRootContext = /* @__PURE__ */ React20.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
  if (true) FieldRootContext.displayName = "FieldRootContext";
  function useFieldRootContext(optional = true) {
    const context = React20.useContext(FieldRootContext);
    if (context.setValidityData === NOOP && !optional) {
      throw new Error(true ? "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>." : formatErrorMessage_default(28));
    }
    return context;
  }

  // node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
  function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name118) {
    const {
      registerFieldControl
    } = useFieldRootContext();
    const sourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol());
    useIsoLayoutEffect(() => {
      const source = sourceRef.current;
      if (!enabled) {
        registerFieldControl(source, void 0);
        return;
      }
      const registration = {
        controlRef,
        getValue: getFormValueOverride,
        id,
        name: name118,
        value
      };
      registerFieldControl(source, registration);
    }, [controlRef, enabled, getFormValueOverride, id, name118, registerFieldControl, sourceRef, value]);
    useIsoLayoutEffect(() => {
      const source = sourceRef.current;
      return () => {
        registerFieldControl(source, void 0);
      };
    }, [registerFieldControl, sourceRef]);
  }

  // node_modules/@base-ui/react/internals/form-context/FormContext.mjs
  var React21 = __toESM(require_react(), 1);
  var FormContext = /* @__PURE__ */ React21.createContext({
    elementRef: {
      current: null
    },
    formRef: {
      current: {
        fields: /* @__PURE__ */ new Map()
      }
    },
    errors: {},
    clearErrors: NOOP,
    validationMode: "onSubmit",
    submitCountRef: {
      current: 0
    }
  });
  if (true) FormContext.displayName = "FormContext";
  function useFormContext() {
    return React21.useContext(FormContext);
  }

  // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
  var React23 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
  var React22 = __toESM(require_react(), 1);
  var LabelableContext = /* @__PURE__ */ React22.createContext({
    controlId: void 0,
    registerControlId: NOOP,
    resetControlId: NOOP,
    labelId: void 0,
    setLabelId: NOOP,
    messageIds: [],
    setMessageIds: NOOP,
    getDescriptionProps: (externalProps) => externalProps
  });
  if (true) LabelableContext.displayName = "LabelableContext";
  function useLabelableContext() {
    return React22.useContext(LabelableContext);
  }

  // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
  function useLabelableId(params = {}) {
    const {
      id,
      enabled = true
    } = params;
    const {
      controlId,
      registerControlId,
      resetControlId
    } = useLabelableContext();
    const defaultId = useBaseUiId();
    const controlSourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol());
    const hasRegisteredRef = React23.useRef(false);
    const hadExplicitIdRef = React23.useRef(false);
    const unregisterControlId = useStableCallback(() => {
      if (!hasRegisteredRef.current || registerControlId === NOOP) {
        return;
      }
      hasRegisteredRef.current = false;
      registerControlId(controlSourceRef.current, void 0);
    });
    useIsoLayoutEffect(() => {
      if (!enabled || registerControlId === NOOP) {
        unregisterControlId();
        return void 0;
      }
      let nextId;
      if (id !== void 0) {
        hadExplicitIdRef.current = true;
        nextId = id;
      } else if (hadExplicitIdRef.current) {
        nextId = defaultId;
      } else {
        resetControlId();
        return void 0;
      }
      if (nextId === void 0) {
        unregisterControlId();
        return void 0;
      }
      hasRegisteredRef.current = true;
      registerControlId(controlSourceRef.current, nextId);
      return void 0;
    }, [id, enabled, registerControlId, resetControlId, defaultId, controlSourceRef, unregisterControlId]);
    useIsoLayoutEffect(() => {
      return unregisterControlId;
    }, [unregisterControlId]);
    return (enabled ? controlId : void 0) ?? id ?? defaultId;
  }

  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
  var React24 = __toESM(require_react(), 1);
  var DirectionContext = /* @__PURE__ */ React24.createContext(void 0);
  if (true) DirectionContext.displayName = "DirectionContext";
  function useDirection() {
    const context = React24.useContext(DirectionContext);
    return context?.direction ?? "ltr";
  }

  // node_modules/@base-ui/react/field/item/FieldItemContext.mjs
  var React25 = __toESM(require_react(), 1);
  var FieldItemContext = /* @__PURE__ */ React25.createContext({
    disabled: false
  });
  if (true) FieldItemContext.displayName = "FieldItemContext";
  function useFieldItemContext() {
    const context = React25.useContext(FieldItemContext);
    return context;
  }

  // node_modules/@base-ui/react/field/root/useFieldValidation.mjs
  var React26 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
  function getCombinedFieldValidityData(validityData, invalid2) {
    return {
      ...validityData,
      state: {
        ...validityData.state,
        valid: !invalid2 && validityData.state.valid
      }
    };
  }

  // node_modules/@base-ui/react/field/root/useFieldValidation.mjs
  var validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);
  function isEligibleInput(input, formElement) {
    if (input.matches(":disabled")) {
      return false;
    }
    if (!formElement || input.form === formElement) {
      return true;
    }
    return input.form === null && !input.hasAttribute("form");
  }
  function findRepresentativeInput(inputs, formElement) {
    let fallback2 = null;
    for (const input of inputs.keys()) {
      if (!isEligibleInput(input, formElement)) {
        continue;
      }
      if (!input.validity.valid) {
        return input;
      }
      fallback2 ??= input;
    }
    return fallback2;
  }
  function makeState(customError) {
    return {
      ...DEFAULT_VALIDITY_STATE,
      valid: !customError,
      customError
    };
  }
  function getNativeErrors(element) {
    return element && element.validationMessage ? [element.validationMessage] : [];
  }
  function useFieldValidation(params) {
    const {
      elementRef,
      formRef
    } = useFormContext();
    const {
      setValidityData,
      validate,
      validityData,
      validationDebounceTime,
      invalid: invalid2,
      markedDirtyRef,
      state,
      shouldValidateOnChange,
      validationMode,
      registeredFieldIdRef
    } = params;
    const {
      controlId,
      getDescriptionProps
    } = useLabelableContext();
    const timeout = useTimeout();
    const inputRef = React26.useRef(null);
    const registeredInputs = useRefWithInit(() => /* @__PURE__ */ new Map()).current;
    const validationCommitIdRef = React26.useRef(0);
    const customValidityRef = React26.useRef(null);
    const registerInput = React26.useCallback((element, registration) => {
      registeredInputs.set(element, registration);
      return () => {
        registeredInputs.delete(element);
      };
    }, [registeredInputs]);
    const getInputControl = useStableCallback(() => {
      const element = findRepresentativeInput(registeredInputs, elementRef.current);
      return element && registeredInputs.get(element)?.controlRef.current || null;
    });
    const commit = useStableCallback(async (value, revalidate = false) => {
      validationCommitIdRef.current += 1;
      const validationCommitId = validationCommitIdRef.current;
      function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid2) {
        const fieldId = registeredFieldIdRef.current ?? controlId;
        if (fieldId == null) {
          return;
        }
        const currentFieldData = formRef.current.fields.get(fieldId);
        if (!currentFieldData) {
          return;
        }
        const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);
        formRef.current.fields.set(fieldId, {
          ...currentFieldData,
          validityData: validityDataWithFormErrors
        });
      }
      function makeValidityData(validityState, errorMessages) {
        const errors = validityState.valid === false ? errorMessages : [];
        return {
          value,
          state: validityState,
          error: errors[0] ?? "",
          errors,
          initialValue: validityData.initialValue
        };
      }
      function setCustomValidity(element2, message) {
        const displaced = element2.validity.customError ? element2.validationMessage : "";
        const ownedMessage = message.replace(/\r\n?/g, "\n");
        element2.setCustomValidity(ownedMessage);
        customValidityRef.current = [element2, ownedMessage, displaced];
      }
      function clearCustomValidity() {
        const record = customValidityRef.current;
        customValidityRef.current = null;
        if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {
          record[0].setCustomValidity(record[2]);
        }
      }
      function publish(validityState, errorMessages, externalInvalid) {
        const nextValidityData = makeValidityData(validityState, errorMessages);
        updateRegisteredFieldValidity(nextValidityData, externalInvalid);
        setValidityData(nextValidityData);
      }
      function getState(el) {
        const computedState = validityKeys.reduce((acc, key) => {
          acc[key] = el.validity[key];
          return acc;
        }, {});
        let hasOnlyValueMissingError = false;
        for (const key of validityKeys) {
          if (key === "valid") {
            continue;
          }
          if (key === "valueMissing" && computedState[key]) {
            hasOnlyValueMissingError = true;
          } else if (computedState[key]) {
            return computedState;
          }
        }
        if (hasOnlyValueMissingError && !markedDirtyRef.current) {
          computedState.valid = true;
          computedState.valueMissing = false;
        }
        return computedState;
      }
      function resolveRepresentativeInput() {
        return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
      }
      let element = resolveRepresentativeInput();
      function refreshState() {
        element = resolveRepresentativeInput();
        return element?.willValidate ? getState(element) : makeState(false);
      }
      if (revalidate) {
        if (state.valid !== false || !element) {
          return;
        }
        if (!element.validity.valueMissing) {
          clearCustomValidity();
          const currentElement = resolveRepresentativeInput();
          const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];
          publish(makeState(foreign.length > 0), foreign, false);
          return;
        }
        for (const key of validityKeys) {
          if (key !== "valid" && key !== "valueMissing" && key !== "customError" && element.validity[key]) {
            return;
          }
        }
      }
      timeout.clear();
      clearCustomValidity();
      let nextState = refreshState();
      let validationErrors = getNativeErrors(element);
      const isValidatingOnChange = shouldValidateOnChange();
      if (validationErrors.length === 0 || isValidatingOnChange) {
        const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
          if (field.name) {
            acc[field.name] = field.getValue();
          }
          return acc;
        }, {});
        const resultOrPromise = validate(value, formValues);
        let result;
        if (typeof resultOrPromise === "object" && resultOrPromise !== null && "then" in resultOrPromise) {
          if (nextState.valid === false) {
            publish(nextState, validationErrors);
          } else if (validationMode === "onSubmit" || !validityData.state.customError) {
            nextState.valid = null;
            publish(nextState, validationErrors);
          }
          result = await resultOrPromise;
          if (validationCommitId !== validationCommitIdRef.current) {
            return;
          }
          nextState = refreshState();
        } else {
          result = resultOrPromise;
        }
        validationErrors = result ? [].concat(result).filter(Boolean) : [];
        if (validationErrors.length > 0) {
          nextState.valid = false;
          nextState.customError = true;
          if (element?.willValidate) {
            setCustomValidity(element, validationErrors.join("\n"));
          }
        } else {
          validationErrors = getNativeErrors(element);
        }
      }
      publish(nextState, validationErrors);
    });
    const change = useStableCallback((value, cancelPending = false) => {
      timeout.clear();
      validationCommitIdRef.current += 1;
      if (cancelPending) {
        return;
      }
      const validateOnChange = shouldValidateOnChange();
      if (validateOnChange && value !== "" && validationDebounceTime) {
        timeout.start(validationDebounceTime, () => {
          commit(value);
        });
      } else {
        commit(value, !validateOnChange);
      }
    });
    const getValidationProps = React26.useCallback((disabled2, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled2 ? {
      "aria-invalid": true
    } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);
    return React26.useMemo(() => ({
      getValidationProps,
      inputRef,
      registeredInputs,
      registerInput,
      getInputControl,
      commit,
      change
    }), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);
  }

  // node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
  function useRegisteredLabelId(idProp, setLabelId) {
    const id = useBaseUiId(idProp);
    useIsoLayoutEffect(() => {
      setLabelId(id);
      return () => {
        setLabelId((currentId) => currentId === id ? void 0 : currentId);
      };
    }, [id, setLabelId]);
    return id;
  }

  // node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
  function useLabel(params = {}) {
    const {
      id: idProp,
      fallbackControlId,
      native = false,
      setLabelId: setLabelIdProp,
      focusControl: focusControlProp
    } = params;
    const {
      controlId: contextControlId,
      setLabelId: setContextLabelId
    } = useLabelableContext();
    const syncLabelId = useStableCallback((nextLabelId) => {
      setContextLabelId(nextLabelId);
      setLabelIdProp?.(nextLabelId);
    });
    const id = useRegisteredLabelId(idProp, syncLabelId);
    const resolvedControlId = contextControlId ?? fallbackControlId;
    function focusControl(event) {
      if (focusControlProp) {
        focusControlProp(event, resolvedControlId);
        return;
      }
      if (!resolvedControlId) {
        return;
      }
      const controlElement = ownerDocument(event.currentTarget).getElementById(resolvedControlId);
      if (isHTMLElement(controlElement)) {
        focusElementWithVisible(controlElement);
      }
    }
    function handleInteraction(event) {
      const target = getTarget(event.nativeEvent);
      if (target?.closest("button,input,select,textarea")) {
        return;
      }
      if (!event.defaultPrevented && event.detail > 1) {
        event.preventDefault();
      }
      if (native) {
        return;
      }
      focusControl(event);
    }
    return native ? {
      id,
      htmlFor: resolvedControlId,
      onMouseDown: handleInteraction
    } : {
      id,
      onClick: handleInteraction,
      onPointerDown(event) {
        event.preventDefault();
      }
    };
  }
  function focusElementWithVisible(element) {
    element.focus({
      // Available from Chrome 144+ (January 2026).
      // Safari and Firefox already support it.
      focusVisible: true
    });
  }

  // node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
  var React27 = __toESM(require_react(), 1);
  function useCompositeItem(params = {}) {
    const {
      highlightItemOnHover,
      highlightedIndex,
      onHighlightedIndexChange
    } = useCompositeRootContext();
    const {
      ref,
      index: index2
    } = useCompositeListItem(params);
    const isHighlighted = highlightedIndex === index2;
    const itemRef = React27.useRef(null);
    const mergedRef = useMergedRefs(ref, itemRef);
    const compositeProps = {
      tabIndex: isHighlighted ? 0 : -1,
      onFocus() {
        onHighlightedIndexChange(index2);
      },
      onMouseMove() {
        const item = itemRef.current;
        if (!highlightItemOnHover || !item) {
          return;
        }
        const disabled2 = item.hasAttribute("disabled") || item.ariaDisabled === "true";
        if (!isHighlighted && !disabled2) {
          item.focus();
        }
      }
    };
    return {
      compositeProps,
      compositeRef: mergedRef,
      index: index2
    };
  }

  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
  function getCssDimensions(element) {
    const css = getComputedStyle2(element);
    let width = parseFloat(css.width) || 0;
    let height = parseFloat(css.height) || 0;
    const hasOffset = isHTMLElement(element);
    const offsetWidth = hasOffset ? element.offsetWidth : width;
    const offsetHeight = hasOffset ? element.offsetHeight : height;
    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
    if (shouldFallback) {
      width = offsetWidth;
      height = offsetHeight;
    }
    return {
      width,
      height
    };
  }

  // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
  var React28 = __toESM(require_react(), 1);
  var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1);
  var DirectionProvider = function DirectionProvider2(props) {
    const {
      direction = "ltr"
    } = props;
    const contextValue = React28.useMemo(() => ({
      direction
    }), [direction]);
    return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(DirectionContext.Provider, {
      value: contextValue,
      children: props.children
    });
  };
  if (true) DirectionProvider.displayName = "DirectionProvider";

  // node_modules/@base-ui/utils/isElementDisabled.mjs
  function isElementDisabled(element) {
    return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
  }

  // node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
  var React29 = __toESM(require_react(), 1);
  var CSPContext = /* @__PURE__ */ React29.createContext(void 0);
  if (true) CSPContext.displayName = "CSPContext";
  var DEFAULT_CSP_CONTEXT_VALUE = {
    disableStyleElements: false
  };
  function useCSPContext() {
    return React29.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
  }

  // node_modules/@base-ui/react/utils/getElementTransform.mjs
  function getElementTransform(element, computedStyle) {
    const transform = (computedStyle ?? getWindow(element).getComputedStyle(element)).transform;
    let translateX = 0;
    let translateY = 0;
    let scale = 1;
    if (transform && transform !== "none") {
      const matrix = transform.match(/matrix(?:3d)?\(([^)]+)\)/);
      if (matrix) {
        const values = matrix[1].split(", ").map(parseFloat);
        if (values.length === 6) {
          translateX = values[4];
          translateY = values[5];
          scale = Math.sqrt(values[0] * values[0] + values[1] * values[1]);
        } else if (values.length === 16) {
          translateX = values[12];
          translateY = values[13];
          scale = values[0];
        }
      }
    }
    return {
      x: translateX,
      y: translateY,
      scale
    };
  }

  // node_modules/@base-ui/react/field/index.parts.mjs
  var index_parts_exports = {};
  __export(index_parts_exports, {
    Control: () => FieldControl,
    Description: () => FieldDescription,
    Error: () => FieldError,
    Item: () => FieldItem,
    Label: () => FieldLabel,
    Root: () => FieldRoot,
    Validity: () => FieldValidity
  });

  // node_modules/@base-ui/react/field/root/FieldRoot.mjs
  var React33 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs
  var React30 = __toESM(require_react(), 1);
  var FieldsetRootContext = /* @__PURE__ */ React30.createContext(void 0);
  if (true) FieldsetRootContext.displayName = "FieldsetRootContext";
  function useFieldsetRootContext(optional = false) {
    const context = React30.useContext(FieldsetRootContext);
    if (!context && !optional) {
      throw new Error(true ? "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>." : formatErrorMessage_default(86));
    }
    return context;
  }

  // node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
  var React31 = __toESM(require_react(), 1);
  var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1);
  var LabelableProvider = function LabelableProvider2(props) {
    const defaultId = useBaseUiId();
    const [controlIdState, setControlIdState] = React31.useState(defaultId);
    const [labelId, setLabelId] = React31.useState();
    const [messageIds, setMessageIds] = React31.useState([]);
    const controlId = controlIdState === void 0 ? defaultId : controlIdState;
    const registrationsRef = useRefWithInit(() => /* @__PURE__ */ new Map());
    const {
      messageIds: parentMessageIds
    } = useLabelableContext();
    const registerControlId = useStableCallback((source, nextId) => {
      const registrations = registrationsRef.current;
      if (nextId === void 0) {
        registrations.delete(source);
      } else {
        registrations.set(source, nextId);
      }
      setControlIdState((prev) => {
        if (registrations.size === 0) {
          return prev;
        }
        let nextControlId;
        for (const id of registrations.values()) {
          if (id === prev) {
            return prev;
          }
          if (nextControlId === void 0) {
            nextControlId = id;
          }
        }
        return nextControlId;
      });
    });
    const resetControlId = useStableCallback(() => {
      if (registrationsRef.current.size === 0) {
        setControlIdState(defaultId);
      }
    });
    const getDescriptionProps = React31.useCallback((externalProps) => {
      const ids = externalProps["aria-describedby"] ? externalProps["aria-describedby"].split(" ") : [];
      ids.push(...parentMessageIds, ...messageIds);
      return {
        ...externalProps,
        "aria-describedby": Array.from(new Set(ids)).join(" ") || void 0
      };
    }, [parentMessageIds, messageIds]);
    const contextValue = React31.useMemo(() => ({
      controlId,
      registerControlId,
      resetControlId,
      labelId,
      setLabelId,
      messageIds,
      setMessageIds,
      getDescriptionProps
    }), [controlId, registerControlId, resetControlId, labelId, setLabelId, messageIds, setMessageIds, getDescriptionProps]);
    return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(LabelableContext.Provider, {
      value: contextValue,
      children: props.children
    });
  };
  if (true) LabelableProvider.displayName = "LabelableProvider";

  // node_modules/@base-ui/react/internals/field-register-control/useFieldControlRegistration.mjs
  var React32 = __toESM(require_react(), 1);
  function useFieldControlRegistration(params) {
    const {
      change,
      commit,
      invalid: invalid2,
      markedDirtyRef,
      name: name118,
      setRegisteredFieldName,
      registeredFieldIdRef,
      setValidityData,
      validityData
    } = params;
    const {
      formRef
    } = useFormContext();
    const activeFieldControlSourceRef = React32.useRef(null);
    const registrationRef = React32.useRef(null);
    const initialValueCapturedRef = React32.useRef(false);
    const getValueForForm = useStableCallback(() => {
      const registration = registrationRef.current;
      if (!registration) {
        return void 0;
      }
      if (registration.getValue) {
        return registration.getValue();
      }
      return registration.value;
    });
    function getRegistrationValue(registration) {
      return registration.value === void 0 ? getValueForForm() : registration.value;
    }
    const validate = useStableCallback(() => {
      const registration = registrationRef.current;
      markedDirtyRef.current = true;
      if (!registration) {
        commit(validityData.value);
        return;
      }
      commit(getRegistrationValue(registration));
    });
    function refreshRegistration() {
      const registration = registrationRef.current;
      if (!registration || !registration.id) {
        return;
      }
      formRef.current.fields.set(registration.id, {
        getValue: getValueForForm,
        name: name118 ?? registration.name,
        controlRef: registration.controlRef,
        validityData: getCombinedFieldValidityData(validityData, invalid2),
        validate
      });
    }
    function deleteRegistration(id = registrationRef.current?.id) {
      if (id) {
        formRef.current.fields.delete(id);
      }
    }
    function captureInitialValue(registration) {
      if (initialValueCapturedRef.current) {
        return;
      }
      initialValueCapturedRef.current = true;
      const initialValue = getRegistrationValue(registration);
      setValidityData((prev) => prev.initialValue === initialValue ? prev : {
        ...prev,
        initialValue
      });
    }
    useIsoLayoutEffect(() => {
      const registration = registrationRef.current;
      if (!registration || !registration.id) {
        return;
      }
      setRegisteredFieldName(name118 ? void 0 : registration.name);
      formRef.current.fields.set(registration.id, {
        getValue: getValueForForm,
        name: name118 ?? registration.name,
        controlRef: registration.controlRef,
        validityData: getCombinedFieldValidityData(validityData, invalid2),
        validate
      });
    }, [formRef, getValueForForm, invalid2, name118, setRegisteredFieldName, validate, validityData]);
    useIsoLayoutEffect(() => {
      const fields = formRef.current.fields;
      return () => {
        const id = registrationRef.current?.id;
        if (id) {
          fields.delete(id);
        }
      };
    }, [formRef]);
    const register = useStableCallback((source, registration) => {
      if (!registration) {
        if (activeFieldControlSourceRef.current === source) {
          activeFieldControlSourceRef.current = null;
          change(void 0, true);
          deleteRegistration();
          registrationRef.current = null;
          setRegisteredFieldName(void 0);
          registeredFieldIdRef.current = void 0;
        }
        return;
      }
      const previousId = registrationRef.current?.id;
      const previousSource = activeFieldControlSourceRef.current;
      if (previousSource && previousSource !== source) {
        change(void 0, true);
      }
      activeFieldControlSourceRef.current = source;
      registrationRef.current = registration;
      if (!name118) {
        setRegisteredFieldName(registration.name);
      }
      registeredFieldIdRef.current = registration.id;
      if (previousId && previousId !== registration.id) {
        deleteRegistration(previousId);
      }
      captureInitialValue(registration);
      refreshRegistration();
    });
    return [validate, register];
  }

  // node_modules/@base-ui/react/field/root/FieldRoot.mjs
  var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1);
  var FieldRootInner = /* @__PURE__ */ React33.forwardRef(function FieldRootInner2(componentProps, forwardedRef) {
    const {
      errors,
      validationMode: formValidationMode,
      submitCountRef
    } = useFormContext();
    const {
      render,
      className,
      validate: validateProp,
      validationDebounceTime = 0,
      validationMode = formValidationMode,
      name: name118,
      disabled: disabledProp = false,
      invalid: invalidProp,
      dirty: dirtyProp,
      touched: touchedProp,
      actionsRef,
      style: style2,
      ...elementProps
    } = componentProps;
    const disabledFieldset = useFieldsetRootContext(true)?.disabled;
    const validate = useStableCallback(validateProp || (() => null));
    const disabled2 = disabledFieldset || disabledProp;
    const [touchedState, setTouchedUnwrapped] = React33.useState(false);
    const [dirtyState, setDirtyUnwrapped] = React33.useState(false);
    const [filled, setFilled] = React33.useState(false);
    const [focused, setFocused] = React33.useState(false);
    const dirty = dirtyProp ?? dirtyState;
    const touched = touchedProp ?? touchedState;
    const markedDirtyRef = React33.useRef(dirty);
    const registeredFieldIdRef = React33.useRef(void 0);
    const [registeredFieldName, setRegisteredFieldName] = React33.useState();
    const effectiveName = name118 ?? registeredFieldName;
    useIsoLayoutEffect(() => {
      if (dirtyProp !== void 0) {
        markedDirtyRef.current = dirtyProp;
      }
    }, [dirtyProp]);
    const setDirty = useStableCallback((value) => {
      if (dirtyProp !== void 0) {
        return;
      }
      if (value) {
        markedDirtyRef.current = true;
      }
      setDirtyUnwrapped(value);
    });
    const setTouched = useStableCallback((value) => {
      if (touchedProp !== void 0) {
        return;
      }
      setTouchedUnwrapped(value);
    });
    const shouldValidateOnChange = useStableCallback(() => validationMode === "onChange" || validationMode === "onSubmit" && submitCountRef.current > 0);
    const formError = effectiveName && Object.hasOwn(errors, effectiveName) ? errors[effectiveName] : null;
    const hasFormError = !!(Array.isArray(formError) ? formError.length : formError);
    const invalid2 = invalidProp === true || hasFormError;
    const [validityData, setValidityData] = React33.useState({
      state: DEFAULT_VALIDITY_STATE,
      error: "",
      errors: [],
      value: null,
      initialValue: null
    });
    const valid2 = !invalid2 && (disabled2 ? null : validityData.state.valid);
    const state = React33.useMemo(() => ({
      disabled: disabled2,
      touched,
      dirty,
      valid: valid2,
      filled,
      focused
    }), [disabled2, touched, dirty, valid2, filled, focused]);
    const validation = useFieldValidation({
      setValidityData,
      validate,
      validityData,
      validationDebounceTime,
      invalid: invalid2,
      markedDirtyRef,
      state,
      shouldValidateOnChange,
      validationMode,
      registeredFieldIdRef
    });
    const [validateFieldControl, registerFieldControl] = useFieldControlRegistration({
      change: validation.change,
      commit: validation.commit,
      invalid: invalid2,
      markedDirtyRef,
      name: name118,
      setRegisteredFieldName,
      registeredFieldIdRef,
      setValidityData,
      validityData
    });
    React33.useImperativeHandle(actionsRef, () => ({
      validate: validateFieldControl
    }), [validateFieldControl]);
    const contextValue = React33.useMemo(() => ({
      invalid: invalid2,
      name: effectiveName,
      validityData,
      setValidityData,
      disabled: disabled2,
      setTouched,
      setDirty,
      setFilled,
      setFocused,
      validationMode,
      shouldValidateOnChange,
      state,
      registerFieldControl,
      validation
    }), [invalid2, effectiveName, validityData, disabled2, setTouched, setDirty, setFilled, setFocused, validationMode, shouldValidateOnChange, state, registerFieldControl, validation]);
    const element = useRenderElement("div", componentProps, {
      ref: forwardedRef,
      state,
      props: elementProps,
      stateAttributesMapping: fieldValidityMapping
    });
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(FieldRootContext.Provider, {
      value: contextValue,
      children: element
    });
  });
  if (true) FieldRootInner.displayName = "FieldRootInner";
  var FieldRoot = /* @__PURE__ */ React33.forwardRef(function FieldRoot2(componentProps, forwardedRef) {
    return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(LabelableProvider, {
      children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(FieldRootInner, {
        ...componentProps,
        ref: forwardedRef
      })
    });
  });
  if (true) FieldRoot.displayName = "FieldRoot";

  // node_modules/@base-ui/react/field/label/FieldLabel.mjs
  var React34 = __toESM(require_react(), 1);
  var FieldLabel = /* @__PURE__ */ React34.forwardRef(function FieldLabel2(componentProps, forwardedRef) {
    const {
      render,
      className,
      style: style2,
      id: idProp,
      nativeLabel = true,
      ...elementProps
    } = componentProps;
    const fieldRootContext = useFieldRootContext(false);
    const fieldItemContext = useFieldItemContext();
    const {
      labelId
    } = useLabelableContext();
    const state = {
      ...fieldRootContext.state,
      disabled: fieldRootContext.disabled || fieldItemContext.disabled
    };
    const labelRef = React34.useRef(null);
    const labelProps = useLabel({
      id: labelId ?? idProp,
      native: nativeLabel
    });
    if (true) {
      React34.useEffect(() => {
        if (!labelRef.current) {
          return;
        }
        const isLabelTag = labelRef.current.tagName === "LABEL";
        if (nativeLabel) {
          if (!isLabelTag) {
            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
            const message = "<Field.Label> expected a <label> element because the `nativeLabel` prop is true. Rendering a non-<label> disables native label association, so `htmlFor` will not work. Use a real <label> in the `render` prop, or set `nativeLabel` to `false`.";
            error(`${message}${ownerStackMessage}`);
          }
        } else if (isLabelTag) {
          const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
          const message = "<Field.Label> expected a non-<label> element because the `nativeLabel` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the `render` prop, or set `nativeLabel` to `true`.";
          error(`${message}${ownerStackMessage}`);
        }
      }, [nativeLabel]);
    }
    const element = useRenderElement("label", componentProps, {
      ref: [forwardedRef, labelRef],
      state,
      props: [labelProps, elementProps],
      stateAttributesMapping: fieldValidityMapping
    });
    return element;
  });
  if (true) FieldLabel.displayName = "FieldLabel";

  // node_modules/@base-ui/react/field/error/FieldError.mjs
  var React35 = __toESM(require_react(), 1);
  var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1);
  var stateAttributesMapping = {
    ...fieldValidityMapping,
    ...transitionStatusMapping
  };
  var FieldError = /* @__PURE__ */ React35.forwardRef(function FieldError2(componentProps, forwardedRef) {
    const {
      render,
      id: idProp,
      className,
      match,
      style: style2,
      ...elementProps
    } = componentProps;
    const id = useBaseUiId(idProp);
    const {
      validityData,
      state: fieldState,
      name: name118
    } = useFieldRootContext(false);
    const {
      setMessageIds
    } = useLabelableContext();
    const {
      errors
    } = useFormContext();
    const formError = name118 && Object.hasOwn(errors, name118) ? errors[name118] : null;
    const hasFormError = !!(Array.isArray(formError) ? formError.length : formError);
    const hasSpecificMatch = typeof match === "string";
    let rendered = false;
    if (match === true) {
      rendered = true;
    } else if (fieldState.disabled) {
      rendered = false;
    } else if (hasSpecificMatch) {
      rendered = Boolean(validityData.state[match]);
    } else {
      rendered = hasFormError || validityData.state.valid === false;
    }
    const {
      mounted,
      transitionStatus,
      setMounted
    } = useTransitionStatus(rendered);
    useIsoLayoutEffect(() => {
      if (!rendered || !id) {
        return void 0;
      }
      setMessageIds((v20) => v20.concat(id));
      return () => {
        setMessageIds((v20) => v20.filter((item) => item !== id));
      };
    }, [rendered, id, setMessageIds]);
    const errorRef = React35.useRef(null);
    const [lastRenderedMessage, setLastRenderedMessage] = React35.useState(null);
    const [lastRenderedMessageKey, setLastRenderedMessageKey] = React35.useState(null);
    let error2 = validityData.error;
    if (!hasSpecificMatch && hasFormError) {
      error2 = formError;
    } else if (validityData.errors.length > 1) {
      error2 = validityData.errors;
    }
    let errorMessage = error2;
    if (Array.isArray(error2)) {
      errorMessage = error2.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("ul", {
        children: error2.map((message) => /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("li", {
          children: message
        }, message))
      }) : error2[0];
    }
    const errorKey = Array.isArray(error2) ? JSON.stringify(error2) : error2;
    if (rendered && errorKey !== lastRenderedMessageKey) {
      setLastRenderedMessageKey(errorKey);
      setLastRenderedMessage(errorMessage);
    }
    useOpenChangeComplete({
      open: rendered,
      ref: errorRef,
      onComplete() {
        if (!rendered) {
          setMounted(false);
        }
      }
    });
    const state = {
      ...fieldState,
      transitionStatus
    };
    const element = useRenderElement("div", componentProps, {
      ref: [forwardedRef, errorRef],
      state,
      props: [{
        id,
        children: rendered ? errorMessage : lastRenderedMessage
      }, elementProps],
      stateAttributesMapping,
      enabled: mounted
    });
    if (!mounted) {
      return null;
    }
    return element;
  });
  if (true) FieldError.displayName = "FieldError";

  // node_modules/@base-ui/react/field/description/FieldDescription.mjs
  var React36 = __toESM(require_react(), 1);
  var FieldDescription = /* @__PURE__ */ React36.forwardRef(function FieldDescription2(componentProps, forwardedRef) {
    const {
      render,
      id: idProp,
      className,
      style: style2,
      ...elementProps
    } = componentProps;
    const id = useBaseUiId(idProp);
    const fieldRootContext = useFieldRootContext(false);
    const fieldItemContext = useFieldItemContext();
    const {
      setMessageIds
    } = useLabelableContext();
    const state = {
      ...fieldRootContext.state,
      disabled: fieldRootContext.disabled || fieldItemContext.disabled
    };
    useIsoLayoutEffect(() => {
      if (!id) {
        return void 0;
      }
      setMessageIds((v20) => v20.concat(id));
      return () => {
        setMessageIds((v20) => v20.filter((item) => item !== id));
      };
    }, [id, setMessageIds]);
    const element = useRenderElement("p", componentProps, {
      ref: forwardedRef,
      state,
      props: [{
        id
      }, elementProps],
      stateAttributesMapping: fieldValidityMapping
    });
    return element;
  });
  if (true) FieldDescription.displayName = "FieldDescription";

  // node_modules/@base-ui/react/field/control/FieldControl.mjs
  var React37 = __toESM(require_react(), 1);
  var FieldControl = /* @__PURE__ */ React37.forwardRef(function FieldControl2(componentProps, forwardedRef) {
    const {
      render,
      className,
      id: idProp,
      name: nameProp,
      value: valueProp,
      disabled: disabledProp = false,
      onValueChange,
      defaultValue,
      autoFocus = false,
      style: style2,
      ...elementProps
    } = componentProps;
    const {
      state: fieldState,
      name: fieldName,
      disabled: fieldDisabled,
      setTouched,
      setDirty,
      validityData,
      setFocused,
      setFilled,
      validationMode,
      validation
    } = useFieldRootContext();
    const {
      clearErrors,
      elementRef: formElementRef,
      submitCountRef
    } = useFormContext();
    const disabled2 = fieldDisabled || disabledProp;
    const name118 = fieldName ?? nameProp;
    const state = {
      ...fieldState,
      disabled: disabled2
    };
    const {
      labelId
    } = useLabelableContext();
    const id = useLabelableId({
      id: idProp
    });
    const [valueUnwrapped] = useControlled({
      controlled: valueProp,
      default: defaultValue,
      name: "FieldControl",
      state: "value"
    });
    const isControlled = valueProp !== void 0;
    const value = isControlled ? valueUnwrapped : void 0;
    const serializedValue = value == null ? void 0 : String(value);
    const getValueFromInput = useStableCallback(() => validation.inputRef.current?.value);
    useRegisterFieldControl(validation.inputRef, id, serializedValue, getValueFromInput, !disabled2, nameProp);
    useIsoLayoutEffect(() => {
      const currentValue = serializedValue ?? validation.inputRef.current?.value;
      if (currentValue !== void 0) {
        setFilled(currentValue !== "");
      }
    }, [serializedValue, validation.inputRef, setFilled]);
    useValueChanged(serializedValue, () => {
      if (serializedValue === void 0) {
        return;
      }
      clearErrors(name118);
      setDirty(serializedValue !== (validityData.initialValue ?? ""));
      validation.change(serializedValue);
    });
    const inputRef = React37.useRef(null);
    const enterValidationTimeout = useTimeout();
    useIsoLayoutEffect(() => {
      if (autoFocus && inputRef.current === activeElement(ownerDocument(inputRef.current))) {
        setFocused(true);
      }
    }, [autoFocus, setFocused]);
    const element = useRenderElement("input", componentProps, {
      ref: [forwardedRef, inputRef],
      state,
      props: [{
        id,
        disabled: disabled2,
        name: name118,
        ref: validation.inputRef,
        "aria-labelledby": labelId,
        autoFocus,
        ...isControlled ? {
          value
        } : {
          defaultValue
        },
        onChange(event) {
          const inputValue = event.currentTarget.value;
          const details = createChangeEventDetails(reason_parts_exports.none, event.nativeEvent);
          onValueChange?.(inputValue, details);
          if (isControlled) {
            return;
          }
          setDirty(inputValue !== (validityData.initialValue ?? ""));
          setFilled(inputValue !== "");
          if (!event.nativeEvent.defaultPrevented && !details.isCanceled) {
            clearErrors(name118);
            validation.change(inputValue);
          }
        },
        onFocus() {
          setFocused(true);
        },
        onBlur(event) {
          setTouched(true);
          setFocused(false);
          if (validationMode === "onBlur") {
            const inputValue = event.currentTarget.value;
            validation.commit(inputValue);
            if (isControlled) {
              queueMicrotask(() => {
                const nextValue = validation.inputRef.current?.value;
                if (nextValue !== void 0 && nextValue !== inputValue && nextValue !== (validityData.initialValue ?? "")) {
                  validation.commit(nextValue);
                }
              });
            }
          }
        },
        onKeyDown(event) {
          if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
            setTouched(true);
            const value2 = event.currentTarget.value;
            const form = event.currentTarget.form;
            if (form && form === formElementRef.current && !event.defaultPrevented) {
              const input = event.currentTarget;
              const submitCount = submitCountRef.current;
              enterValidationTimeout.start(0, () => {
                if (submitCountRef.current === submitCount) {
                  validation.commit(input.value);
                }
              });
            } else {
              validation.commit(value2);
            }
          }
        }
      }, elementProps, (props) => validation.getValidationProps(disabled2, props)],
      stateAttributesMapping: fieldValidityMapping
    });
    return element;
  });
  if (true) FieldControl.displayName = "FieldControl";

  // node_modules/@base-ui/react/field/validity/FieldValidity.mjs
  var React38 = __toESM(require_react(), 1);
  var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1);
  var FieldValidity = function FieldValidity2(props) {
    const {
      children
    } = props;
    const {
      validityData,
      invalid: invalid2
    } = useFieldRootContext(false);
    const combinedFieldValidityData = React38.useMemo(() => getCombinedFieldValidityData(validityData, invalid2), [validityData, invalid2]);
    const isInvalid = combinedFieldValidityData.state.valid === false;
    const {
      transitionStatus
    } = useTransitionStatus(isInvalid);
    const fieldValidityState = React38.useMemo(() => {
      return {
        ...combinedFieldValidityData,
        validity: combinedFieldValidityData.state,
        transitionStatus
      };
    }, [combinedFieldValidityData, transitionStatus]);
    return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(React38.Fragment, {
      children: children(fieldValidityState)
    });
  };
  if (true) FieldValidity.displayName = "FieldValidity";

  // node_modules/@base-ui/react/field/item/FieldItem.mjs
  var React39 = __toESM(require_react(), 1);
  var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1);
  var FieldItem = /* @__PURE__ */ React39.forwardRef(function FieldItem2(componentProps, forwardedRef) {
    const {
      render,
      className,
      style: style2,
      disabled: disabledProp = false,
      ...elementProps
    } = componentProps;
    const {
      state: fieldState,
      disabled: rootDisabled
    } = useFieldRootContext(false);
    const disabled2 = rootDisabled || disabledProp;
    const state = {
      ...fieldState,
      disabled: disabled2
    };
    const fieldItemContext = React39.useMemo(() => ({
      disabled: disabled2
    }), [disabled2]);
    const element = useRenderElement("div", componentProps, {
      ref: forwardedRef,
      state,
      props: elementProps,
      stateAttributesMapping: fieldValidityMapping
    });
    return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(LabelableProvider, {
      children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(FieldItemContext.Provider, {
        value: fieldItemContext,
        children: element
      })
    });
  });
  if (true) FieldItem.displayName = "FieldItem";

  // node_modules/@base-ui/react/input/Input.mjs
  var React40 = __toESM(require_react(), 1);
  var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1);
  var Input = /* @__PURE__ */ React40.forwardRef(function Input2(props, forwardedRef) {
    return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(index_parts_exports.Control, {
      ref: forwardedRef,
      ...props
    });
  });
  if (true) Input.displayName = "Input";

  // node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
  var React42 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
  var React41 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/internals/composite/constants.mjs
  var ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";

  // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
  function useCompositeRoot(params) {
    const {
      loopFocus = true,
      orientation = "both",
      grid,
      onLoop,
      direction,
      highlightedIndex: externalHighlightedIndex,
      onHighlightedIndexChange: externalSetHighlightedIndex,
      rootRef: externalRef,
      enableHomeAndEndKeys = false,
      stopEventPropagation,
      disabledIndices,
      modifierKeys = EMPTY_ARRAY
    } = params;
    const [internalHighlightedIndex, internalSetHighlightedIndex] = React41.useState(0);
    const isGrid = grid != null;
    const rootRef = React41.useRef(null);
    const mergedRef = useMergedRefs(rootRef, externalRef);
    const elementsRef = React41.useRef([]);
    const hasSetDefaultIndexRef = React41.useRef(false);
    const highlightedElementRef = React41.useRef(null);
    const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;
    const onHighlightedIndexChange = useStableCallback((index2, shouldScrollIntoView = false) => {
      highlightedElementRef.current = elementsRef.current[index2] ?? null;
      (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index2);
      if (shouldScrollIntoView) {
        const newActiveItem = elementsRef.current[index2];
        scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);
      }
    });
    const onMapChange = useStableCallback((map) => {
      if (map.size === 0) {
        return;
      }
      if (hasSetDefaultIndexRef.current) {
        const elements = elementsRef.current;
        const nextIndex = elements.indexOf(highlightedElementRef.current);
        if (nextIndex === -1) {
          const replacement = elements[highlightedIndex];
          if (!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {
            onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices));
          } else {
            highlightedElementRef.current = replacement;
          }
        } else if (nextIndex !== highlightedIndex) {
          onHighlightedIndexChange(nextIndex);
        }
        return;
      }
      hasSetDefaultIndexRef.current = true;
      const sortedElements = Array.from(map.keys());
      const activeItem = sortedElements.find((compositeElement) => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;
      const activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;
      if (activeIndex !== -1) {
        onHighlightedIndexChange(activeIndex);
      } else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {
        const firstEnabledIndex = findNonDisabledListIndex(sortedElements, {
          disabledIndices
        });
        if (!isIndexOutOfListBounds(sortedElements, firstEnabledIndex)) {
          onHighlightedIndexChange(firstEnabledIndex);
        }
      }
      scrollIntoViewIfNeeded(rootRef.current, activeItem, direction, orientation);
    });
    useIsoLayoutEffect(() => {
      if (disabledIndices == null || externalHighlightedIndex != null || !hasSetDefaultIndexRef.current) {
        return;
      }
      const elements = elementsRef.current;
      if (isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {
        const firstEnabledIndex = findNonDisabledListIndex(elements, {
          disabledIndices
        });
        if (!isIndexOutOfListBounds(elements, firstEnabledIndex)) {
          onHighlightedIndexChange(firstEnabledIndex);
        }
      }
    }, [disabledIndices, externalHighlightedIndex, highlightedIndex, elementsRef, onHighlightedIndexChange]);
    const wrappedOnLoop = useStableCallback((event, prevIndex, nextIndex) => {
      if (!onLoop) {
        return nextIndex;
      }
      return onLoop(event, prevIndex, nextIndex, elementsRef);
    });
    const onKeyDown = useStableCallback((event) => {
      const isHomeOrEnd = event.key === HOME || event.key === END;
      if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd) {
        return;
      }
      if (isModifierKeySet(event, modifierKeys)) {
        return;
      }
      const element = rootRef.current;
      if (!element) {
        return;
      }
      const isRtl = direction === "rtl";
      const horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT;
      const horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT;
      const forwardKey = orientation === "vertical" ? ARROW_DOWN : horizontalForwardKey;
      const backwardKey = orientation === "vertical" ? ARROW_UP : horizontalBackwardKey;
      const target = getTarget(event.nativeEvent);
      if (target != null && isNativeInput(target) && !isElementDisabled(target)) {
        const selectionStart = target.selectionStart;
        const selectionEnd = target.selectionEnd;
        const textContent = target.value;
        if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd) {
          return;
        }
        if (event.key !== backwardKey && selectionStart < textContent.length) {
          return;
        }
        if (event.key !== forwardKey && selectionStart > 0) {
          return;
        }
      }
      let nextIndex = highlightedIndex;
      const minIndex = getMinListIndex(elementsRef, disabledIndices);
      const maxIndex = getMaxListIndex(elementsRef, disabledIndices);
      if (grid != null) {
        nextIndex = grid({
          disabledIndices,
          elementsRef,
          event,
          highlightedIndex,
          loopFocus,
          maxIndex,
          minIndex,
          onLoop: wrappedOnLoop,
          orientation,
          rtl: isRtl
        });
      }
      const isForwardKey = orientation !== "vertical" && event.key === horizontalForwardKey || orientation !== "horizontal" && event.key === ARROW_DOWN;
      const isBackwardKey = orientation !== "vertical" && event.key === horizontalBackwardKey || orientation !== "horizontal" && event.key === ARROW_UP;
      if (enableHomeAndEndKeys) {
        if (event.key === HOME) {
          nextIndex = minIndex;
        } else if (event.key === END) {
          nextIndex = maxIndex;
        }
      }
      if (nextIndex === highlightedIndex && (isForwardKey || isBackwardKey)) {
        if (loopFocus && nextIndex === maxIndex && isForwardKey) {
          nextIndex = minIndex;
          if (onLoop) {
            nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);
          }
        } else if (loopFocus && nextIndex === minIndex && isBackwardKey) {
          nextIndex = maxIndex;
          if (onLoop) {
            nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);
          }
        } else {
          nextIndex = findNonDisabledListIndex(elementsRef.current, {
            startingIndex: nextIndex,
            decrement: isBackwardKey,
            disabledIndices
          });
        }
      }
      if (nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex)) {
        if (stopEventPropagation) {
          event.stopPropagation();
        }
        if (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) {
          event.preventDefault();
        }
        onHighlightedIndexChange(nextIndex, true);
        queueMicrotask(() => {
          elementsRef.current[nextIndex]?.focus();
        });
      }
    });
    const props = {
      ref: mergedRef,
      onFocus(event) {
        const element = rootRef.current;
        const target = getTarget(event.nativeEvent);
        if (!element || target == null || !isNativeInput(target)) {
          return;
        }
        target.setSelectionRange(0, target.value.length);
      },
      onKeyDown
    };
    return {
      props,
      highlightedIndex,
      onHighlightedIndexChange,
      elementsRef,
      onMapChange,
      relayKeyboardEvent: onKeyDown
    };
  }
  function getFallbackIndex(elements, disabledIndices) {
    let fallbackIndex = -1;
    for (let index2 = 0; index2 < elements.length; index2 += 1) {
      const element = elements[index2];
      if (!element || isListIndexDisabled(elements, index2, disabledIndices)) {
        continue;
      }
      if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM)) {
        return index2;
      }
      if (fallbackIndex === -1) {
        fallbackIndex = index2;
      }
    }
    return Math.max(fallbackIndex, 0);
  }
  function isModifierKeySet(event, ignoredModifierKeys) {
    for (const key of MODIFIER_KEYS) {
      if (ignoredModifierKeys.includes(key)) {
        continue;
      }
      if (event.getModifierState(key)) {
        return true;
      }
    }
    return false;
  }

  // node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
  var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1);
  function CompositeRoot(componentProps) {
    const {
      render,
      className,
      style: style2,
      refs = EMPTY_ARRAY,
      props = EMPTY_ARRAY,
      state = EMPTY_OBJECT,
      stateAttributesMapping: stateAttributesMapping4,
      highlightedIndex: highlightedIndexProp,
      onHighlightedIndexChange: onHighlightedIndexChangeProp,
      orientation,
      grid,
      loopFocus,
      onLoop,
      enableHomeAndEndKeys,
      onMapChange: onMapChangeProp,
      stopEventPropagation = true,
      rootRef,
      disabledIndices,
      modifierKeys,
      highlightItemOnHover = false,
      tag = "div",
      ...elementProps
    } = componentProps;
    const direction = useDirection();
    const {
      props: defaultProps,
      highlightedIndex,
      onHighlightedIndexChange,
      elementsRef,
      onMapChange: onMapChangeUnwrapped,
      relayKeyboardEvent
    } = useCompositeRoot({
      grid,
      loopFocus,
      onLoop,
      orientation,
      highlightedIndex: highlightedIndexProp,
      onHighlightedIndexChange: onHighlightedIndexChangeProp,
      rootRef,
      stopEventPropagation,
      enableHomeAndEndKeys,
      direction,
      disabledIndices,
      modifierKeys
    });
    const element = useRenderElement(tag, componentProps, {
      state,
      ref: refs,
      props: [defaultProps, ...props, elementProps],
      stateAttributesMapping: stateAttributesMapping4
    });
    const contextValue = React42.useMemo(() => ({
      highlightedIndex,
      onHighlightedIndexChange,
      highlightItemOnHover,
      relayKeyboardEvent
    }), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);
    return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(CompositeRootContext.Provider, {
      value: contextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(CompositeList, {
        elementsRef,
        onMapChange: (newMap) => {
          onMapChangeProp?.(newMap);
          onMapChangeUnwrapped(newMap);
        },
        children: element
      })
    });
  }

  // node_modules/@base-ui/react/internals/prehydrationScript.stub.mjs
  var script = "";

  // node_modules/@base-ui/react/utils/useIsHydrating.mjs
  var import_shim = __toESM(require_shim(), 1);
  function subscribe() {
    return NOOP;
  }
  function getSnapshot() {
    return false;
  }
  function getServerSnapshot() {
    return true;
  }
  function useIsHydrating() {
    return (0, import_shim.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
  }

  // node_modules/@base-ui/react/internals/PrehydrationScript.mjs
  var React43 = __toESM(require_react(), 1);
  var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1);
  function PrehydrationScript(props) {
    const {
      script: script2
    } = props;
    const {
      nonce
    } = useCSPContext();
    const isHydrating = useIsHydrating();
    if (!isHydrating) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("script", {
      nonce,
      dangerouslySetInnerHTML: {
        __html: script2
      },
      suppressHydrationWarning: true
    });
  }

  // node_modules/@base-ui/react/tabs/index.parts.mjs
  var index_parts_exports2 = {};
  __export(index_parts_exports2, {
    Indicator: () => TabsIndicator,
    List: () => TabsList,
    Panel: () => TabsPanel,
    Root: () => TabsRoot,
    Tab: () => TabsTab
  });

  // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
  var React45 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/tabs/root/TabsRootContext.mjs
  var React44 = __toESM(require_react(), 1);
  var TabsRootContext = /* @__PURE__ */ React44.createContext(void 0);
  if (true) TabsRootContext.displayName = "TabsRootContext";
  function useTabsRootContext() {
    const context = React44.useContext(TabsRootContext);
    if (context === void 0) {
      throw new Error(true ? "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>." : formatErrorMessage_default(64));
    }
    return context;
  }

  // node_modules/@base-ui/react/tabs/root/TabsRootDataAttributes.mjs
  var activationDirection = "data-activation-direction";

  // node_modules/@base-ui/react/tabs/root/stateAttributesMapping.mjs
  var tabsStateAttributesMapping = {
    tabActivationDirection: (dir) => ({
      [activationDirection]: dir
    })
  };

  // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
  var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
  var TabsRoot = /* @__PURE__ */ React45.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
    const {
      className,
      defaultValue: defaultValueProp = 0,
      onValueChange: onValueChangeProp,
      orientation = "horizontal",
      render,
      value: valueProp,
      style: style2,
      ...elementProps
    } = componentProps;
    const hasExplicitDefaultValueProp = componentProps.defaultValue !== void 0;
    const tabPanelRefs = React45.useRef([]);
    const [mountedTabPanels, setMountedTabPanels] = React45.useState(() => /* @__PURE__ */ new Map());
    const [value, setValue] = useControlled({
      controlled: valueProp,
      default: defaultValueProp,
      name: "Tabs",
      state: "value"
    });
    const isControlled = valueProp !== void 0;
    const [tabMap, setTabMap] = React45.useState(() => /* @__PURE__ */ new Map());
    const lastKnownTabElementRef = React45.useRef(void 0);
    const getTabElementBySelectedValue = React45.useCallback((selectedValue) => findTabElement(tabMap, selectedValue), [tabMap]);
    const [activationDirectionState, setActivationDirectionState] = React45.useState(() => ({
      previousValue: value,
      tabActivationDirection: "none"
    }));
    const {
      previousValue,
      tabActivationDirection: committedTabActivationDirection
    } = activationDirectionState;
    let tabActivationDirection = committedTabActivationDirection;
    let directionComputationIncomplete = false;
    if (previousValue !== value) {
      tabActivationDirection = computeActivationDirection(previousValue, value, orientation, tabMap);
      directionComputationIncomplete = previousValue != null && value != null && getTabElementBySelectedValue(value) == null;
    }
    const nextPreviousValue = directionComputationIncomplete ? previousValue : value;
    const shouldSyncActivationDirectionState = previousValue !== nextPreviousValue || committedTabActivationDirection !== tabActivationDirection;
    useIsoLayoutEffect(() => {
      if (!shouldSyncActivationDirectionState) {
        return;
      }
      setActivationDirectionState({
        previousValue: nextPreviousValue,
        tabActivationDirection
      });
    }, [nextPreviousValue, shouldSyncActivationDirectionState, tabActivationDirection]);
    const onValueChange = useStableCallback((newValue, eventDetails) => {
      const activationDirection2 = computeActivationDirection(value, newValue, orientation, tabMap);
      eventDetails.activationDirection = activationDirection2;
      onValueChangeProp?.(newValue, eventDetails);
      if (eventDetails.isCanceled) {
        return;
      }
      setValue(newValue);
    });
    const notifyAutomaticValueChange = useStableCallback((nextValue, reason) => {
      onValueChangeProp?.(nextValue, createChangeEventDetails(reason, void 0, void 0, {
        activationDirection: "none"
      }));
    });
    const registerMountedTabPanel = useStableCallback((panelValue, panelId) => {
      setMountedTabPanels((prev) => {
        const next2 = new Map(prev);
        next2.set(panelValue, panelId);
        return next2;
      });
      return () => {
        setMountedTabPanels((prev) => {
          if (prev.get(panelValue) !== panelId) {
            return prev;
          }
          const next2 = new Map(prev);
          next2.delete(panelValue);
          return next2;
        });
      };
    });
    const getTabPanelIdByValue = React45.useCallback((tabValue) => {
      return mountedTabPanels.get(tabValue);
    }, [mountedTabPanels]);
    const getTabIdByPanelValue = React45.useCallback((tabPanelValue) => {
      for (const tabMetadata of tabMap.values()) {
        if (tabPanelValue === tabMetadata.value) {
          return tabMetadata.id;
        }
      }
      return void 0;
    }, [tabMap]);
    const tabsContextValue = React45.useMemo(() => ({
      getTabElementBySelectedValue,
      getTabIdByPanelValue,
      getTabPanelIdByValue,
      onValueChange,
      orientation,
      registerMountedTabPanel,
      setTabMap,
      tabActivationDirection,
      value
    }), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, tabActivationDirection, value]);
    const selectedTabMetadata = React45.useMemo(() => {
      for (const tabMetadata of tabMap.values()) {
        if (tabMetadata.value === value) {
          return tabMetadata;
        }
      }
      return void 0;
    }, [tabMap, value]);
    const firstEnabledTabValue = React45.useMemo(() => {
      for (const tabMetadata of tabMap.values()) {
        if (!tabMetadata.disabled) {
          return tabMetadata.value;
        }
      }
      return void 0;
    }, [tabMap]);
    const shouldNotifyInitialValueChangeRef = React45.useRef(!hasExplicitDefaultValueProp);
    const initialDefaultValueRef = React45.useRef(defaultValueProp);
    const shouldHonorDisabledDefaultValueRef = React45.useRef(hasExplicitDefaultValueProp);
    const didRegisterTabsRef = React45.useRef(false);
    useIsoLayoutEffect(() => {
      if (isControlled) {
        return;
      }
      function commitAutomaticValueChange(fallbackValue, fallbackReason) {
        setValue(fallbackValue);
        setActivationDirectionState({
          previousValue: fallbackValue,
          tabActivationDirection: "none"
        });
        notifyAutomaticValueChange(fallbackValue, fallbackReason);
        shouldNotifyInitialValueChangeRef.current = false;
      }
      if (tabMap.size === 0) {
        if (didRegisterTabsRef.current && value !== null && !lastKnownTabElementRef.current?.isConnected) {
          commitAutomaticValueChange(null, reason_parts_exports.missing);
        }
        return;
      }
      didRegisterTabsRef.current = true;
      lastKnownTabElementRef.current = tabMap.keys().next().value;
      const selectionIsDisabled = selectedTabMetadata?.disabled;
      const selectionIsMissing = selectedTabMetadata == null && value !== null;
      if (!selectionIsDisabled && value === initialDefaultValueRef.current) {
        shouldHonorDisabledDefaultValueRef.current = false;
      }
      if (shouldHonorDisabledDefaultValueRef.current && selectionIsDisabled && value === initialDefaultValueRef.current) {
        return;
      }
      const shouldNotifyInitialValueChange = shouldNotifyInitialValueChangeRef.current;
      if (selectionIsDisabled || selectionIsMissing) {
        const fallbackValue = firstEnabledTabValue ?? null;
        if (value === fallbackValue) {
          shouldNotifyInitialValueChangeRef.current = false;
          return;
        }
        let fallbackReason = reason_parts_exports.missing;
        if (shouldNotifyInitialValueChange) {
          fallbackReason = reason_parts_exports.initial;
        } else if (selectionIsDisabled) {
          fallbackReason = reason_parts_exports.disabled;
        }
        commitAutomaticValueChange(fallbackValue, fallbackReason);
        return;
      }
      if (shouldNotifyInitialValueChange && selectedTabMetadata != null) {
        notifyAutomaticValueChange(value, reason_parts_exports.initial);
        shouldNotifyInitialValueChangeRef.current = false;
      }
    }, [firstEnabledTabValue, isControlled, notifyAutomaticValueChange, selectedTabMetadata, setValue, tabMap, value]);
    const state = {
      orientation,
      tabActivationDirection
    };
    const element = useRenderElement("div", componentProps, {
      state,
      ref: forwardedRef,
      props: elementProps,
      stateAttributesMapping: tabsStateAttributesMapping
    });
    return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(TabsRootContext.Provider, {
      value: tabsContextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(CompositeList, {
        elementsRef: tabPanelRefs,
        children: element
      })
    });
  });
  if (true) TabsRoot.displayName = "TabsRoot";
  function findTabElement(tabMap, value) {
    for (const [tabElement, tabMetadata] of tabMap.entries()) {
      if (value === tabMetadata.value) {
        return tabElement;
      }
    }
    return null;
  }
  function computeActivationDirection(oldValue, newValue, orientation, tabMap) {
    if (oldValue == null || newValue == null) {
      return "none";
    }
    const [positionProp, backward, forward] = orientation === "horizontal" ? ["left", "left", "right"] : ["top", "up", "down"];
    const oldTab = findTabElement(tabMap, oldValue);
    const newTab = findTabElement(tabMap, newValue);
    if (oldTab == null || newTab == null) {
      if (oldTab !== newTab && (typeof oldValue === "number" || typeof oldValue === "string") && typeof oldValue === typeof newValue) {
        return newValue > oldValue ? forward : backward;
      }
      return "none";
    }
    const oldPosition = oldTab.getBoundingClientRect()[positionProp];
    const newPosition = newTab.getBoundingClientRect()[positionProp];
    if (newPosition < oldPosition) {
      return backward;
    }
    if (newPosition > oldPosition) {
      return forward;
    }
    return "none";
  }

  // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
  var React47 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/tabs/list/TabsListContext.mjs
  var React46 = __toESM(require_react(), 1);
  var TabsListContext = /* @__PURE__ */ React46.createContext(void 0);
  if (true) TabsListContext.displayName = "TabsListContext";
  function useTabsListContext() {
    const context = React46.useContext(TabsListContext);
    if (context === void 0) {
      throw new Error(true ? "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>." : formatErrorMessage_default(65));
    }
    return context;
  }

  // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
  var TabsTab = /* @__PURE__ */ React47.forwardRef(function TabsTab2(componentProps, forwardedRef) {
    const {
      className,
      disabled: disabled2 = false,
      render,
      value,
      id: idProp,
      nativeButton = true,
      style: style2,
      ...elementProps
    } = componentProps;
    const {
      value: activeTabValue,
      getTabPanelIdByValue,
      onValueChange,
      orientation,
      tabActivationDirection
    } = useTabsRootContext();
    const {
      activateOnFocus,
      registerTabResizeObserverElement,
      tabsListElement
    } = useTabsListContext();
    const {
      highlightedIndex,
      onHighlightedIndexChange
    } = useCompositeRootContext();
    const id = useBaseUiId(idProp);
    const tabMetadata = React47.useMemo(() => ({
      disabled: disabled2,
      id,
      value
    }), [disabled2, id, value]);
    const {
      compositeProps,
      compositeRef,
      index: index2
      // hook is used instead of the CompositeItem component
      // because the index is needed for Tab internals
    } = useCompositeItem({
      metadata: tabMetadata
    });
    const active = value === activeTabValue;
    const isNavigatingRef = React47.useRef(false);
    const unobserveTabElementRef = React47.useRef(null);
    const observeTabElement = useStableCallback((element2) => {
      unobserveTabElementRef.current?.();
      unobserveTabElementRef.current = element2 ? registerTabResizeObserverElement(element2) : null;
    });
    useIsoLayoutEffect(() => {
      if (isNavigatingRef.current) {
        isNavigatingRef.current = false;
        return;
      }
      if (!(active && index2 > -1 && highlightedIndex !== index2)) {
        return;
      }
      const listElement = tabsListElement;
      if (listElement != null) {
        const activeEl = activeElement(ownerDocument(listElement));
        if (activeEl && contains(listElement, activeEl)) {
          return;
        }
      }
      if (!disabled2) {
        onHighlightedIndexChange(index2);
      }
    }, [active, index2, highlightedIndex, onHighlightedIndexChange, disabled2, tabsListElement]);
    const {
      getButtonProps,
      buttonRef
    } = useButton({
      disabled: disabled2,
      native: nativeButton,
      focusableWhenDisabled: true
    });
    const tabPanelId = getTabPanelIdByValue(value);
    const isPressingRef = React47.useRef(false);
    const isMainButtonRef = React47.useRef(false);
    function activate(event) {
      onValueChange(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
        activationDirection: "none"
      }));
    }
    function onClick(event) {
      if (active || disabled2) {
        return;
      }
      activate(event);
    }
    function onFocus(event) {
      if (active || disabled2) {
        return;
      }
      if (activateOnFocus && (!isPressingRef.current || // keyboard or touch focus
      isMainButtonRef.current)) {
        activate(event);
      }
    }
    function onPointerDown(event) {
      if (active || disabled2) {
        return;
      }
      isPressingRef.current = true;
      isMainButtonRef.current = event.button === 0;
      const doc = ownerDocument(event.currentTarget);
      function handlePointerEnd() {
        isPressingRef.current = false;
        isMainButtonRef.current = false;
        doc.removeEventListener("pointerup", handlePointerEnd);
        doc.removeEventListener("pointercancel", handlePointerEnd);
      }
      doc.addEventListener("pointerup", handlePointerEnd);
      doc.addEventListener("pointercancel", handlePointerEnd);
    }
    const state = {
      disabled: disabled2,
      active,
      orientation,
      tabActivationDirection
    };
    const element = useRenderElement("button", componentProps, {
      state,
      ref: [forwardedRef, buttonRef, compositeRef, observeTabElement],
      props: [compositeProps, {
        role: "tab",
        "aria-controls": tabPanelId,
        "aria-selected": active,
        id,
        onClick,
        onFocus,
        onPointerDown,
        [ACTIVE_COMPOSITE_ITEM]: active ? "" : void 0,
        onKeyDownCapture() {
          isNavigatingRef.current = true;
        }
      }, elementProps, getButtonProps],
      stateAttributesMapping: tabsStateAttributesMapping
    });
    return element;
  });
  if (true) TabsTab.displayName = "TabsTab";

  // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
  var React48 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/tabs/indicator/TabsIndicatorCssVars.mjs
  var activeTabLeft = "--active-tab-left";
  var activeTabRight = "--active-tab-right";
  var activeTabTop = "--active-tab-top";
  var activeTabBottom = "--active-tab-bottom";
  var activeTabWidth = "--active-tab-width";
  var activeTabHeight = "--active-tab-height";

  // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
  var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1);
  var _PrehydrationScript;
  var stateAttributesMapping2 = {
    ...tabsStateAttributesMapping,
    activeTabPosition: () => null,
    activeTabSize: () => null
  };
  var MAX_LAYOUT_ROUNDING_ERROR = 2;
  var TabsIndicator = /* @__PURE__ */ React48.forwardRef(function TabsIndicator2(componentProps, forwardedRef) {
    const {
      className,
      render,
      renderBeforeHydration = false,
      style: styleProp,
      ...elementProps
    } = componentProps;
    const {
      getTabElementBySelectedValue,
      orientation,
      tabActivationDirection,
      value
    } = useTabsRootContext();
    const {
      tabsListElement,
      registerIndicatorUpdateListener
    } = useTabsListContext();
    const rerender = useForcedRerendering();
    React48.useEffect(() => {
      return registerIndicatorUpdateListener(rerender);
    }, [registerIndicatorUpdateListener, rerender]);
    let left = 0;
    let right = 0;
    let top = 0;
    let bottom = 0;
    let width = 0;
    let height = 0;
    let isTabSelected = false;
    if (value != null && tabsListElement != null) {
      const activeTab = getTabElementBySelectedValue(value);
      if (activeTab != null) {
        isTabSelected = true;
        const {
          width: computedWidth,
          height: computedHeight
        } = getCssDimensions(activeTab);
        const {
          width: tabListWidth,
          height: tabListHeight
        } = getCssDimensions(tabsListElement);
        const tabRect = activeTab.getBoundingClientRect();
        const tabsListRect = tabsListElement.getBoundingClientRect();
        const scaleX = tabListWidth > 0 ? tabsListRect.width / tabListWidth : 1;
        const scaleY = tabListHeight > 0 ? tabsListRect.height / tabListHeight : 1;
        const layoutOffset = getLayoutOffset(activeTab, tabsListElement);
        left = layoutOffset.left;
        top = layoutOffset.top;
        const rectLeft = (tabRect.left - tabsListRect.left) / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
        const rectTop = (tabRect.top - tabsListRect.top) / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
        const tabTranslation = getActiveTabTranslation(activeTab);
        if (Math.abs(rectLeft - tabTranslation.x - left) <= MAX_LAYOUT_ROUNDING_ERROR && Math.abs(rectTop - tabTranslation.y - top) <= MAX_LAYOUT_ROUNDING_ERROR) {
          left = rectLeft;
          top = rectTop;
        }
        width = computedWidth;
        height = computedHeight;
        right = tabsListElement.scrollWidth - left - width;
        bottom = tabsListElement.scrollHeight - top - height;
      }
    }
    const activeTabPosition = isTabSelected ? {
      left,
      right,
      top,
      bottom
    } : null;
    const activeTabSize = isTabSelected ? {
      width,
      height
    } : null;
    const style2 = isTabSelected ? {
      [activeTabLeft]: `${left}px`,
      [activeTabRight]: `${right}px`,
      [activeTabTop]: `${top}px`,
      [activeTabBottom]: `${bottom}px`,
      [activeTabWidth]: `${width}px`,
      [activeTabHeight]: `${height}px`
    } : void 0;
    const displayIndicator = isTabSelected && width > 0 && height > 0;
    const state = {
      orientation,
      activeTabPosition,
      activeTabSize,
      tabActivationDirection
    };
    const element = useRenderElement("span", componentProps, {
      state,
      ref: forwardedRef,
      props: [{
        role: "presentation",
        style: style2,
        hidden: !displayIndicator
        // do not display the indicator before the layout is settled
      }, elementProps, {
        suppressHydrationWarning: true
      }],
      stateAttributesMapping: stateAttributesMapping2
    });
    if (value == null) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(React48.Fragment, {
      children: [element, renderBeforeHydration && (_PrehydrationScript || (_PrehydrationScript = /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(PrehydrationScript, {
        script
      })))]
    });
  });
  if (true) TabsIndicator.displayName = "TabsIndicator";
  function getLayoutOffset(element, ancestor) {
    const elementOffset = getCumulativeOffset(element);
    const ancestorOffset = getCumulativeOffset(ancestor);
    let left = elementOffset.left - ancestorOffset.left - ancestor.clientLeft;
    let top = elementOffset.top - ancestorOffset.top - ancestor.clientTop;
    let node = getParentNode(element);
    while (isHTMLElement(node) && node !== ancestor && !isLastTraversableNode(node)) {
      left -= node.scrollLeft;
      top -= node.scrollTop;
      node = getParentNode(node);
    }
    return {
      left,
      top
    };
  }
  function getCumulativeOffset(element) {
    let left = 0;
    let top = 0;
    let currentElement = element;
    while (currentElement != null) {
      left += currentElement.offsetLeft;
      top += currentElement.offsetTop;
      const offsetParent = currentElement.offsetParent;
      if (offsetParent != null) {
        left += offsetParent.clientLeft;
        top += offsetParent.clientTop;
      }
      currentElement = offsetParent;
    }
    return {
      left,
      top
    };
  }
  function getActiveTabTranslation(element) {
    const computedStyle = getWindow(element).getComputedStyle(element);
    const {
      x: x3,
      y: y2
    } = getElementTransform(element, computedStyle);
    let translateX = x3;
    let translateY = y2;
    const {
      translate
    } = computedStyle;
    if (translate && translate !== "none") {
      const parts = translate.split(" ");
      translateX += resolveTranslateLength(parts[0], element.offsetWidth);
      translateY += resolveTranslateLength(parts[1], element.offsetHeight);
    }
    return {
      x: translateX,
      y: translateY
    };
  }
  function resolveTranslateLength(value, referenceSize) {
    if (!value) {
      return 0;
    }
    const numeric = parseFloat(value);
    if (!Number.isFinite(numeric)) {
      return 0;
    }
    return value.endsWith("%") ? numeric / 100 * referenceSize : numeric;
  }

  // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
  var React49 = __toESM(require_react(), 1);

  // node_modules/@base-ui/react/tabs/panel/TabsPanelDataAttributes.mjs
  var index = "data-index";
  var startingStyle2 = TransitionStatusDataAttributes_exports.startingStyle;
  var endingStyle2 = TransitionStatusDataAttributes_exports.endingStyle;

  // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
  var stateAttributesMapping3 = {
    ...tabsStateAttributesMapping,
    ...transitionStatusMapping
  };
  var TabsPanel = /* @__PURE__ */ React49.forwardRef(function TabsPanel2(componentProps, forwardedRef) {
    const {
      className,
      value,
      render,
      keepMounted = false,
      style: style2,
      ...elementProps
    } = componentProps;
    const {
      value: selectedValue,
      getTabIdByPanelValue,
      orientation,
      tabActivationDirection,
      registerMountedTabPanel
    } = useTabsRootContext();
    const id = useBaseUiId();
    const {
      ref: listItemRef,
      index: index2
    } = useCompositeListItem();
    const open = value === selectedValue;
    const {
      mounted,
      transitionStatus,
      setMounted
    } = useTransitionStatus(open);
    const hidden = !mounted;
    const correspondingTabId = getTabIdByPanelValue(value);
    const state = {
      hidden,
      orientation,
      tabActivationDirection,
      transitionStatus
    };
    const panelRef = React49.useRef(null);
    const element = useRenderElement("div", componentProps, {
      state,
      ref: [forwardedRef, listItemRef, panelRef],
      props: [{
        "aria-labelledby": correspondingTabId,
        hidden,
        id,
        role: "tabpanel",
        tabIndex: open ? 0 : -1,
        inert: inertValue(!open),
        // Computed key: a plain literal key fails the DOM-props excess property check.
        [index]: index2
      }, elementProps],
      stateAttributesMapping: stateAttributesMapping3
    });
    useOpenChangeComplete({
      open,
      ref: panelRef,
      onComplete() {
        if (!open) {
          setMounted(false);
        }
      }
    });
    useIsoLayoutEffect(() => {
      if (id == null || hidden && !keepMounted) {
        return void 0;
      }
      return registerMountedTabPanel(value, id);
    }, [hidden, keepMounted, value, id, registerMountedTabPanel]);
    const shouldRender = keepMounted || mounted;
    if (!shouldRender) {
      return null;
    }
    return element;
  });
  if (true) TabsPanel.displayName = "TabsPanel";

  // node_modules/@base-ui/react/tabs/list/TabsList.mjs
  var React50 = __toESM(require_react(), 1);
  var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1);
  var TabsList = /* @__PURE__ */ React50.forwardRef(function TabsList2(componentProps, forwardedRef) {
    const {
      activateOnFocus = false,
      className,
      loopFocus = true,
      render,
      style: style2,
      ...elementProps
    } = componentProps;
    const {
      orientation,
      setTabMap,
      tabActivationDirection
    } = useTabsRootContext();
    const [highlightedTabIndex, setHighlightedTabIndex] = React50.useState(0);
    const [tabsListElement, setTabsListElement] = React50.useState(null);
    const indicatorUpdateListenersRef = React50.useRef(/* @__PURE__ */ new Set());
    const tabResizeObserverElementsRef = React50.useRef(/* @__PURE__ */ new Set());
    const resizeObserverRef = React50.useRef(null);
    useIsoLayoutEffect(() => {
      if (typeof ResizeObserver === "undefined") {
        return void 0;
      }
      const resizeObserver = new ResizeObserver(() => {
        indicatorUpdateListenersRef.current.forEach((listener) => {
          listener();
        });
      });
      resizeObserverRef.current = resizeObserver;
      if (tabsListElement) {
        resizeObserver.observe(tabsListElement);
      }
      tabResizeObserverElementsRef.current.forEach((element) => {
        resizeObserver.observe(element);
      });
      return () => {
        resizeObserver.disconnect();
        resizeObserverRef.current = null;
      };
    }, [tabsListElement]);
    const registerIndicatorUpdateListener = useStableCallback((listener) => {
      indicatorUpdateListenersRef.current.add(listener);
      return () => {
        indicatorUpdateListenersRef.current.delete(listener);
      };
    });
    const registerTabResizeObserverElement = useStableCallback((element) => {
      tabResizeObserverElementsRef.current.add(element);
      resizeObserverRef.current?.observe(element);
      return () => {
        tabResizeObserverElementsRef.current.delete(element);
        resizeObserverRef.current?.unobserve(element);
      };
    });
    const state = {
      orientation,
      tabActivationDirection
    };
    const defaultProps = {
      "aria-orientation": orientation === "vertical" ? "vertical" : void 0,
      role: "tablist"
    };
    const tabsListContextValue = React50.useMemo(() => ({
      activateOnFocus,
      registerIndicatorUpdateListener,
      registerTabResizeObserverElement,
      tabsListElement
    }), [activateOnFocus, registerIndicatorUpdateListener, registerTabResizeObserverElement, tabsListElement]);
    return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(TabsListContext.Provider, {
      value: tabsListContextValue,
      children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(CompositeRoot, {
        render,
        className,
        style: style2,
        state,
        refs: [forwardedRef, setTabsListElement],
        props: [defaultProps, elementProps],
        stateAttributesMapping: tabsStateAttributesMapping,
        highlightedIndex: highlightedTabIndex,
        enableHomeAndEndKeys: true,
        loopFocus,
        orientation,
        onHighlightedIndexChange: setHighlightedTabIndex,
        onMapChange: setTabMap,
        disabledIndices: EMPTY_ARRAY
      })
    });
  });
  if (true) TabsList.displayName = "TabsList";

  // node_modules/@base-ui/react/use-render/useRender.mjs
  function useRender(params) {
    return useRenderElement(params.defaultTagName ?? "div", params, params);
  }

  // packages/ui/build-module/text/text.mjs
  var import_element5 = __toESM(require_element(), 1);
  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
  function getRuntime() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument(targetDocument) {
    const runtime = getRuntime();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle(hash, css) {
    const runtime = getRuntime();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    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)}}}');
  }
  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" };
  if (typeof process === "undefined" || true) {
    registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  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" };
  var Text2 = (0, import_element5.forwardRef)(function Text22({ variant = "body-md", render, className, ...props }, ref) {
    const element = useRender({
      render,
      defaultTagName: "span",
      ref,
      props: mergeProps(props, {
        className: clsx_default(
          style_default.text,
          global_css_defense_default.heading,
          global_css_defense_default.p,
          style_default[variant],
          className
        )
      })
    });
    return element;
  });

  // packages/ui/build-module/badge/badge.mjs
  var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
  function getRuntime2() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument2(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash2(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE2}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle2(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime2();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash2(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument2(targetDocument) {
    const runtime = getRuntime2();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle2(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle2(hash, css) {
    const runtime = getRuntime2();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle2(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    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))}}}");
  }
  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" };
  var Badge = (0, import_element6.forwardRef)(function Badge2({ intent = "none", className, ...props }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
      Text2,
      {
        ref,
        className: clsx_default(
          style_default2.badge,
          style_default2[`is-${intent}-intent`],
          className
        ),
        ...props,
        variant: "body-sm"
      }
    );
  });

  // packages/ui/build-module/utils/direction-provider.mjs
  var import_i18n9 = __toESM(require_i18n(), 1);
  var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
  function DirectionProvider3({ children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(DirectionProvider, { direction: (0, import_i18n9.isRTL)() ? "rtl" : "ltr", children });
  }

  // packages/ui/build-module/link/link.mjs
  var import_element7 = __toESM(require_element(), 1);
  var import_i18n10 = __toESM(require_i18n(), 1);
  var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
  function getRuntime3() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument3(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash3(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE3}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle3(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime3();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash3(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument3(targetDocument) {
    const runtime = getRuntime3();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle3(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle3(hash, css) {
    const runtime = getRuntime3();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle3(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
  }
  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
  if (typeof process === "undefined" || true) {
    registerStyle3("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
  }
  var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
  if (typeof process === "undefined" || true) {
    registerStyle3("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
  }
  var style_default3 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
  if (typeof process === "undefined" || true) {
    registerStyle3("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
  var Link = (0, import_element7.forwardRef)(function Link2({
    children,
    variant = "default",
    tone = "brand",
    openInNewTab = false,
    target,
    render,
    className,
    ...props
  }, ref) {
    const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
    const element = useRender({
      render,
      defaultTagName: "a",
      ref,
      props: mergeProps(props, {
        className: clsx_default(
          global_css_defense_default2.a,
          resets_default["box-sizing"],
          focus_module_default["outset-ring--focus-except-active"],
          variant !== "unstyled" && style_default3.link,
          variant !== "unstyled" && style_default3[`is-${tone}`],
          variant === "unstyled" && style_default3["is-unstyled"],
          className
        ),
        target: target ?? (openInNewTab ? "_blank" : void 0),
        children: /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(import_jsx_runtime192.Fragment, { children: [
          children,
          shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
            "span",
            {
              className: style_default3["link-icon"],
              role: "img",
              "aria-label": (
                /* translators: accessibility text appended to link text */
                (0, import_i18n10.__)("(opens in a new tab)")
              )
            }
          )
        ] })
      })
    });
    return element;
  });

  // packages/ui/build-module/icon/icon.mjs
  var import_element8 = __toESM(require_element(), 1);
  var import_primitives163 = __toESM(require_primitives(), 1);
  var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
  var Icon = (0, import_element8.forwardRef)(function Icon2({ icon: icon2, size = 24, style: style2, ...restProps }, ref) {
    const mergedStyle = icon2.props.style || style2 ? { ...icon2.props.style, ...style2 } : void 0;
    return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
      import_primitives163.SVG,
      {
        ref,
        ...icon2.props,
        ...restProps,
        ...mergedStyle ? { style: mergedStyle } : {},
        width: size,
        height: size
      }
    );
  });

  // packages/ui/build-module/visually-hidden/visually-hidden.mjs
  var import_element9 = __toESM(require_element(), 1);
  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
  function getRuntime4() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument4(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash4(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE4}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle4(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime4();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash4(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument4(targetDocument) {
    const runtime = getRuntime4();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle4(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle4(hash, css) {
    const runtime = getRuntime4();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle4(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle4("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
  }
  var style_default4 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
  var VisuallyHidden = (0, import_element9.forwardRef)(
    function VisuallyHidden2({ render, ...restProps }, ref) {
      const element = useRender({
        render,
        ref,
        props: mergeProps(
          { className: style_default4["visually-hidden"] },
          restProps,
          {
            // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
            "data-visually-hidden": ""
          }
        )
      });
      return element;
    }
  );

  // packages/ui/build-module/stack/stack.mjs
  var import_element10 = __toESM(require_element(), 1);
  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
  function getRuntime5() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument5(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash5(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE5}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle5(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime5();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash5(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument5(targetDocument) {
    const runtime = getRuntime5();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle5(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle5(hash, css) {
    const runtime = getRuntime5();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle5(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle5("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
  }
  var style_default5 = { "stack": "_19ce0419607e1896__stack" };
  var gapTokens = {
    xs: "var(--wpds-dimension-gap-xs, 4px)",
    sm: "var(--wpds-dimension-gap-sm, 8px)",
    md: "var(--wpds-dimension-gap-md, 12px)",
    lg: "var(--wpds-dimension-gap-lg, 16px)",
    xl: "var(--wpds-dimension-gap-xl, 24px)",
    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
  };
  var Stack = (0, import_element10.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
    const style2 = {
      gap: gap && gapTokens[gap],
      alignItems: align,
      justifyContent: justify,
      flexDirection: direction,
      flexWrap: wrap
    };
    const element = useRender({
      render,
      ref,
      props: mergeProps(props, { style: style2, className: style_default5.stack })
    });
    return element;
  });

  // packages/ui/build-module/utils/use-schedule-validation.mjs
  var import_compose4 = __toESM(require_compose(), 1);
  var import_element11 = __toESM(require_element(), 1);
  function useScheduleValidation(validate) {
    const validateEvent = (0, import_compose4.useEvent)(validate);
    const timerRef = (0, import_element11.useRef)(null);
    const unmountedRef = (0, import_element11.useRef)(false);
    const scheduleValidation = (0, import_element11.useCallback)(() => {
      if (unmountedRef.current) {
        return;
      }
      if (timerRef.current) {
        clearTimeout(timerRef.current);
      }
      timerRef.current = setTimeout(() => {
        validateEvent();
        timerRef.current = null;
      }, 0);
    }, [validateEvent]);
    (0, import_element11.useEffect)(() => {
      unmountedRef.current = false;
      return () => {
        unmountedRef.current = true;
        if (timerRef.current) {
          clearTimeout(timerRef.current);
        }
      };
    }, []);
    return scheduleValidation;
  }

  // packages/ui/build-module/form/primitives/input/input.mjs
  var import_element14 = __toESM(require_element(), 1);

  // packages/ui/build-module/form/primitives/input-layout/input-layout.mjs
  var import_element12 = __toESM(require_element(), 1);
  var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
  function getRuntime6() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument6(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash6(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE6}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle6(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime6();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash6(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument6(targetDocument) {
    const runtime = getRuntime6();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle6(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle6(hash, css) {
    const runtime = getRuntime6();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle6(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle6("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default3 = { "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" };
  if (typeof process === "undefined" || true) {
    registerStyle6("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
  }
  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
  if (typeof process === "undefined" || true) {
    registerStyle6("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
  }
  var style_default6 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
  var InputLayout = (0, import_element12.forwardRef)(
    function InputLayout2({
      className,
      children,
      visuallyDisabled,
      size = "default",
      isBorderless,
      prefix,
      suffix,
      ...restProps
    }, ref) {
      return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(
        "div",
        {
          ref,
          className: clsx_default(
            global_css_defense_default3.div,
            resets_default2["box-sizing"],
            style_default6["input-layout"],
            style_default6[`is-size-${size}`],
            visuallyDisabled && style_default6["is-disabled"],
            isBorderless && style_default6["is-borderless"],
            className
          ),
          ...restProps,
          children: [
            import_element12.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
              "div",
              {
                className: style_default6["slot-wrapper"],
                "data-slot-type": "prefix",
                children: prefix
              }
            ),
            children,
            import_element12.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
              "div",
              {
                className: style_default6["slot-wrapper"],
                "data-slot-type": "suffix",
                children: suffix
              }
            )
          ]
        }
      );
    }
  );

  // packages/ui/build-module/form/primitives/input-layout/slot.mjs
  var import_element13 = __toESM(require_element(), 1);
  var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
  function getRuntime7() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument7(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash7(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE7}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle7(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime7();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash7(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument7(targetDocument) {
    const runtime = getRuntime7();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle7(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle7(hash, css) {
    const runtime = getRuntime7();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle7(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle7("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
  }
  var style_default7 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
  var InputLayoutSlot = (0, import_element13.forwardRef)(function InputLayoutSlot2({ padding = "default", className, ...restProps }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
      "div",
      {
        ref,
        className: clsx_default(
          style_default7["input-layout-slot"],
          style_default7[`is-padding-${padding}`],
          className
        ),
        ...restProps
      }
    );
  });
  InputLayoutSlot.displayName = "InputLayout.Slot";

  // packages/ui/build-module/form/primitives/input-layout/index.mjs
  var InputLayout3 = Object.assign(InputLayout, {
    Slot: InputLayoutSlot
  });

  // packages/ui/build-module/form/primitives/input/input.mjs
  var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
  function getRuntime8() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument8(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash8(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE8}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle8(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime8();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash8(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument8(targetDocument) {
    const runtime = getRuntime8();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle8(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle8(hash, css) {
    const runtime = getRuntime8();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle8(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle8("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default4 = { "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" };
  if (typeof process === "undefined" || true) {
    registerStyle8("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
  }
  var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
  if (typeof process === "undefined" || true) {
    registerStyle8("1a25f6a232", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._2ae7be2fc1bb17a3__input{--_gcd-input-padding:var(--wp-ui-input-padding-block,0px) var(--wp-ui-input-layout-padding-inline,0px);background:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-weak,#707070)}&:disabled,&[aria-disabled=true]{--_gcd-input-placeholder-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}&[type=number]{appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{appearance:none;margin:0}}}}}");
  }
  var style_default8 = { "input": "_2ae7be2fc1bb17a3__input" };
  var Input3 = (0, import_element14.forwardRef)(function Input22({ className, size = "default", prefix, suffix, style: style2, ...restProps }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
      InputLayout3,
      {
        className: clsx_default(
          focus_module_default2["outset-ring--focus-within"],
          className
        ),
        style: style2,
        size,
        visuallyDisabled: restProps.disabled,
        prefix,
        suffix,
        children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
          Input,
          {
            ref,
            className: clsx_default(global_css_defense_default4.input, style_default8.input),
            ...restProps
          }
        )
      }
    );
  });

  // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
  var import_i18n11 = __toESM(require_i18n(), 1);
  var import_element16 = __toESM(require_element(), 1);

  // packages/ui/build-module/spinner/spinner.mjs
  var import_element15 = __toESM(require_element(), 1);
  var import_jsx_runtime197 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
  function getRuntime9() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument9(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash9(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE9}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle9(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime9();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash9(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument9(targetDocument) {
    const runtime = getRuntime9();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle9(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle9(hash, css) {
    const runtime = getRuntime9();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle9(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle9("bbbecfe373", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.ab4d64c07c0ba587__spinner{background-color:transparent;display:inline-block;height:var(--wpds-dimension-size-2xs,16px);opacity:1;overflow:visible;position:relative;width:var(--wpds-dimension-size-2xs,16px)}.a7654e10245bb7d2__indicator,.dc51f80c84b35fe2__track{fill:transparent;stroke-width:1.5px}.dc51f80c84b35fe2__track{stroke:var(--wpds-color-background-track-neutral,#dbdbdb)}.a7654e10245bb7d2__indicator{stroke:var(--wpds-color-background-thumb-brand,var(--wp-admin-theme-color,#3858e9));stroke-linecap:round;animation:_02322d973909703c__spinner-spin 1.4s linear infinite both;transform-origin:50% 50%}@keyframes _02322d973909703c__spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}}");
  }
  var style_default9 = { "spinner": "ab4d64c07c0ba587__spinner", "track": "dc51f80c84b35fe2__track", "indicator": "a7654e10245bb7d2__indicator", "spinner-spin": "_02322d973909703c__spinner-spin" };
  var Spinner2 = (0, import_element15.forwardRef)(
    function Spinner22({ className, ...props }, ref) {
      return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(
        "svg",
        {
          className: clsx_default(style_default9.spinner, className),
          viewBox: "0 0 100 100",
          xmlns: "http://www.w3.org/2000/svg",
          role: "presentation",
          focusable: "false",
          ...props,
          ref,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
              "circle",
              {
                className: style_default9.track,
                cx: "50",
                cy: "50",
                r: "50",
                vectorEffect: "non-scaling-stroke"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
              "path",
              {
                className: style_default9.indicator,
                d: "m 50 0 a 50 50 0 0 1 50 50",
                vectorEffect: "non-scaling-stroke"
              }
            )
          ]
        }
      );
    }
  );

  // packages/ui/build-module/form/primitives/validity-indicator/validity-indicator.mjs
  var import_jsx_runtime198 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
  function getRuntime10() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument10(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash10(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE10}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle10(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime10();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash10(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument10(targetDocument) {
    const runtime = getRuntime10();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle10(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle10(hash, css) {
    const runtime = getRuntime10();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle10(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle10("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default5 = { "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" };
  if (typeof process === "undefined" || true) {
    registerStyle10("d11816833c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7a7ac88e306348e7__indicator{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);align-items:flex-start;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);gap:var(--wpds-dimension-gap-xs,4px);line-height:var(--wpds-typography-line-height-xs,16px);@media not (prefers-reduced-motion){animation:_48722cc5dd090ce4__indicator-jump var(--wpds-motion-duration-md,.2s) cubic-bezier(.68,-.55,.27,1.55)}}._57a3bbbfbe38a5c6__is-invalid{color:var(--wpds-color-foreground-content-error-weak,#cc1818)}._9e944dc198aac10b__is-valid{color:var(--wpds-color-foreground-content-success-weak,#008030)}.e482806667437c6a__indicator-icon{flex-shrink:0}._6e46434cc23019d2__indicator-spinner{height:var(--wpds-dimension-size-3xs,12px);margin:2px;width:var(--wpds-dimension-size-3xs,12px)}@keyframes _48722cc5dd090ce4__indicator-jump{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}}}');
  }
  var style_default10 = { "indicator": "_7a7ac88e306348e7__indicator", "indicator-jump": "_48722cc5dd090ce4__indicator-jump", "is-invalid": "_57a3bbbfbe38a5c6__is-invalid", "is-valid": "_9e944dc198aac10b__is-valid", "indicator-icon": "e482806667437c6a__indicator-icon", "indicator-spinner": "_6e46434cc23019d2__indicator-spinner" };
  var ICON = {
    valid: published_default,
    invalid: error_default
  };
  function ValidityIndicator({
    id,
    type,
    message
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(
      "p",
      {
        id,
        className: clsx_default(
          global_css_defense_default5.p,
          style_default10.indicator,
          style_default10[`is-${type}`]
        ),
        children: [
          type === "validating" ? /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(Spinner2, { className: style_default10["indicator-spinner"] }) : /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
            Icon,
            {
              className: style_default10["indicator-icon"],
              icon: ICON[type],
              size: 16,
              fill: "currentColor"
            }
          ),
          message
        ]
      }
    );
  }

  // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
  var import_jsx_runtime199 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_RENDER = (props) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
  function appendRequiredIndicator(label, required, markWhenOptional) {
    let suffix;
    if (required && !markWhenOptional) {
      suffix = `(${(0, import_i18n11.__)("Required")})`;
    } else if (!required && markWhenOptional) {
      suffix = `(${(0, import_i18n11.__)("Optional")})`;
    }
    if (!suffix) {
      return label;
    }
    if (typeof label === "string") {
      return `${label} ${suffix}`;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_jsx_runtime199.Fragment, { children: [
      label,
      " ",
      suffix
    ] });
  }
  var VALIDITY_VISIBLE_ATTRIBUTE = "data-validity-visible";
  var ControlWithError = (0, import_element16.forwardRef)(function ControlWithError2({
    required,
    markWhenOptional,
    customValidity,
    getValidityTarget,
    children,
    render = DEFAULT_RENDER,
    ...restProps
  }, forwardedRef) {
    const [errorMessage, setErrorMessage] = (0, import_element16.useState)();
    const [statusMessage, setStatusMessage] = (0, import_element16.useState)();
    const [showMessage, setShowMessage] = (0, import_element16.useState)(false);
    const [isTouched, setIsTouched] = (0, import_element16.useState)(false);
    const wrapperRef = (0, import_element16.useRef)(null);
    (0, import_element16.useEffect)(() => {
      const validityTarget = getValidityTarget();
      const handler = () => {
        if (customValidity?.type !== "validating") {
          setErrorMessage(validityTarget?.validationMessage);
        }
        setShowMessage(true);
        validityTarget?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
      };
      validityTarget?.addEventListener("invalid", handler);
      return () => validityTarget?.removeEventListener("invalid", handler);
    }, [customValidity?.type, getValidityTarget]);
    (0, import_element16.useEffect)(() => {
      const validityTarget = getValidityTarget();
      const suppressNativePopover = (event) => {
        event.preventDefault();
        if (!event.isTrusted) {
          return;
        }
        const target = event.target;
        const firstErrorInForm = Array.from(
          target.form?.elements ?? []
        ).find((el) => !el.validity.valid);
        if (!target.form || firstErrorInForm === target) {
          target.focus();
        }
      };
      const radioSiblings = validityTarget?.type === "radio" && validityTarget?.name ? Array.from(
        wrapperRef.current?.querySelectorAll(
          `input[type="radio"][name="${validityTarget?.name}"]`
        ) ?? []
      ).filter((sibling) => sibling !== validityTarget) : [];
      validityTarget?.addEventListener("invalid", suppressNativePopover);
      radioSiblings.forEach(
        (sibling) => sibling.addEventListener("invalid", suppressNativePopover)
      );
      return () => {
        validityTarget?.removeEventListener(
          "invalid",
          suppressNativePopover
        );
        radioSiblings.forEach(
          (sibling) => sibling.removeEventListener("invalid", suppressNativePopover)
        );
      };
    }, [getValidityTarget]);
    (0, import_element16.useEffect)(() => {
      const validityTarget = getValidityTarget();
      if (!customValidity?.type) {
        validityTarget?.setCustomValidity("");
        setErrorMessage(validityTarget?.validationMessage);
        setStatusMessage(void 0);
        return;
      }
      switch (customValidity.type) {
        case "validating": {
          validityTarget?.setCustomValidity("");
          setErrorMessage(void 0);
          setStatusMessage({
            type: "validating",
            message: customValidity.message
          });
          break;
        }
        case "valid": {
          validityTarget?.setCustomValidity("");
          setErrorMessage(validityTarget?.validationMessage);
          setStatusMessage({
            type: "valid",
            message: customValidity.message
          });
          break;
        }
        case "invalid": {
          validityTarget?.setCustomValidity(
            customValidity.message ?? ""
          );
          setErrorMessage(validityTarget?.validationMessage);
          setStatusMessage(void 0);
          break;
        }
      }
    }, [customValidity, getValidityTarget]);
    (0, import_element16.useEffect)(() => {
      if (!isTouched || showMessage) {
        return;
      }
      if (customValidity?.type === "validating") {
        const timer = setTimeout(() => {
          setShowMessage(true);
        }, 1e3);
        return () => clearTimeout(timer);
      }
      setShowMessage(true);
    }, [isTouched, customValidity?.type, showMessage]);
    const onBlur = (event) => {
      if (event.relatedTarget && event.currentTarget.contains(event.relatedTarget)) {
        return;
      }
      if (!isTouched) {
        setIsTouched(true);
        getValidityTarget()?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
      }
      const validityTarget = getValidityTarget();
      const isValidating = customValidity?.type === "validating";
      window.queueMicrotask(() => {
        if (!isValidating) {
          setErrorMessage(validityTarget?.validationMessage);
        }
      });
    };
    const messageId = (0, import_element16.useId)();
    const message = (() => {
      if (errorMessage) {
        return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
          ValidityIndicator,
          {
            id: messageId,
            type: "invalid",
            message: errorMessage
          }
        );
      }
      if (statusMessage?.type) {
        return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
          ValidityIndicator,
          {
            id: messageId,
            type: statusMessage.type,
            message: statusMessage.message
          }
        );
      }
      return null;
    })();
    const visibleMessage = showMessage ? message : null;
    (0, import_element16.useEffect)(() => {
      const target = getValidityTarget();
      if (!target) {
        return;
      }
      function setDescribedBy(el, shouldAdd) {
        const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter((id) => id && id !== messageId);
        if (shouldAdd) {
          ids.push(messageId);
        }
        if (ids.length) {
          el.setAttribute("aria-describedby", ids.join(" "));
        } else {
          el.removeAttribute("aria-describedby");
        }
      }
      setDescribedBy(target, !!visibleMessage);
      return () => setDescribedBy(target, false);
    }, [visibleMessage, messageId, getValidityTarget]);
    return useRender({
      render,
      ref: [forwardedRef, wrapperRef],
      props: mergeProps(restProps, {
        onBlur,
        children: /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(import_jsx_runtime199.Fragment, { children: [
          (0, import_element16.cloneElement)(children, {
            label: appendRequiredIndicator(
              children.props.label,
              required,
              markWhenOptional
            ),
            required
          }),
          visibleMessage
        ] })
      })
    });
  });

  // packages/ui/build-module/form/primitives/field/index.mjs
  var field_exports = {};
  __export(field_exports, {
    Control: () => Control,
    Description: () => Description,
    Details: () => Details,
    Item: () => Item,
    Label: () => Label,
    Root: () => Root,
    VisualLabel: () => VisualLabel
  });

  // packages/ui/build-module/form/primitives/field/root.mjs
  var import_element17 = __toESM(require_element(), 1);
  var import_jsx_runtime200 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
  function getRuntime11() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument11(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash11(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE11}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle11(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime11();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash11(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument11(targetDocument) {
    const runtime = getRuntime11();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle11(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle11(hash, css) {
    const runtime = getRuntime11();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle11(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle11("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
  }
  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
  var DEFAULT_RENDER2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
  var Root = (0, import_element17.forwardRef)(function Root2({ className, render = DEFAULT_RENDER2, ...restProps }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
      index_parts_exports.Root,
      {
        ref,
        className: clsx_default(resets_default3["box-sizing"], className),
        render,
        ...restProps
      }
    );
  });

  // packages/ui/build-module/form/primitives/field/item.mjs
  var import_element18 = __toESM(require_element(), 1);
  var import_jsx_runtime201 = __toESM(require_jsx_runtime(), 1);
  var Item = (0, import_element18.forwardRef)(function Item2(props, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(index_parts_exports.Item, { ref, ...props });
  });

  // packages/ui/build-module/form/primitives/field/label.mjs
  var import_element19 = __toESM(require_element(), 1);
  var import_jsx_runtime202 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
  function getRuntime12() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument12(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash12(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE12}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle12(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime12();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash12(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument12(targetDocument) {
    const runtime = getRuntime12();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle12(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle12(hash, css) {
    const runtime = getRuntime12();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle12(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle12("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
  }
  var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
  var Label = (0, import_element19.forwardRef)(
    function Label2({ className, hideFromVision, variant, ...restProps }, ref) {
      const label = /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
        index_parts_exports.Label,
        {
          ref,
          className: clsx_default(
            field_default.label,
            variant && field_default[`is-${variant}`],
            className
          ),
          ...restProps
        }
      );
      if (hideFromVision) {
        return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(VisuallyHidden, { render: label });
      }
      return label;
    }
  );

  // packages/ui/build-module/form/primitives/field/description.mjs
  var import_element20 = __toESM(require_element(), 1);
  var import_jsx_runtime203 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
  function getRuntime13() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument13(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash13(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE13}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle13(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime13();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash13(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument13(targetDocument) {
    const runtime = getRuntime13();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle13(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle13(hash, css) {
    const runtime = getRuntime13();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle13(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle13("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default6 = { "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" };
  if (typeof process === "undefined" || true) {
    registerStyle13("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
  }
  var field_default2 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
  var Description = (0, import_element20.forwardRef)(function Description2({ className, ...restProps }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
      index_parts_exports.Description,
      {
        ref,
        className: clsx_default(
          global_css_defense_default6.p,
          field_default2.description,
          className
        ),
        ...restProps
      }
    );
  });

  // packages/ui/build-module/form/primitives/field/details.mjs
  var import_element21 = __toESM(require_element(), 1);
  var import_i18n12 = __toESM(require_i18n(), 1);
  var import_jsx_runtime204 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
  function getRuntime14() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument14(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash14(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE14}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle14(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime14();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash14(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument14(targetDocument) {
    const runtime = getRuntime14();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle14(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle14(hash, css) {
    const runtime = getRuntime14();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle14(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle14("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
  }
  var field_default3 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
  var Details = (0, import_element21.forwardRef)(
    function Details2({ className, ...restProps }, ref) {
      return /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(import_jsx_runtime204.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(index_parts_exports.Description, {}), children: (0, import_i18n12.__)("More details follow the field.") }),
        /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
          "div",
          {
            ref,
            className: clsx_default(field_default3.description, className),
            ...restProps
          }
        )
      ] });
    }
  );

  // packages/ui/build-module/form/primitives/field/control.mjs
  var import_element22 = __toESM(require_element(), 1);
  var import_jsx_runtime205 = __toESM(require_jsx_runtime(), 1);
  var Control = (0, import_element22.forwardRef)(
    function Control2(props, ref) {
      return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(index_parts_exports.Control, { ref, ...props });
    }
  );

  // packages/ui/build-module/form/primitives/field/visual-label.mjs
  var import_element23 = __toESM(require_element(), 1);
  var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
  function getRuntime15() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument15(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash15(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE15}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle15(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime15();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash15(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument15(targetDocument) {
    const runtime = getRuntime15();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle15(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle15(hash, css) {
    const runtime = getRuntime15();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle15(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle15("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
  }
  var field_default4 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
  var VisualLabel = (0, import_element23.forwardRef)(
    function VisualLabel2({ className, render, variant, ...restProps }, ref) {
      return useRender({
        defaultTagName: "span",
        render,
        ref,
        props: mergeProps(restProps, {
          className: clsx_default(
            field_default4.label,
            variant && field_default4[`is-${variant}`],
            className
          )
        })
      });
    }
  );
  VisualLabel.displayName = "Field.VisualLabel";

  // packages/ui/build-module/form/primitives/textarea/textarea.mjs
  var import_element24 = __toESM(require_element(), 1);
  var import_jsx_runtime206 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
  function getRuntime16() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument16(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash16(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE16}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle16(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime16();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash16(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument16(targetDocument) {
    const runtime = getRuntime16();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle16(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle16(hash, css) {
    const runtime = getRuntime16();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle16(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle16("1540cbc709", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1e441c22c9dc5d28__wrapper{--wp-ui-textarea-min-height:var(--wpds-dimension-size-lg,40px)}._414844876c32ecee__textarea{min-height:calc(var(--wp-ui-textarea-min-height) - 2px);resize:block}}@layer compositions{._1e441c22c9dc5d28__wrapper{--wp-ui-input-padding-block:9.9px;height:auto;line-height:1.4}}}");
  }
  var style_default11 = { "wrapper": "_1e441c22c9dc5d28__wrapper", "textarea": "_414844876c32ecee__textarea" };
  if (typeof process === "undefined" || true) {
    registerStyle16("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default7 = { "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" };
  var wrappedRender = (render, restProps) => {
    return function textareaRender(props) {
      return typeof render === "function" ? render(mergeProps(props, restProps)) : (0, import_element24.cloneElement)(render, mergeProps(props, restProps));
    };
  };
  var Textarea = (0, import_element24.forwardRef)(
    function Textarea2({
      className,
      defaultValue,
      disabled: disabled2,
      onValueChange,
      render,
      rows = 4,
      style: style2,
      value,
      ...restProps
    }, ref) {
      return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
        Input3,
        {
          className: clsx_default(style_default11.wrapper, className),
          style: style2,
          render: wrappedRender(
            render || ((props) => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("textarea", { ...props })),
            {
              className: clsx_default(
                global_css_defense_default7.textarea,
                style_default11.textarea
              ),
              ref,
              rows,
              ...restProps
            }
          ),
          value,
          defaultValue,
          onValueChange,
          disabled: disabled2
        }
      );
    }
  );

  // packages/ui/build-module/form/textarea-control/textarea-control.mjs
  var import_element25 = __toESM(require_element(), 1);
  var import_jsx_runtime207 = __toESM(require_jsx_runtime(), 1);
  var TextareaControl = (0, import_element25.forwardRef)(function TextareaControl2({
    className,
    label,
    description,
    details,
    hideLabelFromVision,
    ...restProps
  }, ref) {
    return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(field_exports.Root, { className, children: [
      /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(field_exports.Label, { hideFromVision: hideLabelFromVision, children: label }),
      /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Textarea, { ref, ...restProps }),
      description && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(field_exports.Description, { children: description }),
      details && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(field_exports.Details, { children: details })
    ] });
  });

  // packages/ui/build-module/form/with-validation/validated-textarea-control/validated-textarea-control.mjs
  var import_element26 = __toESM(require_element(), 1);
  var import_compose5 = __toESM(require_compose(), 1);
  var import_jsx_runtime208 = __toESM(require_jsx_runtime(), 1);
  var ValidatedTextareaControl = (0, import_element26.forwardRef)(function ValidatedTextareaControl2({ required, markWhenOptional, customValidity, ...restProps }, forwardedRef) {
    const validityTargetRef = (0, import_element26.useRef)(null);
    const mergedRefs = (0, import_compose5.useMergeRefs)([forwardedRef, validityTargetRef]);
    return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
      ControlWithError,
      {
        required,
        markWhenOptional,
        customValidity,
        getValidityTarget: () => validityTargetRef.current,
        children: /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(TextareaControl, { ref: mergedRefs, ...restProps })
      }
    );
  });

  // packages/ui/build-module/tabs/index.mjs
  var tabs_exports = {};
  __export(tabs_exports, {
    List: () => List,
    Panel: () => Panel,
    Root: () => Root3,
    Tab: () => Tab
  });

  // packages/ui/build-module/tabs/list.mjs
  var import_element27 = __toESM(require_element(), 1);
  var import_compose6 = __toESM(require_compose(), 1);
  var import_jsx_runtime209 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
  function getRuntime17() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument17(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash17(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE17}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle17(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime17();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash17(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument17(targetDocument) {
    const runtime = getRuntime17();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle17(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle17(hash, css) {
    const runtime = getRuntime17();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle17(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle17("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n			&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n				[role=tab]:is([aria-selected=true])\n				&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
  }
  var style_default12 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
  var SCROLL_EPSILON = 1;
  var List = (0, import_element27.forwardRef)(
    function TabList({
      children,
      variant = "default",
      className,
      activateOnFocus,
      ...otherProps
    }, forwardedRef) {
      const [listEl, setListEl] = (0, import_element27.useState)(null);
      const [overflow, setOverflow] = (0, import_element27.useState)({
        first: false,
        last: false,
        isScrolling: false
      });
      (0, import_element27.useEffect)(() => {
        if (!listEl) {
          return;
        }
        const measureOverflow = () => {
          const { scrollWidth, clientWidth, scrollLeft } = listEl;
          const maxScroll = Math.max(scrollWidth - clientWidth, 0);
          const direction = listEl.dir || (typeof window !== "undefined" ? window.getComputedStyle(listEl).direction : "ltr");
          const scrollFromStart = direction === "rtl" && scrollLeft < 0 ? (
            // In RTL layouts, scrollLeft is typically 0 at the visual "start"
            // (right edge) and becomes negative toward the "end" (left edge).
            // Normalize value for correct first/last detection logic.
            -scrollLeft
          ) : scrollLeft;
          const next2 = {
            first: scrollFromStart > SCROLL_EPSILON,
            last: scrollFromStart < maxScroll - SCROLL_EPSILON,
            isScrolling: scrollWidth > clientWidth
          };
          setOverflow(
            (prev) => prev.first === next2.first && prev.last === next2.last && prev.isScrolling === next2.isScrolling ? prev : next2
          );
        };
        const resizeObserver = new ResizeObserver(measureOverflow);
        const observeTabs = () => {
          resizeObserver.disconnect();
          resizeObserver.observe(listEl);
          listEl.querySelectorAll('[role="tab"]').forEach((tab) => resizeObserver.observe(tab));
        };
        const mutationObserver = new MutationObserver(observeTabs);
        mutationObserver.observe(listEl, {
          childList: true,
          subtree: true
        });
        let scrollTick = false;
        const throttleMeasureOverflowOnScroll = () => {
          if (!scrollTick) {
            requestAnimationFrame(() => {
              measureOverflow();
              scrollTick = false;
            });
            scrollTick = true;
          }
        };
        listEl.addEventListener(
          "scroll",
          throttleMeasureOverflowOnScroll,
          { passive: true }
        );
        observeTabs();
        measureOverflow();
        return () => {
          listEl.removeEventListener(
            "scroll",
            throttleMeasureOverflowOnScroll
          );
          resizeObserver.disconnect();
          mutationObserver.disconnect();
        };
      }, [listEl]);
      const mergedListRef = (0, import_compose6.useMergeRefs)([
        forwardedRef,
        (el) => setListEl(el)
      ]);
      return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
        index_parts_exports2.List,
        {
          ref: mergedListRef,
          activateOnFocus,
          "data-select-on-move": activateOnFocus ? "true" : "false",
          className: clsx_default(
            style_default12.tablist,
            overflow.first && style_default12["is-overflowing-first"],
            overflow.last && style_default12["is-overflowing-last"],
            style_default12[`is-${variant}-variant`],
            className
          ),
          ...otherProps,
          tabIndex: otherProps.tabIndex ?? (overflow.isScrolling ? -1 : void 0),
          children: [
            children,
            /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(index_parts_exports2.Indicator, { className: style_default12.indicator })
          ]
        }
      );
    }
  );

  // packages/ui/build-module/tabs/panel.mjs
  var import_element29 = __toESM(require_element(), 1);

  // packages/ui/build-module/tabs/context.mjs
  var import_element28 = __toESM(require_element(), 1);
  var import_jsx_runtime210 = __toESM(require_jsx_runtime(), 1);
  var VALIDATION_ENABLED = true;
  var TabsValidationContext = VALIDATION_ENABLED ? (0, import_element28.createContext)(null) : null;
  function useRegisterTabDev() {
    const context = (0, import_element28.useContext)(TabsValidationContext);
    (0, import_element28.useEffect)(() => {
      if (context) {
        return context.registerTab();
      }
      return void 0;
    }, [context]);
  }
  function useRegisterTabProd() {
  }
  var useRegisterTab = VALIDATION_ENABLED ? useRegisterTabDev : useRegisterTabProd;
  function useRegisterPanelDev() {
    const context = (0, import_element28.useContext)(TabsValidationContext);
    (0, import_element28.useEffect)(() => {
      if (context) {
        return context.registerPanel();
      }
      return void 0;
    }, [context]);
  }
  function useRegisterPanelProd() {
  }
  var useRegisterPanel = VALIDATION_ENABLED ? useRegisterPanelDev : useRegisterPanelProd;
  function TabsValidationProviderDev({
    children
  }) {
    const tabCountRef = (0, import_element28.useRef)(0);
    const panelCountRef = (0, import_element28.useRef)(0);
    const scheduleValidation = useScheduleValidation(() => {
      const tabCount = tabCountRef.current;
      const panelCount = panelCountRef.current;
      if (tabCount !== panelCount) {
        throw new Error(
          `Tabs: Tab/Panel count mismatch (${tabCount} Tabs, ${panelCount} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`
        );
      }
    });
    const registerTab = (0, import_element28.useCallback)(() => {
      tabCountRef.current += 1;
      scheduleValidation();
      return () => {
        tabCountRef.current -= 1;
        scheduleValidation();
      };
    }, [scheduleValidation]);
    const registerPanel = (0, import_element28.useCallback)(() => {
      panelCountRef.current += 1;
      scheduleValidation();
      return () => {
        panelCountRef.current -= 1;
        scheduleValidation();
      };
    }, [scheduleValidation]);
    const contextValue = (0, import_element28.useMemo)(
      () => ({
        registerTab,
        registerPanel
      }),
      [registerTab, registerPanel]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(TabsValidationContext.Provider, { value: contextValue, children });
  }
  function TabsValidationProviderProd({
    children
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_jsx_runtime210.Fragment, { children });
  }
  var TabsValidationProvider = VALIDATION_ENABLED ? TabsValidationProviderDev : TabsValidationProviderProd;

  // packages/ui/build-module/tabs/panel.mjs
  var import_jsx_runtime211 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
  function getRuntime18() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument18(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash18(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE18}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle18(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime18();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash18(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument18(targetDocument) {
    const runtime = getRuntime18();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle18(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle18(hash, css) {
    const runtime = getRuntime18();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle18(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle18("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
  }
  var global_css_defense_default8 = { "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" };
  if (typeof process === "undefined" || true) {
    registerStyle18("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
  }
  var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
  var Panel = (0, import_element29.forwardRef)(
    function TabPanel({ className, ...otherProps }, forwardedRef) {
      useRegisterPanel();
      return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
        index_parts_exports2.Panel,
        {
          ref: forwardedRef,
          className: clsx_default(
            global_css_defense_default8.div,
            focus_module_default3["outset-ring--focus-visible"],
            className
          ),
          ...otherProps
        }
      );
    }
  );

  // packages/ui/build-module/tabs/root.mjs
  var import_element30 = __toESM(require_element(), 1);
  var import_jsx_runtime212 = __toESM(require_jsx_runtime(), 1);
  var Root3 = (0, import_element30.forwardRef)(
    function TabsRoot3({ ...otherProps }, forwardedRef) {
      return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(TabsValidationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(index_parts_exports2.Root, { ref: forwardedRef, ...otherProps }) }) });
    }
  );

  // packages/ui/build-module/tabs/tab.mjs
  var import_element31 = __toESM(require_element(), 1);
  var import_jsx_runtime213 = __toESM(require_jsx_runtime(), 1);
  var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
  function getRuntime19() {
    const globalScope = globalThis;
    if (globalScope.__wpStyleRuntime) {
      return globalScope.__wpStyleRuntime;
    }
    globalScope.__wpStyleRuntime = {
      documents: /* @__PURE__ */ new Map(),
      styles: /* @__PURE__ */ new Map(),
      injectedStyles: /* @__PURE__ */ new WeakMap()
    };
    if (typeof document !== "undefined") {
      registerDocument19(document);
    }
    return globalScope.__wpStyleRuntime;
  }
  function documentContainsStyleHash19(targetDocument, hash) {
    if (!targetDocument.head) {
      return false;
    }
    for (const style2 of targetDocument.head.querySelectorAll(
      `style[${STYLE_HASH_ATTRIBUTE19}]`
    )) {
      if (style2.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
        return true;
      }
    }
    return false;
  }
  function injectStyle19(targetDocument, hash, css) {
    if (!targetDocument.head) {
      return;
    }
    const runtime = getRuntime19();
    let injectedStyles = runtime.injectedStyles.get(targetDocument);
    if (!injectedStyles) {
      injectedStyles = /* @__PURE__ */ new Set();
      runtime.injectedStyles.set(targetDocument, injectedStyles);
    }
    if (injectedStyles.has(hash)) {
      return;
    }
    if (documentContainsStyleHash19(targetDocument, hash)) {
      injectedStyles.add(hash);
      return;
    }
    const style2 = targetDocument.createElement("style");
    style2.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
    style2.appendChild(targetDocument.createTextNode(css));
    targetDocument.head.appendChild(style2);
    injectedStyles.add(hash);
  }
  function registerDocument19(targetDocument) {
    const runtime = getRuntime19();
    runtime.documents.set(
      targetDocument,
      (runtime.documents.get(targetDocument) ?? 0) + 1
    );
    for (const [hash, css] of runtime.styles) {
      injectStyle19(targetDocument, hash, css);
    }
    return () => {
      const count = runtime.documents.get(targetDocument);
      if (count === void 0) {
        return;
      }
      if (count <= 1) {
        runtime.documents.delete(targetDocument);
        return;
      }
      runtime.documents.set(targetDocument, count - 1);
    };
  }
  function registerStyle19(hash, css) {
    const runtime = getRuntime19();
    runtime.styles.set(hash, css);
    for (const targetDocument of runtime.documents.keys()) {
      injectStyle19(targetDocument, hash, css);
    }
  }
  if (typeof process === "undefined" || true) {
    registerStyle19("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n			&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n				[role=tab]:is([aria-selected=true])\n				&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
  }
  var style_default13 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
  var Tab = (0, import_element31.forwardRef)(function Tab2({ className, children, ...otherProps }, forwardedRef) {
    useRegisterTab();
    return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
      index_parts_exports2.Tab,
      {
        ref: forwardedRef,
        className: clsx_default(style_default13.tab, className),
        ...otherProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime213.jsx)("span", { className: style_default13["tab-children"], children }),
          /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Icon, { icon: chevron_right_default, className: style_default13["tab-chevron"] })
        ]
      }
    );
  });

  // packages/block-library/build-module/audio/edit.mjs
  var import_block_editor15 = __toESM(require_block_editor(), 1);
  var import_i18n14 = __toESM(require_i18n(), 1);
  var import_data8 = __toESM(require_data(), 1);
  var import_notices = __toESM(require_notices(), 1);
  var import_element34 = __toESM(require_element(), 1);

  // node_modules/memize/dist/index.js
  function memize(fn, options2) {
    var size = 0;
    var head;
    var tail;
    options2 = options2 || {};
    function memoized() {
      var node = head, len = arguments.length, args, i;
      searchCache: while (node) {
        if (node.args.length !== arguments.length) {
          node = node.next;
          continue;
        }
        for (i = 0; i < len; i++) {
          if (node.args[i] !== arguments[i]) {
            node = node.next;
            continue searchCache;
          }
        }
        if (node !== head) {
          if (node === tail) {
            tail = node.prev;
          }
          node.prev.next = node.next;
          if (node.next) {
            node.next.prev = node.prev;
          }
          node.next = head;
          node.prev = null;
          head.prev = node;
          head = node;
        }
        return node.val;
      }
      args = new Array(len);
      for (i = 0; i < len; i++) {
        args[i] = arguments[i];
      }
      node = {
        args,
        // Generate the result from original function
        val: fn.apply(null, args)
      };
      if (head) {
        head.prev = node;
        node.next = head;
      } else {
        tail = node;
      }
      if (size === /** @type {MemizeOptions} */
      options2.maxSize) {
        tail = /** @type {MemizeCacheNode} */
        tail.prev;
        tail.next = null;
      } else {
        size++;
      }
      head = node;
      return node.val;
    }
    memoized.clear = function() {
      head = null;
      tail = null;
      size = 0;
    };
    return memoized;
  }

  // packages/block-library/build-module/embed/util.mjs
  var import_element32 = __toESM(require_element(), 1);
  var import_blocks3 = __toESM(require_blocks(), 1);
  var import_url2 = __toESM(require_url(), 1);

  // node_modules/tslib/tslib.es6.mjs
  var __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };

  // node_modules/lower-case/dist.es2015/index.js
  function lowerCase(str) {
    return str.toLowerCase();
  }

  // node_modules/no-case/dist.es2015/index.js
  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  function noCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    var _a = options2.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options2.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options2.transform, transform = _c === void 0 ? lowerCase : _c, _d = options2.delimiter, delimiter = _d === void 0 ? " " : _d;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    while (result.charAt(start) === "\0")
      start++;
    while (result.charAt(end - 1) === "\0")
      end--;
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
  }
  function replace(input, re, value) {
    if (re instanceof RegExp)
      return input.replace(re, value);
    return re.reduce(function(input2, re2) {
      return input2.replace(re2, value);
    }, input);
  }

  // node_modules/upper-case-first/dist.es2015/index.js
  function upperCaseFirst(input) {
    return input.charAt(0).toUpperCase() + input.substr(1);
  }

  // node_modules/capital-case/dist.es2015/index.js
  function capitalCaseTransform(input) {
    return upperCaseFirst(input.toLowerCase());
  }
  function capitalCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options2));
  }

  // node_modules/dot-case/dist.es2015/index.js
  function dotCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return noCase(input, __assign({ delimiter: "." }, options2));
  }

  // node_modules/param-case/dist.es2015/index.js
  function paramCase(input, options2) {
    if (options2 === void 0) {
      options2 = {};
    }
    return dotCase(input, __assign({ delimiter: "-" }, options2));
  }

  // packages/kebab-case/build-module/index.mjs
  function kebabCase(str) {
    let input = str?.toString?.() ?? "";
    input = input.replace(/['\u2019]/, "");
    return paramCase(input, {
      splitRegexp: [
        /(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
        // fooBar => foo-bar, 3Bar => 3-bar
        /(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
        // 3bar => 3-bar
        /([A-Za-z])([0-9])/g,
        // Foo3 => foo-3, foo3 => foo-3
        /([A-Z])([A-Z][a-z])/g
        // FOOBar => foo-bar
      ]
    });
  }

  // packages/block-library/build-module/embed/block.json
  var block_default7 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/embed",
    title: "Embed",
    category: "embed",
    description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      type: {
        type: "string",
        role: "content"
      },
      providerNameSlug: {
        type: "string",
        role: "content"
      },
      allowResponsive: {
        type: "boolean",
        default: true
      },
      responsive: {
        type: "boolean",
        default: false,
        role: "content"
      },
      previewable: {
        type: "boolean",
        default: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-embed-editor",
    style: "wp-block-embed"
  };

  // packages/block-library/build-module/embed/constants.mjs
  var ASPECT_RATIOS = [
    // Common video resolutions.
    { ratio: "2.33", className: "wp-embed-aspect-21-9" },
    { ratio: "2.00", className: "wp-embed-aspect-18-9" },
    { ratio: "1.78", className: "wp-embed-aspect-16-9" },
    { ratio: "1.33", className: "wp-embed-aspect-4-3" },
    // Vertical video and instagram square video support.
    { ratio: "1.00", className: "wp-embed-aspect-1-1" },
    { ratio: "0.56", className: "wp-embed-aspect-9-16" },
    { ratio: "0.50", className: "wp-embed-aspect-1-2" }
  ];
  var WP_EMBED_TYPE = "wp-embed";

  // packages/block-library/build-module/embed/util.mjs
  var import_jsx_runtime214 = __toESM(require_jsx_runtime(), 1);
  var { name: DEFAULT_EMBED_BLOCK } = block_default7;
  var getEmbedInfoByProvider = (provider) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
    ({ name: name118 }) => name118 === provider
  );
  var matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern));
  var findMoreSuitableBlock = (url) => (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
    ({ patterns }) => matchesPatterns(url, patterns)
  );
  function rewriteXToTwitter(url) {
    if (!url || (0, import_url2.getAuthority)(url) !== "x.com") {
      return url;
    }
    const rewritten = new URL(url);
    rewritten.host = "twitter.com";
    return rewritten.toString();
  }
  var isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"');
  var getPhotoHtml = (photo) => {
    const imageUrl = photo.url || photo.thumbnail_url;
    const photoPreview = /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) });
    return (0, import_element32.renderToString)(photoPreview);
  };
  var createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
    const { preview, attributes: attributes2 = {} } = props;
    const { url, providerNameSlug, type, ...restAttributes } = attributes2;
    if (!url || !(0, import_blocks3.getBlockType)(DEFAULT_EMBED_BLOCK)) {
      return;
    }
    const matchedBlock = findMoreSuitableBlock(url);
    const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE;
    const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
    if (shouldCreateNewBlock) {
      return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
        url,
        ...restAttributes,
        ...matchedBlock.attributes
      });
    }
    const wpVariation = (0, import_blocks3.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
      ({ name: name118 }) => name118 === "wordpress"
    );
    if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
      return;
    }
    return (0, import_blocks3.createBlock)(DEFAULT_EMBED_BLOCK, {
      url,
      ...wpVariation.attributes,
      // By now we have the preview, but when the new block first renders, it
      // won't have had all the attributes set, and so won't get the correct
      // type and it won't render correctly. So, we pass through the current attributes
      // here so that the initial render works when we switch to the WordPress
      // block. This only affects the WordPress block because it can't be
      // rendered in the usual Sandbox (it has a sandbox of its own) and it
      // relies on the preview to set the correct render type.
      ...attributesFromPreview
    });
  };
  var hasAspectRatioClass = (existingClassNames) => {
    if (!existingClassNames) {
      return false;
    }
    return ASPECT_RATIOS.some(
      ({ className }) => existingClassNames.includes(className)
    );
  };
  var removeAspectRatioClasses = (existingClassNames) => {
    if (!existingClassNames) {
      return existingClassNames;
    }
    const aspectRatioClassNames = ASPECT_RATIOS.reduce(
      (accumulator, { className }) => {
        accumulator.push(className);
        return accumulator;
      },
      ["wp-has-aspect-ratio"]
    );
    let outputClassNames = existingClassNames;
    for (const className of aspectRatioClassNames) {
      outputClassNames = outputClassNames.replace(className, "");
    }
    return outputClassNames.trim();
  };
  function hasInlineResponsivePadding(html) {
    const paddingPattern = /padding-(top|bottom)\s*:\s*[\d.]+%/i;
    return paddingPattern.test(html);
  }
  function getClassNames(html, existingClassNames, allowResponsive = true) {
    if (!allowResponsive) {
      return removeAspectRatioClasses(existingClassNames);
    }
    if (hasInlineResponsivePadding(html)) {
      return removeAspectRatioClasses(existingClassNames);
    }
    const previewDocument = document.implementation.createHTMLDocument("");
    previewDocument.body.innerHTML = html;
    const iframe = previewDocument.body.querySelector("iframe");
    if (iframe && iframe.height && iframe.width) {
      const aspectRatio = (iframe.width / iframe.height).toFixed(2);
      for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
        const potentialRatio = ASPECT_RATIOS[ratioIndex];
        if (aspectRatio >= potentialRatio.ratio) {
          const ratioDiff = aspectRatio - potentialRatio.ratio;
          if (ratioDiff > 0.1) {
            return removeAspectRatioClasses(existingClassNames);
          }
          return clsx_default(
            removeAspectRatioClasses(existingClassNames),
            potentialRatio.className,
            "wp-has-aspect-ratio"
          );
        }
      }
    }
    return existingClassNames;
  }
  function fallback(url, onReplace) {
    const link = /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("a", { href: url, children: url });
    onReplace(
      (0, import_blocks3.createBlock)("core/paragraph", { content: (0, import_element32.renderToString)(link) })
    );
  }
  var getAttributesFromPreview = memize(
    (preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
      if (!preview) {
        return {};
      }
      const attributes2 = {};
      let { type = "rich" } = preview;
      const { html, provider_name: providerName } = preview;
      const providerNameSlug = kebabCase(
        (providerName || title).toLowerCase()
      );
      if (isFromWordPress(html)) {
        type = WP_EMBED_TYPE;
      }
      if (html || "photo" === type) {
        attributes2.type = type;
        attributes2.providerNameSlug = providerNameSlug;
      }
      if (hasAspectRatioClass(currentClassNames)) {
        return attributes2;
      }
      attributes2.className = getClassNames(
        html,
        currentClassNames,
        isResponsive && allowResponsive
      );
      return attributes2;
    }
  );
  var getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => {
    const { allowResponsive, className } = currentAttributes;
    return {
      ...currentAttributes,
      ...getAttributesFromPreview(
        preview,
        title,
        className,
        isResponsive,
        allowResponsive
      )
    };
  };

  // packages/block-library/build-module/utils/caption.mjs
  var import_element33 = __toESM(require_element(), 1);
  var import_compose7 = __toESM(require_compose(), 1);
  var import_i18n13 = __toESM(require_i18n(), 1);
  var import_block_editor14 = __toESM(require_block_editor(), 1);
  var import_components6 = __toESM(require_components(), 1);
  var import_blocks4 = __toESM(require_blocks(), 1);
  var import_jsx_runtime215 = __toESM(require_jsx_runtime(), 1);
  function Caption({
    attributeKey = "caption",
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter,
    placeholder: placeholder2 = (0, import_i18n13.__)("Add caption"),
    label = (0, import_i18n13.__)("Caption text"),
    showToolbarButton = true,
    excludeElementClassName,
    className,
    readOnly,
    tagName = "figcaption",
    addLabel = (0, import_i18n13.__)("Add caption"),
    removeLabel = (0, import_i18n13.__)("Remove caption"),
    icon: icon2 = caption_default,
    ...props
  }) {
    const caption = attributes2[attributeKey];
    const prevCaption = (0, import_compose7.usePrevious)(caption);
    const isCaptionEmpty = import_block_editor14.RichText.isEmpty(caption);
    const isPrevCaptionEmpty = import_block_editor14.RichText.isEmpty(prevCaption);
    const [showCaption, setShowCaption] = (0, import_element33.useState)(!isCaptionEmpty);
    (0, import_element33.useEffect)(() => {
      if (!isCaptionEmpty && isPrevCaptionEmpty) {
        setShowCaption(true);
      }
    }, [isCaptionEmpty, isPrevCaptionEmpty]);
    (0, import_element33.useEffect)(() => {
      if (!isSelected && isCaptionEmpty) {
        setShowCaption(false);
      }
    }, [isSelected, isCaptionEmpty]);
    const ref = (0, import_element33.useCallback)(
      (node) => {
        if (node && isCaptionEmpty) {
          node.focus();
        }
      },
      [isCaptionEmpty]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(import_jsx_runtime215.Fragment, { children: [
      showToolbarButton && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_block_editor14.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
        import_components6.ToolbarButton,
        {
          onClick: () => {
            setShowCaption(!showCaption);
            if (showCaption && caption) {
              setAttributes({
                [attributeKey]: void 0
              });
            }
          },
          icon: icon2,
          isPressed: showCaption,
          label: showCaption ? removeLabel : addLabel
        }
      ) }),
      showCaption && (!import_block_editor14.RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
        import_block_editor14.RichText,
        {
          identifier: attributeKey,
          tagName,
          className: clsx_default(
            className,
            excludeElementClassName ? "" : (0, import_block_editor14.__experimentalGetElementClassName)("caption")
          ),
          ref,
          "aria-label": label,
          placeholder: placeholder2,
          value: caption,
          onChange: (value) => setAttributes({ [attributeKey]: value }),
          inlineToolbar: true,
          __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
            (0, import_blocks4.createBlock)((0, import_blocks4.getDefaultBlockName)())
          ) : void 0,
          readOnly,
          ...props
        }
      )
    ] });
  }

  // packages/block-library/build-module/audio/edit.mjs
  var import_jsx_runtime216 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES = ["audio"];
  function AudioEdit({
    attributes: attributes2,
    className,
    setAttributes,
    onReplace,
    isSelected: isSingleSelected,
    insertBlocksAfter
  }) {
    const { id, autoplay, loop, preload, src } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element34.useState)(attributes2.blob);
    const blockEditingMode = (0, import_block_editor15.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES,
      onChange: onSelectAudio,
      onError: onUploadError
    });
    function toggleAttribute(attribute) {
      return (newValue) => {
        setAttributes({ [attribute]: newValue });
      };
    }
    function onSelectURL(newSrc) {
      if (newSrc !== src) {
        const embedBlock = createUpgradedEmbedBlock({
          attributes: { url: newSrc }
        });
        if (void 0 !== embedBlock && onReplace) {
          onReplace(embedBlock);
          return;
        }
        setAttributes({ src: newSrc, id: void 0, blob: void 0 });
        setTemporaryURL();
      }
    }
    const { createErrorNotice } = (0, import_data8.useDispatch)(import_notices.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    function onSelectAudio(media) {
      if (!media || !media.url) {
        setAttributes({
          src: void 0,
          id: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob2.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      setAttributes({
        blob: void 0,
        src: media.url,
        id: media.id,
        caption: media.caption
      });
      setTemporaryURL();
    }
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL
    });
    const blockProps = (0, import_block_editor15.useBlockProps)({
      className: classes
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    if (!src && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
        import_block_editor15.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(import_block_editor15.BlockIcon, { icon: audio_default }),
          onSelect: onSelectAudio,
          onSelectURL,
          accept: "audio/*",
          allowedTypes: ALLOWED_MEDIA_TYPES,
          value: attributes2,
          onError: onUploadError
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)(import_jsx_runtime216.Fragment, { children: [
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(import_block_editor15.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
        import_block_editor15.MediaReplaceFlow,
        {
          mediaId: id,
          mediaURL: src,
          allowedTypes: ALLOWED_MEDIA_TYPES,
          accept: "audio/*",
          onSelect: onSelectAudio,
          onSelectURL,
          onError: onUploadError,
          onReset: () => onSelectAudio(void 0),
          variant: "toolbar"
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(import_block_editor15.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)(
        import_components7.__experimentalToolsPanel,
        {
          label: (0, import_i18n14.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoplay: false,
              loop: false,
              preload: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(Text2, { className: "wp-block-audio__autoplay-help-text", children: (0, import_i18n14.__)(
              "Most browsers block audio until a visitor interacts with the page, so autoplay often won\u2019t work, especially on mobile. Unexpected sound can also be disruptive for screen reader users."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
              import_components7.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n14.__)("Autoplay"),
                isShownByDefault: true,
                hasValue: () => !!autoplay,
                onDeselect: () => setAttributes({
                  autoplay: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
                  import_components7.ToggleControl,
                  {
                    label: (0, import_i18n14.__)("Autoplay"),
                    onChange: toggleAttribute("autoplay"),
                    checked: !!autoplay
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
              import_components7.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n14.__)("Loop"),
                isShownByDefault: true,
                hasValue: () => !!loop,
                onDeselect: () => setAttributes({
                  loop: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
                  import_components7.ToggleControl,
                  {
                    label: (0, import_i18n14.__)("Loop"),
                    onChange: toggleAttribute("loop"),
                    checked: !!loop
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
              import_components7.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n14.__)("Preload"),
                isShownByDefault: true,
                hasValue: () => !!preload,
                onDeselect: () => setAttributes({
                  preload: void 0
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
                  import_components7.SelectControl,
                  {
                    label: (0, import_i18n14._x)(
                      "Preload",
                      "noun; Audio block parameter"
                    ),
                    value: preload || "",
                    onChange: (value) => setAttributes({
                      preload: value || void 0
                    }),
                    options: [
                      { value: "", label: (0, import_i18n14.__)("Browser default") },
                      { value: "auto", label: (0, import_i18n14.__)("Auto") },
                      { value: "metadata", label: (0, import_i18n14.__)("Metadata") },
                      {
                        value: "none",
                        label: (0, import_i18n14._x)("None", "Preload value")
                      }
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
          "audio",
          {
            controls: "controls",
            inert: !isSingleSelected ? "true" : void 0,
            src: src ?? temporaryURL
          }
        ),
        !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(import_components7.Spinner, {}),
        /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected: isSingleSelected,
            insertBlocksAfter,
            label: (0, import_i18n14.__)("Audio caption text"),
            showToolbarButton: isSingleSelected && hasNonContentControls
          }
        )
      ] })
    ] });
  }
  var edit_default = AudioEdit;

  // packages/block-library/build-module/audio/block.json
  var block_default8 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/audio",
    title: "Audio",
    category: "media",
    description: "Embed a simple audio player.",
    keywords: ["music", "sound", "podcast", "recording"],
    textdomain: "default",
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      src: {
        type: "string",
        source: "attribute",
        selector: "audio",
        attribute: "src",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      id: {
        type: "number",
        role: "content"
      },
      autoplay: {
        type: "boolean",
        source: "attribute",
        selector: "audio",
        attribute: "autoplay"
      },
      loop: {
        type: "boolean",
        source: "attribute",
        selector: "audio",
        attribute: "loop"
      },
      preload: {
        type: "string",
        source: "attribute",
        selector: "audio",
        attribute: "preload"
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        background: false,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-audio-editor",
    style: "wp-block-audio"
  };

  // packages/block-library/build-module/audio/save.mjs
  var import_block_editor16 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime217 = __toESM(require_jsx_runtime(), 1);
  function save5({ attributes: attributes2 }) {
    const { autoplay, caption, loop, preload, src } = attributes2;
    return src && /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("figure", { ...import_block_editor16.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
        "audio",
        {
          controls: "controls",
          src,
          autoPlay: autoplay,
          loop,
          preload
        }
      ),
      !import_block_editor16.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
        import_block_editor16.RichText.Content,
        {
          tagName: "figcaption",
          value: caption,
          className: (0, import_block_editor16.__experimentalGetElementClassName)(
            "caption"
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/audio/transforms.mjs
  var import_blob3 = __toESM(require_blob(), 1);
  var import_blocks5 = __toESM(require_blocks(), 1);
  var transforms = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length === 1 && files[0].type.indexOf("audio/") === 0;
        },
        transform(files) {
          const file = files[0];
          const block = (0, import_blocks5.createBlock)("core/audio", {
            blob: (0, import_blob3.createBlobURL)(file)
          });
          return block;
        }
      },
      {
        type: "shortcode",
        tag: "audio",
        attributes: {
          src: {
            type: "string",
            shortcode: ({
              named: { src, mp3, m4a, ogg, wav, wma }
            }) => {
              return src || mp3 || m4a || ogg || wav || wma;
            }
          },
          loop: {
            type: "string",
            shortcode: ({ named: { loop } }) => {
              return loop;
            }
          },
          autoplay: {
            type: "string",
            shortcode: ({ named: { autoplay } }) => {
              return autoplay;
            }
          },
          preload: {
            type: "string",
            shortcode: ({ named: { preload } }) => {
              return preload;
            }
          }
        }
      }
    ]
  };
  var transforms_default = transforms;

  // packages/block-library/build-module/audio/index.mjs
  var { name: name7 } = block_default8;
  var settings7 = {
    icon: audio_default,
    example: {
      attributes: {
        src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"
      },
      viewportWidth: 350
    },
    transforms: transforms_default,
    deprecated: deprecated_default2,
    edit: edit_default,
    save: save5
  };
  var init7 = () => initBlock({ name: name7, metadata: block_default8, settings: settings7 });

  // packages/block-library/build-module/breadcrumbs/index.mjs
  var breadcrumbs_exports = {};
  __export(breadcrumbs_exports, {
    init: () => init8,
    metadata: () => block_default9,
    name: () => name8,
    settings: () => settings8
  });

  // packages/block-library/build-module/breadcrumbs/block.json
  var block_default9 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/breadcrumbs",
    title: "Breadcrumbs",
    category: "theme",
    description: "Display a breadcrumb trail showing the path to the current page.",
    textdomain: "default",
    attributes: {
      prefersTaxonomy: {
        type: "boolean",
        default: false
      },
      separator: {
        type: "string",
        default: "/"
      },
      showHomeItem: {
        type: "boolean",
        default: true
      },
      showCurrentItem: {
        type: "boolean",
        default: true
      },
      showOnHomePage: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType", "templateSlug"],
    supports: {
      anchor: true,
      html: false,
      align: ["wide", "full"],
      spacing: {
        margin: true,
        padding: true
      },
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: false,
          color: true,
          width: true,
          style: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-breadcrumbs"
  };

  // packages/block-library/build-module/breadcrumbs/edit.mjs
  var import_i18n15 = __toESM(require_i18n(), 1);
  var import_block_editor17 = __toESM(require_block_editor(), 1);
  var import_components8 = __toESM(require_components(), 1);
  var import_data9 = __toESM(require_data(), 1);
  var import_core_data4 = __toESM(require_core_data(), 1);
  var import_element35 = __toESM(require_element(), 1);
  var import_server_side_render2 = __toESM(require_server_side_render(), 1);
  var import_compose8 = __toESM(require_compose(), 1);
  var import_jsx_runtime218 = __toESM(require_jsx_runtime(), 1);
  var separatorDefaultValue = "/";
  function BreadcrumbEdit({
    attributes: attributes2,
    setAttributes,
    name: name118,
    context: { postId, postType, templateSlug }
  }) {
    const {
      separator,
      showHomeItem,
      showCurrentItem,
      prefersTaxonomy,
      showOnHomePage
    } = attributes2;
    const {
      post,
      isPostTypeHierarchical,
      postTypeHasTaxonomies,
      hasTermsAssigned,
      isLoading
    } = (0, import_data9.useSelect)(
      (select10) => {
        if (!postType) {
          return {};
        }
        const _post = select10(import_core_data4.store).getEntityRecord(
          "postType",
          postType,
          postId
        );
        const postTypeObject = select10(import_core_data4.store).getPostType(postType);
        const _postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length;
        let taxonomies;
        if (_postTypeHasTaxonomies) {
          taxonomies = select10(import_core_data4.store).getTaxonomies({
            type: postType,
            per_page: -1
          });
        }
        return {
          post: _post,
          isPostTypeHierarchical: postTypeObject?.hierarchical,
          postTypeHasTaxonomies: _postTypeHasTaxonomies,
          hasTermsAssigned: _post && (taxonomies || []).filter(
            ({ visibility }) => visibility?.publicly_queryable
          ).some((taxonomy) => {
            return !!_post[taxonomy.rest_base]?.length;
          }),
          isLoading: postId && !_post || !postTypeObject || _postTypeHasTaxonomies && !taxonomies
        };
      },
      [postType, postId]
    );
    const [invalidationKey, setInvalidationKey] = (0, import_element35.useState)(0);
    (0, import_element35.useEffect)(() => {
      setInvalidationKey((c2) => c2 + 1);
    }, [post]);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error: error2 } = (0, import_server_side_render2.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name118,
      urlQueryArgs: { post_id: postId, invalidationKey }
    });
    const prevContentRef = (0, import_element35.useRef)("");
    (0, import_element35.useEffect)(() => {
      if (status === "success") {
        prevContentRef.current = content;
      }
    }, [content, status]);
    const [showLoader, setShowLoader] = (0, import_element35.useState)(false);
    (0, import_element35.useEffect)(() => {
      if (status !== "loading") {
        return;
      }
      const timeout = setTimeout(() => {
        setShowLoader(true);
      }, 400);
      return () => {
        clearTimeout(timeout);
        setShowLoader(false);
      };
    }, [status]);
    const disabledRef = (0, import_compose8.useDisabled)();
    const blockProps = (0, import_block_editor17.useBlockProps)({ ref: disabledRef });
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_components8.Spinner, {}) });
    }
    let _showTerms;
    if (!isPostTypeHierarchical && !post?.parent) {
      _showTerms = true;
    } else if (!postTypeHasTaxonomies) {
      _showTerms = false;
    } else {
      _showTerms = prefersTaxonomy;
    }
    let placeholder2 = null;
    const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not.
    // This is needed because when we are showing the template in post editor we
    // want to show the real breadcrumbs if we have the post type.
    templateSlug && !postType || !_showTerms && !isPostTypeHierarchical || _showTerms && !hasTermsAssigned;
    if (showPlaceholder) {
      const placeholderItems = [];
      if (showHomeItem) {
        placeholderItems.push((0, import_i18n15.__)("Home"));
      }
      if (templateSlug && !postId) {
        placeholderItems.push((0, import_i18n15.__)("Page"));
      } else if (_showTerms) {
        placeholderItems.push((0, import_i18n15.__)("Category"));
      } else {
        placeholderItems.push((0, import_i18n15.__)("Ancestor"), (0, import_i18n15.__)("Parent"));
      }
      placeholder2 = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
        "nav",
        {
          ...blockProps,
          style: {
            "--separator": `"${separator.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`,
            ...blockProps.style
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("ol", { children: [
            placeholderItems.map((text, index2) => /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index2}`, children: text }) }, index2)),
            showCurrentItem && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("span", { "aria-current": "page", children: (0, import_i18n15.__)("Current") }) })
          ] })
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(import_jsx_runtime218.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_block_editor17.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
        import_components8.__experimentalToolsPanel,
        {
          label: (0, import_i18n15.__)("Settings"),
          resetAll: () => {
            setAttributes({
              separator: separatorDefaultValue,
              showHomeItem: true,
              showCurrentItem: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n15.__)("Show home breadcrumb"),
                isShownByDefault: true,
                hasValue: () => !showHomeItem,
                onDeselect: () => setAttributes({
                  showHomeItem: true
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
                  import_components8.ToggleControl,
                  {
                    label: (0, import_i18n15.__)("Show home breadcrumb"),
                    onChange: (value) => setAttributes({ showHomeItem: value }),
                    checked: showHomeItem
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n15.__)("Show current breadcrumb"),
                isShownByDefault: true,
                hasValue: () => !showCurrentItem,
                onDeselect: () => setAttributes({
                  showCurrentItem: true
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
                  import_components8.ToggleControl,
                  {
                    label: (0, import_i18n15.__)("Show current breadcrumb"),
                    onChange: (value) => setAttributes({ showCurrentItem: value }),
                    checked: showCurrentItem
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
              import_components8.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n15.__)("Separator"),
                isShownByDefault: true,
                hasValue: () => separator !== separatorDefaultValue,
                onDeselect: () => setAttributes({
                  separator: separatorDefaultValue
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
                  import_components8.TextControl,
                  {
                    autoComplete: "off",
                    label: (0, import_i18n15.__)("Separator"),
                    value: separator,
                    onChange: (value) => setAttributes({ separator: value }),
                    onBlur: () => {
                      if (!separator) {
                        setAttributes({
                          separator: separatorDefaultValue
                        });
                      }
                    }
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(import_block_editor17.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          import_components8.CheckboxControl,
          {
            label: (0, import_i18n15.__)("Show on homepage"),
            checked: showOnHomePage,
            onChange: (value) => setAttributes({ showOnHomePage: value }),
            help: (0, import_i18n15.__)(
              "If this Breadcrumbs block appears in a template or template part that\u2019s shown on the homepage, enable this option to display the breadcrumb trail. Otherwise, this setting has no effect."
            )
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
          import_components8.CheckboxControl,
          {
            label: (0, import_i18n15.__)("Prefer taxonomy terms"),
            checked: prefersTaxonomy,
            onChange: (value) => setAttributes({ prefersTaxonomy: value }),
            help: (0, import_i18n15.__)(
              "The exact type of breadcrumbs shown will vary automatically depending on the page in which this block is displayed. In the specific case of a hierarchical post type with taxonomies, the breadcrumbs can either reflect its post hierarchy (default) or the hierarchy of its assigned taxonomy terms."
            )
          }
        )
      ] }),
      status === "loading" && !showPlaceholder && (prevContentRef.current ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
        html_renderer_default,
        {
          wrapperProps: {
            ...blockProps,
            style: {
              ...blockProps.style,
              opacity: showLoader ? 0.3 : 1
            }
          },
          html: prevContentRef.current
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(import_components8.Spinner, {}) })),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("p", { children: (0, import_i18n15.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n15.__)("Error: %s"),
        error2
      ) }) }),
      showPlaceholder && placeholder2,
      !showPlaceholder && status === "success" && /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/breadcrumbs/index.mjs
  var { name: name8 } = block_default9;
  var settings8 = {
    icon: breadcrumbs_default,
    example: {},
    edit: BreadcrumbEdit
  };
  var init8 = () => initBlock({ name: name8, metadata: block_default9, settings: settings8 });

  // packages/block-library/build-module/button/index.mjs
  var button_exports = {};
  __export(button_exports, {
    init: () => init9,
    metadata: () => block_default10,
    name: () => name9,
    settings: () => settings9
  });
  var import_i18n17 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/button/deprecated.mjs
  var import_block_editor19 = __toESM(require_block_editor(), 1);
  var import_compose9 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/utils/migrate-font-family.mjs
  var import_block_editor18 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/lock-unlock.mjs
  var import_private_apis = __toESM(require_private_apis(), 1);
  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
    "@wordpress/block-library"
  );

  // packages/block-library/build-module/utils/migrate-font-family.mjs
  var { cleanEmptyObject } = unlock(import_block_editor18.privateApis);
  function migrate_font_family_default(attributes2) {
    if (!attributes2?.style?.typography?.fontFamily) {
      return attributes2;
    }
    const { fontFamily, ...typography } = attributes2.style.typography;
    return {
      ...attributes2,
      style: cleanEmptyObject({
        ...attributes2.style,
        typography
      }),
      fontFamily: fontFamily.split("|").pop()
    };
  }

  // packages/block-library/build-module/utils/migrate-text-align.mjs
  function migrate_text_align_default(attributes2) {
    const { textAlign, ...restAttributes } = attributes2;
    if (!textAlign) {
      return attributes2;
    }
    return {
      ...restAttributes,
      style: {
        ...attributes2.style,
        typography: {
          ...attributes2.style?.typography,
          textAlign
        }
      }
    };
  }

  // packages/block-library/build-module/button/deprecated.mjs
  var import_jsx_runtime219 = __toESM(require_jsx_runtime(), 1);
  var migrateWidth = (attributes2) => {
    const { width, ...otherAttributes } = attributes2;
    if (!width) {
      return otherAttributes;
    }
    return {
      ...otherAttributes,
      style: {
        ...otherAttributes.style,
        dimensions: {
          ...otherAttributes.style?.dimensions,
          width: `${width}%`
        }
      }
    };
  };
  var migrateBorderRadius = (attributes2) => {
    const { borderRadius, ...newAttributes } = attributes2;
    const oldBorderRadius = [
      borderRadius,
      newAttributes.style?.border?.radius
    ].find((possibleBorderRadius) => {
      return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0;
    });
    if (!oldBorderRadius) {
      return newAttributes;
    }
    return {
      ...newAttributes,
      style: {
        ...newAttributes.style,
        border: {
          ...newAttributes.style?.border,
          radius: `${oldBorderRadius}px`
        }
      }
    };
  };
  function migrateAlign(attributes2) {
    if (!attributes2.align) {
      return attributes2;
    }
    const { align, ...otherAttributes } = attributes2;
    return {
      ...otherAttributes,
      className: clsx_default(
        otherAttributes.className,
        `align${attributes2.align}`
      )
    };
  }
  var migrateCustomColorsAndGradients = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor && !attributes2.customGradient) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    if (attributes2.customGradient) {
      style2.color.gradient = attributes2.customGradient;
    }
    const {
      customTextColor,
      customBackgroundColor,
      customGradient,
      ...restAttributes
    } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var oldColorsMigration = (attributes2) => {
    const { color, textColor, ...restAttributes } = {
      ...attributes2,
      customTextColor: attributes2.textColor && "#" === attributes2.textColor[0] ? attributes2.textColor : void 0,
      customBackgroundColor: attributes2.color && "#" === attributes2.color[0] ? attributes2.color : void 0
    };
    return migrateCustomColorsAndGradients(restAttributes);
  };
  var blockAttributes = {
    url: {
      type: "string",
      source: "attribute",
      selector: "a",
      attribute: "href"
    },
    title: {
      type: "string",
      source: "attribute",
      selector: "a",
      attribute: "title"
    },
    text: {
      type: "string",
      source: "html",
      selector: "a"
    }
  };
  var v14 = {
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      splitting: true,
      align: false,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "fontSize",
          "lineHeight",
          "textAlign",
          "fontFamily",
          "fontWeight",
          "fontStyle",
          "textTransform",
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-button .wp-block-button__link",
      typography: {
        writingMode: ".wp-block-button"
      }
    },
    save({ attributes: attributes2, className }) {
      const {
        tagName,
        type,
        fontSize,
        linkTarget,
        rel,
        style: style2,
        text,
        title,
        url,
        width
      } = attributes2;
      const TagName2 = tagName || "a";
      const isButtonTag = "button" === TagName2;
      const buttonType = type || "button";
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
      const typographyProps = (0, import_block_editor19.getTypographyClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        typographyProps.className,
        {
          // For backwards compatibility add style that isn't
          // provided via block support.
          "no-border-radius": style2?.border?.radius === 0,
          [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
        },
        (0, import_block_editor19.__experimentalGetElementClassName)("button")
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style,
        ...shadowProps.style,
        ...typographyProps.style,
        writingMode: void 0
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width
      });
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: TagName2,
          type: isButtonTag ? buttonType : null,
          className: buttonClasses,
          href: isButtonTag ? null : url,
          title,
          style: buttonStyle,
          value: text,
          target: isButtonTag ? null : linkTarget,
          rel: isButtonTag ? null : rel
        }
      ) });
    },
    isEligible(attributes2) {
      return typeof attributes2.width === "number";
    },
    migrate: migrateWidth
  };
  var v13 = {
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      textAlign: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "fontSize",
          "lineHeight",
          "fontFamily",
          "fontWeight",
          "fontStyle",
          "textTransform",
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-button .wp-block-button__link",
      typography: {
        writingMode: ".wp-block-button"
      }
    },
    save({ attributes: attributes2, className }) {
      const {
        tagName,
        type,
        textAlign,
        fontSize,
        linkTarget,
        rel,
        style: style2,
        text,
        title,
        url,
        width
      } = attributes2;
      const TagName2 = tagName || "a";
      const isButtonTag = "button" === TagName2;
      const buttonType = type || "button";
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
      const typographyProps = (0, import_block_editor19.getTypographyClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        typographyProps.className,
        {
          [`has-text-align-${textAlign}`]: textAlign,
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0,
          [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
        },
        (0, import_block_editor19.__experimentalGetElementClassName)("button")
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style,
        ...shadowProps.style,
        ...typographyProps.style,
        writingMode: void 0
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width
      });
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: TagName2,
          type: isButtonTag ? buttonType : null,
          className: buttonClasses,
          href: isButtonTag ? null : url,
          title,
          style: buttonStyle,
          value: text,
          target: isButtonTag ? null : linkTarget,
          rel: isButtonTag ? null : rel
        }
      ) });
    },
    isEligible(attributes2) {
      return !!attributes2.textAlign || typeof attributes2.width === "number";
    },
    migrate: (0, import_compose9.compose)(migrateWidth, migrate_text_align_default)
  };
  var v12 = {
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      textAlign: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-button__link",
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2, className }) {
      const {
        tagName,
        type,
        textAlign,
        fontSize,
        linkTarget,
        rel,
        style: style2,
        text,
        title,
        url,
        width
      } = attributes2;
      const TagName2 = tagName || "a";
      const isButtonTag = "button" === TagName2;
      const buttonType = type || "button";
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor19.__experimentalGetShadowClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          [`has-text-align-${textAlign}`]: textAlign,
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        },
        (0, import_block_editor19.__experimentalGetElementClassName)("button")
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style,
        ...shadowProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: TagName2,
          type: isButtonTag ? buttonType : null,
          className: buttonClasses,
          href: isButtonTag ? null : url,
          title,
          style: buttonStyle,
          value: text,
          target: isButtonTag ? null : linkTarget,
          rel: isButtonTag ? null : rel
        }
      ) });
    },
    isEligible(attributes2) {
      return typeof attributes2.width === "number";
    },
    migrate: migrateWidth
  };
  var v11 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "title"
      },
      text: {
        type: "string",
        source: "html",
        selector: "a"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      __experimentalSelector: ".wp-block-button__link"
    },
    save({ attributes: attributes2, className }) {
      const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
      if (!text) {
        return null;
      }
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        }
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: "a",
          className: buttonClasses,
          href: url,
          title,
          style: buttonStyle,
          value: text,
          target: linkTarget,
          rel
        }
      ) });
    }
  };
  var v10 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "title"
      },
      text: {
        type: "string",
        source: "html",
        selector: "a"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      width: {
        type: "number"
      }
    },
    supports: {
      anchor: true,
      align: true,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      reusable: false,
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        radius: true,
        __experimentalSkipSerialization: true
      },
      __experimentalSelector: ".wp-block-button__link"
    },
    save({ attributes: attributes2, className }) {
      const { fontSize, linkTarget, rel, style: style2, text, title, url, width } = attributes2;
      if (!text) {
        return null;
      }
      const borderProps = (0, import_block_editor19.__experimentalGetBorderClassesAndStyles)(attributes2);
      const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
      const spacingProps = (0, import_block_editor19.__experimentalGetSpacingClassesAndStyles)(attributes2);
      const buttonClasses = clsx_default(
        "wp-block-button__link",
        colorProps.className,
        borderProps.className,
        {
          // For backwards compatibility add style that isn't provided via
          // block support.
          "no-border-radius": style2?.border?.radius === 0
        }
      );
      const buttonStyle = {
        ...borderProps.style,
        ...colorProps.style,
        ...spacingProps.style
      };
      const wrapperClasses = clsx_default(className, {
        [`has-custom-width wp-block-button__width-${width}`]: width,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      });
      return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
        import_block_editor19.RichText.Content,
        {
          tagName: "a",
          className: buttonClasses,
          href: url,
          title,
          style: buttonStyle,
          value: text,
          target: linkTarget,
          rel
        }
      ) });
    },
    migrate: (0, import_compose9.compose)(migrateWidth, migrate_font_family_default),
    isEligible({ style: style2, width }) {
      return style2?.typography?.fontFamily || typeof width === "number";
    }
  };
  var deprecated = [
    v14,
    v13,
    v12,
    v11,
    v10,
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true,
          gradients: true
        },
        typography: {
          fontSize: true,
          __experimentalFontFamily: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        width: {
          type: "number"
        }
      },
      isEligible({ style: style2 }) {
        return typeof style2?.border?.radius === "number";
      },
      save({ attributes: attributes2, className }) {
        const {
          fontSize,
          linkTarget,
          rel,
          style: style2,
          text,
          title,
          url,
          width
        } = attributes2;
        if (!text) {
          return null;
        }
        const borderRadius = style2?.border?.radius;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": style2?.border?.radius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width,
          [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
        });
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose9.compose)(
        migrateWidth,
        migrate_font_family_default,
        migrateBorderRadius
      )
    },
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        },
        width: {
          type: "number"
        }
      },
      save({ attributes: attributes2, className }) {
        const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": borderRadius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width
        });
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose9.compose)(
        migrateWidth,
        migrate_font_family_default,
        migrateBorderRadius
      )
    },
    {
      supports: {
        anchor: true,
        align: true,
        alignWide: false,
        color: {
          __experimentalSkipSerialization: true
        },
        reusable: false,
        __experimentalSelector: ".wp-block-button__link"
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        },
        width: {
          type: "number"
        }
      },
      save({ attributes: attributes2, className }) {
        const { borderRadius, linkTarget, rel, text, title, url, width } = attributes2;
        const colorProps = (0, import_block_editor19.__experimentalGetColorClassesAndStyles)(attributes2);
        const buttonClasses = clsx_default(
          "wp-block-button__link",
          colorProps.className,
          {
            "no-border-radius": borderRadius === 0
          }
        );
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0,
          ...colorProps.style
        };
        const wrapperClasses = clsx_default(className, {
          [`has-custom-width wp-block-button__width-${width}`]: width
        });
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ...import_block_editor19.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      },
      migrate: (0, import_compose9.compose)(
        migrateWidth,
        migrate_font_family_default,
        migrateBorderRadius
      )
    },
    {
      supports: {
        align: true,
        alignWide: false,
        color: { gradients: true }
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        gradient: {
          type: "string"
        },
        style: {
          type: "object"
        }
      },
      save({ attributes: attributes2 }) {
        const { borderRadius, linkTarget, rel, text, title, url } = attributes2;
        const buttonClasses = clsx_default("wp-block-button__link", {
          "no-border-radius": borderRadius === 0
        });
        const buttonStyle = {
          borderRadius: borderRadius ? borderRadius + "px" : void 0
        };
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        );
      },
      migrate: (0, import_compose9.compose)(migrateWidth, migrateBorderRadius)
    },
    {
      supports: {
        align: true,
        alignWide: false
      },
      attributes: {
        ...blockAttributes,
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        },
        borderRadius: {
          type: "number"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        customGradient: {
          type: "string"
        },
        gradient: {
          type: "string"
        }
      },
      isEligible: (attributes2) => !!attributes2.customTextColor || !!attributes2.customBackgroundColor || !!attributes2.customGradient || !!attributes2.align,
      migrate: (0, import_compose9.compose)(
        migrateWidth,
        migrateBorderRadius,
        migrateCustomColorsAndGradients,
        migrateAlign
      ),
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          borderRadius,
          customBackgroundColor,
          customTextColor,
          customGradient,
          linkTarget,
          gradient,
          rel,
          text,
          textColor,
          title,
          url
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = !customGradient && (0, import_block_editor19.getColorClassName)("background-color", backgroundColor);
        const gradientClass = (0, import_block_editor19.__experimentalGetGradientClass)(gradient);
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor || customGradient || gradient,
          [backgroundClass]: backgroundClass,
          "no-border-radius": borderRadius === 0,
          [gradientClass]: gradientClass
        });
        const buttonStyle = {
          background: customGradient ? customGradient : void 0,
          backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          borderRadius: borderRadius ? borderRadius + "px" : void 0
        };
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        align: {
          type: "string",
          default: "none"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        linkTarget: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "target"
        },
        rel: {
          type: "string",
          source: "attribute",
          selector: "a",
          attribute: "rel"
        },
        placeholder: {
          type: "string"
        }
      },
      isEligible(attribute) {
        return attribute.className && attribute.className.includes("is-style-squared");
      },
      migrate(attributes2) {
        let newClassName = attributes2.className;
        if (newClassName) {
          newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim();
        }
        return migrateBorderRadius(
          migrateCustomColorsAndGradients({
            ...attributes2,
            className: newClassName ? newClassName : void 0,
            borderRadius: 0
          })
        );
      },
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          customTextColor,
          linkTarget,
          rel,
          text,
          textColor,
          title,
          url
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor19.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor,
          [backgroundClass]: backgroundClass
        });
        const buttonStyle = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text,
            target: linkTarget,
            rel
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        align: {
          type: "string",
          default: "none"
        },
        backgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      migrate: (0, import_compose9.compose)(migrateWidth, oldColorsMigration),
      save({ attributes: attributes2 }) {
        const {
          url,
          text,
          title,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor
        } = attributes2;
        const textClass = (0, import_block_editor19.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor19.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const buttonClasses = clsx_default("wp-block-button__link", {
          "has-text-color": textColor || customTextColor,
          [textClass]: textClass,
          "has-background": backgroundColor || customBackgroundColor,
          [backgroundClass]: backgroundClass
        });
        const buttonStyle = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: buttonClasses,
            href: url,
            title,
            style: buttonStyle,
            value: text
          }
        ) });
      }
    },
    {
      attributes: {
        ...blockAttributes,
        color: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        align: {
          type: "string",
          default: "none"
        }
      },
      save({ attributes: attributes2 }) {
        const { url, text, title, align, color, textColor } = attributes2;
        const buttonStyle = {
          backgroundColor: color,
          color: textColor
        };
        const linkClass = "wp-block-button__link";
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          import_block_editor19.RichText.Content,
          {
            tagName: "a",
            className: linkClass,
            href: url,
            title,
            style: buttonStyle,
            value: text
          }
        ) });
      },
      migrate: (0, import_compose9.compose)(migrateWidth, oldColorsMigration)
    },
    {
      attributes: {
        ...blockAttributes,
        color: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        align: {
          type: "string",
          default: "none"
        }
      },
      save({ attributes: attributes2 }) {
        const { url, text, title, align, color, textColor } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
          "div",
          {
            className: `align${align}`,
            style: { backgroundColor: color },
            children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
              import_block_editor19.RichText.Content,
              {
                tagName: "a",
                href: url,
                title,
                style: { color: textColor },
                value: text
              }
            )
          }
        );
      },
      migrate: (0, import_compose9.compose)(migrateWidth, oldColorsMigration)
    }
  ];
  var deprecated_default3 = deprecated;

  // packages/block-library/build-module/button/edit.mjs
  var import_i18n16 = __toESM(require_i18n(), 1);
  var import_element37 = __toESM(require_element(), 1);
  var import_components9 = __toESM(require_components(), 1);
  var import_block_editor21 = __toESM(require_block_editor(), 1);
  var import_keycodes = __toESM(require_keycodes(), 1);
  var import_blocks6 = __toESM(require_blocks(), 1);
  var import_compose11 = __toESM(require_compose(), 1);
  var import_data11 = __toESM(require_data(), 1);

  // packages/block-library/build-module/button/constants.mjs
  var NEW_TAB_REL = "noopener";
  var NEW_TAB_TARGET = "_blank";
  var NOFOLLOW_REL = "nofollow";

  // packages/block-library/build-module/button/get-updated-link-attributes.mjs
  var import_url3 = __toESM(require_url(), 1);
  function getUpdatedLinkAttributes({
    rel = "",
    url = "",
    opensInNewTab,
    nofollow
  }) {
    let newLinkTarget;
    let updatedRel = rel;
    if (opensInNewTab) {
      newLinkTarget = NEW_TAB_TARGET;
      updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`;
    } else {
      const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    if (nofollow) {
      updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
    } else {
      const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
      updatedRel = updatedRel?.replace(relRegex, "").trim();
    }
    return {
      url: (0, import_url3.prependHTTPS)(url),
      linkTarget: newLinkTarget,
      rel: updatedRel || void 0
    };
  }

  // packages/block-library/build-module/utils/remove-anchor-tag.mjs
  function removeAnchorTag(value) {
    return value.toString().replace(/<\/?a[^>]*>/g, "");
  }

  // packages/block-library/build-module/utils/deprecated-text-align-attributes.mjs
  var import_compose10 = __toESM(require_compose(), 1);
  var import_element36 = __toESM(require_element(), 1);
  var import_deprecated3 = __toESM(require_deprecated(), 1);
  var import_data10 = __toESM(require_data(), 1);
  var import_block_editor20 = __toESM(require_block_editor(), 1);
  function useDeprecatedTextAlign(props) {
    const { name: name118, attributes: attributes2, setAttributes } = props;
    const { textAlign } = attributes2;
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data10.useDispatch)(import_block_editor20.store);
    const updateStyleWithAlign = (0, import_compose10.useEvent)(() => {
      (0, import_deprecated3.default)(`textAlign attribute in ${name118}`, {
        alternative: "style.typography.textAlign",
        since: "7.0"
      });
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes((currentAttr) => ({
        style: {
          ...currentAttr.style,
          typography: {
            ...currentAttr.style?.typography,
            textAlign
          }
        }
      }));
    });
    const lastUpdatedAlignRef = (0, import_element36.useRef)();
    (0, import_element36.useEffect)(() => {
      if (textAlign === lastUpdatedAlignRef.current) {
        return;
      }
      lastUpdatedAlignRef.current = textAlign;
      updateStyleWithAlign();
    }, [textAlign, updateStyleWithAlign]);
  }

  // packages/block-library/build-module/button/utils.mjs
  function isPercentageWidth(width) {
    return typeof width === "string" && width.endsWith("%");
  }
  function getWidthClasses(width) {
    if (!width) {
      return {};
    }
    if (isPercentageWidth(width)) {
      const legacyWidthClasses = {
        "25%": "wp-block-button__width-25",
        "50%": "wp-block-button__width-50",
        "75%": "wp-block-button__width-75",
        "100%": "wp-block-button__width-100"
      };
      return {
        "has-custom-width": true,
        "wp-block-button__width": true,
        // Maintain legacy class for backwards compatibility.
        ...legacyWidthClasses[width] && {
          [legacyWidthClasses[width]]: true
        }
      };
    }
    return {
      "has-custom-width": true
    };
  }

  // packages/block-library/build-module/button/edit.mjs
  var import_jsx_runtime220 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl } = unlock(import_block_editor21.privateApis);
  var { subscribeDelegatedListener } = unlock(import_compose11.privateApis);
  var LINK_SETTINGS = [
    ...import_block_editor21.LinkControl.DEFAULT_LINK_SETTINGS,
    {
      id: "nofollow",
      title: (0, import_i18n16.__)("Mark as nofollow")
    }
  ];
  function useEnter(clientId) {
    const { replaceBlocks, selectionChange } = (0, import_data11.useDispatch)(import_block_editor21.store);
    const {
      getBlock,
      getBlockAttributes: getBlockAttributes4,
      getBlockRootClientId,
      getBlockIndex
    } = (0, import_data11.useSelect)(import_block_editor21.store);
    return (0, import_compose11.useRefEffect)((element) => {
      function onKeyDown(event) {
        if (event.defaultPrevented || event.keyCode !== import_keycodes.ENTER) {
          return;
        }
        const { text } = getBlockAttributes4(clientId) ?? {};
        if (text?.length) {
          return;
        }
        event.preventDefault();
        const topParentListBlock = getBlock(
          getBlockRootClientId(clientId)
        );
        const blockIndex = getBlockIndex(clientId);
        const head = (0, import_blocks6.cloneBlock)({
          ...topParentListBlock,
          innerBlocks: topParentListBlock.innerBlocks.slice(
            0,
            blockIndex
          )
        });
        const middle = (0, import_blocks6.createBlock)((0, import_blocks6.getDefaultBlockName)());
        const after = topParentListBlock.innerBlocks.slice(
          blockIndex + 1
        );
        const tail = after.length ? [
          (0, import_blocks6.cloneBlock)({
            ...topParentListBlock,
            innerBlocks: after
          })
        ] : [];
        replaceBlocks(
          topParentListBlock.clientId,
          [head, middle, ...tail],
          1
        );
        selectionChange(middle.clientId);
      }
      return subscribeDelegatedListener(
        element,
        "keydown",
        onKeyDown,
        true
      );
    }, []);
  }
  function ButtonEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      className,
      isSelected,
      onReplace,
      mergeBlocks,
      clientId,
      context
    } = props;
    const {
      tagName,
      linkTarget,
      placeholder: placeholder2,
      rel,
      style: style2,
      text,
      url,
      metadata
    } = attributes2;
    const width = style2?.dimensions?.width;
    useDeprecatedTextAlign(props);
    const TagName2 = tagName || "a";
    function onKeyDown(event) {
      if (import_keycodes.isKeyboardEvent.primary(event, "k")) {
        startEditing(event);
      } else if (import_keycodes.isKeyboardEvent.primaryShift(event, "k")) {
        unlink();
        richTextRef.current?.focus();
      }
    }
    const [popoverAnchor, setPopoverAnchor] = (0, import_element37.useState)(null);
    const borderProps = (0, import_block_editor21.__experimentalUseBorderProps)(attributes2);
    const colorProps = (0, import_block_editor21.__experimentalUseColorProps)(attributes2);
    const spacingProps = (0, import_block_editor21.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor21.__experimentalGetShadowClassesAndStyles)(attributes2);
    const dimensionsProps = (0, import_block_editor21.__experimentalGetDimensionsClassesAndStyles)(attributes2);
    const ref = (0, import_element37.useRef)();
    const richTextRef = (0, import_element37.useRef)();
    const blockProps = (0, import_block_editor21.useBlockProps)({
      ref: (0, import_compose11.useMergeRefs)([setPopoverAnchor, ref]),
      onKeyDown
    });
    const blockEditingMode = (0, import_block_editor21.useBlockEditingMode)();
    const [isEditingURL, setIsEditingURL] = (0, import_element37.useState)(false);
    const isURLSet = !!url;
    const opensInNewTab = linkTarget === NEW_TAB_TARGET;
    const nofollow = !!rel?.includes(NOFOLLOW_REL);
    const isLinkTag = "a" === TagName2;
    const {
      createPageEntity,
      userCanCreatePages,
      lockUrlControls = false
    } = (0, import_data11.useSelect)(
      (select10) => {
        if (!isSelected) {
          return {};
        }
        const _settings = select10(import_block_editor21.store).getSettings();
        const blockBindingsSource = (0, import_blocks6.getBlockBindingsSource)(
          metadata?.bindings?.url?.source
        );
        return {
          createPageEntity: _settings.__experimentalCreatePageEntity,
          userCanCreatePages: _settings.__experimentalUserCanCreatePages,
          lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
            select: select10,
            context,
            args: metadata?.bindings?.url?.args
          })
        };
      },
      [context, isSelected, metadata?.bindings?.url]
    );
    async function handleCreate(pageTitle) {
      const page = await createPageEntity({
        title: pageTitle,
        status: "draft"
      });
      return {
        id: page.id,
        type: page.type,
        title: page.title.rendered,
        url: page.link,
        kind: "post-type"
      };
    }
    function createButtonText(searchTerm) {
      return (0, import_element37.createInterpolateElement)(
        (0, import_i18n16.sprintf)(
          /* translators: %s: search term. */
          (0, import_i18n16.__)("Create page: <mark>%s</mark>"),
          searchTerm
        ),
        { mark: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("mark", {}) }
      );
    }
    function startEditing(event) {
      event.preventDefault();
      setIsEditingURL(true);
    }
    function unlink() {
      setAttributes({
        url: void 0,
        linkTarget: void 0,
        rel: void 0
      });
      setIsEditingURL(false);
    }
    (0, import_element37.useEffect)(() => {
      if (!isSelected) {
        setIsEditingURL(false);
      }
    }, [isSelected]);
    const linkValue = (0, import_element37.useMemo)(
      () => ({ url, opensInNewTab, nofollow }),
      [url, opensInNewTab, nofollow]
    );
    const useEnterRef = useEnter(clientId);
    const mergedRef = (0, import_compose11.useMergeRefs)([useEnterRef, richTextRef]);
    const [fluidTypographySettings, layout, dimensionSizes] = (0, import_block_editor21.useSettings)(
      "typography.fluid",
      "layout",
      "dimensions.dimensionSizes"
    );
    const dimensionPresets = (0, import_element37.useMemo)(() => {
      if (!dimensionSizes) {
        return [];
      }
      return [
        ...dimensionSizes?.custom ?? [],
        ...dimensionSizes?.theme ?? [],
        ...dimensionSizes?.default ?? []
      ];
    }, [dimensionSizes]);
    const typographyProps = (0, import_block_editor21.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const resolvedWidth = (0, import_element37.useMemo)(() => {
      if (!width) {
        return void 0;
      }
      const presetPrefix = "var:preset|dimension|";
      if (width.startsWith(presetPrefix)) {
        const slug = width.slice(presetPrefix.length);
        const preset = dimensionPresets?.find((p2) => p2.slug === slug);
        return preset?.size ?? width;
      }
      return width;
    }, [width, dimensionPresets]);
    const hasNonContentControls = blockEditingMode === "default";
    const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls;
    const classes = clsx_default(
      blockProps.className,
      getWidthClasses(resolvedWidth)
    );
    const widthStyle = (0, import_element37.useMemo)(() => {
      if (!width) {
        return {};
      }
      if (isPercentageWidth(resolvedWidth)) {
        return {
          "--wp--block-button--width": parseFloat(resolvedWidth)
        };
      }
      return dimensionsProps.style;
    }, [width, resolvedWidth, dimensionsProps.style]);
    return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        "div",
        {
          ...blockProps,
          className: classes,
          style: { ...blockProps.style, ...widthStyle },
          children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
            import_block_editor21.RichText,
            {
              ref: mergedRef,
              "aria-label": (0, import_i18n16.__)("Button text"),
              placeholder: placeholder2 || (0, import_i18n16.__)("Add text\u2026"),
              value: text,
              onChange: (value) => setAttributes({
                text: removeAnchorTag(value)
              }),
              withoutInteractiveFormatting: true,
              className: clsx_default(
                className,
                "wp-block-button__link",
                colorProps.className,
                borderProps.className,
                typographyProps.className,
                {
                  // For backwards compatibility add style that isn't
                  // provided via block support.
                  "no-border-radius": style2?.border?.radius === 0,
                  [`has-custom-font-size`]: blockProps.style.fontSize
                },
                (0, import_block_editor21.__experimentalGetElementClassName)("button")
              ),
              style: {
                ...borderProps.style,
                ...colorProps.style,
                ...spacingProps.style,
                ...shadowProps.style,
                ...typographyProps.style,
                writingMode: void 0
              },
              onReplace,
              onMerge: mergeBlocks,
              identifier: "text"
            }
          )
        }
      ),
      hasBlockControls && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(import_block_editor21.BlockControls, { group: "block", children: isLinkTag && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        import_components9.ToolbarButton,
        {
          name: "link",
          icon: !isURLSet ? link_default : link_off_default,
          title: !isURLSet ? (0, import_i18n16.__)("Link") : (0, import_i18n16.__)("Unlink"),
          shortcut: !isURLSet ? import_keycodes.displayShortcut.primary("k") : import_keycodes.displayShortcut.primaryShift("k"),
          onClick: !isURLSet ? startEditing : unlink,
          isActive: isURLSet
        }
      ) }),
      isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
        import_components9.Popover,
        {
          placement: "bottom",
          onClose: () => {
            setIsEditingURL(false);
            richTextRef.current?.focus();
          },
          anchor: popoverAnchor,
          focusOnMount: isEditingURL ? "firstElement" : false,
          __unstableSlotName: "__unstable-block-tools-after",
          shift: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
            import_block_editor21.LinkControl,
            {
              value: linkValue,
              onChange: ({
                url: newURL,
                opensInNewTab: newOpensInNewTab,
                nofollow: newNofollow
              }) => setAttributes(
                getUpdatedLinkAttributes({
                  rel,
                  url: newURL,
                  opensInNewTab: newOpensInNewTab,
                  nofollow: newNofollow
                })
              ),
              onRemove: () => {
                unlink();
                richTextRef.current?.focus();
              },
              forceIsEditingLink: isEditingURL,
              settings: LINK_SETTINGS,
              createSuggestion: createPageEntity && handleCreate,
              withCreateSuggestion: userCanCreatePages,
              createSuggestionButtonText: createButtonText
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_block_editor21.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
          HTMLElementControl,
          {
            tagName,
            onChange: (value) => setAttributes({ tagName: value }),
            options: [
              { label: (0, import_i18n16.__)("Default (<a>)"), value: "a" },
              { label: "<button>", value: "button" }
            ]
          }
        ),
        isLinkTag && /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
          import_components9.TextControl,
          {
            label: (0, import_i18n16.__)("Link relation"),
            help: (0, import_element37.createInterpolateElement)(
              (0, import_i18n16.__)(
                "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
              ),
              {
                a: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
                  Link,
                  {
                    openInNewTab: true,
                    href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"
                  }
                )
              }
            ),
            value: rel || "",
            onChange: (newRel) => setAttributes({ rel: newRel })
          }
        )
      ] })
    ] });
  }
  var edit_default2 = ButtonEdit;

  // packages/block-library/build-module/button/block.json
  var block_default10 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/button",
    title: "Button",
    category: "design",
    parent: ["core/buttons"],
    description: "Prompt visitors to take action with a button-style link.",
    keywords: ["link"],
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        enum: ["a", "button"],
        default: "a"
      },
      type: {
        type: "string",
        default: "button"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "a,button",
        attribute: "title",
        role: "content"
      },
      text: {
        type: "rich-text",
        source: "rich-text",
        selector: "a,button",
        role: "content"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "target",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "rel",
        role: "content"
      },
      placeholder: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      },
      gradient: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      splitting: true,
      align: false,
      alignWide: false,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        width: true,
        __experimentalSkipSerialization: ["width"],
        __experimentalDefaultControls: {
          width: true
        }
      },
      typography: {
        __experimentalSkipSerialization: [
          "fontSize",
          "lineHeight",
          "textAlign",
          "fontFamily",
          "fontWeight",
          "fontStyle",
          "textTransform",
          "textDecoration",
          "letterSpacing"
        ],
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      reusable: false,
      shadow: {
        __experimentalSkipSerialization: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    styles: [
      { name: "fill", label: "Fill", isDefault: true },
      { name: "outline", label: "Outline" }
    ],
    editorStyle: "wp-block-button-editor",
    style: "wp-block-button",
    selectors: {
      root: ".wp-block-button .wp-block-button__link",
      typography: {
        writingMode: ".wp-block-button"
      },
      dimensions: {
        root: ".wp-block-button",
        width: ".wp-block-button"
      }
    }
  };

  // packages/block-library/build-module/button/save.mjs
  var import_block_editor22 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime221 = __toESM(require_jsx_runtime(), 1);
  function save6({ attributes: attributes2 }) {
    const {
      tagName,
      type,
      fontSize,
      linkTarget,
      rel,
      style: style2,
      text,
      title,
      url
    } = attributes2;
    const TagName2 = tagName || "a";
    const isButtonTag = "button" === TagName2;
    const buttonType = type || "button";
    const borderProps = (0, import_block_editor22.__experimentalGetBorderClassesAndStyles)(attributes2);
    const colorProps = (0, import_block_editor22.__experimentalGetColorClassesAndStyles)(attributes2);
    const spacingProps = (0, import_block_editor22.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor22.__experimentalGetShadowClassesAndStyles)(attributes2);
    const typographyProps = (0, import_block_editor22.getTypographyClassesAndStyles)(attributes2);
    const buttonClasses = clsx_default(
      "wp-block-button__link",
      colorProps.className,
      borderProps.className,
      typographyProps.className,
      {
        // For backwards compatibility add style that isn't provided via
        // block support.
        "no-border-radius": style2?.border?.radius === 0,
        [`has-custom-font-size`]: fontSize || style2?.typography?.fontSize
      },
      (0, import_block_editor22.__experimentalGetElementClassName)("button")
    );
    const buttonStyle = {
      ...borderProps.style,
      ...colorProps.style,
      ...spacingProps.style,
      ...shadowProps.style,
      ...typographyProps.style,
      writingMode: void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ...import_block_editor22.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
      import_block_editor22.RichText.Content,
      {
        tagName: TagName2,
        type: isButtonTag ? buttonType : null,
        className: buttonClasses,
        href: isButtonTag ? null : url,
        title,
        style: buttonStyle,
        value: text,
        target: isButtonTag ? null : linkTarget,
        rel: isButtonTag ? null : rel
      }
    ) });
  }

  // packages/block-library/build-module/button/index.mjs
  var { name: name9 } = block_default10;
  var settings9 = {
    icon: button_default,
    example: {
      attributes: {
        className: "is-style-fill",
        text: (0, import_i18n17.__)("Call to action")
      }
    },
    edit: edit_default2,
    save: save6,
    deprecated: deprecated_default3,
    merge: (a, { text = "" }) => ({
      ...a,
      text: (a.text || "") + text
    }),
    __experimentalLabel(attributes2, { context }) {
      const { text } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = text?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || text;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
    }
  };
  var init9 = () => initBlock({ name: name9, metadata: block_default10, settings: settings9 });

  // packages/block-library/build-module/buttons/index.mjs
  var buttons_exports = {};
  __export(buttons_exports, {
    init: () => init10,
    metadata: () => block_default11,
    name: () => name10,
    settings: () => settings10
  });
  var import_i18n18 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/buttons/deprecated.mjs
  var import_block_editor23 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime222 = __toESM(require_jsx_runtime(), 1);
  var migrateWithLayout = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { contentJustification, orientation, ...updatedAttributes } = attributes2;
    if (contentJustification || orientation) {
      Object.assign(updatedAttributes, {
        layout: {
          type: "flex",
          ...contentJustification && {
            justifyContent: contentJustification
          },
          ...orientation && { orientation }
        }
      });
    }
    return updatedAttributes;
  };
  var deprecated3 = [
    {
      attributes: {
        contentJustification: {
          type: "string"
        },
        orientation: {
          type: "string",
          default: "horizontal"
        }
      },
      supports: {
        anchor: true,
        align: ["wide", "full"],
        __experimentalExposeControlsToChildren: true,
        spacing: {
          blockGap: true,
          margin: ["top", "bottom"],
          __experimentalDefaultControls: {
            blockGap: true
          }
        }
      },
      isEligible: ({ contentJustification, orientation }) => !!contentJustification || !!orientation,
      migrate: migrateWithLayout,
      save({ attributes: { contentJustification, orientation } }) {
        return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
          "div",
          {
            ...import_block_editor23.useBlockProps.save({
              className: clsx_default({
                [`is-content-justification-${contentJustification}`]: contentJustification,
                "is-vertical": orientation === "vertical"
              })
            }),
            children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_block_editor23.InnerBlocks.Content, {})
          }
        );
      }
    },
    {
      supports: {
        align: ["center", "left", "right"],
        anchor: true
      },
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_block_editor23.InnerBlocks.Content, {}) });
      },
      isEligible({ align }) {
        return align && ["center", "left", "right"].includes(align);
      },
      migrate(attributes2) {
        return migrateWithLayout({
          ...attributes2,
          align: void 0,
          // Floating Buttons blocks shouldn't have been supported in the
          // first place. Most users using them probably expected them to
          // act like content justification controls, so these blocks are
          // migrated to use content justification.
          // As for center-aligned Buttons blocks, the content justification
          // equivalent will create an identical end result in most cases.
          contentJustification: attributes2.align
        });
      }
    }
  ];
  var deprecated_default4 = deprecated3;

  // packages/block-library/build-module/buttons/transforms.mjs
  var import_blocks8 = __toESM(require_blocks(), 1);
  var import_rich_text = __toESM(require_rich_text(), 1);

  // packages/block-library/build-module/utils/get-transformed-attributes.mjs
  var import_blocks7 = __toESM(require_blocks(), 1);
  function getTransformedAttributes(attributes2, newBlockName, bindingsCallback = null) {
    if (!attributes2) {
      return void 0;
    }
    const newBlockType = (0, import_blocks7.getBlockType)(newBlockName);
    if (!newBlockType) {
      return void 0;
    }
    const transformedAttributes = {};
    if ((0, import_blocks7.hasBlockSupport)(newBlockType, "anchor") && attributes2.anchor) {
      transformedAttributes.anchor = attributes2.anchor;
    }
    if ((0, import_blocks7.hasBlockSupport)(newBlockType, "ariaLabel") && attributes2.ariaLabel) {
      transformedAttributes.ariaLabel = attributes2.ariaLabel;
    }
    if (attributes2.metadata) {
      const transformedMetadata = [];
      if (bindingsCallback) {
        transformedMetadata.push("id", "bindings");
      }
      if (transformedMetadata.length > 0) {
        const newMetadata = Object.entries(attributes2.metadata).reduce(
          (obj, [prop, value]) => {
            if (!transformedMetadata.includes(prop)) {
              return obj;
            }
            obj[prop] = prop === "bindings" ? bindingsCallback(value) : value;
            return obj;
          },
          {}
        );
        if (Object.keys(newMetadata).length > 0) {
          transformedAttributes.metadata = newMetadata;
        }
      }
    }
    if (Object.keys(transformedAttributes).length === 0) {
      return void 0;
    }
    return transformedAttributes;
  }

  // packages/block-library/build-module/buttons/transforms.mjs
  var transforms2 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/button"],
        transform: (buttons) => (
          // Creates the buttons block.
          (0, import_blocks8.createBlock)(
            "core/buttons",
            {},
            // Loop the selected buttons.
            buttons.map(
              (attributes2) => (
                // Create singular button in the buttons block.
                (0, import_blocks8.createBlock)("core/button", attributes2)
              )
            )
          )
        )
      },
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (buttons) => (
          // Creates the buttons block.
          (0, import_blocks8.createBlock)(
            "core/buttons",
            {},
            // Loop the selected buttons.
            buttons.map((attributes2) => {
              const { content } = attributes2;
              const element = (0, import_rich_text.__unstableCreateElement)(document, content);
              const text = element.innerText || "";
              const link = element.querySelector("a");
              const url = link?.getAttribute("href");
              return (0, import_blocks8.createBlock)("core/button", {
                ...attributes2,
                ...getTransformedAttributes(
                  attributes2,
                  "core/button",
                  ({ content: contentBinding }) => ({
                    text: contentBinding
                  })
                ),
                text,
                url
              });
            })
          )
        ),
        isMatch: (paragraphs) => {
          return paragraphs.every((attributes2) => {
            const element = (0, import_rich_text.__unstableCreateElement)(
              document,
              attributes2.content
            );
            const text = element.innerText || "";
            const links = element.querySelectorAll("a");
            return text.length <= 30 && links.length <= 1;
          });
        }
      }
    ]
  };
  var transforms_default2 = transforms2;

  // packages/block-library/build-module/buttons/edit.mjs
  var import_block_editor24 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime223 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK = {
    name: "core/button"
  };
  function ButtonsEdit({ attributes: attributes2, className }) {
    const { fontSize, layout, style: style2 } = attributes2;
    const blockProps = (0, import_block_editor24.useBlockProps)({
      className: clsx_default(className, {
        "has-custom-font-size": fontSize || style2?.typography?.fontSize
      })
    });
    const innerBlocksProps = (0, import_block_editor24.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK,
      orientation: layout?.orientation ?? "horizontal"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("div", { ...innerBlocksProps });
  }
  var edit_default3 = ButtonsEdit;

  // packages/block-library/build-module/buttons/block.json
  var block_default11 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/buttons",
    title: "Buttons",
    category: "design",
    allowedBlocks: ["core/button"],
    description: "Prompt visitors to take action with a group of button-style links.",
    keywords: ["link"],
    textdomain: "default",
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      __experimentalExposeControlsToChildren: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        blockGap: ["horizontal", "vertical"],
        padding: true,
        margin: ["top", "bottom"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      interactivity: {
        clientNavigation: true
      },
      listView: true,
      contentRole: true
    },
    editorStyle: "wp-block-buttons-editor",
    style: "wp-block-buttons"
  };

  // packages/block-library/build-module/buttons/save.mjs
  var import_block_editor25 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime224 = __toESM(require_jsx_runtime(), 1);
  function save7({ attributes: attributes2, className }) {
    const { fontSize, style: style2 } = attributes2;
    const blockProps = import_block_editor25.useBlockProps.save({
      className: clsx_default(className, {
        "has-custom-font-size": fontSize || style2?.typography?.fontSize
      })
    });
    const innerBlocksProps = import_block_editor25.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime224.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/buttons/index.mjs
  var { name: name10 } = block_default11;
  var TEMPLATE4 = [["core/button"]];
  var settings10 = {
    icon: buttons_default,
    example: {
      attributes: {
        layout: {
          type: "flex",
          justifyContent: "center"
        }
      },
      innerBlocks: [
        {
          name: "core/button",
          attributes: { text: (0, import_i18n18.__)("Find out more") }
        },
        {
          name: "core/button",
          attributes: { text: (0, import_i18n18.__)("Contact us") }
        }
      ]
    },
    deprecated: deprecated_default4,
    transforms: transforms_default2,
    template: TEMPLATE4,
    templateInsertUpdatesSelection: true,
    edit: edit_default3,
    save: save7
  };
  var init10 = () => initBlock({ name: name10, metadata: block_default11, settings: settings10 });

  // packages/block-library/build-module/calendar/index.mjs
  var calendar_exports = {};
  __export(calendar_exports, {
    init: () => init11,
    metadata: () => block_default12,
    name: () => name11,
    settings: () => settings11
  });

  // packages/block-library/build-module/calendar/block.json
  var block_default12 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/calendar",
    title: "Calendar",
    category: "widgets",
    description: "A calendar of your site\u2019s posts.",
    keywords: ["posts", "archive"],
    textdomain: "default",
    attributes: {
      month: {
        type: "integer"
      },
      year: {
        type: "integer"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      color: {
        link: true,
        __experimentalSkipSerialization: ["text", "background"],
        __experimentalDefaultControls: {
          background: true,
          text: true
        },
        __experimentalSelector: "table, th"
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-calendar"
  };

  // packages/block-library/build-module/calendar/edit.mjs
  var import_components10 = __toESM(require_components(), 1);
  var import_data12 = __toESM(require_data(), 1);
  var import_server_side_render3 = __toESM(require_server_side_render(), 1);
  var import_block_editor26 = __toESM(require_block_editor(), 1);
  var import_core_data5 = __toESM(require_core_data(), 1);
  var import_i18n19 = __toESM(require_i18n(), 1);
  var import_compose12 = __toESM(require_compose(), 1);
  var import_jsx_runtime225 = __toESM(require_jsx_runtime(), 1);
  var getYearMonth = memize((date) => {
    if (!date) {
      return {};
    }
    const dateObj = new Date(date);
    return {
      year: dateObj.getFullYear(),
      month: dateObj.getMonth() + 1
    };
  });
  function CalendarEdit({ attributes: attributes2, name: name118 }) {
    const { date, hasPosts, hasPostsResolved } = (0, import_data12.useSelect)((select10) => {
      const { getEntityRecords, hasFinishedResolution } = select10(import_core_data5.store);
      const singlePublishedPostQuery = {
        status: "publish",
        per_page: 1
      };
      const posts = getEntityRecords(
        "postType",
        "post",
        singlePublishedPostQuery
      );
      const postsResolved = hasFinishedResolution("getEntityRecords", [
        "postType",
        "post",
        singlePublishedPostQuery
      ]);
      let _date;
      const editorSelectors = select10("core/editor");
      if (editorSelectors) {
        const postType = editorSelectors.getEditedPostAttribute("type");
        if (postType === "post") {
          _date = editorSelectors.getEditedPostAttribute("date");
        }
      }
      return {
        date: _date,
        hasPostsResolved: postsResolved,
        hasPosts: postsResolved && posts?.length === 1
      };
    }, []);
    const { content, status, error: error2 } = (0, import_server_side_render3.useServerSideRender)({
      attributes: {
        ...attributes2,
        ...getYearMonth(date)
      },
      block: name118
    });
    const disabledRef = (0, import_compose12.useDisabled)();
    const blockProps = (0, import_block_editor26.useBlockProps)({ ref: disabledRef });
    if (!hasPosts) {
      return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components10.Placeholder, { icon: calendar_default, label: (0, import_i18n19.__)("Calendar"), children: !hasPostsResolved ? /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components10.Spinner, {}) : (0, import_i18n19.__)("No published posts found.") }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(import_jsx_runtime225.Fragment, { children: [
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_components10.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)("p", { children: (0, import_i18n19.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n19.__)("Error: %s"),
        error2
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/calendar/transforms.mjs
  var import_blocks9 = __toESM(require_blocks(), 1);
  var transforms3 = {
    from: [
      {
        type: "block",
        blocks: ["core/archives"],
        transform: () => (0, import_blocks9.createBlock)("core/calendar")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/archives"],
        transform: () => (0, import_blocks9.createBlock)("core/archives")
      }
    ]
  };
  var transforms_default3 = transforms3;

  // packages/block-library/build-module/calendar/index.mjs
  var { name: name11 } = block_default12;
  var settings11 = {
    icon: calendar_default,
    example: {},
    edit: CalendarEdit,
    transforms: transforms_default3
  };
  var init11 = () => initBlock({ name: name11, metadata: block_default12, settings: settings11 });

  // packages/block-library/build-module/categories/index.mjs
  var categories_exports = {};
  __export(categories_exports, {
    init: () => init12,
    metadata: () => block_default13,
    name: () => name12,
    settings: () => settings12
  });

  // packages/block-library/build-module/categories/block.json
  var block_default13 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/categories",
    title: "Terms List",
    category: "widgets",
    description: "Display a list of all terms of a given taxonomy.",
    keywords: ["categories"],
    textdomain: "default",
    attributes: {
      taxonomy: {
        type: "string",
        default: "category"
      },
      displayAsDropdown: {
        type: "boolean",
        default: false
      },
      showHierarchy: {
        type: "boolean",
        default: false
      },
      showPostCounts: {
        type: "boolean",
        default: false
      },
      showOnlyTopLevel: {
        type: "boolean",
        default: false
      },
      showEmpty: {
        type: "boolean",
        default: false
      },
      label: {
        type: "string",
        role: "content"
      },
      showLabel: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["enhancedPagination"],
    supports: {
      anchor: true,
      align: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      shadow: true
    },
    editorStyle: "wp-block-categories-editor",
    style: "wp-block-categories"
  };

  // packages/block-library/build-module/categories/edit.mjs
  var import_components11 = __toESM(require_components(), 1);
  var import_compose13 = __toESM(require_compose(), 1);
  var import_block_editor27 = __toESM(require_block_editor(), 1);
  var import_html_entities2 = __toESM(require_html_entities(), 1);
  var import_i18n20 = __toESM(require_i18n(), 1);
  var import_core_data6 = __toESM(require_core_data(), 1);
  var import_data13 = __toESM(require_data(), 1);
  var import_notices2 = __toESM(require_notices(), 1);
  var import_jsx_runtime226 = __toESM(require_jsx_runtime(), 1);
  function CategoriesEdit({
    attributes: {
      displayAsDropdown,
      showHierarchy,
      showPostCounts,
      showOnlyTopLevel,
      showEmpty,
      label,
      showLabel,
      taxonomy: taxonomySlug
    },
    setAttributes,
    className,
    clientId
  }) {
    const selectId = (0, import_compose13.useInstanceId)(CategoriesEdit, "blocks-category-select");
    const { records: allTaxonomies, isResolvingTaxonomies } = (0, import_core_data6.useEntityRecords)(
      "root",
      "taxonomy",
      { per_page: -1 }
    );
    const taxonomies = allTaxonomies?.filter((t) => t.visibility.public);
    const taxonomy = taxonomies?.find((t) => t.slug === taxonomySlug);
    const isHierarchicalTaxonomy = !isResolvingTaxonomies && taxonomy?.hierarchical;
    const query = { per_page: -1, hide_empty: !showEmpty, context: "view" };
    if (isHierarchicalTaxonomy && showOnlyTopLevel) {
      query.parent = 0;
    }
    const { records: categories, isResolving } = (0, import_core_data6.useEntityRecords)(
      "taxonomy",
      taxonomySlug,
      query
    );
    const { createWarningNotice } = (0, import_data13.useDispatch)(import_notices2.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n20.__)("Links are disabled in the editor."), {
        id: `block-library/core/categories/redirection-prevented/${clientId}`,
        type: "snackbar"
      });
    };
    const getCategoriesList = (parentId) => {
      if (!categories?.length) {
        return [];
      }
      if (parentId === null) {
        return categories;
      }
      return categories.filter(({ parent }) => parent === parentId);
    };
    const toggleAttribute = (attributeName) => (newValue) => setAttributes({ [attributeName]: newValue });
    const renderCategoryName = (name118) => !name118 ? (0, import_i18n20.__)("(Untitled)") : (0, import_html_entities2.decodeEntities)(name118).trim();
    const renderCategoryList = () => {
      const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
      const categoriesList = getCategoriesList(parentId);
      return categoriesList.map(
        (category) => renderCategoryListItem(category)
      );
    };
    const renderCategoryListItem = (category) => {
      const childCategories = getCategoriesList(category.id);
      const { id, link, count, name: name118 } = category;
      return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("li", { className: `cat-item cat-item-${id}`, children: [
        /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("a", { href: link, onClick: showRedirectionPreventedNotice, children: renderCategoryName(name118) }),
        showPostCounts && ` (${count})`,
        isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("ul", { className: "children", children: childCategories.map(
          (childCategory) => renderCategoryListItem(childCategory)
        ) })
      ] }, id);
    };
    const renderCategoryDropdown = () => {
      const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
      const categoriesList = getCategoriesList(parentId);
      return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
        showLabel ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
          import_block_editor27.RichText,
          {
            className: "wp-block-categories__label",
            "aria-label": (0, import_i18n20.__)("Label text"),
            placeholder: taxonomy?.name,
            withoutInteractiveFormatting: true,
            value: label,
            onChange: (html) => setAttributes({ label: html })
          }
        ) : (
          // eslint-disable-next-line jsx-a11y/label-has-associated-control
          /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("label", { htmlFor: selectId }), children: label ? label : taxonomy?.name })
        ),
        /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("select", { id: selectId, children: [
          /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("option", { children: (0, import_i18n20.sprintf)(
            /* translators: %s: taxonomy's singular name */
            (0, import_i18n20.__)("Select %s"),
            taxonomy?.labels?.singular_name
          ) }),
          categoriesList.map(
            (category) => renderCategoryDropdownItem(category, 0)
          )
        ] })
      ] });
    };
    const renderCategoryDropdownItem = (category, level) => {
      const { id, count, name: name118 } = category;
      const childCategories = getCategoriesList(id);
      return [
        /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("option", { className: `level-${level}`, children: [
          Array.from({ length: level * 3 }).map(() => "\xA0"),
          renderCategoryName(name118),
          showPostCounts && ` (${count})`
        ] }, id),
        isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && childCategories.map(
          (childCategory) => renderCategoryDropdownItem(childCategory, level + 1)
        )
      ];
    };
    const TagName2 = !!categories?.length && !displayAsDropdown && !isResolving ? "ul" : "div";
    const classes = clsx_default(
      className,
      `wp-block-categories-taxonomy-${taxonomySlug}`,
      {
        "wp-block-categories-list": !!categories?.length && !displayAsDropdown && !isResolving,
        "wp-block-categories-dropdown": !!categories?.length && displayAsDropdown && !isResolving
      }
    );
    const blockProps = (0, import_block_editor27.useBlockProps)({
      className: classes
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(TagName2, { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_block_editor27.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
        import_components11.__experimentalToolsPanel,
        {
          label: (0, import_i18n20.__)("Settings"),
          resetAll: () => {
            setAttributes({
              taxonomy: "category",
              displayAsDropdown: false,
              showHierarchy: false,
              showPostCounts: false,
              showOnlyTopLevel: false,
              showEmpty: false,
              showLabel: true
            });
          },
          dropdownMenuProps,
          children: [
            Array.isArray(taxonomies) && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => {
                  return taxonomySlug !== "category";
                },
                label: (0, import_i18n20.__)("Taxonomy"),
                onDeselect: () => {
                  setAttributes({ taxonomy: "category" });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.SelectControl,
                  {
                    label: (0, import_i18n20.__)("Taxonomy"),
                    options: taxonomies.map((t) => ({
                      label: t.name,
                      value: t.slug
                    })),
                    value: taxonomySlug,
                    onChange: (selectedTaxonomy) => setAttributes({
                      taxonomy: selectedTaxonomy
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayAsDropdown,
                label: (0, import_i18n20.__)("Display as dropdown"),
                onDeselect: () => setAttributes({ displayAsDropdown: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    label: (0, import_i18n20.__)("Display as dropdown"),
                    checked: displayAsDropdown,
                    onChange: toggleAttribute("displayAsDropdown")
                  }
                )
              }
            ),
            displayAsDropdown && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !showLabel,
                label: (0, import_i18n20.__)("Show label"),
                onDeselect: () => setAttributes({ showLabel: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    className: "wp-block-categories__indentation",
                    label: (0, import_i18n20.__)("Show label"),
                    checked: showLabel,
                    onChange: toggleAttribute("showLabel")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showPostCounts,
                label: (0, import_i18n20.__)("Show post counts"),
                onDeselect: () => setAttributes({ showPostCounts: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    label: (0, import_i18n20.__)("Show post counts"),
                    checked: showPostCounts,
                    onChange: toggleAttribute("showPostCounts")
                  }
                )
              }
            ),
            isHierarchicalTaxonomy && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showOnlyTopLevel,
                label: (0, import_i18n20.__)("Show only top level terms"),
                onDeselect: () => setAttributes({ showOnlyTopLevel: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    label: (0, import_i18n20.__)("Show only top level terms"),
                    checked: showOnlyTopLevel,
                    onChange: toggleAttribute(
                      "showOnlyTopLevel"
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showEmpty,
                label: (0, import_i18n20.__)("Show empty terms"),
                onDeselect: () => setAttributes({ showEmpty: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    label: (0, import_i18n20.__)("Show empty terms"),
                    checked: showEmpty,
                    onChange: toggleAttribute("showEmpty")
                  }
                )
              }
            ),
            isHierarchicalTaxonomy && !showOnlyTopLevel && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
              import_components11.__experimentalToolsPanelItem,
              {
                hasValue: () => !!showHierarchy,
                label: (0, import_i18n20.__)("Show hierarchy"),
                onDeselect: () => setAttributes({ showHierarchy: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
                  import_components11.ToggleControl,
                  {
                    label: (0, import_i18n20.__)("Show hierarchy"),
                    checked: showHierarchy,
                    onChange: toggleAttribute("showHierarchy")
                  }
                )
              }
            )
          ]
        }
      ) }),
      isResolving && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_components11.Placeholder, { icon: pin_default, label: (0, import_i18n20.__)("Terms"), children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_components11.Spinner, {}) }),
      !isResolving && categories?.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("p", { children: taxonomy.labels.no_terms }),
      !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())
    ] });
  }

  // packages/block-library/build-module/categories/variations.mjs
  var import_i18n21 = __toESM(require_i18n(), 1);
  var variations = [
    {
      name: "terms",
      title: (0, import_i18n21.__)("Terms List"),
      icon: category_default,
      attributes: {
        // We need to set an attribute here that will be set when inserting the block.
        // We cannot leave this empty, as that would be interpreted as the default value,
        // which is `category` -- for which we're defining a distinct variation below,
        // for backwards compatibility reasons.
        // The logical fallback is thus the only other built-in and public taxonomy: Tags.
        taxonomy: "post_tag"
      },
      isActive: (blockAttributes8) => (
        // This variation is used for any taxonomy other than `category`.
        blockAttributes8.taxonomy !== "category"
      )
    },
    {
      name: "categories",
      title: (0, import_i18n21.__)("Categories List"),
      description: (0, import_i18n21.__)("Display a list of all categories."),
      icon: category_default,
      attributes: {
        taxonomy: "category"
      },
      isActive: ["taxonomy"],
      // The following is needed to prevent "Terms List" from showing up twice in the inserter
      // (once for the block, once for the variation). Fortunately, it does not collide with
      // `categories` being the default value of the `taxonomy` attribute.
      isDefault: true
    }
  ];
  var variations_default = variations;

  // packages/block-library/build-module/categories/index.mjs
  var { name: name12 } = block_default13;
  var settings12 = {
    icon: category_default,
    example: {},
    edit: CategoriesEdit,
    variations: variations_default
  };
  var init12 = () => initBlock({ name: name12, metadata: block_default13, settings: settings12 });

  // packages/block-library/build-module/freeform/index.mjs
  var freeform_exports = {};
  __export(freeform_exports, {
    init: () => init13,
    metadata: () => block_default14,
    name: () => name13,
    settings: () => settings13
  });

  // packages/block-library/build-module/freeform/edit.mjs
  var import_block_editor30 = __toESM(require_block_editor(), 1);
  var import_data16 = __toESM(require_data(), 1);
  var import_components14 = __toESM(require_components(), 1);
  var import_element39 = __toESM(require_element(), 1);
  var import_i18n24 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/freeform/convert-to-blocks-button.mjs
  var import_i18n22 = __toESM(require_i18n(), 1);
  var import_components12 = __toESM(require_components(), 1);
  var import_data14 = __toESM(require_data(), 1);
  var import_blocks10 = __toESM(require_blocks(), 1);
  var import_block_editor28 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime227 = __toESM(require_jsx_runtime(), 1);
  var ConvertToBlocksButton = ({ clientId }) => {
    const { replaceBlocks } = (0, import_data14.useDispatch)(import_block_editor28.store);
    const block = (0, import_data14.useSelect)(
      (select10) => {
        return select10(import_block_editor28.store).getBlock(clientId);
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
      import_components12.ToolbarButton,
      {
        onClick: () => replaceBlocks(
          block.clientId,
          (0, import_blocks10.rawHandler)({ HTML: (0, import_blocks10.serialize)(block) })
        ),
        children: (0, import_i18n22.__)("Convert to blocks")
      }
    );
  };
  var convert_to_blocks_button_default = ConvertToBlocksButton;

  // packages/block-library/build-module/freeform/modal.mjs
  var import_block_editor29 = __toESM(require_block_editor(), 1);
  var import_components13 = __toESM(require_components(), 1);
  var import_element38 = __toESM(require_element(), 1);
  var import_i18n23 = __toESM(require_i18n(), 1);
  var import_data15 = __toESM(require_data(), 1);
  var import_compose14 = __toESM(require_compose(), 1);
  var import_jsx_runtime228 = __toESM(require_jsx_runtime(), 1);
  function ModalAuxiliaryActions({ onClick, isModalFullScreen }) {
    const isMobileViewport = (0, import_compose14.useViewportMatch)("small", "<");
    if (isMobileViewport) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
      import_components13.Button,
      {
        size: "compact",
        onClick,
        icon: fullscreen_default,
        isPressed: isModalFullScreen,
        label: isModalFullScreen ? (0, import_i18n23.__)("Exit fullscreen") : (0, import_i18n23.__)("Enter fullscreen")
      }
    );
  }
  function ClassicEdit(props) {
    const styles = (0, import_data15.useSelect)(
      (select10) => select10(import_block_editor29.store).getSettings().styles
    );
    (0, import_element38.useEffect)(() => {
      const { baseURL, suffix, settings: settings117 } = window.wpEditorL10n.tinymce;
      window.tinymce.EditorManager.overrideDefaults({
        base_url: baseURL,
        suffix
      });
      window.wp.oldEditor.initialize(props.id, {
        tinymce: {
          ...settings117,
          setup(editor) {
            editor.on("init", () => {
              const doc = editor.getDoc();
              styles.forEach(({ css }) => {
                const styleEl = doc.createElement("style");
                styleEl.innerHTML = css;
                doc.head.appendChild(styleEl);
              });
            });
          }
        }
      });
      return () => {
        window.wp.oldEditor.remove(props.id);
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)("textarea", { ...props });
  }
  function ModalEdit({ clientId, content, onClose, onChange }) {
    const [isModalFullScreen, setIsModalFullScreen] = (0, import_element38.useState)(false);
    const id = `editor-${clientId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
      import_components13.Modal,
      {
        title: (0, import_i18n23.__)("Classic Editor"),
        onRequestClose: onClose,
        shouldCloseOnClickOutside: false,
        overlayClassName: "block-editor-freeform-modal",
        isFullScreen: isModalFullScreen,
        className: "block-editor-freeform-modal__content",
        headerActions: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
          ModalAuxiliaryActions,
          {
            onClick: () => setIsModalFullScreen(!isModalFullScreen),
            isModalFullScreen
          }
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(ClassicEdit, { id, defaultValue: content }),
          /* @__PURE__ */ (0, import_jsx_runtime228.jsxs)(
            import_components13.Flex,
            {
              className: "block-editor-freeform-modal__actions",
              justify: "flex-end",
              expanded: false,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_components13.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                  import_components13.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onClose,
                    children: (0, import_i18n23.__)("Cancel")
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(import_components13.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
                  import_components13.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: () => {
                      onChange(window.wp.oldEditor.getContent(id));
                      onClose();
                    },
                    children: (0, import_i18n23.__)("Save")
                  }
                ) })
              ]
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/freeform/edit.mjs
  var import_jsx_runtime229 = __toESM(require_jsx_runtime(), 1);
  function FreeformEdit({
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const { content } = attributes2;
    const [isOpen, setOpen] = (0, import_element39.useState)(false);
    const editButtonRef = (0, import_element39.useRef)(null);
    const canRemove = (0, import_data16.useSelect)(
      (select10) => select10(import_block_editor30.store).canRemoveBlock(clientId),
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_jsx_runtime229.Fragment, { children: [
      canRemove && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_block_editor30.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components14.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(convert_to_blocks_button_default, { clientId }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_block_editor30.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_components14.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
        import_components14.ToolbarButton,
        {
          ref: editButtonRef,
          onClick: () => setOpen(true),
          children: (0, import_i18n24.__)("Edit")
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)("div", { ...(0, import_block_editor30.useBlockProps)(), children: [
        content ? /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_element39.RawHTML, { children: content }) : /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
          import_components14.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_block_editor30.BlockIcon, { icon: classic_default }),
            label: (0, import_i18n24.__)("Classic"),
            instructions: (0, import_i18n24.__)(
              "Use the classic editor to add content."
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
              import_components14.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => setOpen(true),
                children: (0, import_i18n24.__)("Edit contents")
              }
            )
          }
        ),
        isOpen && /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
          ModalEdit,
          {
            clientId,
            content,
            onClose: () => {
              setOpen(false);
              if (editButtonRef.current) {
                editButtonRef.current.focus();
              }
            },
            onChange: (newContent) => setAttributes({ content: newContent })
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/freeform/block.json
  var block_default14 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/freeform",
    title: "Classic",
    category: "text",
    description: "Use the classic WordPress editor.",
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        source: "raw"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      lock: false,
      reusable: false,
      renaming: false,
      visibility: false,
      customCSS: false
    },
    editorStyle: "wp-block-freeform-editor"
  };

  // packages/block-library/build-module/freeform/save.mjs
  var import_element40 = __toESM(require_element(), 1);
  var import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
  function save8({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_element40.RawHTML, { children: content });
  }

  // packages/block-library/build-module/freeform/index.mjs
  var { name: name13 } = block_default14;
  var settings13 = {
    icon: classic_default,
    edit: FreeformEdit,
    save: save8
  };
  var init13 = () => initBlock({ name: name13, metadata: block_default14, settings: settings13 });

  // packages/block-library/build-module/code/index.mjs
  var code_exports = {};
  __export(code_exports, {
    init: () => init14,
    metadata: () => block_default15,
    name: () => name14,
    settings: () => settings14
  });
  var import_i18n26 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/code/edit.mjs
  var import_i18n25 = __toESM(require_i18n(), 1);
  var import_block_editor31 = __toESM(require_block_editor(), 1);
  var import_blocks11 = __toESM(require_blocks(), 1);
  var import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
  function CodeEdit({
    attributes: attributes2,
    setAttributes,
    onRemove,
    insertBlocksAfter,
    mergeBlocks
  }) {
    const blockProps = (0, import_block_editor31.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)("pre", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
      import_block_editor31.RichText,
      {
        tagName: "code",
        identifier: "content",
        value: attributes2.content,
        onChange: (content) => setAttributes({ content }),
        onRemove,
        onMerge: mergeBlocks,
        placeholder: (0, import_i18n25.__)("Write code\u2026"),
        "aria-label": (0, import_i18n25.__)("Code"),
        preserveWhiteSpace: true,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: insertBlocksAfter ? () => insertBlocksAfter(
          (0, import_blocks11.createBlock)((0, import_blocks11.getDefaultBlockName)())
        ) : void 0,
        style: { whiteSpace: "break-spaces" }
      }
    ) });
  }

  // packages/block-library/build-module/code/block.json
  var block_default15 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/code",
    title: "Code",
    category: "text",
    description: "Display code snippets that respect your spacing and tabs.",
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "code",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      align: ["wide"],
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          width: true,
          color: true
        }
      },
      color: {
        text: true,
        background: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-code"
  };

  // packages/block-library/build-module/code/save.mjs
  var import_block_editor32 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/code/utils.mjs
  var import_compose15 = __toESM(require_compose(), 1);
  function escape(content) {
    return (0, import_compose15.pipe)(
      escapeOpeningSquareBrackets,
      escapeProtocolInIsolatedUrls
    )(content || "");
  }
  function escapeOpeningSquareBrackets(content) {
    return content.replace(/\[/g, "&#91;");
  }
  function escapeProtocolInIsolatedUrls(content) {
    return content.replace(
      /^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,
      "$1&#47;&#47;$2"
    );
  }

  // packages/block-library/build-module/code/save.mjs
  var import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
  function save9({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)("pre", { ...import_block_editor32.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
      import_block_editor32.RichText.Content,
      {
        tagName: "code",
        value: escape(
          typeof attributes2.content === "string" ? attributes2.content : attributes2.content.toHTMLString({
            preserveWhiteSpace: true
          })
        )
      }
    ) });
  }

  // packages/block-library/build-module/code/transforms.mjs
  var import_blocks12 = __toESM(require_blocks(), 1);
  var import_rich_text2 = __toESM(require_rich_text(), 1);
  var transforms4 = {
    from: [
      {
        type: "input",
        regExp: /^```$/,
        transform: () => (0, import_blocks12.createBlock)("core/code")
      },
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          const { content } = attributes2;
          return (0, import_blocks12.createBlock)("core/code", {
            ...attributes2,
            ...getTransformedAttributes(attributes2, "core/code"),
            content
          });
        }
      },
      {
        type: "block",
        blocks: ["core/html"],
        __experimentalConvert(block) {
          const { attributes: attributes2 } = block;
          return (0, import_blocks12.createBlock)("core/code", {
            ...attributes2,
            ...getTransformedAttributes(attributes2, "core/code"),
            // The HTML is plain text (with plain line breaks), so
            // convert it to rich text.
            content: (0, import_rich_text2.toHTMLString)({
              value: (0, import_rich_text2.create)({ text: (0, import_blocks12.getBlockContent)(block) })
            })
          });
        }
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "PRE" && node.children.length === 1 && node.firstChild.nodeName === "CODE",
        schema: {
          pre: {
            children: {
              code: {
                children: {
                  "#text": {}
                }
              }
            }
          }
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          const { content } = attributes2;
          return (0, import_blocks12.createBlock)("core/paragraph", {
            ...getTransformedAttributes(attributes2, "core/paragraph"),
            content
          });
        }
      }
    ]
  };
  var transforms_default4 = transforms4;

  // packages/block-library/build-module/code/index.mjs
  var { name: name14 } = block_default15;
  var settings14 = {
    icon: code_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Preserve \n markers for line breaks
        content: (0, import_i18n26.__)(
          "// A \u201Cblock\u201D is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );"
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    },
    transforms: transforms_default4,
    edit: CodeEdit,
    save: save9
  };
  var init14 = () => initBlock({ name: name14, metadata: block_default15, settings: settings14 });

  // packages/block-library/build-module/column/index.mjs
  var column_exports = {};
  __export(column_exports, {
    init: () => init15,
    metadata: () => block_default16,
    name: () => name15,
    settings: () => settings15
  });

  // packages/block-library/build-module/column/deprecated.mjs
  var import_block_editor33 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime233 = __toESM(require_jsx_runtime(), 1);
  var deprecated4 = [
    {
      attributes: {
        verticalAlignment: {
          type: "string"
        },
        width: {
          type: "number",
          min: 0,
          max: 100
        }
      },
      isEligible({ width }) {
        return isFinite(width);
      },
      migrate(attributes2) {
        return {
          ...attributes2,
          width: `${attributes2.width}%`
        };
      },
      save({ attributes: attributes2 }) {
        const { verticalAlignment, width } = attributes2;
        const wrapperClasses = clsx_default({
          [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        const style2 = { flexBasis: width + "%" };
        return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)("div", { className: wrapperClasses, style: style2, children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(import_block_editor33.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default5 = deprecated4;

  // packages/block-library/build-module/column/edit.mjs
  var import_block_editor34 = __toESM(require_block_editor(), 1);
  var import_components15 = __toESM(require_components(), 1);
  var import_data17 = __toESM(require_data(), 1);
  var import_i18n27 = __toESM(require_i18n(), 1);
  var import_jsx_runtime234 = __toESM(require_jsx_runtime(), 1);
  function ColumnInspectorControls({ width, setAttributes }) {
    const [availableUnits] = (0, import_block_editor34.useSettings)("spacing.units");
    const units = (0, import_components15.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"]
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
      import_components15.__experimentalToolsPanel,
      {
        label: (0, import_i18n27.__)("Settings"),
        resetAll: () => {
          setAttributes({ width: void 0 });
        },
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
          import_components15.__experimentalToolsPanelItem,
          {
            hasValue: () => width !== void 0,
            label: (0, import_i18n27.__)("Width"),
            onDeselect: () => setAttributes({ width: void 0 }),
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
              import_components15.__experimentalUnitControl,
              {
                label: (0, import_i18n27.__)("Width"),
                __unstableInputWidth: "calc(50% - 8px)",
                value: width || "",
                onChange: (nextWidth) => {
                  nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
                  setAttributes({ width: nextWidth });
                },
                units
              }
            )
          }
        )
      }
    );
  }
  function ColumnEdit({
    attributes: { verticalAlignment, width, templateLock, allowedBlocks },
    setAttributes,
    clientId
  }) {
    const classes = clsx_default("block-core-columns", {
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
    });
    const { columnsIds, hasChildBlocks, rootClientId } = (0, import_data17.useSelect)(
      (select10) => {
        const { getBlockOrder, getBlockRootClientId } = select10(import_block_editor34.store);
        const rootId = getBlockRootClientId(clientId);
        return {
          hasChildBlocks: getBlockOrder(clientId).length > 0,
          rootClientId: rootId,
          columnsIds: getBlockOrder(rootId)
        };
      },
      [clientId]
    );
    const { updateBlockAttributes } = (0, import_data17.useDispatch)(import_block_editor34.store);
    const updateAlignment = (value) => {
      setAttributes({ verticalAlignment: value });
      updateBlockAttributes(rootClientId, {
        verticalAlignment: null
      });
    };
    const widthWithUnit = Number.isFinite(width) ? width + "%" : width;
    const blockProps = (0, import_block_editor34.useBlockProps)({
      className: classes,
      style: widthWithUnit ? { flexBasis: widthWithUnit } : void 0
    });
    const columnsCount = columnsIds.length;
    const currentColumnPosition = columnsIds.indexOf(clientId) + 1;
    const label = (0, import_i18n27.sprintf)(
      /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
      (0, import_i18n27.__)("%1$s (%2$d of %3$d)"),
      blockProps["aria-label"],
      currentColumnPosition,
      columnsCount
    );
    const innerBlocksProps = (0, import_block_editor34.useInnerBlocksProps)(
      { ...blockProps, "aria-label": label },
      {
        templateLock,
        allowedBlocks,
        renderAppender: hasChildBlocks ? false : import_block_editor34.InnerBlocks.ButtonBlockAppender
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_jsx_runtime234.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_block_editor34.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        import_block_editor34.BlockVerticalAlignmentToolbar,
        {
          onChange: updateAlignment,
          value: verticalAlignment,
          controls: ["top", "center", "bottom", "stretch"]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_block_editor34.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
        ColumnInspectorControls,
        {
          width,
          setAttributes
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime234.jsx)("div", { ...innerBlocksProps })
    ] });
  }
  var edit_default4 = ColumnEdit;

  // packages/block-library/build-module/column/block.json
  var block_default16 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/column",
    title: "Column",
    category: "design",
    parent: ["core/columns"],
    description: "A single column within a columns block.",
    textdomain: "default",
    attributes: {
      verticalAlignment: {
        type: "string"
      },
      width: {
        type: "string"
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      __experimentalOnEnter: true,
      anchor: true,
      reusable: false,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        blockGap: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: true,
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    }
  };

  // packages/block-library/build-module/column/save.mjs
  var import_block_editor35 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime235 = __toESM(require_jsx_runtime(), 1);
  function save10({ attributes: attributes2 }) {
    const { verticalAlignment, width } = attributes2;
    const wrapperClasses = clsx_default({
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
    });
    let style2;
    if (width && /\d/.test(width)) {
      let flexBasis = Number.isFinite(width) ? width + "%" : width;
      if (!Number.isFinite(width) && width?.endsWith("%")) {
        const multiplier = 1e12;
        flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + "%";
      }
      style2 = { flexBasis };
    }
    const blockProps = import_block_editor35.useBlockProps.save({
      className: wrapperClasses,
      style: style2
    });
    const innerBlocksProps = import_block_editor35.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/column/index.mjs
  var { name: name15 } = block_default16;
  var settings15 = {
    icon: column_default,
    edit: edit_default4,
    save: save10,
    deprecated: deprecated_default5
  };
  var init15 = () => initBlock({ name: name15, metadata: block_default16, settings: settings15 });

  // packages/block-library/build-module/columns/index.mjs
  var columns_exports = {};
  __export(columns_exports, {
    init: () => init16,
    metadata: () => block_default17,
    name: () => name16,
    settings: () => settings16
  });
  var import_i18n30 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/columns/deprecated.mjs
  var import_blocks13 = __toESM(require_blocks(), 1);
  var import_block_editor36 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime236 = __toESM(require_jsx_runtime(), 1);
  function getDeprecatedLayoutColumn(originalContent) {
    let { doc } = getDeprecatedLayoutColumn;
    if (!doc) {
      doc = document.implementation.createHTMLDocument("");
      getDeprecatedLayoutColumn.doc = doc;
    }
    let columnMatch;
    doc.body.innerHTML = originalContent;
    for (const classListItem of doc.body.firstChild.classList) {
      if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) {
        return Number(columnMatch[1]) - 1;
      }
    }
  }
  var migrateCustomColors = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    const { customTextColor, customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2,
      isStackedOnMobile: true
    };
  };
  var deprecated_default6 = [
    {
      attributes: {
        verticalAlignment: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        }
      },
      migrate: migrateCustomColors,
      save({ attributes: attributes2 }) {
        const {
          verticalAlignment,
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor36.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor36.getColorClassName)("color", textColor);
        const className = clsx_default({
          "has-background": backgroundColor || customBackgroundColor,
          "has-text-color": textColor || customTextColor,
          [backgroundClass]: backgroundClass,
          [textClass]: textClass,
          [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        const style2 = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
          "div",
          {
            className: className ? className : void 0,
            style: style2,
            children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_block_editor36.InnerBlocks.Content, {})
          }
        );
      }
    },
    {
      attributes: {
        columns: {
          type: "number",
          default: 2
        }
      },
      isEligible(attributes2, innerBlocks) {
        const isFastPassEligible = innerBlocks.some(
          (innerBlock) => /layout-column-\d+/.test(innerBlock.originalContent)
        );
        if (!isFastPassEligible) {
          return false;
        }
        return innerBlocks.some(
          (innerBlock) => getDeprecatedLayoutColumn(innerBlock.originalContent) !== void 0
        );
      },
      migrate(attributes2, innerBlocks) {
        const columns = innerBlocks.reduce((accumulator, innerBlock) => {
          const { originalContent } = innerBlock;
          let columnIndex = getDeprecatedLayoutColumn(originalContent);
          if (columnIndex === void 0) {
            columnIndex = 0;
          }
          if (!accumulator[columnIndex]) {
            accumulator[columnIndex] = [];
          }
          accumulator[columnIndex].push(innerBlock);
          return accumulator;
        }, []);
        const migratedInnerBlocks = columns.map(
          (columnBlocks) => (0, import_blocks13.createBlock)("core/column", {}, columnBlocks)
        );
        const { columns: ignoredColumns, ...restAttributes } = attributes2;
        return [
          {
            ...restAttributes,
            isStackedOnMobile: true
          },
          migratedInnerBlocks
        ];
      },
      save({ attributes: attributes2 }) {
        const { columns } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: `has-${columns}-columns`, children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_block_editor36.InnerBlocks.Content, {}) });
      }
    },
    {
      attributes: {
        columns: {
          type: "number",
          default: 2
        }
      },
      migrate(attributes2, innerBlocks) {
        const { columns, ...restAttributes } = attributes2;
        attributes2 = {
          ...restAttributes,
          isStackedOnMobile: true
        };
        return [attributes2, innerBlocks];
      },
      save({ attributes: attributes2 }) {
        const { verticalAlignment, columns } = attributes2;
        const wrapperClasses = clsx_default(`has-${columns}-columns`, {
          [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
        });
        return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)("div", { className: wrapperClasses, children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(import_block_editor36.InnerBlocks.Content, {}) });
      }
    }
  ];

  // packages/block-library/build-module/columns/edit.mjs
  var import_i18n28 = __toESM(require_i18n(), 1);
  var import_components16 = __toESM(require_components(), 1);
  var import_block_editor37 = __toESM(require_block_editor(), 1);
  var import_data18 = __toESM(require_data(), 1);
  var import_blocks14 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/columns/utils.mjs
  var toWidthPrecision = (value) => {
    const unitlessValue = parseFloat(value);
    return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
  };
  function getEffectiveColumnWidth(block, totalBlockCount) {
    const { width = 100 / totalBlockCount } = block.attributes;
    return toWidthPrecision(width);
  }
  function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
    return blocks.reduce(
      (sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
      0
    );
  }
  function getColumnWidths(blocks, totalBlockCount = blocks.length) {
    return blocks.reduce((accumulator, block) => {
      const width = getEffectiveColumnWidth(block, totalBlockCount);
      return Object.assign(accumulator, { [block.clientId]: width });
    }, {});
  }
  function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
    const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
    return Object.fromEntries(
      Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
        ([clientId, width]) => {
          const newWidth = availableWidth * width / totalWidth;
          return [clientId, toWidthPrecision(newWidth)];
        }
      )
    );
  }
  function hasExplicitPercentColumnWidths(blocks) {
    return blocks.every((block) => {
      const blockWidth = block.attributes.width;
      return Number.isFinite(
        blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
      );
    });
  }
  function getMappedColumnWidths(blocks, widths) {
    return blocks.map((block) => ({
      ...block,
      attributes: {
        ...block.attributes,
        width: `${widths[block.clientId]}%`
      }
    }));
  }

  // packages/block-library/build-module/columns/edit.mjs
  var import_jsx_runtime237 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK2 = {
    name: "core/column"
  };
  function ColumnInspectorControls2({
    clientId,
    setAttributes,
    isStackedOnMobile
  }) {
    const { count, canInsertColumnBlock, minCount } = (0, import_data18.useSelect)(
      (select10) => {
        const { canInsertBlockType, canRemoveBlock, getBlockOrder } = select10(import_block_editor37.store);
        const blockOrder = getBlockOrder(clientId);
        const preventRemovalBlockIndexes = blockOrder.reduce(
          (acc, blockId, index2) => {
            if (!canRemoveBlock(blockId)) {
              acc.push(index2);
            }
            return acc;
          },
          []
        );
        return {
          count: blockOrder.length,
          canInsertColumnBlock: canInsertBlockType(
            "core/column",
            clientId
          ),
          minCount: Math.max(...preventRemovalBlockIndexes) + 1
        };
      },
      [clientId]
    );
    const { getBlocks } = (0, import_data18.useSelect)(import_block_editor37.store);
    const { replaceInnerBlocks } = (0, import_data18.useDispatch)(import_block_editor37.store);
    function updateColumns(previousColumns, newColumns) {
      let innerBlocks = getBlocks(clientId);
      const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks);
      const isAddingColumn = newColumns > previousColumns;
      if (isAddingColumn && hasExplicitWidths) {
        const newColumnWidth = toWidthPrecision(100 / newColumns);
        const newlyAddedColumns = newColumns - previousColumns;
        const widths = getRedistributedColumnWidths(
          innerBlocks,
          100 - newColumnWidth * newlyAddedColumns
        );
        innerBlocks = [
          ...getMappedColumnWidths(innerBlocks, widths),
          ...Array.from({
            length: newlyAddedColumns
          }).map(() => {
            return (0, import_blocks14.createBlock)("core/column", {
              width: `${newColumnWidth}%`
            });
          })
        ];
      } else if (isAddingColumn) {
        innerBlocks = [
          ...innerBlocks,
          ...Array.from({
            length: newColumns - previousColumns
          }).map(() => {
            return (0, import_blocks14.createBlock)("core/column");
          })
        ];
      } else if (newColumns < previousColumns) {
        innerBlocks = innerBlocks.slice(
          0,
          -(previousColumns - newColumns)
        );
        if (hasExplicitWidths) {
          const widths = getRedistributedColumnWidths(innerBlocks, 100);
          innerBlocks = getMappedColumnWidths(innerBlocks, widths);
        }
      }
      replaceInnerBlocks(clientId, innerBlocks);
    }
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(
      import_components16.__experimentalToolsPanel,
      {
        label: (0, import_i18n28.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isStackedOnMobile: true
          });
        },
        dropdownMenuProps,
        children: [
          canInsertColumnBlock && /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_components16.__experimentalVStack, { spacing: 4, style: { gridColumn: "1 / -1" }, children: [
            /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
              import_components16.RangeControl,
              {
                label: (0, import_i18n28.__)("Columns"),
                value: count,
                onChange: (value) => updateColumns(count, Math.max(minCount, value)),
                min: Math.max(1, minCount),
                max: Math.max(6, count)
              }
            ),
            count > 6 && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_components16.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n28.__)(
              "This column count exceeds the recommended amount and may cause visual breakage."
            ) })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
            import_components16.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n28.__)("Stack on mobile"),
              isShownByDefault: true,
              hasValue: () => isStackedOnMobile !== true,
              onDeselect: () => setAttributes({
                isStackedOnMobile: true
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
                import_components16.ToggleControl,
                {
                  label: (0, import_i18n28.__)("Stack on mobile"),
                  checked: isStackedOnMobile,
                  onChange: () => setAttributes({
                    isStackedOnMobile: !isStackedOnMobile
                  })
                }
              )
            }
          )
        ]
      }
    );
  }
  function ColumnsEditContainer({ attributes: attributes2, setAttributes, clientId }) {
    const { isStackedOnMobile, verticalAlignment, templateLock } = attributes2;
    const registry = (0, import_data18.useRegistry)();
    const { getBlockOrder } = (0, import_data18.useSelect)(import_block_editor37.store);
    const { updateBlockAttributes } = (0, import_data18.useDispatch)(import_block_editor37.store);
    const classes = clsx_default({
      [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      [`is-not-stacked-on-mobile`]: !isStackedOnMobile
    });
    const blockProps = (0, import_block_editor37.useBlockProps)({
      className: classes
    });
    const innerBlocksProps = (0, import_block_editor37.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK2,
      directInsert: true,
      orientation: "horizontal",
      renderAppender: false,
      templateLock
    });
    function updateAlignment(newVerticalAlignment) {
      const innerBlockClientIds = getBlockOrder(clientId);
      registry.batch(() => {
        setAttributes({ verticalAlignment: newVerticalAlignment });
        updateBlockAttributes(innerBlockClientIds, {
          verticalAlignment: newVerticalAlignment
        });
      });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(import_jsx_runtime237.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_block_editor37.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
        import_block_editor37.BlockVerticalAlignmentToolbar,
        {
          onChange: updateAlignment,
          value: verticalAlignment
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_block_editor37.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
        ColumnInspectorControls2,
        {
          clientId,
          setAttributes,
          isStackedOnMobile
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { ...innerBlocksProps })
    ] });
  }
  function Placeholder4({ clientId, name: name118, setAttributes }) {
    const { blockType, variations: variations19 } = (0, import_data18.useSelect)(
      (select10) => {
        const { getBlockVariations: getBlockVariations4, getBlockType: getBlockType6 } = select10(import_blocks14.store);
        return {
          blockType: getBlockType6(name118),
          variations: getBlockVariations4(name118, "block")
        };
      },
      [name118]
    );
    const { replaceInnerBlocks } = (0, import_data18.useDispatch)(import_block_editor37.store);
    const blockProps = (0, import_block_editor37.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
      import_block_editor37.__experimentalBlockVariationPicker,
      {
        icon: blockType?.icon?.src,
        label: blockType?.title,
        variations: variations19,
        instructions: (0, import_i18n28.__)("Divide into columns. Select a layout:"),
        onSelect: (nextVariation) => {
          if (nextVariation.attributes) {
            setAttributes(nextVariation.attributes);
          }
          if (nextVariation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks14.createBlocksFromInnerBlocksTemplate)(
                nextVariation.innerBlocks
              ),
              true
            );
          }
        }
      }
    ) });
  }
  var ColumnsEdit = (props) => {
    const { clientId } = props;
    const hasInnerBlocks = (0, import_data18.useSelect)(
      (select10) => select10(import_block_editor37.store).getBlocks(clientId).length > 0,
      [clientId]
    );
    const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder4;
    return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Component, { ...props });
  };
  var edit_default5 = ColumnsEdit;

  // packages/block-library/build-module/columns/block.json
  var block_default17 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/columns",
    title: "Columns",
    category: "design",
    allowedBlocks: ["core/column"],
    description: "Display content in multiple columns, with blocks added to each column.",
    textdomain: "default",
    attributes: {
      verticalAlignment: {
        type: "string"
      },
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        heading: true,
        button: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      spacing: {
        blockGap: {
          __experimentalDefault: "2em",
          sides: ["horizontal", "vertical"]
        },
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowEditing: false,
        default: {
          type: "flex",
          flexWrap: "nowrap"
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      shadow: true
    },
    editorStyle: "wp-block-columns-editor",
    style: "wp-block-columns"
  };

  // packages/block-library/build-module/columns/save.mjs
  var import_block_editor38 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime238 = __toESM(require_jsx_runtime(), 1);
  function save11({ attributes: attributes2 }) {
    const { isStackedOnMobile, verticalAlignment } = attributes2;
    const className = clsx_default({
      [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      [`is-not-stacked-on-mobile`]: !isStackedOnMobile
    });
    const blockProps = import_block_editor38.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor38.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/columns/variations.mjs
  var import_components17 = __toESM(require_components(), 1);
  var import_i18n29 = __toESM(require_i18n(), 1);
  var import_jsx_runtime239 = __toESM(require_jsx_runtime(), 1);
  var variations2 = [
    {
      name: "one-column-full",
      title: (0, import_i18n29.__)("100"),
      description: (0, import_i18n29.__)("One column"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [["core/column"]],
      scope: ["block"]
    },
    {
      name: "two-columns-equal",
      title: (0, import_i18n29.__)("50 / 50"),
      description: (0, import_i18n29.__)("Two columns; equal split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
        }
      ),
      isDefault: true,
      innerBlocks: [["core/column"], ["core/column"]],
      scope: ["block"]
    },
    {
      name: "two-columns-one-third-two-thirds",
      title: (0, import_i18n29.__)("33 / 66"),
      description: (0, import_i18n29.__)("Two columns; one-third, two-thirds split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "33.33%" }],
        ["core/column", { width: "66.66%" }]
      ],
      scope: ["block"]
    },
    {
      name: "two-columns-two-thirds-one-third",
      title: (0, import_i18n29.__)("66 / 33"),
      description: (0, import_i18n29.__)("Two columns; two-thirds, one-third split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "66.66%" }],
        ["core/column", { width: "33.33%" }]
      ],
      scope: ["block"]
    },
    {
      name: "three-columns-equal",
      title: (0, import_i18n29.__)("33 / 33 / 33"),
      description: (0, import_i18n29.__)("Three columns; equal split"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column"],
        ["core/column"],
        ["core/column"]
      ],
      scope: ["block"]
    },
    {
      name: "three-columns-wider-center",
      title: (0, import_i18n29.__)("25 / 50 / 25"),
      description: (0, import_i18n29.__)("Three columns; wide center column"),
      icon: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
        import_components17.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_components17.Path, { d: "M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z" })
        }
      ),
      innerBlocks: [
        ["core/column", { width: "25%" }],
        ["core/column", { width: "50%" }],
        ["core/column", { width: "25%" }]
      ],
      scope: ["block"]
    }
  ];
  var variations_default2 = variations2;

  // packages/block-library/build-module/columns/transforms.mjs
  var import_blocks15 = __toESM(require_blocks(), 1);
  var MAXIMUM_SELECTED_BLOCKS = 6;
  var COLUMN_VERTICAL_ALIGNMENTS = ["top", "center", "bottom"];
  var ROW_VERTICAL_ALIGNMENTS = [...COLUMN_VERTICAL_ALIGNMENTS, "stretch"];
  var FLEX_SIZE_LAYOUT_VALUES = ["fixed", "fixedNoShrink"];
  var DEFAULT_COLUMN_LAYOUT = { type: "default" };
  var getObjectValue = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
  var getGroupAttributes = (attributes2) => {
    const groupAttributeDefinitions = (0, import_blocks15.getBlockType)("core/group")?.attributes;
    if (!groupAttributeDefinitions) {
      return {};
    }
    const normalizedAttributes = getObjectValue(attributes2);
    return Object.fromEntries(
      Object.entries(normalizedAttributes).filter(
        ([name118]) => Object.hasOwn(groupAttributeDefinitions, name118)
      )
    );
  };
  var getColumnWidth = (width) => {
    if (Number.isFinite(width)) {
      return `${width}%`;
    }
    if (typeof width === "string" && /\d/.test(width)) {
      return width;
    }
    return void 0;
  };
  var getColumnBlocksFromGrid = (innerBlocks, columnCount) => {
    const columnWidth = +(100 / columnCount).toFixed(2);
    const innerBlocksTemplate = Array.from(
      { length: columnCount },
      (_2, columnIndex) => [
        "core/column",
        { width: `${columnWidth}%` },
        innerBlocks.filter(
          (_innerBlock, blockIndex) => blockIndex % columnCount === columnIndex
        )
      ]
    );
    return (0, import_blocks15.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate);
  };
  var getColumnBlocksFromRow = (innerBlocks) => innerBlocks.map((innerBlock) => {
    const style2 = getObjectValue(innerBlock?.attributes?.style);
    const { selfStretch, flexSize, ...remainingLayout } = getObjectValue(
      style2.layout
    );
    const columnWidth = FLEX_SIZE_LAYOUT_VALUES.includes(selfStretch) ? getColumnWidth(flexSize) : void 0;
    const updatedStyle = { ...style2 };
    if (Object.keys(remainingLayout).length) {
      updatedStyle.layout = remainingLayout;
    } else {
      delete updatedStyle.layout;
    }
    const columnInnerBlock = (0, import_blocks15.cloneSanitizedBlock)(innerBlock, {
      style: Object.keys(updatedStyle).length ? updatedStyle : void 0
    });
    return (0, import_blocks15.createBlock)(
      "core/column",
      columnWidth ? { width: columnWidth } : {},
      [columnInnerBlock]
    );
  });
  var getGridInnerBlocks = (innerBlocks) => innerBlocks.flatMap((column) => {
    const columnInnerBlocks = column.innerBlocks || [];
    const {
      layout: layoutAttribute,
      style: styleAttribute,
      ...groupAttributes
    } = getGroupAttributes(column?.attributes);
    const columnStyle = getObjectValue(styleAttribute);
    const columnLayout = getObjectValue(layoutAttribute);
    const hasGroupAttributes = Object.keys(groupAttributes).length > 0;
    const hasColumnStyle = Object.keys(columnStyle).length > 0;
    const hasColumnLayout = Object.keys(columnLayout).length > 0;
    if (columnInnerBlocks.length > 1 || hasGroupAttributes || hasColumnStyle || hasColumnLayout) {
      return [
        (0, import_blocks15.createBlock)(
          "core/group",
          {
            ...groupAttributes,
            layout: hasColumnLayout ? columnLayout : DEFAULT_COLUMN_LAYOUT,
            ...hasColumnStyle && {
              style: columnStyle
            }
          },
          columnInnerBlocks
        )
      ];
    }
    return columnInnerBlocks;
  });
  var getRowInnerBlocks = (innerBlocks) => {
    const columnWidths = innerBlocks.map((column) => {
      return getColumnWidth(column?.attributes?.width);
    });
    const allColumnWidthsUnavailable = columnWidths.every(
      (columnWidth) => !columnWidth
    );
    const equalColumnWidth = innerBlocks.length ? `${+(100 / innerBlocks.length).toFixed(2)}%` : void 0;
    return innerBlocks.map((column, index2) => {
      const columnInnerBlocks = Array.isArray(column?.innerBlocks) ? column.innerBlocks : [];
      const columnWidth = columnWidths[index2] || (allColumnWidthsUnavailable ? equalColumnWidth : void 0);
      const childLayout = columnWidth ? { selfStretch: "fixed", flexSize: columnWidth } : { selfStretch: "fill" };
      const {
        layout: layoutAttribute,
        style: styleAttribute,
        ...groupAttributes
      } = getGroupAttributes(column?.attributes);
      const columnStyle = getObjectValue(styleAttribute);
      const columnLayout = getObjectValue(layoutAttribute);
      const hasGroupAttributes = Object.keys(groupAttributes).length > 0;
      const hasColumnStyle = Object.keys(columnStyle).length > 0;
      const hasColumnLayout = Object.keys(columnLayout).length > 0;
      if (columnInnerBlocks.length === 1 && !hasGroupAttributes && !hasColumnStyle && !hasColumnLayout) {
        const innerBlock = columnInnerBlocks[0];
        const style2 = getObjectValue(innerBlock.attributes?.style);
        const layout = getObjectValue(style2.layout);
        const updatedLayout = { ...layout, ...childLayout };
        if (!columnWidth) {
          delete updatedLayout.flexSize;
        }
        return (0, import_blocks15.cloneSanitizedBlock)(innerBlock, {
          style: {
            ...style2,
            layout: updatedLayout
          }
        });
      }
      return (0, import_blocks15.createBlock)(
        "core/group",
        {
          ...groupAttributes,
          layout: hasColumnLayout ? columnLayout : DEFAULT_COLUMN_LAYOUT,
          style: {
            ...columnStyle,
            layout: {
              ...getObjectValue(columnStyle.layout),
              ...childLayout
            }
          }
        },
        columnInnerBlocks
      );
    });
  };
  var transforms5 = {
    from: [
      {
        type: "block",
        blocks: ["core/group"],
        priority: 1,
        transform: (attributes2, innerBlocks) => {
          const { layout, ...rest } = attributes2;
          const { columnCount } = layout;
          return (0, import_blocks15.createBlock)(
            "core/columns",
            rest,
            getColumnBlocksFromGrid(innerBlocks, columnCount)
          );
        },
        isMatch: ({ layout }) => layout?.type === "grid" && Number.isInteger(layout?.columnCount) && layout.columnCount > 0
      },
      {
        type: "block",
        blocks: ["core/group"],
        priority: 1,
        transform: (attributes2, innerBlocks) => {
          const { layout, ...rest } = attributes2;
          const verticalAlignment = COLUMN_VERTICAL_ALIGNMENTS.includes(
            layout?.verticalAlignment
          ) ? layout.verticalAlignment : void 0;
          return (0, import_blocks15.createBlock)(
            "core/columns",
            { ...rest, verticalAlignment },
            getColumnBlocksFromRow(innerBlocks)
          );
        },
        isMatch: ({ layout }) => layout?.type === "flex" && layout?.orientation !== "vertical"
      },
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        __experimentalConvert: (blocks) => {
          const columnWidth = +(100 / blocks.length).toFixed(2);
          const innerBlocksTemplate = blocks.map(
            ({ name: name118, attributes: attributes2, innerBlocks, innerContent }) => [
              "core/column",
              { width: `${columnWidth}%` },
              [
                [
                  name118,
                  { ...attributes2 },
                  innerBlocks,
                  innerContent
                ]
              ]
            ]
          );
          return (0, import_blocks15.createBlock)(
            "core/columns",
            {},
            (0, import_blocks15.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
          );
        },
        isMatch: ({ length: selectedBlocksLength }, blocks) => {
          if (blocks.length === 1 && blocks[0].name === "core/columns") {
            return false;
          }
          return selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS;
        }
      },
      {
        type: "block",
        blocks: ["core/media-text"],
        priority: 1,
        transform: (attributes2, innerBlocks) => {
          const {
            align,
            backgroundColor,
            textColor,
            style: style2,
            mediaAlt: alt,
            mediaId: id,
            mediaPosition: mediaPosition3,
            mediaSizeSlug: sizeSlug,
            mediaType,
            mediaUrl: url,
            mediaWidth,
            verticalAlignment
          } = attributes2;
          let media;
          if (mediaType === "image" || !mediaType) {
            const imageAttrs = { id, alt, url, sizeSlug };
            const linkAttrs = {
              href: attributes2.href,
              linkClass: attributes2.linkClass,
              linkDestination: attributes2.linkDestination,
              linkTarget: attributes2.linkTarget,
              rel: attributes2.rel
            };
            media = ["core/image", { ...imageAttrs, ...linkAttrs }];
          } else {
            media = ["core/video", { id, src: url }];
          }
          const innerBlocksTemplate = [
            ["core/column", { width: `${mediaWidth}%` }, [media]],
            [
              "core/column",
              { width: `${100 - mediaWidth}%` },
              innerBlocks
            ]
          ];
          if (mediaPosition3 === "right") {
            innerBlocksTemplate.reverse();
          }
          return (0, import_blocks15.createBlock)(
            "core/columns",
            {
              align,
              backgroundColor,
              textColor,
              style: style2,
              verticalAlignment
            },
            (0, import_blocks15.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
          );
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/group"],
        variationName: "group-row",
        transform: (attributes2, innerBlocks) => {
          const { verticalAlignment } = attributes2;
          const rowVerticalAlignment = ROW_VERTICAL_ALIGNMENTS.includes(
            verticalAlignment
          ) ? verticalAlignment : "stretch";
          return (0, import_blocks15.createBlock)(
            "core/group",
            {
              ...attributes2,
              isStackedOnMobile: void 0,
              verticalAlignment: void 0,
              layout: {
                type: "flex",
                flexWrap: "nowrap",
                verticalAlignment: rowVerticalAlignment
              }
            },
            getRowInnerBlocks(innerBlocks)
          );
        }
      },
      {
        type: "block",
        blocks: ["core/group"],
        variationName: "group-grid",
        transform: (attributes2, innerBlocks) => {
          const columnCount = innerBlocks.length;
          return (0, import_blocks15.createBlock)(
            "core/group",
            {
              ...attributes2,
              isStackedOnMobile: void 0,
              verticalAlignment: void 0,
              layout: {
                type: "grid",
                ...columnCount && { columnCount }
              }
            },
            getGridInnerBlocks(innerBlocks)
          );
        }
      }
    ],
    ungroup: (attributes2, innerBlocks) => innerBlocks.flatMap((innerBlock) => innerBlock.innerBlocks)
  };
  var transforms_default5 = transforms5;

  // packages/block-library/build-module/columns/index.mjs
  var { name: name16 } = block_default17;
  var settings16 = {
    icon: columns_default,
    variations: variations_default2,
    example: {
      viewportWidth: 782,
      // Columns collapse "@media (max-width: 781px)".
      innerBlocks: [
        {
          name: "core/column",
          innerBlocks: [
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n30.__)(
                  "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."
                )
              }
            },
            {
              name: "core/image",
              attributes: {
                url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg"
              }
            },
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n30.__)(
                  "Suspendisse commodo neque lacus, a dictum orci interdum et."
                )
              }
            }
          ]
        },
        {
          name: "core/column",
          innerBlocks: [
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n30.__)(
                  "Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit."
                )
              }
            },
            {
              name: "core/paragraph",
              attributes: {
                /* translators: example text. */
                content: (0, import_i18n30.__)(
                  "Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim."
                )
              }
            }
          ]
        }
      ]
    },
    deprecated: deprecated_default6,
    edit: edit_default5,
    save: save11,
    transforms: transforms_default5
  };
  var init16 = () => initBlock({ name: name16, metadata: block_default17, settings: settings16 });

  // packages/block-library/build-module/comments/index.mjs
  var comments_exports = {};
  __export(comments_exports, {
    init: () => init17,
    metadata: () => block_default18,
    name: () => name17,
    settings: () => settings17
  });

  // packages/block-library/build-module/comments/block.json
  var block_default18 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments",
    title: "Comments",
    category: "theme",
    description: "An advanced block that allows displaying post comments using different visual configurations.",
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      },
      legacy: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        button: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-comments-editor",
    usesContext: ["postId", "postType"]
  };

  // packages/block-library/build-module/comments/deprecated.mjs
  var import_block_editor39 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime240 = __toESM(require_jsx_runtime(), 1);
  var v15 = {
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      }
    },
    apiVersion: 3,
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      }
    },
    save({ attributes: { tagName: Tag } }) {
      const blockProps = import_block_editor39.useBlockProps.save();
      const { className } = blockProps;
      const classes = className?.split(" ") || [];
      const newClasses = classes?.filter(
        (cls) => cls !== "wp-block-comments"
      );
      const newBlockProps = {
        ...blockProps,
        className: newClasses.join(" ")
      };
      return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(Tag, { ...newBlockProps, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(import_block_editor39.InnerBlocks.Content, {}) });
    }
  };
  var deprecated_default7 = [v15];

  // packages/block-library/build-module/comments/edit/index.mjs
  var import_block_editor44 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/comments/edit/comments-inspector-controls.mjs
  var import_i18n31 = __toESM(require_i18n(), 1);
  var import_block_editor40 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime241 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl2 } = unlock(import_block_editor40.privateApis);
  function CommentsInspectorControls({
    attributes: { tagName },
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_block_editor40.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(import_block_editor40.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
      HTMLElementControl2,
      {
        tagName,
        onChange: (value) => setAttributes({ tagName: value }),
        options: [
          { label: (0, import_i18n31.__)("Default (<div>)"), value: "div" },
          { label: "<section>", value: "section" },
          { label: "<aside>", value: "aside" }
        ]
      }
    ) }) });
  }

  // packages/block-library/build-module/comments/edit/comments-legacy.mjs
  var import_block_editor43 = __toESM(require_block_editor(), 1);
  var import_i18n34 = __toESM(require_i18n(), 1);
  var import_components19 = __toESM(require_components(), 1);

  // packages/block-library/build-module/comments/edit/placeholder.mjs
  var import_block_editor42 = __toESM(require_block_editor(), 1);
  var import_i18n33 = __toESM(require_i18n(), 1);
  var import_data20 = __toESM(require_data(), 1);
  var import_core_data8 = __toESM(require_core_data(), 1);
  var import_element41 = __toESM(require_element(), 1);

  // packages/block-library/build-module/post-comments-form/form.mjs
  var import_i18n32 = __toESM(require_i18n(), 1);
  var import_block_editor41 = __toESM(require_block_editor(), 1);
  var import_components18 = __toESM(require_components(), 1);
  var import_compose16 = __toESM(require_compose(), 1);
  var import_core_data7 = __toESM(require_core_data(), 1);
  var import_data19 = __toESM(require_data(), 1);
  var import_jsx_runtime242 = __toESM(require_jsx_runtime(), 1);
  var CommentsFormPlaceholder = () => {
    const instanceId = (0, import_compose16.useInstanceId)(CommentsFormPlaceholder);
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)("div", { className: "comment-respond", children: [
      /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("h3", { className: "comment-reply-title", children: (0, import_i18n32.__)("Leave a Reply") }),
      /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(
        "form",
        {
          noValidate: true,
          className: "comment-form",
          onSubmit: (event) => event.preventDefault(),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)("p", { children: [
              /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("label", { htmlFor: `comment-${instanceId}`, children: (0, import_i18n32.__)("Comment") }),
              /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
                "textarea",
                {
                  id: `comment-${instanceId}`,
                  name: "comment",
                  cols: "45",
                  rows: "8",
                  readOnly: true
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("p", { className: "form-submit wp-block-button", children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
              "input",
              {
                name: "submit",
                type: "submit",
                className: clsx_default(
                  "wp-block-button__link",
                  (0, import_block_editor41.__experimentalGetElementClassName)("button")
                ),
                label: (0, import_i18n32.__)("Post Comment"),
                value: (0, import_i18n32.__)("Post Comment"),
                "aria-disabled": "true"
              }
            ) })
          ]
        }
      )
    ] });
  };
  var CommentsForm = ({ postId, postType }) => {
    const [commentStatus, setCommentStatus] = (0, import_core_data7.useEntityProp)(
      "postType",
      postType,
      "comment_status",
      postId
    );
    const isSiteEditor = postType === void 0 || postId === void 0;
    const defaultCommentStatus = (0, import_data19.useSelect)(
      (select10) => select10(import_block_editor41.store).getSettings().__experimentalDiscussionSettings?.defaultCommentStatus,
      []
    );
    const postTypeSupportsComments = (0, import_data19.useSelect)(
      (select10) => postType ? !!select10(import_core_data7.store).getPostType(postType)?.supports.comments : false
    );
    if (!isSiteEditor && "open" !== commentStatus) {
      if ("closed" === commentStatus) {
        const actions = [
          /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
            import_components18.Button,
            {
              __next40pxDefaultSize: true,
              onClick: () => setCommentStatus("open"),
              variant: "primary",
              children: (0, import_i18n32._x)(
                "Enable comments",
                "action that affects the current post"
              )
            },
            "enableComments"
          )
        ];
        return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_block_editor41.Warning, { actions, children: (0, import_i18n32.__)(
          "Post Comments Form block: Comments are not enabled for this item."
        ) });
      } else if (!postTypeSupportsComments) {
        return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_block_editor41.Warning, { children: (0, import_i18n32.sprintf)(
          /* translators: %s: Post type (i.e. "post", "page") */
          (0, import_i18n32.__)(
            "Post Comments Form block: Comments are not enabled for this post type (%s)."
          ),
          postType
        ) });
      } else if ("open" !== defaultCommentStatus) {
        return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_block_editor41.Warning, { children: (0, import_i18n32.__)(
          "Post Comments Form block: Comments are not enabled."
        ) });
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(CommentsFormPlaceholder, {});
  };
  var form_default = CommentsForm;

  // packages/block-library/build-module/comments/edit/placeholder.mjs
  var import_jsx_runtime243 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsPlaceholder({ postType, postId }) {
    let [postTitle] = (0, import_core_data8.useEntityProp)("postType", postType, "title", postId);
    postTitle = postTitle || (0, import_i18n33.__)("Post Title");
    const avatarURL = (0, import_data20.useSelect)(
      (select10) => select10(import_block_editor42.store).getSettings().__experimentalDiscussionSettings?.avatarURL,
      []
    );
    return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true", children: [
      /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("h3", {
        /* translators: %s: Post title. */
        children: (0, import_i18n33.sprintf)((0, import_i18n33.__)("One response to %s"), postTitle)
      }),
      /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { className: "navigation", children: [
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("a", { href: "#top", children: [
          "\xAB ",
          (0, import_i18n33.__)("Older Comments")
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("a", { href: "#top", children: [
          (0, import_i18n33.__)("Newer Comments"),
          " \xBB"
        ] }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("article", { className: "comment-body", children: [
        /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("footer", { className: "comment-meta", children: [
          /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { className: "comment-author vcard", children: [
            /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
              "img",
              {
                alt: (0, import_i18n33.__)("Commenter Avatar"),
                src: avatarURL,
                className: "avatar avatar-32 photo",
                height: "32",
                width: "32",
                loading: "lazy"
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("a", { href: "#top", className: "url", children: (0, import_i18n33.__)("A WordPress Commenter") }) }),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("span", { className: "says", children: [
              (0, import_i18n33.__)("says"),
              ":"
            ] })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { className: "comment-metadata", children: [
            /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0, import_i18n33.__)("January 1, 2000 at 00:00 am") }) }),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
              "a",
              {
                className: "comment-edit-link",
                href: "#top",
                children: (0, import_i18n33.__)("Edit")
              }
            ) })
          ] })
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("p", { children: [
          (0, import_i18n33.__)("Hi, this is a comment."),
          /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("br", {}),
          (0, import_i18n33.__)(
            "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
          ),
          /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("br", {}),
          (0, import_element41.createInterpolateElement)(
            (0, import_i18n33.__)(
              "Commenter avatars come from <a>Gravatar</a>."
            ),
            {
              a: (
                // eslint-disable-next-line jsx-a11y/anchor-has-content
                /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("a", { href: "https://gravatar.com/" })
              )
            }
          )
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
          "a",
          {
            className: "comment-reply-link",
            href: "#top",
            "aria-label": (0, import_i18n33.__)(
              "Reply to A WordPress Commenter"
            ),
            /* translators: Comment reply button text. */
            children: (0, import_i18n33._x)("Reply", "verb")
          }
        ) })
      ] }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { className: "navigation", children: [
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("a", { href: "#top", children: [
          "\xAB ",
          (0, import_i18n33.__)("Older Comments")
        ] }) }),
        /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("a", { href: "#top", children: [
          (0, import_i18n33.__)("Newer Comments"),
          " \xBB"
        ] }) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(form_default, { postId, postType })
    ] });
  }

  // packages/block-library/build-module/comments/edit/comments-legacy.mjs
  var import_jsx_runtime244 = __toESM(require_jsx_runtime(), 1);
  function CommentsLegacy({
    attributes: attributes2,
    setAttributes,
    context: { postType, postId }
  }) {
    const { textAlign } = attributes2;
    const actions = [
      /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
        import_components19.Button,
        {
          __next40pxDefaultSize: true,
          onClick: () => void setAttributes({ legacy: false }),
          variant: "primary",
          children: (0, import_i18n34.__)("Switch to editable mode")
        },
        "convert"
      )
    ];
    const blockProps = (0, import_block_editor43.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_jsx_runtime244.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_block_editor43.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
        import_block_editor43.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_block_editor43.Warning, { actions, children: (0, import_i18n34.__)(
          "Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode."
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(PostCommentsPlaceholder, { postId, postType })
      ] })
    ] });
  }

  // packages/block-library/build-module/comments/edit/index.mjs
  var import_jsx_runtime245 = __toESM(require_jsx_runtime(), 1);
  function CommentsEdit(props) {
    const { attributes: attributes2, setAttributes, clientId } = props;
    const { tagName: TagName2, legacy } = attributes2;
    const blockProps = (0, import_block_editor44.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor44.useInnerBlocksProps)(blockProps);
    if (legacy) {
      return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(CommentsLegacy, { ...props });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_jsx_runtime245.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
        CommentsInspectorControls,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/comments/save.mjs
  var import_block_editor45 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime246 = __toESM(require_jsx_runtime(), 1);
  function save12({ attributes: { tagName: Tag, legacy } }) {
    const blockProps = import_block_editor45.useBlockProps.save();
    const innerBlocksProps = import_block_editor45.useInnerBlocksProps.save(blockProps);
    return legacy ? null : /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/comments/edit/template.mjs
  var TEMPLATE5 = [
    ["core/comments-title"],
    [
      "core/comment-template",
      {},
      [
        [
          "core/columns",
          {},
          [
            [
              "core/column",
              { width: "40px" },
              [
                [
                  "core/avatar",
                  {
                    size: 40,
                    style: {
                      border: { radius: "20px" }
                    }
                  }
                ]
              ]
            ],
            [
              "core/column",
              {},
              [
                [
                  "core/comment-author-name",
                  {
                    fontSize: "small"
                  }
                ],
                [
                  "core/group",
                  {
                    layout: { type: "flex" },
                    style: {
                      spacing: {
                        margin: {
                          top: "0px",
                          bottom: "0px"
                        }
                      }
                    }
                  },
                  [
                    [
                      "core/comment-date",
                      {
                        fontSize: "small"
                      }
                    ],
                    [
                      "core/comment-edit-link",
                      {
                        fontSize: "small"
                      }
                    ]
                  ]
                ],
                ["core/comment-content"],
                [
                  "core/comment-reply-link",
                  {
                    fontSize: "small"
                  }
                ]
              ]
            ]
          ]
        ]
      ]
    ],
    ["core/comments-pagination"],
    ["core/post-comments-form"]
  ];
  var template_default = TEMPLATE5;

  // packages/block-library/build-module/comments/index.mjs
  var { name: name17 } = block_default18;
  var settings17 = {
    icon: post_comments_default,
    example: {},
    template: template_default,
    edit: CommentsEdit,
    save: save12,
    deprecated: deprecated_default7
  };
  var init17 = () => initBlock({ name: name17, metadata: block_default18, settings: settings17 });

  // packages/block-library/build-module/comment-author-avatar/index.mjs
  var comment_author_avatar_exports = {};
  __export(comment_author_avatar_exports, {
    init: () => init18,
    metadata: () => block_default19,
    name: () => name18,
    settings: () => settings18
  });

  // packages/block-library/build-module/comment-author-avatar/block.json
  var block_default19 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: "fse",
    name: "core/comment-author-avatar",
    title: "Comment Author Avatar (deprecated)",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "This block is deprecated. Please use the Avatar block instead.",
    textdomain: "default",
    attributes: {
      width: {
        type: "number",
        default: 96
      },
      height: {
        type: "number",
        default: 96
      }
    },
    usesContext: ["commentId"],
    supports: {
      html: false,
      inserter: false,
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      color: {
        background: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        __experimentalSkipSerialization: true,
        margin: true,
        padding: true
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comment-author-avatar/edit.mjs
  var import_block_editor46 = __toESM(require_block_editor(), 1);
  var import_components20 = __toESM(require_components(), 1);
  var import_core_data9 = __toESM(require_core_data(), 1);
  var import_data21 = __toESM(require_data(), 1);
  var import_i18n35 = __toESM(require_i18n(), 1);
  var import_jsx_runtime247 = __toESM(require_jsx_runtime(), 1);
  function Edit6({
    attributes: attributes2,
    context: { commentId },
    setAttributes,
    isSelected
  }) {
    const { height, width } = attributes2;
    const [avatars] = (0, import_core_data9.useEntityProp)(
      "root",
      "comment",
      "author_avatar_urls",
      commentId
    );
    const [authorName] = (0, import_core_data9.useEntityProp)(
      "root",
      "comment",
      "author_name",
      commentId
    );
    const avatarUrls = avatars ? Object.values(avatars) : null;
    const sizes = avatars ? Object.keys(avatars) : null;
    const minSize = sizes ? sizes[0] : 24;
    const maxSize = sizes ? sizes[sizes.length - 1] : 96;
    const blockProps = (0, import_block_editor46.useBlockProps)();
    const spacingProps = (0, import_block_editor46.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const maxSizeBuffer = Math.floor(maxSize * 2.5);
    const avatarURL = (0, import_data21.useSelect)((select10) => {
      const { __experimentalDiscussionSettings } = select10(import_block_editor46.store).getSettings();
      return __experimentalDiscussionSettings?.avatarURL;
    }, []);
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_block_editor46.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_components20.PanelBody, { title: (0, import_i18n35.__)("Settings"), children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
      import_components20.RangeControl,
      {
        label: (0, import_i18n35.__)("Image size"),
        onChange: (newWidth) => setAttributes({
          width: newWidth,
          height: newWidth
        }),
        min: minSize,
        max: maxSizeBuffer,
        initialPosition: width,
        value: width
      }
    ) }) });
    const resizableAvatar = /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
      import_components20.ResizableBox,
      {
        size: {
          width,
          height
        },
        showHandle: isSelected,
        onResizeStop: (event, direction, elt, delta) => {
          setAttributes({
            height: parseInt(height + delta.height, 10),
            width: parseInt(width + delta.width, 10)
          });
        },
        lockAspectRatio: true,
        enable: {
          top: false,
          right: !(0, import_i18n35.isRTL)(),
          bottom: true,
          left: (0, import_i18n35.isRTL)()
        },
        minWidth: minSize,
        maxWidth: maxSizeBuffer,
        children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
          "img",
          {
            src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL,
            alt: `${authorName} ${(0, import_i18n35.__)("Avatar")}`,
            ...blockProps
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_jsx_runtime247.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("div", { ...spacingProps, children: resizableAvatar })
    ] });
  }

  // packages/block-library/build-module/comment-author-avatar/index.mjs
  var { name: name18 } = block_default19;
  var settings18 = {
    icon: comment_author_avatar_default,
    edit: Edit6
  };
  var init18 = () => initBlock({ name: name18, metadata: block_default19, settings: settings18 });

  // packages/block-library/build-module/comment-author-name/index.mjs
  var comment_author_name_exports = {};
  __export(comment_author_name_exports, {
    init: () => init19,
    metadata: () => block_default20,
    name: () => name19,
    settings: () => settings19
  });

  // packages/block-library/build-module/comment-author-name/block.json
  var block_default20 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-author-name",
    title: "Comment Author Name",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the name of the author of the comment.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      background: {
        gradient: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-author-name"
  };

  // packages/block-library/build-module/comment-author-name/edit.mjs
  var import_i18n36 = __toESM(require_i18n(), 1);
  var import_data22 = __toESM(require_data(), 1);
  var import_block_editor47 = __toESM(require_block_editor(), 1);
  var import_core_data10 = __toESM(require_core_data(), 1);
  var import_components21 = __toESM(require_components(), 1);
  var import_jsx_runtime248 = __toESM(require_jsx_runtime(), 1);
  function Edit7(props) {
    const {
      attributes: { isLink, linkTarget },
      context: { commentId },
      setAttributes
    } = props;
    useDeprecatedTextAlign(props);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockProps = (0, import_block_editor47.useBlockProps)();
    let displayName = (0, import_data22.useSelect)(
      (select10) => {
        const { getEntityRecord } = select10(import_core_data10.store);
        const comment = getEntityRecord("root", "comment", commentId);
        const authorName = comment?.author_name;
        if (comment && !authorName) {
          const user = getEntityRecord("root", "user", comment.author);
          return user?.name ?? (0, import_i18n36.__)("Anonymous");
        }
        return authorName ?? "";
      },
      [commentId]
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_block_editor47.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(
      import_components21.__experimentalToolsPanel,
      {
        label: (0, import_i18n36.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isLink: true,
            linkTarget: "_self"
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
            import_components21.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n36.__)("Link to authors URL"),
              isShownByDefault: true,
              hasValue: () => !isLink,
              onDeselect: () => setAttributes({
                isLink: true
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
                import_components21.ToggleControl,
                {
                  label: (0, import_i18n36.__)("Link to authors URL"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          ),
          isLink && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
            import_components21.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n36.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => linkTarget !== "_self",
              onDeselect: () => setAttributes({
                linkTarget: "_self"
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
                import_components21.ToggleControl,
                {
                  label: (0, import_i18n36.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: linkTarget === "_blank"
                }
              )
            }
          )
        ]
      }
    ) });
    if (!commentId || !displayName) {
      displayName = (0, import_i18n36._x)("Comment Author", "block title");
    }
    const displayAuthor = isLink ? /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
      "a",
      {
        href: "#comment-author-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: displayName
      }
    ) : displayName;
    return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(import_jsx_runtime248.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime248.jsx)("div", { ...blockProps, children: displayAuthor })
    ] });
  }

  // packages/block-library/build-module/comment-author-name/deprecated.mjs
  var v22 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      },
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var v16 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: false
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default8 = [v22, v16];

  // packages/block-library/build-module/comment-author-name/index.mjs
  var { name: name19 } = block_default20;
  var settings19 = {
    icon: comment_author_name_default,
    edit: Edit7,
    deprecated: deprecated_default8,
    example: {}
  };
  var init19 = () => initBlock({ name: name19, metadata: block_default20, settings: settings19 });

  // packages/block-library/build-module/comment-content/index.mjs
  var comment_content_exports = {};
  __export(comment_content_exports, {
    init: () => init20,
    metadata: () => block_default21,
    name: () => name20,
    settings: () => settings20
  });

  // packages/block-library/build-module/comment-content/block.json
  var block_default21 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-content",
    title: "Comment Content",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the contents of a comment.",
    textdomain: "default",
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      spacing: {
        padding: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true
        }
      },
      html: false
    },
    style: "wp-block-comment-content"
  };

  // packages/block-library/build-module/comment-content/edit.mjs
  var import_i18n37 = __toESM(require_i18n(), 1);
  var import_element42 = __toESM(require_element(), 1);
  var import_components22 = __toESM(require_components(), 1);
  var import_core_data11 = __toESM(require_core_data(), 1);
  var import_block_editor48 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime249 = __toESM(require_jsx_runtime(), 1);
  function Edit8(props) {
    const {
      context: { commentId }
    } = props;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor48.useBlockProps)();
    const [content] = (0, import_core_data11.useEntityProp)(
      "root",
      "comment",
      "content",
      commentId
    );
    if (!commentId || !content) {
      return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_jsx_runtime249.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("p", { children: (0, import_i18n37._x)("Comment Content", "block title") }) }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_jsx_runtime249.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_components22.Disabled, { children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(import_element42.RawHTML, { children: content.rendered }, "html") }) }) });
  }

  // packages/block-library/build-module/comment-content/deprecated.mjs
  var v17 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        padding: ["horizontal", "vertical"]
      },
      html: false
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default9 = [v17];

  // packages/block-library/build-module/comment-content/index.mjs
  var { name: name20 } = block_default21;
  var settings20 = {
    icon: comment_content_default,
    edit: Edit8,
    deprecated: deprecated_default9,
    example: {}
  };
  var init20 = () => initBlock({ name: name20, metadata: block_default21, settings: settings20 });

  // packages/block-library/build-module/comment-date/index.mjs
  var comment_date_exports = {};
  __export(comment_date_exports, {
    init: () => init21,
    metadata: () => block_default22,
    name: () => name21,
    settings: () => settings21
  });

  // packages/block-library/build-module/comment-date/block.json
  var block_default22 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-date",
    title: "Comment Date",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays the date on which the comment was posted.",
    textdomain: "default",
    attributes: {
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-date"
  };

  // packages/block-library/build-module/comment-date/edit.mjs
  var import_core_data12 = __toESM(require_core_data(), 1);
  var import_date = __toESM(require_date(), 1);
  var import_block_editor49 = __toESM(require_block_editor(), 1);
  var import_components23 = __toESM(require_components(), 1);
  var import_i18n38 = __toESM(require_i18n(), 1);
  var import_jsx_runtime250 = __toESM(require_jsx_runtime(), 1);
  function Edit9({
    attributes: { format: format3, isLink },
    context: { commentId },
    setAttributes
  }) {
    const blockProps = (0, import_block_editor49.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let [date] = (0, import_core_data12.useEntityProp)("root", "comment", "date", commentId);
    const [siteFormat = (0, import_date.getSettings)().formats.date] = (0, import_core_data12.useEntityProp)(
      "root",
      "site",
      "date_format"
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(import_block_editor49.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(
      import_components23.__experimentalToolsPanel,
      {
        label: (0, import_i18n38.__)("Settings"),
        resetAll: () => {
          setAttributes({
            format: void 0,
            isLink: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
            import_components23.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n38.__)("Date format"),
              hasValue: () => format3 !== void 0,
              onDeselect: () => setAttributes({ format: void 0 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
                import_block_editor49.__experimentalDateFormatPicker,
                {
                  format: format3,
                  defaultFormat: siteFormat,
                  onChange: (nextFormat) => setAttributes({ format: nextFormat })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
            import_components23.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n38.__)("Link to comment"),
              hasValue: () => !isLink,
              onDeselect: () => setAttributes({ isLink: true }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
                import_components23.ToggleControl,
                {
                  label: (0, import_i18n38.__)("Link to comment"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          )
        ]
      }
    ) });
    if (!commentId || !date) {
      date = (0, import_i18n38._x)("Comment Date", "block title");
    }
    let commentDate = date instanceof Date ? /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("time", { dateTime: (0, import_date.dateI18n)("c", date), children: format3 === "human-diff" ? (0, import_date.humanTimeDiff)(date) : (0, import_date.dateI18n)(format3 || siteFormat, date) }) : /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("time", { children: date });
    if (isLink) {
      commentDate = /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
        "a",
        {
          href: "#comment-date-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: commentDate
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(import_jsx_runtime250.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime250.jsx)("div", { ...blockProps, children: commentDate })
    ] });
  }

  // packages/block-library/build-module/comment-date/deprecated.mjs
  var v18 = {
    attributes: {
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default10 = [v18];

  // packages/block-library/build-module/comment-date/index.mjs
  var { name: name21 } = block_default22;
  var settings21 = {
    icon: post_date_default,
    edit: Edit9,
    deprecated: deprecated_default10,
    example: {}
  };
  var init21 = () => initBlock({ name: name21, metadata: block_default22, settings: settings21 });

  // packages/block-library/build-module/comment-edit-link/index.mjs
  var comment_edit_link_exports = {};
  __export(comment_edit_link_exports, {
    init: () => init22,
    metadata: () => block_default23,
    name: () => name22,
    settings: () => settings22
  });

  // packages/block-library/build-module/comment-edit-link/block.json
  var block_default23 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-edit-link",
    title: "Comment Edit Link",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",
    textdomain: "default",
    usesContext: ["commentId"],
    attributes: {
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        gradient: true
      },
      color: {
        link: true,
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    style: "wp-block-comment-edit-link"
  };

  // packages/block-library/build-module/comment-edit-link/edit.mjs
  var import_block_editor50 = __toESM(require_block_editor(), 1);
  var import_components24 = __toESM(require_components(), 1);
  var import_i18n39 = __toESM(require_i18n(), 1);
  var import_jsx_runtime251 = __toESM(require_jsx_runtime(), 1);
  function Edit10(props) {
    const { attributes: attributes2, setAttributes } = props;
    const { linkTarget } = attributes2;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor50.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_block_editor50.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
      import_components24.__experimentalToolsPanel,
      {
        label: (0, import_i18n39.__)("Settings"),
        resetAll: () => {
          setAttributes({
            linkTarget: "_self"
          });
        },
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
          import_components24.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n39.__)("Open in new tab"),
            isShownByDefault: true,
            hasValue: () => linkTarget === "_blank",
            onDeselect: () => setAttributes({ linkTarget: "_self" }),
            children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
              import_components24.ToggleControl,
              {
                label: (0, import_i18n39.__)("Open in new tab"),
                onChange: (value) => setAttributes({
                  linkTarget: value ? "_blank" : "_self"
                }),
                checked: linkTarget === "_blank"
              }
            )
          }
        )
      }
    ) });
    return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(import_jsx_runtime251.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime251.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
        "a",
        {
          href: "#edit-comment-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: (0, import_i18n39.__)("Edit")
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/comment-edit-link/deprecated.mjs
  var v19 = {
    attributes: {
      linkTarget: {
        type: "string",
        default: "_self"
      },
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      html: false,
      color: {
        link: true,
        gradients: true,
        text: false
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default11 = [v19];

  // packages/block-library/build-module/comment-edit-link/index.mjs
  var { name: name22 } = block_default23;
  var settings22 = {
    icon: comment_edit_link_default,
    edit: Edit10,
    deprecated: deprecated_default11,
    example: {}
  };
  var init22 = () => initBlock({ name: name22, metadata: block_default23, settings: settings22 });

  // packages/block-library/build-module/comment-reply-link/index.mjs
  var comment_reply_link_exports = {};
  __export(comment_reply_link_exports, {
    init: () => init23,
    metadata: () => block_default24,
    name: () => name23,
    settings: () => settings23
  });

  // packages/block-library/build-module/comment-reply-link/block.json
  var block_default24 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-reply-link",
    title: "Comment Reply Link",
    category: "theme",
    ancestor: ["core/comment-template"],
    description: "Displays a link to reply to a comment.",
    textdomain: "default",
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      html: false
    },
    style: "wp-block-comment-reply-link"
  };

  // packages/block-library/build-module/comment-reply-link/edit.mjs
  var import_i18n40 = __toESM(require_i18n(), 1);
  var import_block_editor51 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime252 = __toESM(require_jsx_runtime(), 1);
  function Edit11(props) {
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor51.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_jsx_runtime252.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
      "a",
      {
        href: "#comment-reply-pseudo-link",
        onClick: (event) => event.preventDefault(),
        /* translators: Comment reply button text. */
        children: (0, import_i18n40._x)("Reply", "verb")
      }
    ) }) });
  }
  var edit_default6 = Edit11;

  // packages/block-library/build-module/comment-reply-link/deprecated.mjs
  var v110 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    usesContext: ["commentId"],
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true,
        text: false
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      html: false
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default12 = [v110];

  // packages/block-library/build-module/comment-reply-link/index.mjs
  var { name: name23 } = block_default24;
  var settings23 = {
    edit: edit_default6,
    icon: comment_reply_link_default,
    deprecated: deprecated_default12,
    example: {}
  };
  var init23 = () => initBlock({ name: name23, metadata: block_default24, settings: settings23 });

  // packages/block-library/build-module/comment-template/index.mjs
  var comment_template_exports = {};
  __export(comment_template_exports, {
    init: () => init24,
    metadata: () => block_default25,
    name: () => name24,
    settings: () => settings24
  });

  // packages/block-library/build-module/comment-template/block.json
  var block_default25 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comment-template",
    title: "Comment Template",
    category: "design",
    parent: ["core/comments"],
    description: "Contains the block elements used to display a comment, like the title, date, author, avatar and more.",
    textdomain: "default",
    usesContext: ["postId"],
    supports: {
      anchor: true,
      align: true,
      html: false,
      reusable: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-comment-template"
  };

  // packages/block-library/build-module/comment-template/edit.mjs
  var import_element44 = __toESM(require_element(), 1);
  var import_data24 = __toESM(require_data(), 1);
  var import_i18n41 = __toESM(require_i18n(), 1);
  var import_block_editor53 = __toESM(require_block_editor(), 1);
  var import_components25 = __toESM(require_components(), 1);
  var import_core_data13 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/comment-template/hooks.mjs
  var import_element43 = __toESM(require_element(), 1);
  var import_data23 = __toESM(require_data(), 1);
  var import_block_editor52 = __toESM(require_block_editor(), 1);
  var import_url4 = __toESM(require_url(), 1);
  var import_api_fetch = __toESM(require_api_fetch(), 1);
  var MAX_COMMENTS_PER_PAGE = 100;
  var useCommentQueryArgs = ({ postId }) => {
    const queryArgs = {
      status: "approve",
      order: "asc",
      context: "embed",
      parent: 0,
      _embed: "children"
    };
    const {
      pageComments,
      commentsPerPage,
      defaultCommentsPage: defaultPage
    } = (0, import_data23.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor52.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings ?? {};
    }, []);
    const perPage = pageComments ? Math.min(commentsPerPage, MAX_COMMENTS_PER_PAGE) : MAX_COMMENTS_PER_PAGE;
    const page = useDefaultPageIndex({
      defaultPage,
      postId,
      perPage,
      queryArgs
    });
    return (0, import_element43.useMemo)(() => {
      return page ? {
        ...queryArgs,
        post: postId,
        per_page: perPage,
        page
      } : null;
    }, [postId, perPage, page]);
  };
  var useDefaultPageIndex = ({ defaultPage, postId, perPage, queryArgs }) => {
    const [defaultPages, setDefaultPages] = (0, import_element43.useState)({});
    const key = `${postId}_${perPage}`;
    const page = defaultPages[key] || 0;
    (0, import_element43.useEffect)(() => {
      if (page || defaultPage !== "newest") {
        return;
      }
      (0, import_api_fetch.default)({
        path: (0, import_url4.addQueryArgs)("/wp/v2/comments", {
          ...queryArgs,
          post: postId,
          per_page: perPage,
          _fields: "id"
        }),
        method: "HEAD",
        parse: false
      }).then((res) => {
        const pages = parseInt(res.headers.get("X-WP-TotalPages"));
        setDefaultPages({
          ...defaultPages,
          [key]: pages <= 1 ? 1 : pages
          // If there are 0 pages, it means that there are no comments, but there is no 0th page.
        });
      }).catch(() => {
        setDefaultPages({
          ...defaultPages,
          [key]: 1
        });
      });
    }, [defaultPage, postId, perPage, setDefaultPages]);
    return defaultPage === "newest" ? page : 1;
  };
  var useCommentTree = (topLevelComments) => {
    const commentTree = (0, import_element43.useMemo)(
      () => topLevelComments?.map(({ id, _embedded }) => {
        const [children] = _embedded?.children || [[]];
        return {
          commentId: id,
          children: children.map((child) => ({
            commentId: child.id
          }))
        };
      }),
      [topLevelComments]
    );
    return commentTree;
  };

  // packages/block-library/build-module/comment-template/edit.mjs
  var import_jsx_runtime253 = __toESM(require_jsx_runtime(), 1);
  var getCommentsPlaceholder = ({
    perPage,
    pageComments,
    threadComments,
    threadCommentsDepth
  }) => {
    const commentsDepth = !threadComments ? 1 : Math.min(threadCommentsDepth, 3);
    const buildChildrenComment = (commentsLevel) => {
      if (commentsLevel < commentsDepth) {
        const nextLevel = commentsLevel + 1;
        return [
          {
            commentId: -(commentsLevel + 3),
            children: buildChildrenComment(nextLevel)
          }
        ];
      }
      return [];
    };
    const placeholderComments = [
      { commentId: -1, children: buildChildrenComment(1) }
    ];
    if ((!pageComments || perPage >= 2) && commentsDepth < 3) {
      placeholderComments.push({
        commentId: -2,
        children: []
      });
    }
    if ((!pageComments || perPage >= 3) && commentsDepth < 2) {
      placeholderComments.push({
        commentId: -3,
        children: []
      });
    }
    return placeholderComments;
  };
  function CommentTemplateInnerBlocks({
    comment,
    activeCommentId,
    setActiveCommentId,
    firstCommentId,
    blocks
  }) {
    const { children, ...innerBlocksProps } = (0, import_block_editor53.useInnerBlocksProps)({});
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)("li", { ...innerBlocksProps, children: [
      comment.commentId === (activeCommentId || firstCommentId) ? children : null,
      /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        MemoizedCommentTemplatePreview,
        {
          blocks,
          commentId: comment.commentId,
          setActiveCommentId,
          isHidden: comment.commentId === (activeCommentId || firstCommentId)
        }
      ),
      comment?.children?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        CommentsList,
        {
          comments: comment.children,
          activeCommentId,
          setActiveCommentId,
          blocks,
          firstCommentId
        }
      ) : null
    ] });
  }
  var CommentTemplatePreview = ({
    blocks,
    commentId,
    setActiveCommentId,
    isHidden
  }) => {
    const blockPreviewProps = (0, import_block_editor53.__experimentalUseBlockPreview)({
      blocks
    });
    const handleOnClick = () => {
      setActiveCommentId(commentId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      "div",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        style: style2,
        onClick: handleOnClick,
        onKeyPress: handleOnClick
      }
    );
  };
  var MemoizedCommentTemplatePreview = (0, import_element44.memo)(CommentTemplatePreview);
  var CommentsList = ({
    comments,
    blockProps,
    activeCommentId,
    setActiveCommentId,
    blocks,
    firstCommentId
  }) => /* @__PURE__ */ (0, import_jsx_runtime253.jsx)("ol", { ...blockProps, children: comments && comments.map(({ commentId, ...comment }, index2) => /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
    import_block_editor53.BlockContextProvider,
    {
      value: {
        // If the commentId is negative it means that this comment is a
        // "placeholder" and that the block is most likely being used in the
        // site editor. In this case, we have to set the commentId to `null`
        // because otherwise the (non-existent) comment with a negative ID
        // would be requested from the REST API.
        commentId: commentId < 0 ? null : commentId
      },
      children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
        CommentTemplateInnerBlocks,
        {
          comment: { commentId, ...comment },
          activeCommentId,
          setActiveCommentId,
          blocks,
          firstCommentId
        }
      )
    },
    comment.commentId || index2
  )) });
  function CommentTemplateEdit({
    clientId,
    context: { postId }
  }) {
    const blockProps = (0, import_block_editor53.useBlockProps)();
    const [activeCommentId, setActiveCommentId] = (0, import_element44.useState)();
    const {
      commentOrder,
      threadCommentsDepth,
      threadComments,
      commentsPerPage,
      pageComments
    } = (0, import_data24.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor53.store);
      return getSettings2().__experimentalDiscussionSettings ?? {};
    }, []);
    const commentQuery = useCommentQueryArgs({
      postId
    });
    const { topLevelComments, blocks } = (0, import_data24.useSelect)(
      (select10) => {
        const { getEntityRecords } = select10(import_core_data13.store);
        const { getBlocks } = select10(import_block_editor53.store);
        return {
          // Request only top-level comments. Replies are embedded.
          topLevelComments: commentQuery ? getEntityRecords("root", "comment", commentQuery) : null,
          blocks: getBlocks(clientId)
        };
      },
      [clientId, commentQuery]
    );
    let commentTree = useCommentTree(
      // Reverse the order of top comments if needed.
      commentOrder === "desc" && topLevelComments ? [...topLevelComments].reverse() : topLevelComments
    );
    if (!topLevelComments) {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(import_components25.Spinner, {}) });
    }
    if (!postId) {
      commentTree = getCommentsPlaceholder({
        perPage: commentsPerPage,
        pageComments,
        threadComments,
        threadCommentsDepth
      });
    }
    if (!commentTree.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)("p", { ...blockProps, children: (0, import_i18n41.__)("No results found.") });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
      CommentsList,
      {
        comments: commentTree,
        blockProps,
        blocks,
        activeCommentId,
        setActiveCommentId,
        firstCommentId: commentTree[0]?.commentId
      }
    );
  }

  // packages/block-library/build-module/comment-template/save.mjs
  var import_block_editor54 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime254 = __toESM(require_jsx_runtime(), 1);
  function CommentTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(import_block_editor54.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/comment-template/index.mjs
  var { name: name24 } = block_default25;
  var TEMPLATE6 = [
    ["core/avatar"],
    ["core/comment-author-name"],
    ["core/comment-date"],
    ["core/comment-content"],
    ["core/comment-reply-link"],
    ["core/comment-edit-link"]
  ];
  var settings24 = {
    icon: layout_default,
    template: TEMPLATE6,
    edit: CommentTemplateEdit,
    save: CommentTemplateSave
  };
  var init24 = () => initBlock({ name: name24, metadata: block_default25, settings: settings24 });

  // packages/block-library/build-module/comments-pagination-previous/index.mjs
  var comments_pagination_previous_exports = {};
  __export(comments_pagination_previous_exports, {
    init: () => init25,
    metadata: () => block_default26,
    name: () => name25,
    settings: () => settings25
  });
  var import_i18n43 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/comments-pagination-previous/block.json
  var block_default26 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-previous",
    title: "Comments Previous Page",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays the previous comment's page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: ["postId", "comments/paginationArrow"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true,
        __experimentalDefaultControls: {
          gradient: true
        }
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-previous/edit.mjs
  var import_i18n42 = __toESM(require_i18n(), 1);
  var import_block_editor55 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime255 = __toESM(require_jsx_runtime(), 1);
  var arrowMap = {
    none: "",
    arrow: "\u2190",
    chevron: "\xAB"
  };
  function CommentsPaginationPreviousEdit({
    attributes: { label },
    setAttributes,
    context: { "comments/paginationArrow": paginationArrow }
  }) {
    const displayArrow = arrowMap[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime255.jsxs)(
      "a",
      {
        href: "#comments-pagination-previous-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor55.useBlockProps)(),
        children: [
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
            "span",
            {
              className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`,
              children: displayArrow
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
            import_block_editor55.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n42.__)("Older comments page link"),
              placeholder: (0, import_i18n42.__)("Older Comments"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination-previous/index.mjs
  var { name: name25 } = block_default26;
  var settings25 = {
    icon: query_pagination_previous_default,
    edit: CommentsPaginationPreviousEdit,
    example: {
      attributes: {
        label: (0, import_i18n43.__)("Older Comments")
      }
    }
  };
  var init25 = () => initBlock({ name: name25, metadata: block_default26, settings: settings25 });

  // packages/block-library/build-module/comments-pagination/index.mjs
  var comments_pagination_exports = {};
  __export(comments_pagination_exports, {
    init: () => init26,
    metadata: () => block_default27,
    name: () => name26,
    settings: () => settings26
  });

  // packages/block-library/build-module/comments-pagination/block.json
  var block_default27 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination",
    title: "Comments Pagination",
    category: "theme",
    parent: ["core/comments"],
    allowedBlocks: [
      "core/comments-pagination-previous",
      "core/comments-pagination-numbers",
      "core/comments-pagination-next"
    ],
    description: "Displays a paginated navigation to next/previous set of comments, when applicable.",
    textdomain: "default",
    attributes: {
      paginationArrow: {
        type: "string",
        default: "none"
      }
    },
    example: {
      attributes: {
        paginationArrow: "none"
      }
    },
    providesContext: {
      "comments/paginationArrow": "paginationArrow"
    },
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-comments-pagination-editor",
    style: "wp-block-comments-pagination"
  };

  // packages/block-library/build-module/comments-pagination/edit.mjs
  var import_i18n45 = __toESM(require_i18n(), 1);
  var import_block_editor56 = __toESM(require_block_editor(), 1);
  var import_data25 = __toESM(require_data(), 1);
  var import_components27 = __toESM(require_components(), 1);

  // packages/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.mjs
  var import_i18n44 = __toESM(require_i18n(), 1);
  var import_components26 = __toESM(require_components(), 1);
  var import_jsx_runtime256 = __toESM(require_jsx_runtime(), 1);
  function CommentsPaginationArrowControls({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime256.jsxs)(
      import_components26.__experimentalToggleGroupControl,
      {
        label: (0, import_i18n44.__)("Arrow"),
        value,
        onChange,
        help: (0, import_i18n44.__)(
          "A decorative arrow appended to the next and previous comments link."
        ),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
            import_components26.__experimentalToggleGroupControlOption,
            {
              value: "none",
              label: (0, import_i18n44._x)(
                "None",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
            import_components26.__experimentalToggleGroupControlOption,
            {
              value: "arrow",
              label: (0, import_i18n44._x)(
                "Arrow",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
            import_components26.__experimentalToggleGroupControlOption,
            {
              value: "chevron",
              label: (0, import_i18n44._x)(
                "Chevron",
                "Arrow option for Comments Pagination Next/Previous blocks"
              )
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination/edit.mjs
  var import_jsx_runtime257 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationEdit({
    attributes: { paginationArrow },
    setAttributes,
    clientId
  }) {
    const hasNextPreviousBlocks = (0, import_data25.useSelect)((select10) => {
      const { getBlocks } = select10(import_block_editor56.store);
      const innerBlocks = getBlocks(clientId);
      return innerBlocks?.find((innerBlock) => {
        return [
          "core/comments-pagination-previous",
          "core/comments-pagination-next"
        ].includes(innerBlock.name);
      });
    }, []);
    const blockProps = (0, import_block_editor56.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const innerBlocksProps = (0, import_block_editor56.useInnerBlocksProps)(blockProps);
    const pageComments = (0, import_data25.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor56.store);
      const { __experimentalDiscussionSettings } = getSettings2();
      return __experimentalDiscussionSettings?.pageComments;
    }, []);
    if (!pageComments) {
      return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_block_editor56.Warning, { children: (0, import_i18n45.__)(
        "Comments Pagination block: paging comments is disabled in the Discussion Settings"
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(import_jsx_runtime257.Fragment, { children: [
      hasNextPreviousBlocks && /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(import_block_editor56.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
        import_components27.__experimentalToolsPanel,
        {
          label: (0, import_i18n45.__)("Settings"),
          dropdownMenuProps,
          resetAll: () => setAttributes({ paginationArrow: "none" }),
          children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
            import_components27.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n45.__)("Arrow"),
              hasValue: () => paginationArrow !== "none",
              onDeselect: () => setAttributes({ paginationArrow: "none" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
                CommentsPaginationArrowControls,
                {
                  value: paginationArrow,
                  onChange: (value) => {
                    setAttributes({ paginationArrow: value });
                  }
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime257.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/comments-pagination/save.mjs
  var import_block_editor57 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
  function save13() {
    return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(import_block_editor57.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/comments-pagination/index.mjs
  var { name: name26 } = block_default27;
  var TEMPLATE7 = [
    ["core/comments-pagination-previous"],
    ["core/comments-pagination-numbers"],
    ["core/comments-pagination-next"]
  ];
  var settings26 = {
    icon: query_pagination_default,
    template: TEMPLATE7,
    edit: QueryPaginationEdit,
    save: save13
  };
  var init26 = () => initBlock({ name: name26, metadata: block_default27, settings: settings26 });

  // packages/block-library/build-module/comments-pagination-next/index.mjs
  var comments_pagination_next_exports = {};
  __export(comments_pagination_next_exports, {
    init: () => init27,
    metadata: () => block_default28,
    name: () => name27,
    settings: () => settings27
  });
  var import_i18n47 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/comments-pagination-next/block.json
  var block_default28 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-next",
    title: "Comments Next Page",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays the next comment's page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: ["postId", "comments/paginationArrow"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-next/edit.mjs
  var import_i18n46 = __toESM(require_i18n(), 1);
  var import_block_editor58 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime259 = __toESM(require_jsx_runtime(), 1);
  var arrowMap2 = {
    none: "",
    arrow: "\u2192",
    chevron: "\xBB"
  };
  function CommentsPaginationNextEdit({
    attributes: { label },
    setAttributes,
    context: { "comments/paginationArrow": paginationArrow }
  }) {
    const displayArrow = arrowMap2[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
      "a",
      {
        href: "#comments-pagination-next-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor58.useBlockProps)(),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
            import_block_editor58.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n46.__)("Newer comments page link"),
              placeholder: (0, import_i18n46.__)("Newer Comments"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          ),
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
            "span",
            {
              className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`,
              children: displayArrow
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/comments-pagination-next/index.mjs
  var { name: name27 } = block_default28;
  var settings27 = {
    icon: query_pagination_next_default,
    edit: CommentsPaginationNextEdit,
    example: {
      attributes: {
        label: (0, import_i18n47.__)("Newer Comments")
      }
    }
  };
  var init27 = () => initBlock({ name: name27, metadata: block_default28, settings: settings27 });

  // packages/block-library/build-module/comments-pagination-numbers/index.mjs
  var comments_pagination_numbers_exports = {};
  __export(comments_pagination_numbers_exports, {
    init: () => init28,
    metadata: () => block_default29,
    name: () => name28,
    settings: () => settings28
  });

  // packages/block-library/build-module/comments-pagination-numbers/block.json
  var block_default29 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-pagination-numbers",
    title: "Comments Page Numbers",
    category: "theme",
    parent: ["core/comments-pagination"],
    description: "Displays a list of page numbers for comments pagination.",
    textdomain: "default",
    usesContext: ["postId"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      }
    }
  };

  // packages/block-library/build-module/comments-pagination-numbers/edit.mjs
  var import_block_editor59 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime260 = __toESM(require_jsx_runtime(), 1);
  var PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
    Tag,
    {
      className: `page-numbers ${extraClass}`,
      href: "#comments-pagination-numbers-pseudo-link",
      onClick: (event) => event.preventDefault(),
      children: content
    }
  ) : /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content });
  function CommentsPaginationNumbersEdit() {
    return /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("div", { ...(0, import_block_editor59.useBlockProps)(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "1" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "2" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "3", tag: "span", extraClass: "current" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "4" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "5" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "...", tag: "span", extraClass: "dots" }),
      /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(PaginationItem, { content: "8" })
    ] });
  }

  // packages/block-library/build-module/comments-pagination-numbers/index.mjs
  var { name: name28 } = block_default29;
  var settings28 = {
    icon: query_pagination_numbers_default,
    edit: CommentsPaginationNumbersEdit,
    example: {}
  };
  var init28 = () => initBlock({ name: name28, metadata: block_default29, settings: settings28 });

  // packages/block-library/build-module/comments-title/index.mjs
  var comments_title_exports = {};
  __export(comments_title_exports, {
    init: () => init29,
    metadata: () => block_default30,
    name: () => name29,
    settings: () => settings29
  });

  // packages/block-library/build-module/comments-title/block.json
  var block_default30 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/comments-title",
    title: "Comments Title",
    category: "theme",
    ancestor: ["core/comments"],
    description: "Displays a title with the number of comments.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    attributes: {
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      background: {
        gradient: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/comments-title/edit.mjs
  var import_block_editor60 = __toESM(require_block_editor(), 1);
  var import_i18n48 = __toESM(require_i18n(), 1);
  var import_core_data14 = __toESM(require_core_data(), 1);
  var import_components28 = __toESM(require_components(), 1);
  var import_element45 = __toESM(require_element(), 1);
  var import_data26 = __toESM(require_data(), 1);
  var import_api_fetch2 = __toESM(require_api_fetch(), 1);
  var import_url5 = __toESM(require_url(), 1);
  var import_jsx_runtime261 = __toESM(require_jsx_runtime(), 1);
  function Edit12(props) {
    useDeprecatedTextAlign(props);
    const { attributes: attributes2, setAttributes, context } = props;
    const {
      showPostTitle,
      showCommentsCount,
      level = 2,
      levelOptions
    } = attributes2;
    const { postId, postType } = context;
    const TagName2 = "h" + level;
    const [commentsCount, setCommentsCount] = (0, import_element45.useState)();
    const [rawTitle] = (0, import_core_data14.useEntityProp)("postType", postType, "title", postId);
    const isSiteEditor = typeof postId === "undefined";
    const blockProps = (0, import_block_editor60.useBlockProps)();
    const {
      threadCommentsDepth,
      threadComments,
      commentsPerPage,
      pageComments
    } = (0, import_data26.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor60.store);
      return getSettings2().__experimentalDiscussionSettings ?? {};
    }, []);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    (0, import_element45.useEffect)(() => {
      if (isSiteEditor) {
        const nestedCommentsNumber = threadComments ? Math.min(threadCommentsDepth, 3) - 1 : 0;
        const topLevelCommentsNumber = pageComments ? commentsPerPage : 3;
        const commentsNumber = parseInt(nestedCommentsNumber) + parseInt(topLevelCommentsNumber);
        setCommentsCount(Math.min(commentsNumber, 3));
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch2.default)({
        path: (0, import_url5.addQueryArgs)("/wp/v2/comments", {
          post: postId,
          _fields: "id"
        }),
        method: "HEAD",
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(
            parseInt(res.headers.get("X-WP-Total"))
          );
        }
      }).catch(() => {
        setCommentsCount(0);
      });
    }, [postId]);
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_block_editor60.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
      import_block_editor60.HeadingLevelDropdown,
      {
        value: level,
        options: levelOptions,
        onChange: (newLevel) => setAttributes({ level: newLevel })
      }
    ) });
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(import_block_editor60.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
      import_components28.__experimentalToolsPanel,
      {
        label: (0, import_i18n48.__)("Settings"),
        resetAll: () => {
          setAttributes({
            showPostTitle: true,
            showCommentsCount: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
            import_components28.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n48.__)("Show post title"),
              isShownByDefault: true,
              hasValue: () => !showPostTitle,
              onDeselect: () => setAttributes({ showPostTitle: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
                import_components28.ToggleControl,
                {
                  label: (0, import_i18n48.__)("Show post title"),
                  checked: showPostTitle,
                  onChange: (value) => setAttributes({ showPostTitle: value })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
            import_components28.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n48.__)("Show comments count"),
              isShownByDefault: true,
              hasValue: () => !showCommentsCount,
              onDeselect: () => setAttributes({ showCommentsCount: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
                import_components28.ToggleControl,
                {
                  label: (0, import_i18n48.__)("Show comments count"),
                  checked: showCommentsCount,
                  onChange: (value) => setAttributes({ showCommentsCount: value })
                }
              )
            }
          )
        ]
      }
    ) });
    const postTitle = isSiteEditor ? (0, import_i18n48.__)("Post Title") : rawTitle;
    let placeholder2;
    if (showCommentsCount && commentsCount !== void 0) {
      if (showPostTitle) {
        if (commentsCount === 1) {
          placeholder2 = (0, import_i18n48.sprintf)(
            /* translators: %s: Post title. */
            (0, import_i18n48.__)('One response to "%s"'),
            postTitle
          );
        } else {
          placeholder2 = (0, import_i18n48.sprintf)(
            /* translators: 1: Number of comments, 2: Post title. */
            (0, import_i18n48._n)(
              '%1$s response to "%2$s"',
              '%1$s responses to "%2$s"',
              commentsCount
            ),
            commentsCount,
            postTitle
          );
        }
      } else if (commentsCount === 1) {
        placeholder2 = (0, import_i18n48.__)("One response");
      } else {
        placeholder2 = (0, import_i18n48.sprintf)(
          /* translators: %s: Number of comments. */
          (0, import_i18n48._n)("%s response", "%s responses", commentsCount),
          commentsCount
        );
      }
    } else if (showPostTitle) {
      if (commentsCount === 1) {
        placeholder2 = (0, import_i18n48.sprintf)((0, import_i18n48.__)('Response to "%s"'), postTitle);
      } else {
        placeholder2 = (0, import_i18n48.sprintf)((0, import_i18n48.__)('Responses to "%s"'), postTitle);
      }
    } else if (commentsCount === 1) {
      placeholder2 = (0, import_i18n48.__)("Response");
    } else {
      placeholder2 = (0, import_i18n48.__)("Responses");
    }
    return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TagName2, { ...blockProps, children: placeholder2 })
    ] });
  }

  // packages/block-library/build-module/comments-title/deprecated.mjs
  var v23 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    migrate: (oldAttributes) => {
      const { singleCommentLabel, multipleCommentsLabel, ...newAttributes } = oldAttributes;
      return migrate_text_align_default(newAttributes);
    },
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v111 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      showPostTitle: {
        type: "boolean",
        default: true
      },
      showCommentsCount: {
        type: "boolean",
        default: true
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      singleCommentLabel: {
        type: "string"
      },
      multipleCommentsLabel: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    migrate: (oldAttributes) => {
      const { singleCommentLabel, multipleCommentsLabel, ...newAttributes } = oldAttributes;
      return migrate_text_align_default(newAttributes);
    },
    isEligible: ({ multipleCommentsLabel, singleCommentLabel }) => multipleCommentsLabel || singleCommentLabel,
    save: () => null
  };
  var deprecated_default13 = [v23, v111];

  // packages/block-library/build-module/comments-title/index.mjs
  var { name: name29 } = block_default30;
  var settings29 = {
    icon: title_default,
    edit: Edit12,
    deprecated: deprecated_default13,
    example: {}
  };
  var init29 = () => initBlock({ name: name29, metadata: block_default30, settings: settings29 });

  // packages/block-library/build-module/cover/index.mjs
  var cover_exports = {};
  __export(cover_exports, {
    init: () => init30,
    metadata: () => block_default31,
    name: () => name30,
    settings: () => settings30
  });
  var import_i18n58 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/cover/deprecated.mjs
  var import_blocks16 = __toESM(require_blocks(), 1);
  var import_block_editor61 = __toESM(require_block_editor(), 1);
  var import_i18n49 = __toESM(require_i18n(), 1);
  var import_compose17 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/cover/shared.mjs
  var import_blob4 = __toESM(require_blob(), 1);
  var POSITION_CLASSNAMES = {
    "top left": "is-position-top-left",
    "top center": "is-position-top-center",
    "top right": "is-position-top-right",
    "center left": "is-position-center-left",
    "center center": "is-position-center-center",
    center: "is-position-center-center",
    "center right": "is-position-center-right",
    "bottom left": "is-position-bottom-left",
    "bottom center": "is-position-bottom-center",
    "bottom right": "is-position-bottom-right"
  };
  var IMAGE_BACKGROUND_TYPE = "image";
  var VIDEO_BACKGROUND_TYPE = "video";
  var EMBED_VIDEO_BACKGROUND_TYPE = "embed-video";
  var COVER_MIN_HEIGHT = 50;
  var DEFAULT_FOCAL_POINT = { x: 0.5, y: 0.5 };
  var ALLOWED_MEDIA_TYPES2 = ["image", "video"];
  function mediaPosition({ x: x3, y: y2 } = DEFAULT_FOCAL_POINT) {
    return `${Math.round(x3 * 100)}% ${Math.round(y2 * 100)}%`;
  }
  function dimRatioToClass(ratio) {
    return ratio === 50 || ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }
  function attributesFromMedia(media) {
    if (!media || !media.url && !media.src) {
      return {
        url: void 0,
        id: void 0
      };
    }
    if ((0, import_blob4.isBlobURL)(media.url)) {
      media.type = (0, import_blob4.getBlobTypeByURL)(media.url);
    }
    let mediaType;
    if (media.media_type) {
      if (media.media_type === IMAGE_BACKGROUND_TYPE) {
        mediaType = IMAGE_BACKGROUND_TYPE;
      } else {
        mediaType = VIDEO_BACKGROUND_TYPE;
      }
    } else if (media.type && (media.type === IMAGE_BACKGROUND_TYPE || media.type === VIDEO_BACKGROUND_TYPE)) {
      mediaType = media.type;
    } else {
      return;
    }
    return {
      url: media.url || media.src,
      id: media.id,
      alt: media?.alt,
      backgroundType: mediaType,
      ...mediaType === VIDEO_BACKGROUND_TYPE ? { hasParallax: void 0 } : {}
    };
  }
  function isContentPositionCenter(contentPosition) {
    return !contentPosition || contentPosition === "center center" || contentPosition === "center";
  }
  function getPositionClassName(contentPosition) {
    if (isContentPositionCenter(contentPosition)) {
      return "";
    }
    return POSITION_CLASSNAMES[contentPosition];
  }

  // packages/block-library/build-module/cover/deprecated.mjs
  var import_jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
  function backgroundImageStyles(url) {
    return url ? { backgroundImage: `url(${url})` } : {};
  }
  function dimRatioToClassV1(ratio) {
    return ratio === 0 || ratio === 50 || !ratio ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }
  function migrateDimRatio(attributes2) {
    return {
      ...attributes2,
      dimRatio: !attributes2.url ? 100 : attributes2.dimRatio
    };
  }
  function migrateTag(attributes2) {
    if (!attributes2.tagName) {
      attributes2 = {
        ...attributes2,
        tagName: "div"
      };
    }
    return {
      ...attributes2
    };
  }
  var blockAttributes2 = {
    url: {
      type: "string"
    },
    id: {
      type: "number"
    },
    hasParallax: {
      type: "boolean",
      default: false
    },
    dimRatio: {
      type: "number",
      default: 50
    },
    overlayColor: {
      type: "string"
    },
    customOverlayColor: {
      type: "string"
    },
    backgroundType: {
      type: "string",
      default: "image"
    },
    focalPoint: {
      type: "object"
    }
  };
  var v8ToV11BlockAttributes = {
    url: {
      type: "string"
    },
    id: {
      type: "number"
    },
    alt: {
      type: "string",
      source: "attribute",
      selector: "img",
      attribute: "alt",
      default: ""
    },
    hasParallax: {
      type: "boolean",
      default: false
    },
    isRepeated: {
      type: "boolean",
      default: false
    },
    dimRatio: {
      type: "number",
      default: 100
    },
    overlayColor: {
      type: "string"
    },
    customOverlayColor: {
      type: "string"
    },
    backgroundType: {
      type: "string",
      default: "image"
    },
    focalPoint: {
      type: "object"
    },
    minHeight: {
      type: "number"
    },
    minHeightUnit: {
      type: "string"
    },
    gradient: {
      type: "string"
    },
    customGradient: {
      type: "string"
    },
    contentPosition: {
      type: "string"
    },
    isDark: {
      type: "boolean",
      default: true
    },
    allowedBlocks: {
      type: "array"
    },
    templateLock: {
      type: ["string", "boolean"],
      enum: ["all", "insert", false]
    }
  };
  var v12toV13BlockAttributes = {
    ...v8ToV11BlockAttributes,
    useFeaturedImage: {
      type: "boolean",
      default: false
    },
    tagName: {
      type: "string",
      default: "div"
    }
  };
  var v14BlockAttributes = {
    ...v12toV13BlockAttributes,
    isUserOverlayColor: {
      type: "boolean"
    },
    sizeSlug: {
      type: "string"
    },
    alt: {
      type: "string",
      default: ""
    }
  };
  var v7toV11BlockSupports = {
    anchor: true,
    align: true,
    html: false,
    spacing: {
      padding: true,
      __experimentalDefaultControls: {
        padding: true
      }
    },
    color: {
      __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
      text: false,
      background: false
    }
  };
  var v12BlockSupports = {
    ...v7toV11BlockSupports,
    spacing: {
      padding: true,
      margin: ["top", "bottom"],
      blockGap: true,
      __experimentalDefaultControls: {
        padding: true,
        blockGap: true
      }
    },
    __experimentalBorder: {
      color: true,
      radius: true,
      style: true,
      width: true,
      __experimentalDefaultControls: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    color: {
      __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
      heading: true,
      text: true,
      background: false,
      __experimentalSkipSerialization: ["gradients"],
      enableContrastChecker: false
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    layout: {
      allowJustification: false
    }
  };
  var v14BlockSupports = {
    ...v12BlockSupports,
    shadow: true,
    dimensions: {
      aspectRatio: true
    },
    interactivity: {
      clientNavigation: true
    }
  };
  var v142 = {
    attributes: v14BlockAttributes,
    supports: v14BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag,
        sizeSlug
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          [`size-${sizeSlug}`]: sizeSlug,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            role: alt ? "img" : void 0,
            "aria-label": alt ? alt : void 0,
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v132 = {
    attributes: v12toV13BlockAttributes,
    supports: v12BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v122 = {
    attributes: v12toV13BlockAttributes,
    supports: v12BlockSupports,
    isEligible(attributes2) {
      return (attributes2.customOverlayColor !== void 0 || attributes2.overlayColor !== void 0) && attributes2.isUserOverlayColor === void 0;
    },
    migrate(attributes2) {
      return {
        ...attributes2,
        isUserOverlayColor: true
      };
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit,
        tagName: Tag
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(Tag, { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    }
  };
  var v112 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
      );
      const backgroundImage = url ? `url(${url})` : void 0;
      const backgroundPosition = mediaPosition(focalPoint);
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const imgClasses = clsx_default(
        "wp-block-cover__image-background",
        id ? `wp-image-${id}` : null,
        {
          "has-parallax": hasParallax,
          "is-repeated": isRepeated
        }
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: imgClasses,
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            role: "img",
            className: imgClasses,
            style: { backgroundPosition, backgroundImage }
          }
        )),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v102 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        useFeaturedImage,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement && !useFeaturedImage ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        !useFeaturedImage && isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v9 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      const gradientValue = gradient || customGradient;
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__background",
              overlayColorClass,
              dimRatioToClass(dimRatio),
              {
                "has-background-dim": dimRatio !== void 0,
                // For backwards compatibility. Former versions of the Cover Block applied
                // `.wp-block-cover__gradient-background` in the presence of
                // media, a gradient and a dim.
                "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                "has-background-gradient": gradientValue,
                [gradientClass]: gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v8 = {
    attributes: v8ToV11BlockAttributes,
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isDark: isDark2,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        minHeight: minHeight || void 0
      };
      const bgStyle = {
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient ? customGradient : void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        {
          "is-light": !isDark2,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              overlayColorClass,
              dimRatioToClass(dimRatio),
              "wp-block-cover__gradient-background",
              gradientClass,
              {
                "has-background-dim": dimRatio !== void 0,
                "has-background-gradient": gradient || customGradient,
                [gradientClass]: !url && gradientClass
              }
            ),
            style: bgStyle
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "div",
          {
            ...import_block_editor61.useInnerBlocksProps.save({
              className: "wp-block-cover__inner-container"
            })
          }
        )
      ] });
    },
    migrate: migrateTag
  };
  var v7 = {
    attributes: {
      ...blockAttributes2,
      isRepeated: {
        type: "boolean",
        default: false
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      }
    },
    supports: v7toV11BlockSupports,
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isRepeated,
        overlayColor,
        url,
        alt,
        id,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const isImgElement = !(hasParallax || isRepeated);
      const style2 = {
        ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
        backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
        background: customGradient && !url ? customGradient : void 0,
        minHeight: minHeight || void 0
      };
      const objectPosition = (
        // prettier-ignore
        focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
      );
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-background-gradient": gradient || customGradient,
          [gradientClass]: !url && gradientClass,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        isImageBackground && isImgElement && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "img",
          {
            className: clsx_default(
              "wp-block-cover__image-background",
              id ? `wp-image-${id}` : null
            ),
            alt,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: clsx_default(
              "wp-block-cover__video-background",
              "intrinsic-ignore"
            ),
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: { objectPosition },
            "data-object-fit": "cover",
            "data-object-position": objectPosition
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose17.compose)(migrateDimRatio, migrateTag)
  };
  var v6 = {
    attributes: {
      ...blockAttributes2,
      isRepeated: {
        type: "boolean",
        default: false
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        contentPosition,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        isRepeated,
        overlayColor,
        url,
        minHeight: minHeightProp,
        minHeightUnit
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
      const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
      const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
      const style2 = isImageBackground ? backgroundImageStyles(url) : {};
      const videoStyle = {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      let positionValue;
      if (focalPoint) {
        positionValue = `${Math.round(
          focalPoint.x * 100
        )}% ${Math.round(focalPoint.y * 100)}%`;
        if (isImageBackground && !hasParallax) {
          style2.backgroundPosition = positionValue;
        }
        if (isVideoBackground) {
          videoStyle.objectPosition = positionValue;
        }
      }
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "is-repeated": isRepeated,
          "has-background-gradient": gradient || customGradient,
          [gradientClass]: !url && gradientClass,
          "has-custom-content-position": !isContentPositionCenter(contentPosition)
        },
        getPositionClassName(contentPosition)
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { ...import_block_editor61.useBlockProps.save({ className: classes, style: style2 }), children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            playsInline: true,
            src: url,
            style: videoStyle
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose17.compose)(migrateDimRatio, migrateTag)
  };
  var v5 = {
    attributes: {
      ...blockAttributes2,
      minHeight: {
        type: "number"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        url,
        minHeight
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${Math.round(
          focalPoint.x * 100
        )}% ${Math.round(focalPoint.y * 100)}%`;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "has-background-gradient": customGradient,
          [gradientClass]: !url && gradientClass
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { className: classes, style: style2, children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose17.compose)(migrateDimRatio, migrateTag)
  };
  var v4 = {
    attributes: {
      ...blockAttributes2,
      minHeight: {
        type: "number"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        gradient,
        customGradient,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        url,
        minHeight
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const gradientClass = (0, import_block_editor61.__experimentalGetGradientClass)(gradient);
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
      }
      if (customGradient && !url) {
        style2.background = customGradient;
      }
      style2.minHeight = minHeight || void 0;
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          "has-background-gradient": customGradient,
          [gradientClass]: !url && gradientClass
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { className: classes, style: style2, children: [
        url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "span",
          {
            "aria-hidden": "true",
            className: clsx_default(
              "wp-block-cover__gradient-background",
              gradientClass
            ),
            style: customGradient ? { background: customGradient } : void 0
          }
        ),
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_block_editor61.InnerBlocks.Content, {}) })
      ] });
    },
    migrate: (0, import_compose17.compose)(migrateDimRatio, migrateTag)
  };
  var v32 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "p"
      },
      contentAlign: {
        type: "string",
        default: "center"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        backgroundType,
        contentAlign,
        customOverlayColor,
        dimRatio,
        focalPoint,
        hasParallax,
        overlayColor,
        title,
        url
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const style2 = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      if (focalPoint && !hasParallax) {
        style2.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
      }
      const classes = clsx_default(
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          [`has-${contentAlign}-content`]: contentAlign !== "center"
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)("div", { className: classes, style: style2, children: [
        VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          "video",
          {
            className: "wp-block-cover__video-background",
            autoPlay: true,
            muted: true,
            loop: true,
            src: url
          }
        ),
        !import_block_editor61.RichText.isEmpty(title) && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
          import_block_editor61.RichText.Content,
          {
            tagName: "p",
            className: "wp-block-cover-text",
            value: title
          }
        )
      ] });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks16.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n49.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var v24 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "p"
      },
      contentAlign: {
        type: "string",
        default: "center"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      className: false
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        title,
        hasParallax,
        dimRatio,
        align,
        contentAlign,
        overlayColor,
        customOverlayColor
      } = attributes2;
      const overlayColorClass = (0, import_block_editor61.getColorClassName)(
        "background-color",
        overlayColor
      );
      const style2 = backgroundImageStyles(url);
      if (!overlayColorClass) {
        style2.backgroundColor = customOverlayColor;
      }
      const classes = clsx_default(
        "wp-block-cover-image",
        dimRatioToClassV1(dimRatio),
        overlayColorClass,
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax,
          [`has-${contentAlign}-content`]: contentAlign !== "center"
        },
        align ? `align${align}` : null
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("div", { className: classes, style: style2, children: !import_block_editor61.RichText.isEmpty(title) && /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
        import_block_editor61.RichText.Content,
        {
          tagName: "p",
          className: "wp-block-cover-image-text",
          value: title
        }
      ) });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, align, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks16.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n49.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var v113 = {
    attributes: {
      ...blockAttributes2,
      title: {
        type: "string",
        source: "html",
        selector: "h2"
      },
      align: {
        type: "string"
      },
      contentAlign: {
        type: "string",
        default: "center"
      }
    },
    supports: {
      className: false
    },
    save({ attributes: attributes2 }) {
      const { url, title, hasParallax, dimRatio, align } = attributes2;
      const style2 = backgroundImageStyles(url);
      const classes = clsx_default(
        "wp-block-cover-image",
        dimRatioToClassV1(dimRatio),
        {
          "has-background-dim": dimRatio !== 0,
          "has-parallax": hasParallax
        },
        align ? `align${align}` : null
      );
      return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("section", { className: classes, style: style2, children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(import_block_editor61.RichText.Content, { tagName: "h2", value: title }) });
    },
    migrate(attributes2) {
      const newAttribs = {
        ...attributes2,
        dimRatio: !attributes2.url ? 100 : attributes2.dimRatio,
        tagName: !attributes2.tagName ? "div" : attributes2.tagName
      };
      const { title, contentAlign, align, ...restAttributes } = newAttribs;
      return [
        restAttributes,
        [
          (0, import_blocks16.createBlock)("core/paragraph", {
            content: attributes2.title,
            style: {
              typography: {
                textAlign: attributes2.contentAlign
              }
            },
            fontSize: "large",
            placeholder: (0, import_i18n49.__)("Write title\u2026")
          })
        ]
      ];
    }
  };
  var deprecated_default14 = [v142, v132, v122, v112, v102, v9, v8, v7, v6, v5, v4, v32, v24, v113];

  // packages/block-library/build-module/cover/edit/index.mjs
  var import_core_data16 = __toESM(require_core_data(), 1);
  var import_element52 = __toESM(require_element(), 1);
  var import_components34 = __toESM(require_components(), 1);
  var import_compose20 = __toESM(require_compose(), 1);
  var import_block_editor69 = __toESM(require_block_editor(), 1);
  var import_i18n56 = __toESM(require_i18n(), 1);
  var import_data30 = __toESM(require_data(), 1);
  var import_blocks18 = __toESM(require_blocks(), 1);
  var import_blob7 = __toESM(require_blob(), 1);
  var import_notices4 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/cover/edit/inspector-controls.mjs
  var import_element48 = __toESM(require_element(), 1);
  var import_components31 = __toESM(require_components(), 1);
  var import_compose19 = __toESM(require_compose(), 1);
  var import_block_editor65 = __toESM(require_block_editor(), 1);
  var import_i18n52 = __toESM(require_i18n(), 1);
  var import_data29 = __toESM(require_data(), 1);
  var import_core_data15 = __toESM(require_core_data(), 1);
  var import_url7 = __toESM(require_url(), 1);

  // packages/block-library/build-module/utils/style-state.mjs
  var import_block_editor62 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject2 } = unlock(import_block_editor62.privateApis);
  function getStateStyle(style2, selectedState) {
    return (0, import_block_editor62.getStyleForState)(style2, selectedState) || {};
  }
  function getMappedDimensions(dimensions, dimensionKeyMap = {}) {
    return Object.fromEntries(
      Object.entries(dimensions).map(([key, value]) => [
        dimensionKeyMap[key] || key,
        value
      ])
    );
  }
  function getControlledDimensions(dimensions, dimensionKeys) {
    if (!dimensionKeys) {
      return dimensions;
    }
    return Object.fromEntries(
      dimensionKeys.map((key) => [key, dimensions[key]])
    );
  }
  function getStyleStateKey(selectedState) {
    return [
      selectedState?.viewport || "default",
      selectedState?.pseudo || "default"
    ].join(":");
  }
  function getStateDimensions(style2, selectedState) {
    return getStateStyle(style2, selectedState)?.dimensions || {};
  }
  function getActiveDimensionValue(options2 = {}) {
    const {
      attributes: attributes2 = {},
      style: style2 = attributes2?.style,
      selectedState,
      hasSelectedStyleState,
      attributeKey,
      styleKey = attributeKey,
      rootValue
    } = options2;
    if (hasSelectedStyleState) {
      return getStateDimensions(style2, selectedState)?.[styleKey];
    }
    if (Object.hasOwn(options2, "rootValue")) {
      return rootValue;
    }
    return attributes2?.[attributeKey];
  }
  function setStateDimensions(style2, selectedState, nextDimensions) {
    const stateStyle = getStateStyle(style2, selectedState);
    return (0, import_block_editor62.setStyleForState)(
      style2,
      selectedState,
      cleanEmptyObject2({
        ...stateStyle,
        dimensions: cleanEmptyObject2({
          ...stateStyle?.dimensions,
          ...nextDimensions
        })
      })
    );
  }
  function getDimensionUpdateAttributes({
    style: style2,
    selectedState,
    hasSelectedStyleState,
    nextDimensions,
    dimensionKeyMap,
    dimensionKeys
  }) {
    const controlledDimensions = getControlledDimensions(
      nextDimensions,
      dimensionKeys
    );
    if (!hasSelectedStyleState) {
      return controlledDimensions;
    }
    return {
      style: setStateDimensions(
        style2,
        selectedState,
        getMappedDimensions(controlledDimensions, dimensionKeyMap)
      )
    };
  }
  function resetDimensions(style2, keys) {
    const dimensionsReset = Object.fromEntries(
      keys.map((key) => [key, void 0])
    );
    return cleanEmptyObject2({
      ...style2,
      dimensions: cleanEmptyObject2({
        ...style2?.dimensions,
        ...dimensionsReset
      })
    });
  }
  function resetStateDimensions(style2, selectedState, keys) {
    return (0, import_block_editor62.setStyleForState)(
      style2,
      selectedState,
      resetDimensions(getStateStyle(style2, selectedState), keys)
    );
  }
  function getDimensionResetAttributes({
    attributes: attributes2 = {},
    style: style2 = attributes2?.style,
    selectedState,
    hasSelectedStyleState,
    keys,
    defaultAttributes = {}
  }) {
    return {
      ...hasSelectedStyleState ? {} : { ...attributes2, ...defaultAttributes },
      style: hasSelectedStyleState ? resetStateDimensions(style2, selectedState, keys) : resetDimensions(style2, keys)
    };
  }

  // packages/block-library/build-module/cover/constants.mjs
  var DEFAULT_MEDIA_SIZE_SLUG = "full";

  // packages/block-library/build-module/utils/poster-image.mjs
  var import_block_editor63 = __toESM(require_block_editor(), 1);
  var import_notices3 = __toESM(require_notices(), 1);
  var import_components29 = __toESM(require_components(), 1);
  var import_blob5 = __toESM(require_blob(), 1);
  var import_i18n50 = __toESM(require_i18n(), 1);
  var import_element46 = __toESM(require_element(), 1);
  var import_compose18 = __toESM(require_compose(), 1);
  var import_data27 = __toESM(require_data(), 1);
  var import_jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
  var POSTER_IMAGE_ALLOWED_MEDIA_TYPES = ["image"];
  function PosterImage({ poster, onChange }) {
    const posterButtonRef = (0, import_element46.useRef)();
    const [isLoading, setIsLoading] = (0, import_element46.useState)(false);
    const descriptionId = (0, import_compose18.useInstanceId)(
      PosterImage,
      "block-library-poster-image-description"
    );
    const { getSettings: getSettings2 } = (0, import_data27.useSelect)(import_block_editor63.store);
    const { createErrorNotice } = (0, import_data27.useDispatch)(import_notices3.store);
    const onDropFiles = (filesList) => {
      getSettings2().mediaUpload({
        allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
        filesList,
        onFileChange: ([image]) => {
          if ((0, import_blob5.isBlobURL)(image?.url)) {
            setIsLoading(true);
            return;
          }
          if (image) {
            onChange(image);
          }
          setIsLoading(false);
        },
        onError: (message) => {
          createErrorNotice(message, {
            id: "poster-image-upload-notice",
            type: "snackbar"
          });
          setIsLoading(false);
        },
        multiple: false
      });
    };
    const getPosterButtonContent = () => {
      if (!poster && isLoading) {
        return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_components29.Spinner, {});
      }
      return !poster ? (0, import_i18n50.__)("Set poster image") : (0, import_i18n50.__)("Replace");
    };
    return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_block_editor63.MediaUploadCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
      import_components29.__experimentalToolsPanelItem,
      {
        label: (0, import_i18n50.__)("Poster image"),
        isShownByDefault: true,
        hasValue: () => !!poster,
        onDeselect: () => onChange(void 0),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_components29.BaseControl.VisualLabel, { children: (0, import_i18n50.__)("Poster image") }),
          /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
            import_block_editor63.MediaUpload,
            {
              title: (0, import_i18n50.__)("Select poster image"),
              onSelect: onChange,
              allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
              render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)("div", { className: "block-library-poster-image__container", children: [
                poster && /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
                  import_components29.Button,
                  {
                    __next40pxDefaultSize: true,
                    onClick: open,
                    "aria-haspopup": "dialog",
                    "aria-label": (0, import_i18n50.__)(
                      "Edit or replace the poster image."
                    ),
                    className: "block-library-poster-image__preview",
                    disabled: isLoading,
                    accessibleWhenDisabled: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
                        "img",
                        {
                          src: poster,
                          alt: (0, import_i18n50.__)("Poster image preview"),
                          className: "block-library-poster-image__preview-image"
                        }
                      ),
                      isLoading && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_components29.Spinner, {})
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
                  import_components29.__experimentalHStack,
                  {
                    className: clsx_default(
                      "block-library-poster-image__actions",
                      {
                        "block-library-poster-image__actions-select": !poster
                      }
                    ),
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
                        import_components29.Button,
                        {
                          __next40pxDefaultSize: true,
                          onClick: open,
                          ref: posterButtonRef,
                          className: "block-library-poster-image__action",
                          "aria-describedby": descriptionId,
                          "aria-haspopup": "dialog",
                          variant: !poster ? "secondary" : void 0,
                          disabled: isLoading,
                          accessibleWhenDisabled: true,
                          children: getPosterButtonContent()
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("p", { id: descriptionId, hidden: true, children: poster ? (0, import_i18n50.sprintf)(
                        /* translators: %s: poster image URL. */
                        (0, import_i18n50.__)(
                          "The current poster image url is %s."
                        ),
                        poster
                      ) : (0, import_i18n50.__)(
                        "There is no poster image currently selected."
                      ) }),
                      !!poster && /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
                        import_components29.Button,
                        {
                          __next40pxDefaultSize: true,
                          onClick: () => {
                            onChange(void 0);
                            posterButtonRef.current.focus();
                          },
                          className: "block-library-poster-image__action",
                          disabled: isLoading,
                          accessibleWhenDisabled: true,
                          children: (0, import_i18n50.__)("Remove")
                        }
                      )
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(import_components29.DropZone, { onFilesDrop: onDropFiles })
              ] })
            }
          )
        ]
      }
    ) });
  }
  var poster_image_default = PosterImage;

  // packages/block-library/build-module/utils/media-control.mjs
  var import_components30 = __toESM(require_components(), 1);
  var import_block_editor64 = __toESM(require_block_editor(), 1);
  var import_dom10 = __toESM(require_dom(), 1);
  var import_element47 = __toESM(require_element(), 1);
  var import_i18n51 = __toESM(require_i18n(), 1);
  var import_data28 = __toESM(require_data(), 1);
  var import_url6 = __toESM(require_url(), 1);
  var import_jsx_runtime264 = __toESM(require_jsx_runtime(), 1);
  var focusToggleButton = (containerRef) => {
    window.requestAnimationFrame(() => {
      const [toggleButton] = import_dom10.focus.tabbable.find(containerRef?.current);
      if (!toggleButton) {
        return;
      }
      toggleButton.focus();
    });
  };
  function MediaControlPreview({
    url,
    filename,
    itemGroupProps,
    className,
    label
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.__experimentalItemGroup, { ...itemGroupProps, as: "span", children: /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(import_components30.__experimentalHStack, { justify: "flex-start", children: [
      /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
        "span",
        {
          className: "block-library-utils__media-control__inspector-image-indicator",
          style: {
            backgroundImage: url ? `url(${url})` : void 0
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.__experimentalTruncate, { numberOfLines: 1, className, children: filename ?? label }) })
    ] }) });
  }
  function MediaControl({
    mediaId,
    mediaUrl,
    filename,
    allowedTypes,
    onSelect,
    onSelectURL,
    onError,
    onReset,
    isUploading = false,
    emptyLabel = (0, import_i18n51.__)("Media"),
    useFeaturedImage,
    onToggleFeaturedImage
  }) {
    const { getSettings: getSettings2 } = (0, import_data28.useSelect)(import_block_editor64.store);
    const onFilesDrop = (filesList) => {
      const { mediaUpload } = getSettings2();
      if (!mediaUpload) {
        return;
      }
      mediaUpload({
        allowedTypes,
        filesList,
        onFileChange([media]) {
          onSelect(media);
        },
        onError,
        multiple: false
      });
    };
    const containerRef = (0, import_element47.useRef)();
    return /* @__PURE__ */ (0, import_jsx_runtime264.jsxs)(
      "div",
      {
        ref: containerRef,
        className: "block-library-utils__media-control",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
            import_block_editor64.MediaReplaceFlow,
            {
              className: "block-library-utils__media-control__replace-flow",
              mediaId,
              mediaURL: mediaUrl,
              allowedTypes,
              onSelect,
              onSelectURL,
              onError,
              useFeaturedImage,
              onToggleFeaturedImage,
              name: /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
                MediaControlPreview,
                {
                  url: mediaUrl,
                  filename,
                  className: "block-library-utils__media-control__inspector-media-replace-title",
                  label: mediaUrl ? (0, import_url6.getFilename)(filename) || emptyLabel : emptyLabel
                }
              ),
              renderToggle: (props) => /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.Button, { ...props, __next40pxDefaultSize: true, children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.Spinner, {}) : props.children }),
              onReset
            }
          ),
          mediaUrl && onReset && /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
            import_components30.Button,
            {
              label: (0, import_i18n51.__)("Reset"),
              className: "block-library-utils__media-control__reset",
              size: "small",
              icon: reset_default,
              onClick: () => {
                onReset();
                focusToggleButton(containerRef);
              }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_components30.DropZone, { onFilesDrop })
        ]
      }
    );
  }

  // packages/block-library/build-module/cover/edit/inspector-controls.mjs
  var import_jsx_runtime265 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject3, ResolutionTool, HTMLElementControl: HTMLElementControl3 } = unlock(
    import_block_editor65.privateApis
  );
  function CoverHeightInput({
    onChange,
    onUnitChange,
    unit = "px",
    value = ""
  }) {
    const instanceId = (0, import_compose19.useInstanceId)(import_components31.__experimentalUnitControl);
    const inputId = `block-cover-height-input-${instanceId}`;
    const isPx = unit === "px";
    const [availableUnits] = (0, import_block_editor65.useSettings)("spacing.units");
    const units = (0, import_components31.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "em", "rem", "vw", "vh"],
      defaultValues: { px: 430, "%": 20, em: 20, rem: 20, vw: 20, vh: 50 }
    });
    const handleOnChange = (unprocessedValue) => {
      const inputValue = unprocessedValue !== "" ? parseFloat(unprocessedValue) : void 0;
      if (isNaN(inputValue) && inputValue !== void 0) {
        return;
      }
      onChange(inputValue);
    };
    const computedValue = (0, import_element48.useMemo)(() => {
      const [parsedQuantity] = (0, import_components31.__experimentalParseQuantityAndUnitFromRawValue)(value);
      return [parsedQuantity, unit].join("");
    }, [unit, value]);
    const min = isPx ? COVER_MIN_HEIGHT : 0;
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
      import_components31.__experimentalUnitControl,
      {
        label: (0, import_i18n52.__)("Minimum height"),
        id: inputId,
        isResetValueOnUnitChange: true,
        min,
        onChange: handleOnChange,
        onUnitChange,
        units,
        value: computedValue
      }
    );
  }
  function CoverInspectorControls({
    attributes: attributes2,
    setAttributes,
    clientId,
    setOverlayColor,
    coverRef,
    currentSettings,
    onSelectMedia,
    onUploadError,
    toggleUseFeaturedImage,
    updateDimRatio,
    onClearMedia,
    featuredImage,
    isSelected
  }) {
    const {
      useFeaturedImage,
      id,
      dimRatio,
      focalPoint,
      hasParallax,
      isRepeated,
      minHeight,
      minHeightUnit,
      alt,
      tagName,
      poster
    } = attributes2;
    const {
      isVideoBackground,
      isImageBackground,
      mediaElement,
      url,
      overlayColor
    } = currentSettings;
    const sizeSlug = attributes2.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
    const { gradientValue, setGradient } = (0, import_block_editor65.__experimentalUseGradient)();
    const { imageSizes, selectedStyleState, hasSelectedStyleState } = (0, import_data29.useSelect)(
      (select10) => {
        const {
          getSettings: getSettings2,
          getSelectedBlockStyleState,
          hasSelectedBlockStyleState
        } = select10(import_block_editor65.store);
        return {
          imageSizes: getSettings2()?.imageSizes,
          selectedStyleState: getSelectedBlockStyleState(clientId),
          hasSelectedStyleState: hasSelectedBlockStyleState(clientId)
        };
      },
      [clientId]
    );
    const selectedStyleStateKey = getStyleStateKey(selectedStyleState);
    const stateMinHeight = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "minHeight",
      styleKey: "minHeight",
      rootValue: void 0
    });
    const [stateMinHeightValue, stateMinHeightUnit] = (0, import_components31.__experimentalParseQuantityAndUnitFromRawValue)(stateMinHeight || "");
    const activeMinHeight = hasSelectedStyleState ? stateMinHeightValue : minHeight;
    const activeMinHeightUnit = hasSelectedStyleState ? stateMinHeightUnit || minHeightUnit : minHeightUnit;
    const activeAspectRatio = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "aspectRatio",
      rootValue: attributes2?.style?.dimensions?.aspectRatio
    });
    const image = (0, import_data29.useSelect)(
      (select10) => id && isImageBackground ? select10(import_core_data15.store).getEntityRecord(
        "postType",
        "attachment",
        id,
        { context: "view" }
      ) : null,
      [id, isImageBackground]
    );
    const currentBackgroundImage = useFeaturedImage ? featuredImage : image;
    function updateImage(newSizeSlug) {
      const newUrl = currentBackgroundImage?.media_details?.sizes?.[newSizeSlug]?.source_url;
      if (!newUrl) {
        return null;
      }
      setAttributes({
        url: newUrl,
        sizeSlug: newSizeSlug
      });
    }
    const imageSizeOptions = imageSizes?.filter(
      ({ slug }) => currentBackgroundImage?.media_details?.sizes?.[slug]?.source_url
    )?.map(({ name: name118, slug }) => ({ value: slug, label: name118 }));
    const toggleParallax = () => {
      setAttributes({
        hasParallax: !hasParallax,
        ...!hasParallax ? { focalPoint: void 0 } : {}
      });
    };
    const toggleIsRepeated = () => {
      setAttributes({
        isRepeated: !isRepeated
      });
    };
    const showFocalPointPicker = isVideoBackground || isImageBackground;
    const imperativeFocalPointPreview = (value) => {
      const [styleOfRef, property] = mediaElement.current ? [mediaElement.current.style, "objectPosition"] : [coverRef.current.style, "backgroundPosition"];
      styleOfRef[property] = mediaPosition(value);
    };
    const colorGradientSettings = (0, import_block_editor65.__experimentalUseMultipleOriginColorsAndGradients)();
    const showOverlayControls = colorGradientSettings.hasColorsOrGradients && !hasSelectedStyleState;
    const setMinHeightAttributes = (nextMinHeight, nextUnit) => {
      if (hasSelectedStyleState) {
        setAttributes(
          getDimensionUpdateAttributes({
            style: attributes2.style,
            selectedState: selectedStyleState,
            hasSelectedStyleState,
            nextDimensions: {
              minHeight: nextMinHeight === void 0 ? void 0 : `${nextMinHeight}${nextUnit || activeMinHeightUnit || "px"}`,
              aspectRatio: void 0
            }
          })
        );
        return;
      }
      setAttributes({
        minHeight: nextMinHeight,
        style: cleanEmptyObject3({
          ...attributes2?.style,
          dimensions: {
            ...attributes2?.style?.dimensions,
            aspectRatio: void 0
            // Reset aspect ratio when minHeight is set.
          }
        })
      });
    };
    const getResetMinHeightAttributes = (attrs = attributes2) => {
      return getDimensionResetAttributes({
        style: attrs.style,
        selectedState: selectedStyleState,
        hasSelectedStyleState,
        keys: ["minHeight"],
        defaultAttributes: {
          minHeight: void 0,
          minHeightUnit: void 0
        }
      });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const mediaInspectorPanel = isSelected ? /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_block_editor65.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
      import_components31.__experimentalToolsPanel,
      {
        label: (0, import_i18n52.__)("Media"),
        resetAll: onClearMedia,
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
          import_components31.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n52.__)("Media"),
            hasValue: () => !!url || !!useFeaturedImage,
            onDeselect: onClearMedia,
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              MediaControl,
              {
                mediaId: id,
                mediaUrl: url,
                filename: image?.media_details?.sizes?.full?.file || image?.slug || (0, import_url7.getFilename)(url),
                allowedTypes: ALLOWED_MEDIA_TYPES2,
                onSelect: onSelectMedia,
                onError: onUploadError,
                onReset: onClearMedia,
                useFeaturedImage,
                onToggleFeaturedImage: toggleUseFeaturedImage,
                emptyLabel: (0, import_i18n52.__)("Add media")
              }
            )
          }
        )
      }
    ) }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(import_jsx_runtime265.Fragment, { children: [
      mediaInspectorPanel,
      (!!url || useFeaturedImage) && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_block_editor65.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
        import_components31.__experimentalToolsPanel,
        {
          label: (0, import_i18n52.__)("Settings"),
          resetAll: () => {
            setAttributes({
              hasParallax: false,
              focalPoint: void 0,
              isRepeated: false,
              alt: "",
              poster: void 0
            });
            updateImage(DEFAULT_MEDIA_SIZE_SLUG);
          },
          dropdownMenuProps,
          children: [
            isImageBackground && /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(import_jsx_runtime265.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                import_components31.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n52.__)("Fixed background"),
                  isShownByDefault: true,
                  hasValue: () => !!hasParallax,
                  onDeselect: () => setAttributes({
                    hasParallax: false,
                    focalPoint: void 0
                  }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                    import_components31.ToggleControl,
                    {
                      label: (0, import_i18n52.__)("Fixed background"),
                      checked: !!hasParallax,
                      onChange: toggleParallax
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                import_components31.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n52.__)("Repeated background"),
                  isShownByDefault: true,
                  hasValue: () => isRepeated,
                  onDeselect: () => setAttributes({
                    isRepeated: false
                  }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                    import_components31.ToggleControl,
                    {
                      label: (0, import_i18n52.__)("Repeated background"),
                      checked: isRepeated,
                      onChange: toggleIsRepeated
                    }
                  )
                }
              )
            ] }),
            showFocalPointPicker && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              import_components31.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n52.__)("Focal point"),
                isShownByDefault: true,
                hasValue: () => !!focalPoint,
                onDeselect: () => setAttributes({
                  focalPoint: void 0
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                  import_components31.FocalPointPicker,
                  {
                    label: (0, import_i18n52.__)("Focal point"),
                    url,
                    value: focalPoint,
                    onDragStart: imperativeFocalPointPreview,
                    onDrag: imperativeFocalPointPreview,
                    onChange: (newFocalPoint) => setAttributes({
                      focalPoint: newFocalPoint
                    })
                  }
                )
              }
            ),
            isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              poster_image_default,
              {
                poster,
                onChange: (posterImage) => setAttributes({
                  poster: posterImage?.url
                })
              }
            ),
            !useFeaturedImage && url && !isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              import_components31.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n52.__)("Alternative text"),
                isShownByDefault: true,
                hasValue: () => !!alt,
                onDeselect: () => setAttributes({ alt: "" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                  import_components31.TextareaControl,
                  {
                    label: (0, import_i18n52.__)("Alternative text"),
                    value: alt,
                    onChange: (newAlt) => setAttributes({ alt: newAlt }),
                    help: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(import_jsx_runtime265.Fragment, { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
                        Link,
                        {
                          openInNewTab: true,
                          href: (
                            // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                            (0, import_i18n52.__)(
                              "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                            )
                          ),
                          children: (0, import_i18n52.__)(
                            "Describe the purpose of the image."
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("br", {}),
                      (0, import_i18n52.__)(
                        "Leave empty if decorative."
                      )
                    ] })
                  }
                )
              }
            ),
            !!imageSizeOptions?.length && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              ResolutionTool,
              {
                value: sizeSlug,
                onChange: updateImage,
                options: imageSizeOptions,
                defaultValue: DEFAULT_MEDIA_SIZE_SLUG
              }
            )
          ]
        }
      ) }),
      showOverlayControls && /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(import_block_editor65.InspectorControls, { group: "color", children: [
        /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
          import_block_editor65.__experimentalColorGradientSettingsDropdown,
          {
            __experimentalIsRenderedInSidebar: true,
            settings: [
              {
                colorValue: overlayColor.color,
                gradientValue,
                label: (0, import_i18n52.__)("Overlay"),
                onColorChange: setOverlayColor,
                onGradientChange: setGradient,
                isShownByDefault: true,
                resetAllFilter: () => ({
                  overlayColor: void 0,
                  customOverlayColor: void 0,
                  gradient: void 0,
                  customGradient: void 0
                }),
                clearable: true
              }
            ],
            panelId: clientId,
            ...colorGradientSettings
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
          import_components31.__experimentalToolsPanelItem,
          {
            hasValue: () => {
              return dimRatio === void 0 ? false : dimRatio !== (url ? 50 : 100);
            },
            label: (0, import_i18n52.__)("Overlay opacity"),
            onDeselect: () => updateDimRatio(url ? 50 : 100),
            resetAllFilter: () => ({
              dimRatio: url ? 50 : 100
            }),
            isShownByDefault: true,
            panelId: clientId,
            children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
              import_components31.RangeControl,
              {
                label: (0, import_i18n52.__)("Overlay opacity"),
                value: dimRatio,
                onChange: (newDimRatio) => updateDimRatio(newDimRatio),
                min: 0,
                max: 100,
                step: 10,
                required: true
              }
            )
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_block_editor65.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        import_components31.__experimentalToolsPanelItem,
        {
          className: "single-column",
          hasValue: () => !!activeMinHeight,
          label: (0, import_i18n52.__)("Minimum height"),
          onDeselect: () => setAttributes(getResetMinHeightAttributes()),
          resetAllFilter: getResetMinHeightAttributes,
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
            CoverHeightInput,
            {
              value: activeAspectRatio ? "" : activeMinHeight,
              unit: activeMinHeightUnit,
              onChange: (newMinHeight) => setMinHeightAttributes(newMinHeight),
              onUnitChange: (nextUnit) => {
                if (hasSelectedStyleState) {
                  if (activeMinHeight !== void 0) {
                    setMinHeightAttributes(
                      activeMinHeight,
                      nextUnit
                    );
                  }
                  return;
                }
                setAttributes({
                  minHeightUnit: nextUnit
                });
              }
            }
          )
        },
        selectedStyleStateKey
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_block_editor65.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
        HTMLElementControl3,
        {
          tagName,
          onChange: (value) => setAttributes({ tagName: value }),
          clientId,
          options: [
            { label: (0, import_i18n52.__)("Default (<div>)"), value: "div" },
            { label: "<header>", value: "header" },
            { label: "<main>", value: "main" },
            { label: "<section>", value: "section" },
            { label: "<article>", value: "article" },
            { label: "<aside>", value: "aside" },
            { label: "<footer>", value: "footer" }
          ]
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/cover/edit/block-controls.mjs
  var import_element50 = __toESM(require_element(), 1);
  var import_block_editor66 = __toESM(require_block_editor(), 1);
  var import_i18n54 = __toESM(require_i18n(), 1);
  var import_components33 = __toESM(require_components(), 1);

  // packages/block-library/build-module/cover/edit/embed-video-url-input.mjs
  var import_element49 = __toESM(require_element(), 1);
  var import_components32 = __toESM(require_components(), 1);
  var import_i18n53 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/cover/embed-video-utils.mjs
  var import_blocks17 = __toESM(require_blocks(), 1);
  var DEFAULT_EMBED_BLOCK2 = "core/embed";
  var DEFAULT_VIDEO_PROVIDERS = [
    "youtube",
    "vimeo",
    "videopress",
    "animoto",
    "tiktok",
    "wordpress-tv"
  ];
  function getAllowedVideoProviders(allowedVideoProviders) {
    if (!Array.isArray(allowedVideoProviders)) {
      return [];
    }
    return DEFAULT_VIDEO_PROVIDERS.filter(
      (provider) => allowedVideoProviders.includes(provider)
    );
  }
  function isValidVideoEmbedUrl(url, allowedProviders) {
    if (!url) {
      return false;
    }
    const embedBlock = findVideoEmbedProvider(url, allowedProviders);
    return embedBlock !== null;
  }
  function findVideoEmbedProvider(url, allowedProviders = DEFAULT_VIDEO_PROVIDERS) {
    const embedVariations = (0, import_blocks17.getBlockVariations)(DEFAULT_EMBED_BLOCK2);
    if (!embedVariations) {
      return null;
    }
    const matchingVariation = embedVariations.find(
      ({ patterns }) => matchesPatterns(url, patterns)
    );
    if (!matchingVariation || !allowedProviders.includes(matchingVariation.name)) {
      return null;
    }
    return matchingVariation;
  }
  function getBackgroundEmbedHtml(html) {
    const srcMatch = html?.match(/src=["']([^"']+)["']/);
    if (!srcMatch) {
      return null;
    }
    const iframeSrc = srcMatch[1];
    const backgroundSrc = getBackgroundVideoSrc(iframeSrc);
    return html.replace(iframeSrc, backgroundSrc);
  }
  function detectProviderFromSrc(src) {
    if (!src) {
      return null;
    }
    const lowerSrc = src.toLowerCase();
    if (lowerSrc.includes("youtube.com") || lowerSrc.includes("youtu.be")) {
      return "youtube";
    }
    if (lowerSrc.includes("vimeo.com")) {
      return "vimeo";
    }
    if (lowerSrc.includes("videopress.com")) {
      return "videopress";
    }
    if (lowerSrc.includes("animoto.com")) {
      return "animoto";
    }
    if (lowerSrc.includes("tiktok.com")) {
      return "tiktok";
    }
    if (lowerSrc.includes("wordpress.tv")) {
      return "wordpress-tv";
    }
    return null;
  }
  function getBackgroundVideoSrc(src) {
    if (!src) {
      return src;
    }
    try {
      const url = new URL(src);
      const provider = detectProviderFromSrc(src);
      switch (provider) {
        case "youtube":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("mute", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("controls", "0");
          url.searchParams.set("showinfo", "0");
          url.searchParams.set("modestbranding", "1");
          url.searchParams.set("playsinline", "1");
          url.searchParams.set("rel", "0");
          const videoId = url.pathname.split("/").pop();
          if (videoId) {
            url.searchParams.set("playlist", videoId);
          }
          break;
        case "vimeo":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("muted", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("background", "1");
          url.searchParams.set("controls", "0");
          break;
        case "videopress":
        case "wordpress-tv":
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("loop", "1");
          url.searchParams.set("muted", "1");
          break;
        default:
          url.searchParams.set("autoplay", "1");
          url.searchParams.set("muted", "1");
          url.searchParams.set("loop", "1");
          break;
      }
      return url.toString();
    } catch {
      return src;
    }
  }

  // packages/block-library/build-module/cover/edit/embed-video-url-input.mjs
  var import_jsx_runtime266 = __toESM(require_jsx_runtime(), 1);
  function EmbedVideoUrlInput({
    onSubmit,
    onClose,
    initialUrl = "",
    allowedVideoProviders
  }) {
    const [url, setUrl] = (0, import_element49.useState)(initialUrl);
    const [error2, setError] = (0, import_element49.useState)("");
    const handleConfirm = () => {
      if (!url) {
        setError((0, import_i18n53.__)("Please enter a URL."));
        return;
      }
      if (!isValidVideoEmbedUrl(url, allowedVideoProviders)) {
        setError(
          (0, import_i18n53.__)(
            "This URL is not supported. Please enter a valid video link from a supported provider."
          )
        );
        return;
      }
      onSubmit(url);
      onClose();
    };
    return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
      import_components32.__experimentalConfirmDialog,
      {
        isOpen: true,
        onConfirm: handleConfirm,
        onCancel: onClose,
        confirmButtonText: (0, import_i18n53.__)("Add video"),
        size: "medium",
        children: /* @__PURE__ */ (0, import_jsx_runtime266.jsxs)(Stack, { direction: "column", gap: "lg", children: [
          error2 && /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(import_components32.Notice, { status: "error", isDismissible: false, children: error2 }),
          /* @__PURE__ */ (0, import_jsx_runtime266.jsx)(
            import_components32.TextControl,
            {
              type: "url",
              label: (0, import_i18n53.__)("Video URL"),
              value: url,
              onChange: (value) => {
                setUrl(value);
                setError("");
              },
              placeholder: (0, import_i18n53.__)(
                "Enter YouTube, Vimeo, or other video URL"
              ),
              help: (0, import_i18n53.__)(
                "Add a background video to the cover block that will autoplay in a loop."
              )
            }
          )
        ] })
      }
    );
  }

  // packages/block-library/build-module/cover/edit/block-controls.mjs
  var import_jsx_runtime267 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject4 } = unlock(import_block_editor66.privateApis);
  function CoverBlockControls({
    attributes: attributes2,
    setAttributes,
    onSelectMedia,
    currentSettings,
    toggleUseFeaturedImage,
    onClearMedia,
    onSelectEmbedUrl,
    onEditMedia,
    editMediaButtonRef,
    showEditMediaButton,
    isEditMediaDisabled,
    blockEditingMode
  }) {
    const {
      contentPosition,
      id,
      useFeaturedImage,
      minHeight,
      minHeightUnit,
      backgroundType,
      allowedVideoProviders
    } = attributes2;
    const { hasInnerBlocks, url } = currentSettings;
    const filteredVideoProviders = getAllowedVideoProviders(
      allowedVideoProviders
    );
    const hasAllowedVideoProviders = filteredVideoProviders.length > 0;
    const [prevMinHeightValue, setPrevMinHeightValue] = (0, import_element50.useState)(minHeight);
    const [prevMinHeightUnit, setPrevMinHeightUnit] = (0, import_element50.useState)(minHeightUnit);
    const [isEmbedUrlInputOpen, setIsEmbedUrlInputOpen] = (0, import_element50.useState)(false);
    const isMinFullHeight = minHeightUnit === "vh" && minHeight === 100 && !attributes2?.style?.dimensions?.aspectRatio;
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const toggleMinFullHeight = () => {
      if (isMinFullHeight) {
        if (prevMinHeightUnit === "vh" && prevMinHeightValue === 100) {
          return setAttributes({
            minHeight: void 0,
            minHeightUnit: void 0
          });
        }
        return setAttributes({
          minHeight: prevMinHeightValue,
          minHeightUnit: prevMinHeightUnit
        });
      }
      setPrevMinHeightValue(minHeight);
      setPrevMinHeightUnit(minHeightUnit);
      return setAttributes({
        minHeight: 100,
        minHeightUnit: "vh",
        style: cleanEmptyObject4({
          ...attributes2?.style,
          dimensions: {
            ...attributes2?.style?.dimensions,
            aspectRatio: void 0
            // Reset aspect ratio when minHeight is set.
          }
        })
      });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(import_jsx_runtime267.Fragment, { children: [
      !isContentOnlyMode && /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(import_block_editor66.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
          import_block_editor66.__experimentalBlockAlignmentMatrixControl,
          {
            label: (0, import_i18n54.__)("Change content position"),
            value: contentPosition,
            onChange: (nextPosition) => setAttributes({
              contentPosition: nextPosition
            }),
            isDisabled: !hasInnerBlocks
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
          import_block_editor66.__experimentalBlockFullHeightAligmentControl,
          {
            isActive: isMinFullHeight,
            onToggle: toggleMinFullHeight,
            isDisabled: !hasInnerBlocks
          }
        ),
        showEditMediaButton && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
          import_components33.ToolbarButton,
          {
            ref: editMediaButtonRef,
            icon: crop_default,
            label: (0, import_i18n54.__)("Edit image"),
            onClick: onEditMedia,
            "aria-haspopup": "dialog",
            disabled: isEditMediaDisabled
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(import_block_editor66.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
        import_block_editor66.MediaReplaceFlow,
        {
          mediaId: id,
          mediaURL: url,
          allowedTypes: ALLOWED_MEDIA_TYPES2,
          onSelect: onSelectMedia,
          onToggleFeaturedImage: toggleUseFeaturedImage,
          useFeaturedImage,
          name: !url ? (0, import_i18n54.__)("Add media") : (0, import_i18n54.__)("Replace"),
          onReset: onClearMedia,
          variant: "toolbar",
          children: ({ onClose }) => hasAllowedVideoProviders ? /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
            import_components33.MenuItem,
            {
              icon: link_default,
              onClick: () => {
                setIsEmbedUrlInputOpen(true);
                onClose();
              },
              children: (0, import_i18n54.__)("Embed video from URL")
            }
          ) : null
        }
      ) }),
      isEmbedUrlInputOpen && /* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
        EmbedVideoUrlInput,
        {
          onSubmit: (embedUrl) => {
            onSelectEmbedUrl(embedUrl);
          },
          onClose: () => setIsEmbedUrlInputOpen(false),
          initialUrl: backgroundType === EMBED_VIDEO_BACKGROUND_TYPE ? url : "",
          allowedVideoProviders: filteredVideoProviders
        }
      )
    ] });
  }

  // packages/block-library/build-module/cover/edit/cover-placeholder.mjs
  var import_block_editor67 = __toESM(require_block_editor(), 1);
  var import_i18n55 = __toESM(require_i18n(), 1);
  var import_blob6 = __toESM(require_blob(), 1);
  var import_jsx_runtime268 = __toESM(require_jsx_runtime(), 1);
  function CoverPlaceholder({
    disableMediaButtons = false,
    children,
    onSelectMedia,
    onError,
    style: style2,
    toggleUseFeaturedImage
  }) {
    const onFilesPreUpload = (files) => {
      if (files.length === 1) {
        onSelectMedia({ url: (0, import_blob6.createBlobURL)(files[0]) });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
      import_block_editor67.MediaPlaceholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(import_block_editor67.BlockIcon, { icon: cover_default }),
        labels: {
          title: (0, import_i18n55.__)("Cover")
        },
        onSelect: onSelectMedia,
        allowedTypes: ALLOWED_MEDIA_TYPES2,
        disableMediaButtons,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        onFilesPreUpload,
        onError,
        style: style2,
        children
      }
    );
  }

  // packages/block-library/build-module/cover/edit/resizable-cover-popover.mjs
  var import_element51 = __toESM(require_element(), 1);
  var import_block_editor68 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime269 = __toESM(require_jsx_runtime(), 1);
  var RESIZABLE_BOX_ENABLE_OPTION = {
    top: false,
    right: false,
    bottom: true,
    left: false,
    topRight: false,
    bottomRight: false,
    bottomLeft: false,
    topLeft: false
  };
  var { ResizableBoxPopover } = unlock(import_block_editor68.privateApis);
  function ResizableCoverPopover({
    className,
    height,
    minHeight,
    onResize,
    onResizeStart,
    onResizeStop,
    showHandle,
    size,
    width,
    ...props
  }) {
    const [isResizing, setIsResizing] = (0, import_element51.useState)(false);
    const resizableBoxProps = {
      className: clsx_default(className, { "is-resizing": isResizing }),
      enable: RESIZABLE_BOX_ENABLE_OPTION,
      onResizeStart: (_event, _direction, elt) => {
        onResizeStart(elt.clientHeight);
        onResize(elt.clientHeight);
      },
      onResize: (_event, _direction, elt) => {
        onResize(elt.clientHeight);
        if (!isResizing) {
          setIsResizing(true);
        }
      },
      onResizeStop: (_event, _direction, elt) => {
        onResizeStop(elt.clientHeight);
        setIsResizing(false);
      },
      showHandle,
      size,
      __experimentalShowTooltip: true,
      __experimentalTooltipProps: {
        axis: "y",
        position: "bottom",
        isVisible: isResizing
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
      ResizableBoxPopover,
      {
        className: "block-library-cover__resizable-box-popover",
        resizableBoxProps,
        ...props
      }
    );
  }

  // node_modules/colord/index.mjs
  for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t = function(r3) {
    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
  }, n = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
  }, u = function(r3, t2, n2) {
    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
  }, e3 = function(r3) {
    return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
  }, o = function(r3, t2) {
    return void 0 === t2 && (t2 = 0), n(r3, t2) % 360;
  }, a = function(r3) {
    return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
  }, i = function(r3) {
    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
  }, s = /^#([0-9a-f]{3,8})$/i, d = function(r3, t2) {
    var n2 = r3.charCodeAt(t2);
    return (15 & n2) + 9 * (n2 >> 6);
  }, h = function(r3, t2) {
    return d(r3, t2) << 4 | d(r3, t2 + 1);
  }, b = [], f = 0; f < 256; f++) b.push((f < 16 ? "0" : "") + f.toString(16));
  var r2;
  var t;
  var n;
  var u;
  var e3;
  var o;
  var a;
  var i;
  var s;
  var d;
  var h;
  var b;
  var f;
  var g = function(r2) {
    return b[u(r2, 0, 255)];
  };
  var c = function(r2) {
    var t = r2.r, n = r2.g, u = r2.b, e3 = r2.a, o = Math.max(t, n, u), a = o - Math.min(t, n, u), i = a ? o === t ? (n - u) / a : o === n ? 2 + (u - t) / a : 4 + (t - n) / a : 0;
    return { h: 60 * (i < 0 ? i + 6 : i), s: o ? a / o * 100 : 0, v: o / 255 * 100, a: e3 };
  };
  var v = function(r2) {
    var t = r2.h, n = r2.s, u = r2.v, e3 = r2.a;
    t = t / 360 * 6, n /= 100, u /= 100;
    var o = Math.floor(t), a = u * (1 - n), i = u * (1 - (t - o) * n), s = u * (1 - (1 - t + o) * n), d = o % 6;
    return { r: 255 * [u, i, a, a, s, u][d], g: 255 * [s, u, u, i, a, a][d], b: 255 * [a, a, s, u, u, i][d], a: e3 };
  };
  var l = function(r2) {
    return { h: e3(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
  };
  var p = function(r2) {
    return { h: o(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
  };
  var m = function(r2) {
    return v((n = (t = r2).s, { h: t.h, s: (n *= ((u = t.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t.a }));
    var t, n, u;
  };
  var y = function(r2) {
    return { h: (t = c(r2)).h, s: (e3 = (200 - (n = t.s)) * (u = t.v) / 100) > 0 && e3 < 200 ? n * u / 100 / (e3 <= 100 ? e3 : 200 - e3) * 100 : 0, l: e3 / 2, a: t.a };
    var t, n, u, e3;
  };
  var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
  var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
  var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
  var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
  var $ = { string: [[function(r2) {
    if (!s.test(r2)) return null;
    var t = r2.length;
    return t <= 5 ? { r: 17 * d(r2, 1), g: 17 * d(r2, 2), b: 17 * d(r2, 3), a: 5 === t ? n(17 * d(r2, 4) / 255, 2) : 1 } : 7 === t || 9 === t ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t ? n(h(r2, 7) / 255, 2) : 1 } : null;
  }, "hex"], [function(r2) {
    var t = M.exec(r2) || H.exec(r2);
    return t ? t[2] !== t[4] || t[4] !== t[6] ? null : a({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: void 0 === t[7] ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
  }, "rgb"], [function(t) {
    var n = N.exec(t) || x.exec(t);
    if (!n) return null;
    var u, e3, o = l({ h: (u = n[1], e3 = n[2], void 0 === e3 && (e3 = "deg"), Number(u) * (r2[e3] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
    return m(o);
  }, "hsl"]], object: [[function(r2) {
    var n = r2.r, u = r2.g, e3 = r2.b, o = r2.a, i = void 0 === o ? 1 : o;
    return t(n) && t(u) && t(e3) ? a({ r: Number(n), g: Number(u), b: Number(e3), a: Number(i) }) : null;
  }, "rgb"], [function(r2) {
    var n = r2.h, u = r2.s, e3 = r2.l, o = r2.a, a = void 0 === o ? 1 : o;
    if (!t(n) || !t(u) || !t(e3)) return null;
    var i = l({ h: Number(n), s: Number(u), l: Number(e3), a: Number(a) });
    return m(i);
  }, "hsl"], [function(r2) {
    var n = r2.h, o = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
    if (!t(n) || !t(o) || !t(a)) return null;
    var d = (function(r3) {
      return { h: e3(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
    })({ h: Number(n), s: Number(o), v: Number(a), a: Number(s) });
    return v(d);
  }, "hsv"]] };
  var j = function(r2, t) {
    for (var n = 0; n < t.length; n++) {
      var u = t[n][0](r2);
      if (u) return [u, t[n][1]];
    }
    return [null, void 0];
  };
  var w = function(r2) {
    return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
  };
  var k = function(r2, t) {
    var n = y(r2);
    return { h: n.h, s: u(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
  };
  var E = function(r2) {
    return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
  };
  var R = function(r2, t) {
    var n = y(r2);
    return { h: n.h, s: n.s, l: u(n.l + 100 * t, 0, 100), a: n.a };
  };
  var q = (function() {
    function r2(r3) {
      this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
    }
    return r2.prototype.isValid = function() {
      return null !== this.parsed;
    }, r2.prototype.brightness = function() {
      return n(E(this.rgba), 2);
    }, r2.prototype.isDark = function() {
      return E(this.rgba) < 0.5;
    }, r2.prototype.isLight = function() {
      return E(this.rgba) >= 0.5;
    }, r2.prototype.toHex = function() {
      return r3 = i(this.rgba), t = r3.r, u = r3.g, e3 = r3.b, a = (o = r3.a) < 1 ? g(n(255 * o)) : "", "#" + g(t) + g(u) + g(e3) + a;
      var r3, t, u, e3, o, a;
    }, r2.prototype.toRgb = function() {
      return i(this.rgba);
    }, r2.prototype.toRgbString = function() {
      return r3 = i(this.rgba), t = r3.r, n = r3.g, u = r3.b, (e3 = r3.a) < 1 ? "rgba(" + t + ", " + n + ", " + u + ", " + e3 + ")" : "rgb(" + t + ", " + n + ", " + u + ")";
      var r3, t, n, u, e3;
    }, r2.prototype.toHsl = function() {
      return p(y(this.rgba));
    }, r2.prototype.toHslString = function() {
      return r3 = p(y(this.rgba)), t = r3.h, n = r3.s, u = r3.l, (e3 = r3.a) < 1 ? "hsla(" + t + ", " + n + "%, " + u + "%, " + e3 + ")" : "hsl(" + t + ", " + n + "%, " + u + "%)";
      var r3, t, n, u, e3;
    }, r2.prototype.toHsv = function() {
      return r3 = c(this.rgba), { h: o(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
      var r3;
    }, r2.prototype.invert = function() {
      return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
      var r3;
    }, r2.prototype.saturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
    }, r2.prototype.desaturate = function(r3) {
      return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
    }, r2.prototype.grayscale = function() {
      return A(k(this.rgba, -1));
    }, r2.prototype.lighten = function(r3) {
      return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
    }, r2.prototype.darken = function(r3) {
      return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
    }, r2.prototype.rotate = function(r3) {
      return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
    }, r2.prototype.alpha = function(r3) {
      return "number" == typeof r3 ? A({ r: (t = this.rgba).r, g: t.g, b: t.b, a: r3 }) : n(this.rgba.a, 3);
      var t;
    }, r2.prototype.hue = function(r3) {
      var t = y(this.rgba);
      return "number" == typeof r3 ? A({ h: r3, s: t.s, l: t.l, a: t.a }) : o(t.h);
    }, r2.prototype.isEqual = function(r3) {
      return this.toHex() === A(r3).toHex();
    }, r2;
  })();
  var A = function(r2) {
    return r2 instanceof q ? r2 : new q(r2);
  };
  var C = [];
  var D = function(r2) {
    r2.forEach(function(r3) {
      C.indexOf(r3) < 0 && (r3(q, $), C.push(r3));
    });
  };

  // node_modules/colord/plugins/names.mjs
  var e = function(e3, f) {
    var a = { white: "#ffffff", bisque: "#ffe4c4", blue: "#0000ff", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", antiquewhite: "#faebd7", aqua: "#00ffff", azure: "#f0ffff", whitesmoke: "#f5f5f5", papayawhip: "#ffefd5", plum: "#dda0dd", blanchedalmond: "#ffebcd", black: "#000000", gold: "#ffd700", goldenrod: "#daa520", gainsboro: "#dcdcdc", cornsilk: "#fff8dc", cornflowerblue: "#6495ed", burlywood: "#deb887", aquamarine: "#7fffd4", beige: "#f5f5dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkkhaki: "#bdb76b", darkgray: "#a9a9a9", darkgreen: "#006400", darkgrey: "#a9a9a9", peachpuff: "#ffdab9", darkmagenta: "#8b008b", darkred: "#8b0000", darkorchid: "#9932cc", darkorange: "#ff8c00", darkslateblue: "#483d8b", gray: "#808080", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", deeppink: "#ff1493", deepskyblue: "#00bfff", wheat: "#f5deb3", firebrick: "#b22222", floralwhite: "#fffaf0", ghostwhite: "#f8f8ff", darkviolet: "#9400d3", magenta: "#ff00ff", green: "#008000", dodgerblue: "#1e90ff", grey: "#808080", honeydew: "#f0fff0", hotpink: "#ff69b4", blueviolet: "#8a2be2", forestgreen: "#228b22", lawngreen: "#7cfc00", indianred: "#cd5c5c", indigo: "#4b0082", fuchsia: "#ff00ff", brown: "#a52a2a", maroon: "#800000", mediumblue: "#0000cd", lightcoral: "#f08080", darkturquoise: "#00ced1", lightcyan: "#e0ffff", ivory: "#fffff0", lightyellow: "#ffffe0", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", linen: "#faf0e6", mediumaquamarine: "#66cdaa", lemonchiffon: "#fffacd", lime: "#00ff00", khaki: "#f0e68c", mediumseagreen: "#3cb371", limegreen: "#32cd32", mediumspringgreen: "#00fa9a", lightskyblue: "#87cefa", lightblue: "#add8e6", midnightblue: "#191970", lightpink: "#ffb6c1", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", mintcream: "#f5fffa", lightslategray: "#778899", lightslategrey: "#778899", navajowhite: "#ffdead", navy: "#000080", mediumvioletred: "#c71585", powderblue: "#b0e0e6", palegoldenrod: "#eee8aa", oldlace: "#fdf5e6", paleturquoise: "#afeeee", mediumturquoise: "#48d1cc", mediumorchid: "#ba55d3", rebeccapurple: "#663399", lightsteelblue: "#b0c4de", mediumslateblue: "#7b68ee", thistle: "#d8bfd8", tan: "#d2b48c", orchid: "#da70d6", mediumpurple: "#9370db", purple: "#800080", pink: "#ffc0cb", skyblue: "#87ceeb", springgreen: "#00ff7f", palegreen: "#98fb98", red: "#ff0000", yellow: "#ffff00", slateblue: "#6a5acd", lavenderblush: "#fff0f5", peru: "#cd853f", palevioletred: "#db7093", violet: "#ee82ee", teal: "#008080", slategray: "#708090", slategrey: "#708090", aliceblue: "#f0f8ff", darkseagreen: "#8fbc8f", darkolivegreen: "#556b2f", greenyellow: "#adff2f", seagreen: "#2e8b57", seashell: "#fff5ee", tomato: "#ff6347", silver: "#c0c0c0", sienna: "#a0522d", lavender: "#e6e6fa", lightgreen: "#90ee90", orange: "#ffa500", orangered: "#ff4500", steelblue: "#4682b4", royalblue: "#4169e1", turquoise: "#40e0d0", yellowgreen: "#9acd32", salmon: "#fa8072", saddlebrown: "#8b4513", sandybrown: "#f4a460", rosybrown: "#bc8f8f", darksalmon: "#e9967a", lightgoldenrodyellow: "#fafad2", snow: "#fffafa", lightgrey: "#d3d3d3", lightgray: "#d3d3d3", dimgray: "#696969", dimgrey: "#696969", olivedrab: "#6b8e23", olive: "#808000" }, r2 = {};
    for (var d in a) r2[a[d]] = d;
    var l2 = {};
    e3.prototype.toName = function(f2) {
      if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
      var d2, i, n = r2[this.toHex()];
      if (n) return n;
      if (null == f2 ? void 0 : f2.closest) {
        var o = this.toRgb(), t = 1 / 0, b = "black";
        if (!l2.length) for (var c2 in a) l2[c2] = new e3(a[c2]).toRgb();
        for (var g2 in a) {
          var u = (d2 = o, i = l2[g2], Math.pow(d2.r - i.r, 2) + Math.pow(d2.g - i.g, 2) + Math.pow(d2.b - i.b, 2));
          u < t && (t = u, b = g2);
        }
        return b;
      }
    };
    f.string.push([function(f2) {
      var r3 = f2.toLowerCase(), d2 = "transparent" === r3 ? "#0000" : a[r3];
      return d2 ? new e3(d2).toRgb() : null;
    }, "name"]);
  };

  // node_modules/fast-average-color/dist/index.esm.js
  function toHex(num) {
    var str = num.toString(16);
    return str.length === 1 ? "0" + str : str;
  }
  function arrayToHex(arr) {
    return "#" + arr.map(toHex).join("");
  }
  function isDark(color) {
    var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1e3;
    return result < 128;
  }
  function prepareIgnoredColor(color) {
    if (!color) {
      return [];
    }
    return isRGBArray(color) ? color : [color];
  }
  function isRGBArray(value) {
    return Array.isArray(value[0]);
  }
  function isIgnoredColor(data, index2, ignoredColor) {
    for (var i = 0; i < ignoredColor.length; i++) {
      if (isIgnoredColorAsNumbers(data, index2, ignoredColor[i])) {
        return true;
      }
    }
    return false;
  }
  function isIgnoredColorAsNumbers(data, index2, ignoredColor) {
    switch (ignoredColor.length) {
      case 3:
        if (isIgnoredRGBColor(data, index2, ignoredColor)) {
          return true;
        }
        break;
      case 4:
        if (isIgnoredRGBAColor(data, index2, ignoredColor)) {
          return true;
        }
        break;
      case 5:
        if (isIgnoredRGBAColorWithThreshold(data, index2, ignoredColor)) {
          return true;
        }
        break;
      default:
        return false;
    }
  }
  function isIgnoredRGBColor(data, index2, ignoredColor) {
    if (data[index2 + 3] !== 255) {
      return true;
    }
    if (data[index2] === ignoredColor[0] && data[index2 + 1] === ignoredColor[1] && data[index2 + 2] === ignoredColor[2]) {
      return true;
    }
    return false;
  }
  function isIgnoredRGBAColor(data, index2, ignoredColor) {
    if (data[index2 + 3] && ignoredColor[3]) {
      return data[index2] === ignoredColor[0] && data[index2 + 1] === ignoredColor[1] && data[index2 + 2] === ignoredColor[2] && data[index2 + 3] === ignoredColor[3];
    }
    return data[index2 + 3] === ignoredColor[3];
  }
  function inRange(colorComponent, ignoredColorComponent, value) {
    return colorComponent >= ignoredColorComponent - value && colorComponent <= ignoredColorComponent + value;
  }
  function isIgnoredRGBAColorWithThreshold(data, index2, ignoredColor) {
    var redIgnored = ignoredColor[0];
    var greenIgnored = ignoredColor[1];
    var blueIgnored = ignoredColor[2];
    var alphaIgnored = ignoredColor[3];
    var threshold = ignoredColor[4];
    var alphaData = data[index2 + 3];
    var alphaInRange = inRange(alphaData, alphaIgnored, threshold);
    if (!alphaIgnored) {
      return alphaInRange;
    }
    if (!alphaData && alphaInRange) {
      return true;
    }
    if (inRange(data[index2], redIgnored, threshold) && inRange(data[index2 + 1], greenIgnored, threshold) && inRange(data[index2 + 2], blueIgnored, threshold) && alphaInRange) {
      return true;
    }
    return false;
  }
  function dominantAlgorithm(arr, len, options2) {
    var colorHash = {};
    var divider = 24;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    var max = [0, 0, 0, 0, 0];
    for (var i = 0; i < len; i += step) {
      var red = arr[i];
      var green = arr[i + 1];
      var blue = arr[i + 2];
      var alpha = arr[i + 3];
      if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
        continue;
      }
      var key = Math.round(red / divider) + "," + Math.round(green / divider) + "," + Math.round(blue / divider);
      if (colorHash[key]) {
        colorHash[key] = [
          colorHash[key][0] + red * alpha,
          colorHash[key][1] + green * alpha,
          colorHash[key][2] + blue * alpha,
          colorHash[key][3] + alpha,
          colorHash[key][4] + 1
        ];
      } else {
        colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
      }
      if (max[4] < colorHash[key][4]) {
        max = colorHash[key];
      }
    }
    var redTotal = max[0];
    var greenTotal = max[1];
    var blueTotal = max[2];
    var alphaTotal = max[3];
    var count = max[4];
    return alphaTotal ? [
      Math.round(redTotal / alphaTotal),
      Math.round(greenTotal / alphaTotal),
      Math.round(blueTotal / alphaTotal),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function simpleAlgorithm(arr, len, options2) {
    var redTotal = 0;
    var greenTotal = 0;
    var blueTotal = 0;
    var alphaTotal = 0;
    var count = 0;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    for (var i = 0; i < len; i += step) {
      var alpha = arr[i + 3];
      var red = arr[i] * alpha;
      var green = arr[i + 1] * alpha;
      var blue = arr[i + 2] * alpha;
      if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
        continue;
      }
      redTotal += red;
      greenTotal += green;
      blueTotal += blue;
      alphaTotal += alpha;
      count++;
    }
    return alphaTotal ? [
      Math.round(redTotal / alphaTotal),
      Math.round(greenTotal / alphaTotal),
      Math.round(blueTotal / alphaTotal),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function sqrtAlgorithm(arr, len, options2) {
    var redTotal = 0;
    var greenTotal = 0;
    var blueTotal = 0;
    var alphaTotal = 0;
    var count = 0;
    var ignoredColor = options2.ignoredColor;
    var step = options2.step;
    for (var i = 0; i < len; i += step) {
      var red = arr[i];
      var green = arr[i + 1];
      var blue = arr[i + 2];
      var alpha = arr[i + 3];
      if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
        continue;
      }
      redTotal += red * red * alpha;
      greenTotal += green * green * alpha;
      blueTotal += blue * blue * alpha;
      alphaTotal += alpha;
      count++;
    }
    return alphaTotal ? [
      Math.round(Math.sqrt(redTotal / alphaTotal)),
      Math.round(Math.sqrt(greenTotal / alphaTotal)),
      Math.round(Math.sqrt(blueTotal / alphaTotal)),
      Math.round(alphaTotal / count)
    ] : options2.defaultColor;
  }
  function getDefaultColor(options2) {
    return getOption(options2, "defaultColor", [0, 0, 0, 0]);
  }
  function getOption(options2, name118, defaultValue) {
    return options2[name118] === void 0 ? defaultValue : options2[name118];
  }
  var MIN_SIZE = 10;
  var MAX_SIZE = 100;
  function isSvg(filename) {
    return filename.search(/\.svg(\?|$)/i) !== -1;
  }
  function getOriginalSize(resource) {
    if (isInstanceOfHTMLImageElement(resource)) {
      var width = resource.naturalWidth;
      var height = resource.naturalHeight;
      if (!resource.naturalWidth && isSvg(resource.src)) {
        width = height = MAX_SIZE;
      }
      return {
        width,
        height
      };
    }
    if (isInstanceOfHTMLVideoElement(resource)) {
      return {
        width: resource.videoWidth,
        height: resource.videoHeight
      };
    }
    return {
      width: resource.width,
      height: resource.height
    };
  }
  function getSrc(resource) {
    if (isInstanceOfHTMLCanvasElement(resource)) {
      return "canvas";
    }
    if (isInstanceOfOffscreenCanvas(resource)) {
      return "offscreencanvas";
    }
    if (isInstanceOfImageBitmap(resource)) {
      return "imagebitmap";
    }
    return resource.src;
  }
  function isInstanceOfHTMLImageElement(resource) {
    return typeof HTMLImageElement !== "undefined" && resource instanceof HTMLImageElement;
  }
  function isInstanceOfOffscreenCanvas(resource) {
    return typeof OffscreenCanvas !== "undefined" && resource instanceof OffscreenCanvas;
  }
  function isInstanceOfHTMLVideoElement(resource) {
    return typeof HTMLVideoElement !== "undefined" && resource instanceof HTMLVideoElement;
  }
  function isInstanceOfHTMLCanvasElement(resource) {
    return typeof HTMLCanvasElement !== "undefined" && resource instanceof HTMLCanvasElement;
  }
  function isInstanceOfImageBitmap(resource) {
    return typeof ImageBitmap !== "undefined" && resource instanceof ImageBitmap;
  }
  function prepareSizeAndPosition(originalSize, options2) {
    var srcLeft = getOption(options2, "left", 0);
    var srcTop = getOption(options2, "top", 0);
    var srcWidth = getOption(options2, "width", originalSize.width);
    var srcHeight = getOption(options2, "height", originalSize.height);
    var destWidth = srcWidth;
    var destHeight = srcHeight;
    if (options2.mode === "precision") {
      return {
        srcLeft,
        srcTop,
        srcWidth,
        srcHeight,
        destWidth,
        destHeight
      };
    }
    var factor;
    if (srcWidth > srcHeight) {
      factor = srcWidth / srcHeight;
      destWidth = MAX_SIZE;
      destHeight = Math.round(destWidth / factor);
    } else {
      factor = srcHeight / srcWidth;
      destHeight = MAX_SIZE;
      destWidth = Math.round(destHeight / factor);
    }
    if (destWidth > srcWidth || destHeight > srcHeight || destWidth < MIN_SIZE || destHeight < MIN_SIZE) {
      destWidth = srcWidth;
      destHeight = srcHeight;
    }
    return {
      srcLeft,
      srcTop,
      srcWidth,
      srcHeight,
      destWidth,
      destHeight
    };
  }
  var isWebWorkers = typeof window === "undefined";
  function makeCanvas() {
    return isWebWorkers ? new OffscreenCanvas(1, 1) : document.createElement("canvas");
  }
  var ERROR_PREFIX = "FastAverageColor: ";
  function outputError(message, silent, error2) {
    if (!silent) {
      console.error(ERROR_PREFIX + message);
      if (error2) {
        console.error(error2);
      }
    }
  }
  function getError(text) {
    return Error(ERROR_PREFIX + text);
  }
  var FastAverageColor = (
    /** @class */
    (function() {
      function FastAverageColor2() {
        this.canvas = null;
        this.ctx = null;
      }
      FastAverageColor2.prototype.getColorAsync = function(resource, options2) {
        if (!resource) {
          return Promise.reject(getError("call .getColorAsync() without resource."));
        }
        if (typeof resource === "string") {
          if (typeof Image === "undefined") {
            return Promise.reject(getError("resource as string is not supported in this environment"));
          }
          var img = new Image();
          img.crossOrigin = options2 && options2.crossOrigin || "";
          img.src = resource;
          return this.bindImageEvents(img, options2);
        } else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) {
          return this.bindImageEvents(resource, options2);
        } else {
          var result = this.getColor(resource, options2);
          return result.error ? Promise.reject(result.error) : Promise.resolve(result);
        }
      };
      FastAverageColor2.prototype.getColor = function(resource, options2) {
        options2 = options2 || {};
        var defaultColor = getDefaultColor(options2);
        if (!resource) {
          outputError("call .getColor(null) without resource", options2.silent);
          return this.prepareResult(defaultColor);
        }
        var originalSize = getOriginalSize(resource);
        var size = prepareSizeAndPosition(originalSize, options2);
        if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
          outputError('incorrect sizes for resource "'.concat(getSrc(resource), '"'), options2.silent);
          return this.prepareResult(defaultColor);
        }
        if (!this.canvas) {
          this.canvas = makeCanvas();
        }
        if (!this.ctx) {
          this.ctx = this.canvas.getContext && this.canvas.getContext("2d");
          if (!this.ctx) {
            outputError("Canvas Context 2D is not supported in this browser", options2.silent);
            return this.prepareResult(defaultColor);
          }
        }
        this.canvas.width = size.destWidth;
        this.canvas.height = size.destHeight;
        var value = defaultColor;
        try {
          this.ctx.clearRect(0, 0, size.destWidth, size.destHeight);
          this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
          var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
          value = this.getColorFromArray4(bitmapData, options2);
        } catch (e3) {
          outputError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image"), options2.silent, e3);
        }
        return this.prepareResult(value);
      };
      FastAverageColor2.prototype.getColorFromArray4 = function(arr, options2) {
        options2 = options2 || {};
        var bytesPerPixel = 4;
        var arrLength = arr.length;
        var defaultColor = getDefaultColor(options2);
        if (arrLength < bytesPerPixel) {
          return defaultColor;
        }
        var len = arrLength - arrLength % bytesPerPixel;
        var step = (options2.step || 1) * bytesPerPixel;
        var algorithm;
        switch (options2.algorithm || "sqrt") {
          case "simple":
            algorithm = simpleAlgorithm;
            break;
          case "sqrt":
            algorithm = sqrtAlgorithm;
            break;
          case "dominant":
            algorithm = dominantAlgorithm;
            break;
          default:
            throw getError("".concat(options2.algorithm, " is unknown algorithm"));
        }
        return algorithm(arr, len, {
          defaultColor,
          ignoredColor: prepareIgnoredColor(options2.ignoredColor),
          step
        });
      };
      FastAverageColor2.prototype.prepareResult = function(value) {
        var rgb = value.slice(0, 3);
        var rgba = [value[0], value[1], value[2], value[3] / 255];
        var isDarkColor = isDark(value);
        return {
          value: [value[0], value[1], value[2], value[3]],
          rgb: "rgb(" + rgb.join(",") + ")",
          rgba: "rgba(" + rgba.join(",") + ")",
          hex: arrayToHex(rgb),
          hexa: arrayToHex(value),
          isDark: isDarkColor,
          isLight: !isDarkColor
        };
      };
      FastAverageColor2.prototype.destroy = function() {
        if (this.canvas) {
          this.canvas.width = 1;
          this.canvas.height = 1;
          this.canvas = null;
        }
        this.ctx = null;
      };
      FastAverageColor2.prototype.bindImageEvents = function(resource, options2) {
        var _this = this;
        return new Promise(function(resolve, reject) {
          var onload = function() {
            unbindEvents();
            var result = _this.getColor(resource, options2);
            if (result.error) {
              reject(result.error);
            } else {
              resolve(result);
            }
          };
          var onerror = function() {
            unbindEvents();
            reject(getError('Error loading image "'.concat(resource.src, '".')));
          };
          var onabort = function() {
            unbindEvents();
            reject(getError('Image "'.concat(resource.src, '" loading aborted')));
          };
          var unbindEvents = function() {
            resource.removeEventListener("load", onload);
            resource.removeEventListener("error", onerror);
            resource.removeEventListener("abort", onabort);
          };
          resource.addEventListener("load", onload);
          resource.addEventListener("error", onerror);
          resource.addEventListener("abort", onabort);
        });
      };
      return FastAverageColor2;
    })()
  );

  // packages/block-library/build-module/cover/edit/color-utils.mjs
  var import_hooks19 = __toESM(require_hooks(), 1);
  D([e]);
  var DEFAULT_BACKGROUND_COLOR = "#FFF";
  var DEFAULT_OVERLAY_COLOR = "#000";
  function compositeSourceOver(source, dest) {
    return {
      r: source.r * source.a + dest.r * dest.a * (1 - source.a),
      g: source.g * source.a + dest.g * dest.a * (1 - source.a),
      b: source.b * source.a + dest.b * dest.a * (1 - source.a),
      a: source.a + dest.a * (1 - source.a)
    };
  }
  function retrieveFastAverageColor() {
    if (!retrieveFastAverageColor.fastAverageColor) {
      retrieveFastAverageColor.fastAverageColor = new FastAverageColor();
    }
    return retrieveFastAverageColor.fastAverageColor;
  }
  var getMediaColor = memize(async (url) => {
    if (!url) {
      return DEFAULT_BACKGROUND_COLOR;
    }
    const { r: r2, g: g2, b, a } = A(DEFAULT_BACKGROUND_COLOR).toRgb();
    try {
      const imgCrossOrigin = (0, import_hooks19.applyFilters)(
        "media.crossOrigin",
        void 0,
        url
      );
      const color = await retrieveFastAverageColor().getColorAsync(url, {
        // The default color is white, which is the color
        // that is returned if there's an error.
        // colord returns alpga 0-1, FAC needs 0-255
        defaultColor: [r2, g2, b, a * 255],
        // Errors that come up don't reject the promise,
        // so error logging has to be silenced
        // with this option.
        silent: false,
        crossOrigin: imgCrossOrigin
      });
      return color.hex;
    } catch {
      return DEFAULT_BACKGROUND_COLOR;
    }
  });
  function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
    if (overlayColor === backgroundColor || dimRatio === 100) {
      return A(overlayColor).isDark();
    }
    const overlay = A(overlayColor).alpha(dimRatio / 100).toRgb();
    const background = A(backgroundColor).toRgb();
    const composite = compositeSourceOver(overlay, background);
    return A(composite).isDark();
  }

  // packages/block-library/build-module/cover/edit/index.mjs
  var import_jsx_runtime270 = __toESM(require_jsx_runtime(), 1);
  var { openMediaEditorModalKey } = unlock(import_block_editor69.privateApis);
  function getInnerBlocksTemplate(attributes2) {
    return [
      [
        "core/paragraph",
        {
          style: {
            typography: {
              textAlign: "center"
            }
          },
          placeholder: (0, import_i18n56.__)("Write title\u2026"),
          ...attributes2
        }
      ]
    ];
  }
  var isTemporaryMedia = (id, url) => !id && (0, import_blob7.isBlobURL)(url);
  function CoverEdit({
    attributes: attributes2,
    clientId,
    isSelected,
    overlayColor,
    setAttributes,
    setOverlayColor,
    toggleSelection,
    context: { postId, postType }
  }) {
    const {
      contentPosition,
      id,
      url: originalUrl,
      backgroundType: originalBackgroundType,
      useFeaturedImage,
      dimRatio,
      focalPoint,
      hasParallax,
      isDark: isDark2,
      isRepeated,
      minHeight,
      minHeightUnit,
      alt,
      allowedBlocks,
      templateLock,
      tagName: TagName2 = "div",
      isUserOverlayColor,
      sizeSlug,
      poster
    } = attributes2;
    const [featuredImage] = (0, import_core_data16.useEntityProp)(
      "postType",
      postType,
      "featured_media",
      postId
    );
    const { getSettings: getSettings2 } = (0, import_data30.useSelect)(import_block_editor69.store);
    const openMediaEditorModal = (0, import_data30.useSelect)(
      (select10) => select10(import_block_editor69.store).getSettings()[openMediaEditorModalKey],
      []
    );
    const { __unstableMarkNextChangeAsNotPersistent, replaceInnerBlocks } = (0, import_data30.useDispatch)(import_block_editor69.store);
    const registry = (0, import_data30.useRegistry)();
    const propsRef = (0, import_element52.useRef)({ attributes: attributes2, overlayColor });
    (0, import_element52.useLayoutEffect)(() => {
      propsRef.current = { attributes: attributes2, overlayColor };
    });
    const { media } = (0, import_data30.useSelect)(
      (select10) => {
        return {
          media: featuredImage && useFeaturedImage ? select10(import_core_data16.store).getEntityRecord(
            "postType",
            "attachment",
            featuredImage,
            {
              context: "view"
            }
          ) : void 0
        };
      },
      [featuredImage, useFeaturedImage]
    );
    const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url ?? media?.source_url;
    (0, import_element52.useEffect)(() => {
      (async () => {
        if (!useFeaturedImage) {
          return;
        }
        const averageBackgroundColor = await getMediaColor(mediaUrl);
        const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
        let newOverlayColor = currentOverlay.color;
        if (!currentAttrs.isUserOverlayColor) {
          newOverlayColor = averageBackgroundColor;
          __unstableMarkNextChangeAsNotPersistent();
          setOverlayColor(newOverlayColor);
        }
        const newIsDark = compositeIsDark(
          currentAttrs.dimRatio,
          newOverlayColor,
          averageBackgroundColor
        );
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          isDark: newIsDark,
          isUserOverlayColor: currentAttrs.isUserOverlayColor || false
        });
      })();
    }, [
      mediaUrl,
      __unstableMarkNextChangeAsNotPersistent,
      setAttributes,
      setOverlayColor,
      useFeaturedImage
    ]);
    const url = useFeaturedImage ? mediaUrl : (
      // Ensure the url is not malformed due to sanitization through `wp_kses`.
      originalUrl?.replaceAll("&amp;", "&")
    );
    const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : originalBackgroundType;
    const { createErrorNotice } = (0, import_data30.useDispatch)(import_notices4.store);
    const { gradientClass, gradientValue } = (0, import_block_editor69.__experimentalUseGradient)();
    const scaffoldInnerBlocks = () => {
      const {
        getBlocks,
        isBlockSelected,
        getSelectedBlocksInitialCaretPosition
      } = registry.select(import_block_editor69.store);
      if (getBlocks(clientId).length > 0) {
        return;
      }
      const [fontSizes] = unlock(
        registry.select(import_block_editor69.store)
      ).getBlockSettings(clientId, "typography.fontSizes");
      const hasFontSizes = fontSizes?.length > 0;
      replaceInnerBlocks(
        clientId,
        (0, import_blocks18.createBlocksFromInnerBlocksTemplate)(
          getInnerBlocksTemplate({
            fontSize: hasFontSizes ? "large" : void 0
          })
        ),
        isBlockSelected(clientId),
        getSelectedBlocksInitialCaretPosition()
      );
    };
    const onSelectMedia = async (newMedia) => {
      const mediaAttributes = attributesFromMedia(newMedia);
      const isImage = [newMedia?.type, newMedia?.media_type].includes(
        IMAGE_BACKGROUND_TYPE
      );
      const averageBackgroundColor = await getMediaColor(
        isImage ? newMedia?.url : void 0
      );
      const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
      let newOverlayColor = currentOverlay.color;
      if (!currentAttrs.isUserOverlayColor) {
        newOverlayColor = averageBackgroundColor;
        setOverlayColor(newOverlayColor);
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newDimRatio = currentAttrs.url === void 0 && currentAttrs.dimRatio === 100 ? 50 : currentAttrs.dimRatio;
      const newIsDark = compositeIsDark(
        newDimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      if (backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes?.id) {
        const { imageDefaultSize } = getSettings2();
        if (sizeSlug && (newMedia?.sizes?.[sizeSlug] || newMedia?.media_details?.sizes?.[sizeSlug])) {
          mediaAttributes.sizeSlug = sizeSlug;
          mediaAttributes.url = newMedia?.sizes?.[sizeSlug]?.url || newMedia?.media_details?.sizes?.[sizeSlug]?.source_url;
        } else if (newMedia?.sizes?.[imageDefaultSize] || newMedia?.media_details?.sizes?.[imageDefaultSize]) {
          mediaAttributes.sizeSlug = imageDefaultSize;
          mediaAttributes.url = newMedia?.sizes?.[imageDefaultSize]?.url || newMedia?.media_details?.sizes?.[imageDefaultSize]?.source_url;
        } else {
          mediaAttributes.sizeSlug = DEFAULT_MEDIA_SIZE_SLUG;
        }
      }
      registry.batch(() => {
        setAttributes({
          ...mediaAttributes,
          focalPoint: void 0,
          useFeaturedImage: void 0,
          dimRatio: newDimRatio,
          isDark: newIsDark,
          isUserOverlayColor: currentAttrs.isUserOverlayColor || false
        });
        scaffoldInnerBlocks();
      });
    };
    const onClearMedia = () => {
      let newOverlayColor = overlayColor.color;
      if (!isUserOverlayColor && overlayColor.color) {
        newOverlayColor = DEFAULT_OVERLAY_COLOR;
        setOverlayColor(void 0);
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newIsDark = compositeIsDark(
        dimRatio,
        newOverlayColor,
        DEFAULT_BACKGROUND_COLOR
      );
      setAttributes({
        url: void 0,
        id: void 0,
        backgroundType: void 0,
        focalPoint: void 0,
        hasParallax: void 0,
        isRepeated: void 0,
        useFeaturedImage: void 0,
        isDark: newIsDark
      });
    };
    const onSetOverlayColor = async (newOverlayColor) => {
      const averageBackgroundColor = await getMediaColor(url);
      const { attributes: currentAttrs } = propsRef.current;
      const newIsDark = compositeIsDark(
        currentAttrs.dimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      setOverlayColor(newOverlayColor);
      __unstableMarkNextChangeAsNotPersistent();
      registry.batch(() => {
        setAttributes({
          isUserOverlayColor: true,
          isDark: newIsDark
        });
        if (newOverlayColor) {
          scaffoldInnerBlocks();
        }
      });
    };
    const onUpdateDimRatio = async (newDimRatio) => {
      const averageBackgroundColor = await getMediaColor(url);
      const { overlayColor: currentOverlay } = propsRef.current;
      const newIsDark = compositeIsDark(
        newDimRatio,
        currentOverlay.color,
        averageBackgroundColor
      );
      setAttributes({
        dimRatio: newDimRatio,
        isDark: newIsDark
      });
    };
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
    };
    const onSelectEmbedUrl = (embedUrl) => {
      const newDimRatio = originalUrl === void 0 && dimRatio === 100 ? 50 : dimRatio;
      setAttributes({
        url: embedUrl,
        backgroundType: EMBED_VIDEO_BACKGROUND_TYPE,
        dimRatio: newDimRatio,
        id: void 0,
        focalPoint: void 0,
        hasParallax: void 0,
        isRepeated: void 0,
        useFeaturedImage: void 0
      });
    };
    const { embedPreview, isFetchingEmbed } = (0, import_data30.useSelect)(
      (select10) => {
        if (backgroundType !== EMBED_VIDEO_BACKGROUND_TYPE || !url) {
          return {
            embedPreview: void 0,
            isFetchingEmbed: false
          };
        }
        const { getEmbedPreview, isRequestingEmbedPreview } = select10(import_core_data16.store);
        return {
          embedPreview: getEmbedPreview(url),
          isFetchingEmbed: isRequestingEmbedPreview(url)
        };
      },
      [url, backgroundType]
    );
    const embedHtml = (0, import_element52.useMemo)(() => {
      if (backgroundType !== EMBED_VIDEO_BACKGROUND_TYPE || !embedPreview?.html) {
        return null;
      }
      return getBackgroundEmbedHtml(embedPreview.html);
    }, [embedPreview, backgroundType]);
    const [isSwappingMedia, setIsSwappingMedia] = (0, import_element52.useState)(false);
    const isUploadingMedia = isTemporaryMedia(id, url);
    const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
    const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
    const isEmbedVideoBackground = EMBED_VIDEO_BACKGROUND_TYPE === backgroundType;
    const blockEditingMode = (0, import_block_editor69.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    const [resizeListener, { height, width }] = (0, import_compose20.useResizeObserver)();
    const resizableBoxDimensions = (0, import_element52.useMemo)(() => {
      return {
        height: minHeightUnit === "px" && minHeight ? minHeight : "auto",
        width: "auto"
      };
    }, [minHeight, minHeightUnit]);
    const minHeightWithUnit = minHeight && minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight;
    const isImgElement = !(hasParallax || isRepeated);
    const style2 = {
      minHeight: minHeightWithUnit || void 0
    };
    const backgroundImage = url ? `url(${url})` : void 0;
    const backgroundPosition = mediaPosition(focalPoint);
    const bgStyle = { backgroundColor: overlayColor.color };
    const mediaStyle = {
      objectPosition: focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
    };
    const hasBackground = !!(url || overlayColor.color || gradientValue);
    const hasInnerBlocks = (0, import_data30.useSelect)(
      (select10) => select10(import_block_editor69.store).getBlock(clientId).innerBlocks.length > 0,
      [clientId]
    );
    const ref = (0, import_element52.useRef)();
    const blockProps = (0, import_block_editor69.useBlockProps)({ ref });
    const innerBlocksProps = (0, import_block_editor69.useInnerBlocksProps)(
      {
        className: "wp-block-cover__inner-container"
      },
      {
        allowedBlocks,
        templateLock,
        dropZoneElement: ref.current
      }
    );
    const mediaElement = (0, import_element52.useRef)();
    const editMediaButtonRef = (0, import_element52.useRef)();
    const currentSettings = {
      isVideoBackground,
      isImageBackground,
      mediaElement,
      hasInnerBlocks,
      url,
      isImgElement,
      overlayColor
    };
    const openCoverMediaEditorModal = (0, import_element52.useCallback)(() => {
      if (!id || !openMediaEditorModal) {
        return;
      }
      openMediaEditorModal({
        id,
        onClose: () => {
          editMediaButtonRef.current?.focus();
        },
        onUpdate: async ({ id: newId, url: newUrl }) => {
          if (typeof newId !== "number") {
            return;
          }
          if (newId !== id && newUrl) {
            setIsSwappingMedia(true);
          }
          const nextAttributes = {
            id: newId,
            backgroundType: IMAGE_BACKGROUND_TYPE,
            ...newUrl ? { url: newUrl } : {},
            ...newId !== id ? { sizeSlug: DEFAULT_MEDIA_SIZE_SLUG } : {}
          };
          if (newUrl) {
            const averageBackgroundColor = await getMediaColor(newUrl);
            const {
              attributes: currentAttrs,
              overlayColor: currentOverlay
            } = propsRef.current;
            let newOverlayColor = currentOverlay.color;
            if (!currentAttrs.isUserOverlayColor) {
              newOverlayColor = averageBackgroundColor;
              setOverlayColor(newOverlayColor);
              __unstableMarkNextChangeAsNotPersistent();
            }
            nextAttributes.isDark = compositeIsDark(
              currentAttrs.dimRatio,
              newOverlayColor,
              averageBackgroundColor
            );
            nextAttributes.isUserOverlayColor = currentAttrs.isUserOverlayColor || false;
          }
          setAttributes(nextAttributes);
          const {
            hasParallax: currentHasParallax,
            isRepeated: currentIsRepeated
          } = propsRef.current.attributes;
          if (currentHasParallax || currentIsRepeated) {
            setIsSwappingMedia(false);
          }
        }
      });
    }, [
      id,
      openMediaEditorModal,
      setAttributes,
      setOverlayColor,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const showEditMediaButton = hasNonContentControls && !useFeaturedImage && isImageBackground && !!id && !!url && !isUploadingMedia && !!openMediaEditorModal;
    const toggleUseFeaturedImage = async () => {
      const newUseFeaturedImage = !useFeaturedImage;
      const averageBackgroundColor = newUseFeaturedImage ? await getMediaColor(mediaUrl) : DEFAULT_BACKGROUND_COLOR;
      const { attributes: currentAttrs, overlayColor: currentOverlay } = propsRef.current;
      const newOverlayColor = !currentAttrs.isUserOverlayColor ? averageBackgroundColor : currentOverlay.color;
      if (!currentAttrs.isUserOverlayColor) {
        if (newUseFeaturedImage) {
          setOverlayColor(newOverlayColor);
        } else {
          setOverlayColor(void 0);
        }
        __unstableMarkNextChangeAsNotPersistent();
      }
      const newDimRatio = currentAttrs.dimRatio === 100 ? 50 : currentAttrs.dimRatio;
      const newIsDark = compositeIsDark(
        newDimRatio,
        newOverlayColor,
        averageBackgroundColor
      );
      registry.batch(() => {
        setAttributes({
          id: void 0,
          url: void 0,
          useFeaturedImage: newUseFeaturedImage,
          dimRatio: newDimRatio,
          backgroundType: useFeaturedImage ? IMAGE_BACKGROUND_TYPE : void 0,
          isDark: newIsDark
        });
        if (newUseFeaturedImage) {
          scaffoldInnerBlocks();
        }
      });
    };
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
      CoverBlockControls,
      {
        attributes: attributes2,
        setAttributes,
        onSelectMedia,
        onSelectEmbedUrl,
        currentSettings,
        toggleUseFeaturedImage,
        onClearMedia,
        blockEditingMode,
        onEditMedia: openCoverMediaEditorModal,
        editMediaButtonRef,
        showEditMediaButton,
        isEditMediaDisabled: isSwappingMedia
      }
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
      CoverInspectorControls,
      {
        attributes: attributes2,
        setAttributes,
        clientId,
        setOverlayColor: onSetOverlayColor,
        coverRef: ref,
        currentSettings,
        onSelectMedia,
        onUploadError,
        toggleUseFeaturedImage,
        updateDimRatio: onUpdateDimRatio,
        onClearMedia,
        featuredImage: media,
        isSelected
      }
    );
    const resizableCoverProps = {
      className: "block-library-cover__resize-container",
      clientId,
      height,
      minHeight: minHeightWithUnit,
      onResizeStart: () => {
        setAttributes({ minHeightUnit: "px" });
        toggleSelection(false);
      },
      onResize: (value) => {
        setAttributes({ minHeight: value });
      },
      onResizeStop: (newMinHeight) => {
        toggleSelection(true);
        setAttributes({ minHeight: newMinHeight });
      },
      // Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
      showHandle: !attributes2.style?.dimensions?.aspectRatio,
      size: resizableBoxDimensions,
      width
    };
    if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) {
      return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(import_jsx_runtime270.Fragment, { children: [
        blockControls,
        inspectorControls,
        hasNonContentControls && isSelected && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(ResizableCoverPopover, { ...resizableCoverProps }),
        /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
          TagName2,
          {
            ...blockProps,
            className: clsx_default("is-placeholder", blockProps.className),
            style: {
              ...blockProps.style,
              minHeight: minHeightWithUnit || void 0
            },
            children: [
              resizeListener,
              /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
                CoverPlaceholder,
                {
                  onSelectMedia,
                  onError: onUploadError,
                  toggleUseFeaturedImage,
                  children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)("div", { className: "wp-block-cover__placeholder-background-options", children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
                    import_block_editor69.ColorPalette,
                    {
                      disableCustomColors: true,
                      value: overlayColor.color,
                      onChange: onSetOverlayColor,
                      clearable: false,
                      presentation: "toggle-buttons",
                      "aria-label": (0, import_i18n56.__)("Overlay color")
                    }
                  ) })
                }
              )
            ]
          }
        )
      ] });
    }
    const classes = clsx_default(
      {
        "is-dark-theme": isDark2,
        "is-light": !isDark2,
        "is-transient": isUploadingMedia || isSwappingMedia,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated,
        "has-custom-content-position": !isContentPositionCenter(contentPosition)
      },
      getPositionClassName(contentPosition)
    );
    const showOverlay = url || !useFeaturedImage || useFeaturedImage && !url;
    return /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(import_jsx_runtime270.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime270.jsxs)(
        TagName2,
        {
          ...blockProps,
          className: clsx_default(classes, blockProps.className),
          style: { ...style2, ...blockProps.style },
          "data-url": url,
          children: [
            resizeListener,
            !url && useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              import_components34.Placeholder,
              {
                className: "wp-block-cover__image--placeholder-image",
                withIllustration: true
              }
            ),
            url && isImageBackground && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              "img",
              {
                ref: mediaElement,
                className: "wp-block-cover__image-background",
                alt,
                src: url,
                style: mediaStyle,
                onLoad: () => setIsSwappingMedia(false),
                onError: () => setIsSwappingMedia(false)
              }
            ) : /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              "div",
              {
                ref: mediaElement,
                role: alt ? "img" : void 0,
                "aria-label": alt ? alt : void 0,
                className: clsx_default(
                  classes,
                  "wp-block-cover__image-background"
                ),
                style: { backgroundImage, backgroundPosition }
              }
            )),
            url && isVideoBackground && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              "video",
              {
                ref: mediaElement,
                className: "wp-block-cover__video-background",
                autoPlay: true,
                muted: true,
                loop: true,
                src: url,
                poster,
                style: mediaStyle
              }
            ),
            isEmbedVideoBackground && embedHtml && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              "div",
              {
                ref: mediaElement,
                className: "wp-block-cover__video-background wp-block-cover__embed-background",
                style: mediaStyle,
                children: /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
                  import_components34.SandBox,
                  {
                    allowSameOrigin: true,
                    html: embedHtml,
                    title: "Background video",
                    styles: [
                      "iframe{position:fixed;top:0;left:0;width:100%;height:100%;}"
                    ]
                  }
                )
              }
            ),
            isEmbedVideoBackground && !embedHtml && isFetchingEmbed && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components34.Spinner, {}),
            showOverlay && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              "span",
              {
                "aria-hidden": "true",
                className: clsx_default(
                  "wp-block-cover__background",
                  dimRatioToClass(dimRatio),
                  {
                    [overlayColor.class]: overlayColor.class,
                    "has-background-dim": dimRatio !== void 0,
                    // For backwards compatibility. Former versions of the Cover Block applied
                    // `.wp-block-cover__gradient-background` in the presence of
                    // media, a gradient and a dim.
                    "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
                    "has-background-gradient": gradientValue,
                    [gradientClass]: gradientClass
                  }
                ),
                style: { backgroundImage: gradientValue, ...bgStyle }
              }
            ),
            (isUploadingMedia || isSwappingMedia) && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(import_components34.Spinner, {}),
            /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(
              CoverPlaceholder,
              {
                disableMediaButtons: true,
                onSelectMedia,
                onError: onUploadError,
                toggleUseFeaturedImage
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime270.jsx)("div", { ...innerBlocksProps })
          ]
        }
      ),
      hasNonContentControls && isSelected && /* @__PURE__ */ (0, import_jsx_runtime270.jsx)(ResizableCoverPopover, { ...resizableCoverProps })
    ] });
  }
  var edit_default7 = (0, import_compose20.compose)([
    (0, import_block_editor69.withColors)({ overlayColor: "background-color" })
  ])(CoverEdit);

  // packages/block-library/build-module/cover/block.json
  var block_default31 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/cover",
    title: "Cover",
    category: "media",
    description: "Add an image or video with a text overlay.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      useFeaturedImage: {
        type: "boolean",
        default: false
      },
      id: {
        type: "number"
      },
      alt: {
        type: "string",
        default: ""
      },
      hasParallax: {
        type: "boolean",
        default: false
      },
      isRepeated: {
        type: "boolean",
        default: false
      },
      dimRatio: {
        type: "number",
        default: 100
      },
      overlayColor: {
        type: "string"
      },
      customOverlayColor: {
        type: "string"
      },
      isUserOverlayColor: {
        type: "boolean"
      },
      backgroundType: {
        type: "string",
        default: "image"
      },
      focalPoint: {
        type: "object"
      },
      minHeight: {
        type: "number"
      },
      minHeightUnit: {
        type: "string"
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      contentPosition: {
        type: "string"
      },
      isDark: {
        type: "boolean",
        default: true
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      },
      tagName: {
        type: "string",
        default: "div"
      },
      sizeSlug: {
        type: "string"
      },
      poster: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "poster"
      },
      allowedVideoProviders: {
        type: "array",
        default: [
          "youtube",
          "vimeo",
          "videopress",
          "animoto",
          "tiktok",
          "wordpress-tv"
        ]
      }
    },
    usesContext: ["postId", "postType"],
    supports: {
      __experimentalOnEnter: true,
      anchor: true,
      align: true,
      html: false,
      shadow: true,
      spacing: {
        padding: true,
        margin: ["top", "bottom"],
        blockGap: true,
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      color: {
        heading: true,
        text: true,
        background: false,
        __experimentalSkipSerialization: ["gradients"],
        enableContrastChecker: false
      },
      dimensions: {
        aspectRatio: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowJustification: false
      },
      interactivity: {
        clientNavigation: true
      },
      filter: {
        duotone: true
      },
      allowedBlocks: true
    },
    selectors: {
      filter: {
        duotone: ".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"
      }
    },
    editorStyle: "wp-block-cover-editor",
    style: "wp-block-cover"
  };

  // packages/block-library/build-module/cover/save.mjs
  var import_block_editor70 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime271 = __toESM(require_jsx_runtime(), 1);
  function save14({ attributes: attributes2 }) {
    const {
      backgroundType,
      gradient,
      contentPosition,
      customGradient,
      customOverlayColor,
      dimRatio,
      focalPoint,
      useFeaturedImage,
      hasParallax,
      isDark: isDark2,
      isRepeated,
      overlayColor,
      url,
      alt,
      id,
      minHeight: minHeightProp,
      minHeightUnit,
      tagName: Tag,
      sizeSlug,
      poster
    } = attributes2;
    const overlayColorClass = (0, import_block_editor70.getColorClassName)(
      "background-color",
      overlayColor
    );
    const gradientClass = (0, import_block_editor70.__experimentalGetGradientClass)(gradient);
    const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
    const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
    const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
    const isEmbedVideoBackground = EMBED_VIDEO_BACKGROUND_TYPE === backgroundType;
    const isImgElement = !(hasParallax || isRepeated);
    const style2 = {
      minHeight: minHeight || void 0
    };
    const bgStyle = {
      backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
      background: customGradient ? customGradient : void 0
    };
    const objectPosition = (
      // prettier-ignore
      focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
    );
    const backgroundImage = url ? `url(${url})` : void 0;
    const backgroundPosition = mediaPosition(focalPoint);
    const classes = clsx_default(
      {
        "is-light": !isDark2,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated,
        "has-custom-content-position": !isContentPositionCenter(contentPosition)
      },
      getPositionClassName(contentPosition)
    );
    const imgClasses = clsx_default(
      "wp-block-cover__image-background",
      id ? `wp-image-${id}` : null,
      {
        [`size-${sizeSlug}`]: sizeSlug,
        "has-parallax": hasParallax,
        "is-repeated": isRepeated
      }
    );
    const gradientValue = gradient || customGradient;
    return /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(Tag, { ...import_block_editor70.useBlockProps.save({ className: classes, style: style2 }), children: [
      !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "img",
        {
          className: imgClasses,
          alt,
          src: url,
          style: { objectPosition },
          "data-object-fit": "cover",
          "data-object-position": objectPosition
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "div",
        {
          role: alt ? "img" : void 0,
          "aria-label": alt ? alt : void 0,
          className: imgClasses,
          style: { backgroundPosition, backgroundImage }
        }
      )),
      isVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "video",
        {
          className: clsx_default(
            "wp-block-cover__video-background",
            "intrinsic-ignore"
          ),
          autoPlay: true,
          muted: true,
          loop: true,
          playsInline: true,
          src: url,
          poster,
          style: { objectPosition },
          "data-object-fit": "cover",
          "data-object-position": objectPosition
        }
      ),
      isEmbedVideoBackground && url && /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "figure",
        {
          className: clsx_default(
            "wp-block-cover__video-background",
            "wp-block-cover__embed-background",
            "wp-block-embed"
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime271.jsx)("div", { className: "wp-block-embed__wrapper", children: url })
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "span",
        {
          "aria-hidden": "true",
          className: clsx_default(
            "wp-block-cover__background",
            overlayColorClass,
            dimRatioToClass(dimRatio),
            {
              "has-background-dim": dimRatio !== void 0,
              // For backwards compatibility. Former versions of the Cover Block applied
              // `.wp-block-cover__gradient-background` in the presence of
              // media, a gradient and a dim.
              "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
              "has-background-gradient": gradientValue,
              [gradientClass]: gradientClass
            }
          ),
          style: bgStyle
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
        "div",
        {
          ...import_block_editor70.useInnerBlocksProps.save({
            className: "wp-block-cover__inner-container"
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/cover/transforms.mjs
  var import_blocks19 = __toESM(require_blocks(), 1);
  var import_block_editor71 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject5 } = unlock(import_block_editor71.privateApis);
  var transforms6 = {
    from: [
      {
        type: "block",
        blocks: ["core/image"],
        transform: ({ caption, url, alt, align, id, anchor, style: style2 }) => (0, import_blocks19.createBlock)(
          "core/cover",
          {
            dimRatio: 50,
            url,
            alt,
            align,
            id,
            anchor,
            style: {
              color: {
                duotone: style2?.color?.duotone
              }
            }
          },
          [
            (0, import_blocks19.createBlock)("core/paragraph", {
              content: caption,
              fontSize: "large",
              style: {
                typography: {
                  textAlign: "center"
                }
              }
            })
          ]
        )
      },
      {
        type: "block",
        blocks: ["core/video"],
        transform: ({ caption, src, align, id, anchor }) => (0, import_blocks19.createBlock)(
          "core/cover",
          {
            dimRatio: 50,
            url: src,
            align,
            id,
            backgroundType: VIDEO_BACKGROUND_TYPE,
            anchor
          },
          [
            (0, import_blocks19.createBlock)("core/paragraph", {
              content: caption,
              fontSize: "large",
              style: {
                typography: {
                  textAlign: "center"
                }
              }
            })
          ]
        )
      },
      {
        type: "block",
        blocks: ["core/group"],
        transform: (attributes2, innerBlocks) => {
          const { align, anchor, backgroundColor, gradient, style: style2 } = attributes2;
          if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/cover") {
            return (0, import_blocks19.createBlock)(
              "core/cover",
              innerBlocks[0].attributes,
              innerBlocks[0].innerBlocks
            );
          }
          const dimRatio = backgroundColor || gradient || style2?.color?.background || style2?.color?.gradient ? void 0 : 50;
          const parentAttributes = {
            align,
            anchor,
            dimRatio,
            overlayColor: backgroundColor,
            customOverlayColor: style2?.color?.background,
            gradient,
            customGradient: style2?.color?.gradient
          };
          const attributesWithoutBackgroundColors = {
            ...attributes2,
            backgroundColor: void 0,
            gradient: void 0,
            style: cleanEmptyObject5({
              ...attributes2?.style,
              color: style2?.color ? {
                ...style2?.color,
                background: void 0,
                gradient: void 0
              } : void 0
            })
          };
          return (0, import_blocks19.createBlock)("core/cover", parentAttributes, [
            (0, import_blocks19.createBlock)(
              "core/group",
              attributesWithoutBackgroundColors,
              innerBlocks
            )
          ]);
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        isMatch: ({
          backgroundType,
          url,
          overlayColor,
          customOverlayColor,
          gradient,
          customGradient
        }) => {
          if (url) {
            return backgroundType === IMAGE_BACKGROUND_TYPE;
          }
          return !overlayColor && !customOverlayColor && !gradient && !customGradient;
        },
        transform: ({ title, url, alt, align, id, anchor, style: style2 }) => (0, import_blocks19.createBlock)("core/image", {
          caption: title,
          url,
          alt,
          align,
          id,
          anchor,
          style: {
            color: {
              duotone: style2?.color?.duotone
            }
          }
        })
      },
      {
        type: "block",
        blocks: ["core/video"],
        isMatch: ({
          backgroundType,
          url,
          overlayColor,
          customOverlayColor,
          gradient,
          customGradient
        }) => {
          if (url) {
            return backgroundType === VIDEO_BACKGROUND_TYPE;
          }
          return !overlayColor && !customOverlayColor && !gradient && !customGradient;
        },
        transform: ({ title, url, align, id, anchor }) => (0, import_blocks19.createBlock)("core/video", {
          caption: title,
          src: url,
          id,
          align,
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/group"],
        isMatch: ({ url, useFeaturedImage }) => {
          if (url || useFeaturedImage) {
            return false;
          }
          return true;
        },
        transform: (attributes2, innerBlocks) => {
          const transformedColorAttributes = {
            backgroundColor: attributes2?.overlayColor,
            gradient: attributes2?.gradient,
            style: cleanEmptyObject5({
              ...attributes2?.style,
              color: attributes2?.customOverlayColor || attributes2?.customGradient || attributes2?.style?.color ? {
                background: attributes2?.customOverlayColor,
                gradient: attributes2?.customGradient,
                ...attributes2?.style?.color
              } : void 0
            })
          };
          if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/group") {
            const groupAttributes = cleanEmptyObject5(
              innerBlocks[0].attributes || {}
            );
            if (groupAttributes?.backgroundColor || groupAttributes?.gradient || groupAttributes?.style?.color?.background || groupAttributes?.style?.color?.gradient) {
              return (0, import_blocks19.createBlock)(
                "core/group",
                groupAttributes,
                innerBlocks[0]?.innerBlocks
              );
            }
            return (0, import_blocks19.createBlock)(
              "core/group",
              {
                ...transformedColorAttributes,
                ...groupAttributes,
                style: cleanEmptyObject5({
                  ...groupAttributes?.style,
                  color: transformedColorAttributes?.style?.color || groupAttributes?.style?.color ? {
                    ...transformedColorAttributes?.style?.color,
                    ...groupAttributes?.style?.color
                  } : void 0
                })
              },
              innerBlocks[0]?.innerBlocks
            );
          }
          return (0, import_blocks19.createBlock)(
            "core/group",
            { ...attributes2, ...transformedColorAttributes },
            innerBlocks
          );
        }
      }
    ]
  };
  var transforms_default6 = transforms6;

  // packages/block-library/build-module/cover/variations.mjs
  var import_i18n57 = __toESM(require_i18n(), 1);
  var variations3 = [
    {
      name: "cover",
      title: (0, import_i18n57.__)("Cover"),
      description: (0, import_i18n57.__)("Add an image or video with a text overlay."),
      attributes: { layout: { type: "constrained" } },
      isDefault: true,
      icon: cover_default
    }
  ];
  var variations_default3 = variations3;

  // packages/block-library/build-module/cover/index.mjs
  var { name: name30 } = block_default31;
  var settings30 = {
    icon: cover_default,
    example: {
      attributes: {
        customOverlayColor: "#065174",
        dimRatio: 40,
        url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg",
        style: {
          typography: {
            fontSize: 48
          },
          color: {
            text: "white"
          }
        }
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: `<strong>${(0, import_i18n58.__)("Snow Patrol")}</strong>`,
            style: {
              typography: {
                textAlign: "center"
              }
            }
          }
        }
      ]
    },
    transforms: transforms_default6,
    save: save14,
    edit: edit_default7,
    deprecated: deprecated_default14,
    variations: variations_default3
  };
  var init30 = () => initBlock({ name: name30, metadata: block_default31, settings: settings30 });

  // packages/block-library/build-module/details/index.mjs
  var details_exports = {};
  __export(details_exports, {
    init: () => init31,
    metadata: () => block_default32,
    name: () => name31,
    settings: () => settings31
  });
  var import_i18n60 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/details/block.json
  var block_default32 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/details",
    title: "Details",
    category: "text",
    description: "Hide and show additional content.",
    keywords: ["summary", "toggle", "disclosure"],
    textdomain: "default",
    attributes: {
      showContent: {
        type: "boolean",
        default: false
      },
      summary: {
        type: "rich-text",
        source: "rich-text",
        selector: "summary",
        role: "content"
      },
      name: {
        type: "string",
        source: "attribute",
        attribute: "name",
        selector: ".wp-block-details"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      __experimentalOnEnter: true,
      align: ["wide", "full"],
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        heading: true,
        button: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        color: true,
        width: true,
        style: true
      },
      html: false,
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        blockGap: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowEditing: false
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-details-editor",
    style: "wp-block-details"
  };

  // packages/block-library/build-module/details/edit.mjs
  var import_block_editor72 = __toESM(require_block_editor(), 1);
  var import_components35 = __toESM(require_components(), 1);
  var import_i18n59 = __toESM(require_i18n(), 1);
  var import_element53 = __toESM(require_element(), 1);
  var import_data31 = __toESM(require_data(), 1);
  var import_keycodes2 = __toESM(require_keycodes(), 1);
  var import_jsx_runtime272 = __toESM(require_jsx_runtime(), 1);
  function DetailsEdit({ attributes: attributes2, setAttributes, clientId }) {
    const { name: name118, showContent, summary, allowedBlocks, placeholder: placeholder2 } = attributes2;
    const blockProps = (0, import_block_editor72.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor72.useInnerBlocksProps)(blockProps, {
      __experimentalCaptureToolbars: true,
      allowedBlocks
    });
    const [isOpen, setIsOpen] = (0, import_element53.useState)(showContent);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const hasSelectedInnerBlock = (0, import_data31.useSelect)(
      (select10) => select10(import_block_editor72.store).hasSelectedInnerBlock(clientId, true),
      [clientId]
    );
    const handleSummaryKeyDown = (event) => {
      if (event.key === "Enter" && !event.shiftKey) {
        setIsOpen((prevIsOpen) => !prevIsOpen);
        event.preventDefault();
      }
    };
    const handleSummaryKeyUp = (event) => {
      if (event.key === " ") {
        event.preventDefault();
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(import_jsx_runtime272.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(import_block_editor72.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
        import_components35.__experimentalToolsPanel,
        {
          label: (0, import_i18n59.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showContent: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
            import_components35.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n59.__)("Open by default"),
              hasValue: () => showContent,
              onDeselect: () => {
                setAttributes({
                  showContent: false
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
                import_components35.ToggleControl,
                {
                  label: (0, import_i18n59.__)("Open by default"),
                  checked: showContent,
                  onChange: () => setAttributes({
                    showContent: !showContent
                  })
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(import_block_editor72.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
        import_components35.TextControl,
        {
          label: (0, import_i18n59.__)("Name attribute"),
          value: name118 || "",
          onChange: (newName) => setAttributes({ name: newName }),
          help: (0, import_i18n59.__)(
            "Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time."
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
        "details",
        {
          ...innerBlocksProps,
          open: isOpen || hasSelectedInnerBlock,
          onToggle: (event) => setIsOpen(event.target.open),
          name: name118 || "",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
              "summary",
              {
                onKeyDown: (0, import_keycodes2.withIgnoreIMEEvents)(handleSummaryKeyDown),
                onKeyUp: handleSummaryKeyUp,
                children: /* @__PURE__ */ (0, import_jsx_runtime272.jsx)(
                  import_block_editor72.RichText,
                  {
                    identifier: "summary",
                    "aria-label": (0, import_i18n59.__)(
                      "Write summary. Press Enter to expand or collapse the details."
                    ),
                    placeholder: placeholder2 || (0, import_i18n59.__)("Write summary\u2026"),
                    withoutInteractiveFormatting: true,
                    value: summary,
                    onChange: (newSummary) => setAttributes({ summary: newSummary })
                  }
                )
              }
            ),
            innerBlocksProps.children
          ]
        }
      )
    ] });
  }
  var edit_default8 = DetailsEdit;

  // packages/block-library/build-module/details/save.mjs
  var import_block_editor73 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime273 = __toESM(require_jsx_runtime(), 1);
  function save15({ attributes: attributes2 }) {
    const { name: name118, showContent } = attributes2;
    const summary = attributes2.summary ? attributes2.summary : "Details";
    const blockProps = import_block_editor73.useBlockProps.save();
    return /* @__PURE__ */ (0, import_jsx_runtime273.jsxs)(
      "details",
      {
        ...blockProps,
        name: name118 || void 0,
        open: showContent,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)("summary", { children: /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(import_block_editor73.RichText.Content, { value: summary }) }),
          /* @__PURE__ */ (0, import_jsx_runtime273.jsx)(import_block_editor73.InnerBlocks.Content, {})
        ]
      }
    );
  }

  // packages/block-library/build-module/details/transforms.mjs
  var import_blocks20 = __toESM(require_blocks(), 1);
  var transforms_default7 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        isMatch({}, blocks) {
          return !(blocks.length === 1 && blocks[0].name === "core/details");
        },
        __experimentalConvert(blocks) {
          return (0, import_blocks20.createBlock)(
            "core/details",
            {},
            blocks.map((block) => (0, import_blocks20.cloneSanitizedBlock)(block))
          );
        }
      }
    ]
  };

  // packages/block-library/build-module/details/index.mjs
  var { name: name31 } = block_default32;
  var TEMPLATE8 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n60.__)("Type / to add a hidden block")
      }
    ]
  ];
  var settings31 = {
    icon: details_default,
    template: TEMPLATE8,
    example: {
      attributes: {
        summary: (0, import_i18n60.__)("La Mancha"),
        showContent: true
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n60.__)(
              "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
            )
          }
        }
      ]
    },
    __experimentalLabel(attributes2, { context }) {
      const { summary } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasSummary = summary?.trim().length > 0;
      if (context === "list-view" && (customName || hasSummary)) {
        return customName || summary;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return !hasSummary ? (0, import_i18n60.__)("Details. Empty.") : (0, import_i18n60.sprintf)(
          /* translators: %s: accessibility text; summary title. */
          (0, import_i18n60.__)("Details. %s"),
          summary
        );
      }
    },
    save: save15,
    edit: edit_default8,
    transforms: transforms_default7
  };
  var init31 = () => initBlock({ name: name31, metadata: block_default32, settings: settings31 });

  // packages/block-library/build-module/embed/index.mjs
  var embed_exports = {};
  __export(embed_exports, {
    init: () => init32,
    metadata: () => block_default7,
    name: () => name32,
    settings: () => settings32
  });

  // packages/block-library/build-module/embed/edit.mjs
  var import_i18n64 = __toESM(require_i18n(), 1);
  var import_element56 = __toESM(require_element(), 1);
  var import_data32 = __toESM(require_data(), 1);
  var import_block_editor77 = __toESM(require_block_editor(), 1);
  var import_core_data17 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/embed/embed-controls.mjs
  var import_i18n61 = __toESM(require_i18n(), 1);
  var import_components36 = __toESM(require_components(), 1);
  var import_block_editor74 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime274 = __toESM(require_jsx_runtime(), 1);
  function getResponsiveHelp(checked) {
    return checked ? (0, import_i18n61.__)(
      "This embed will preserve its aspect ratio when the browser is resized."
    ) : (0, import_i18n61.__)(
      "This embed may not preserve its aspect ratio when the browser is resized."
    );
  }
  var EmbedControls = ({
    blockSupportsResponsive,
    showEditButton,
    themeSupportsResponsive,
    allowResponsive,
    toggleResponsive,
    switchBackToURLInput
  }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(import_jsx_runtime274.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor74.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_components36.ToolbarGroup, { children: showEditButton && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        import_components36.ToolbarButton,
        {
          className: "components-toolbar__control",
          label: (0, import_i18n61.__)("Edit URL"),
          icon: pencil_default,
          onClick: switchBackToURLInput
        }
      ) }) }),
      themeSupportsResponsive && blockSupportsResponsive && /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor74.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
        import_components36.__experimentalToolsPanel,
        {
          label: (0, import_i18n61.__)("Media settings"),
          resetAll: () => {
            toggleResponsive(true);
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
            import_components36.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n61.__)("Media settings"),
              isShownByDefault: true,
              hasValue: () => !allowResponsive,
              onDeselect: () => {
                toggleResponsive(!allowResponsive);
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
                import_components36.ToggleControl,
                {
                  label: (0, import_i18n61.__)("Resize for smaller devices"),
                  checked: allowResponsive,
                  help: getResponsiveHelp,
                  onChange: toggleResponsive
                }
              )
            }
          )
        }
      ) })
    ] });
  };
  var embed_controls_default = EmbedControls;

  // packages/block-library/build-module/embed/icons.mjs
  var import_components37 = __toESM(require_components(), 1);
  var import_jsx_runtime275 = __toESM(require_jsx_runtime(), 1);
  var embedContentIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z" }) });
  var embedAudioIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z" }) });
  var embedPhotoIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });
  var embedVideoIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z" }) });
  var embedTwitterIcon = {
    foreground: "#000000",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) })
  };
  var embedYouTubeIcon = {
    foreground: "#ff0000",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z" }) })
  };
  var embedFacebookIcon = {
    foreground: "#3b5998",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z" }) })
  };
  var embedInstagramIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z" }) }) });
  var embedWordPressIcon = {
    foreground: "#0073AA",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z" }) }) })
  };
  var embedSpotifyIcon = {
    foreground: "#1db954",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325" }) })
  };
  var embedFlickrIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z" }) });
  var embedVimeoIcon = {
    foreground: "#1ab7ea",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.G, { children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z" }) }) })
  };
  var embedRedditIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" }) });
  var embedTumblrIcon = {
    foreground: "#35465c",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z" }) })
  };
  var embedAmazonIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(import_components37.SVG, { viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z" }),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z" }),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z" })
  ] });
  var embedAnimotoIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(import_components37.SVG, { viewBox: "0 0 24 24", children: [
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
        fill: "#4bc7ee"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components37.Path,
      {
        d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",
        fill: "#d4cdcb"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
        fill: "#c3d82e"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components37.Path,
      {
        d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",
        fill: "#e4ecb0"
      }
    ),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" }),
    /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
      import_components37.Path,
      {
        d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
        fill: "#7cb3c9"
      }
    )
  ] });
  var embedDailymotionIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
    import_components37.Path,
    {
      d: "M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",
      fill: "#333436"
    }
  ) });
  var embedPinterestIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });
  var embedWolframIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 44 44", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.Path, { d: "M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" }) });
  var embedPocketCastsIcon = {
    foreground: "#f43e37",
    src: /* @__PURE__ */ (0, import_jsx_runtime275.jsxs)(
      import_components37.SVG,
      {
        width: "24",
        height: "24",
        viewBox: "0 0 24 24",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
            import_components37.Path,
            {
              fillRule: "evenodd",
              clipRule: "evenodd",
              d: "M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
            import_components37.Path,
            {
              fillRule: "evenodd",
              clipRule: "evenodd",
              d: "M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",
              fill: "#fff"
            }
          )
        ]
      }
    )
  };
  var embedBlueskyIcon = /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(import_components37.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime275.jsx)(
    import_components37.Path,
    {
      fill: "#0a7aff",
      d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
    }
  ) });

  // packages/block-library/build-module/embed/embed-loading.mjs
  var import_components38 = __toESM(require_components(), 1);
  var import_jsx_runtime276 = __toESM(require_jsx_runtime(), 1);
  var EmbedLoading = () => /* @__PURE__ */ (0, import_jsx_runtime276.jsx)("div", { className: "wp-block-embed is-loading", children: /* @__PURE__ */ (0, import_jsx_runtime276.jsx)(import_components38.Spinner, {}) });
  var embed_loading_default = EmbedLoading;

  // packages/block-library/build-module/embed/embed-placeholder.mjs
  var import_i18n62 = __toESM(require_i18n(), 1);
  var import_components39 = __toESM(require_components(), 1);
  var import_block_editor75 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime277 = __toESM(require_jsx_runtime(), 1);
  function EmbedPlaceholder({
    icon: icon2,
    label,
    value,
    onSubmit,
    onChange,
    cannotEmbed,
    fallback: fallback2,
    tryAgain
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(
      import_components39.Placeholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_block_editor75.BlockIcon, { icon: icon2, showColors: true }),
        label,
        className: "wp-block-embed",
        instructions: (0, import_i18n62.__)(
          "Paste a link to the content you want to display on your site."
        ),
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)("form", { onSubmit, children: [
            /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
              import_components39.__experimentalInputControl,
              {
                type: "url",
                value: value || "",
                className: "wp-block-embed__placeholder-input",
                label,
                hideLabelFromVision: true,
                placeholder: (0, import_i18n62.__)("Enter URL to embed here\u2026"),
                onChange
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(import_components39.Button, { __next40pxDefaultSize: true, variant: "primary", type: "submit", children: (0, import_i18n62._x)("Embed", "button label") })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("div", { className: "wp-block-embed__learn-more", children: /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
            Link,
            {
              openInNewTab: true,
              href: (0, import_i18n62.__)(
                "https://wordpress.org/documentation/article/embeds/"
              ),
              children: (0, import_i18n62.__)("Learn more about embeds")
            }
          ) }),
          cannotEmbed && /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(
            Stack,
            {
              direction: "column",
              gap: "md",
              className: "components-placeholder__error",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime277.jsx)("div", { className: "components-placeholder__instructions", children: (0, import_i18n62.__)("Sorry, this content could not be embedded.") }),
                /* @__PURE__ */ (0, import_jsx_runtime277.jsxs)(Stack, { direction: "row", gap: "md", justify: "flex-start", children: [
                  /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
                    import_components39.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "secondary",
                      onClick: tryAgain,
                      children: (0, import_i18n62._x)("Try again", "button label")
                    }
                  ),
                  fallback2 && /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
                    import_components39.Button,
                    {
                      __next40pxDefaultSize: true,
                      variant: "secondary",
                      onClick: fallback2,
                      children: (0, import_i18n62._x)("Convert to link", "button label")
                    }
                  )
                ] })
              ]
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/embed/embed-preview.mjs
  var import_i18n63 = __toESM(require_i18n(), 1);
  var import_components40 = __toESM(require_components(), 1);
  var import_block_editor76 = __toESM(require_block_editor(), 1);
  var import_element55 = __toESM(require_element(), 1);
  var import_url8 = __toESM(require_url(), 1);

  // packages/block-library/build-module/embed/wp-embed-preview.mjs
  var import_compose21 = __toESM(require_compose(), 1);
  var import_element54 = __toESM(require_element(), 1);
  var import_jsx_runtime278 = __toESM(require_jsx_runtime(), 1);
  var attributeMap = {
    class: "className",
    frameborder: "frameBorder",
    marginheight: "marginHeight",
    marginwidth: "marginWidth"
  };
  function WpEmbedPreview({ html }) {
    const ref = (0, import_element54.useRef)();
    const props = (0, import_element54.useMemo)(() => {
      const doc = new window.DOMParser().parseFromString(html, "text/html");
      const iframe = doc.querySelector("iframe");
      const iframeProps = {};
      if (!iframe) {
        return iframeProps;
      }
      Array.from(iframe.attributes).forEach(({ name: name118, value }) => {
        if (name118 === "style") {
          return;
        }
        iframeProps[attributeMap[name118] || name118] = value;
      });
      return iframeProps;
    }, [html]);
    (0, import_element54.useEffect)(() => {
      const { ownerDocument: ownerDocument2 } = ref.current;
      const { defaultView } = ownerDocument2;
      function resizeWPembeds({ data: { secret, message, value } = {} }) {
        if (message !== "height" || secret !== props["data-secret"]) {
          return;
        }
        ref.current.height = value;
      }
      defaultView.addEventListener("message", resizeWPembeds);
      return () => {
        defaultView.removeEventListener("message", resizeWPembeds);
      };
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)("div", { className: "wp-block-embed__wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
      "iframe",
      {
        ref: (0, import_compose21.useMergeRefs)([ref, (0, import_compose21.useFocusableIframe)()]),
        title: props.title,
        ...props
      }
    ) });
  }

  // packages/block-library/build-module/embed/embed-preview.mjs
  var import_jsx_runtime279 = __toESM(require_jsx_runtime(), 1);
  function EmbedPreview({
    preview,
    previewable,
    url,
    type,
    isSelected,
    className,
    icon: icon2,
    label
  }) {
    const [interactive, setInteractive] = (0, import_element55.useState)(false);
    if (!isSelected && interactive) {
      setInteractive(false);
    }
    const hideOverlay = () => {
      setInteractive(true);
    };
    const { scripts } = preview;
    const html = "photo" === type ? getPhotoHtml(preview) : preview.html;
    const embedSourceUrl = (0, import_url8.getAuthority)(url);
    const iframeTitle = (0, import_i18n63.sprintf)(
      // translators: %s: host providing embed content e.g: www.youtube.com
      (0, import_i18n63.__)("Embedded content from %s"),
      embedSourceUrl
    );
    const sandboxClassnames = clsx_default(
      type,
      className,
      "wp-block-embed__wrapper"
    );
    const embedWrapper = "wp-embed" === type ? /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(WpEmbedPreview, { html }) : /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)("div", { className: "wp-block-embed__wrapper", children: [
      /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
        import_components40.SandBox,
        {
          allowSameOrigin: true,
          html,
          scripts,
          title: iframeTitle,
          type: sandboxClassnames,
          onFocus: hideOverlay
        }
      ),
      !interactive && /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
        "div",
        {
          className: "block-library-embed__interactive-overlay",
          onMouseUp: hideOverlay
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(import_jsx_runtime279.Fragment, { children: previewable ? embedWrapper : /* @__PURE__ */ (0, import_jsx_runtime279.jsxs)(
      import_components40.Placeholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(import_block_editor76.BlockIcon, { icon: icon2, showColors: true }),
        label,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("p", { className: "components-placeholder__error", children: /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("a", { href: url, children: url }) }),
          /* @__PURE__ */ (0, import_jsx_runtime279.jsx)("p", { className: "components-placeholder__error", children: (0, import_i18n63.sprintf)(
            /* translators: %s: host providing embed content e.g: www.youtube.com */
            (0, import_i18n63.__)(
              "Embedded content from %s can't be previewed in the editor."
            ),
            embedSourceUrl
          ) })
        ]
      }
    ) });
  }

  // packages/block-library/build-module/embed/edit.mjs
  var import_jsx_runtime280 = __toESM(require_jsx_runtime(), 1);
  var EmbedEdit = (props) => {
    const {
      attributes: {
        providerNameSlug,
        previewable,
        responsive,
        url: attributesUrl
      },
      attributes: attributes2,
      isSelected,
      onReplace,
      setAttributes,
      insertBlocksAfter,
      onFocus
    } = props;
    const defaultEmbedInfo = {
      title: (0, import_i18n64._x)("Embed", "block title"),
      icon: embedContentIcon
    };
    const { icon: icon2, title } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo;
    const [url, setURL] = (0, import_element56.useState)(attributesUrl);
    const [isEditingURL, setIsEditingURL] = (0, import_element56.useState)(false);
    const { invalidateResolution } = (0, import_data32.useDispatch)(import_core_data17.store);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data32.useDispatch)(import_block_editor77.store);
    const {
      preview,
      fetching,
      themeSupportsResponsive,
      cannotEmbed,
      hasResolved
    } = (0, import_data32.useSelect)(
      (select10) => {
        const {
          getEmbedPreview,
          isPreviewEmbedFallback,
          isRequestingEmbedPreview,
          getThemeSupports,
          hasFinishedResolution
        } = select10(import_core_data17.store);
        if (!attributesUrl) {
          return { fetching: false, cannotEmbed: false };
        }
        const embedPreview = getEmbedPreview(attributesUrl);
        const previewIsFallback = isPreviewEmbedFallback(attributesUrl);
        const badEmbedProvider = embedPreview?.html === false && embedPreview?.type === void 0;
        const wordpressCantEmbed = embedPreview?.data?.status === 404;
        const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed;
        return {
          preview: validPreview ? embedPreview : void 0,
          fetching: isRequestingEmbedPreview(attributesUrl),
          themeSupportsResponsive: getThemeSupports()["responsive-embeds"],
          cannotEmbed: !validPreview || previewIsFallback,
          hasResolved: hasFinishedResolution("getEmbedPreview", [
            attributesUrl
          ])
        };
      },
      [attributesUrl]
    );
    const getMergedAttributes = () => getMergedAttributesWithPreview(
      attributes2,
      preview,
      title,
      responsive
    );
    function toggleResponsive(newAllowResponsive) {
      const { className: className2 } = attributes2;
      const { html } = preview;
      setAttributes({
        allowResponsive: newAllowResponsive,
        className: getClassNames(
          html,
          className2,
          responsive && newAllowResponsive
        )
      });
    }
    (0, import_element56.useEffect)(() => {
      if (!cannotEmbed || !hasResolved || !attributesUrl) {
        return;
      }
      const newURL = attributesUrl.replace(/\/$/, "");
      if (newURL === attributesUrl) {
        return;
      }
      setURL(newURL);
      setIsEditingURL(false);
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes({ url: newURL });
    }, [
      attributesUrl,
      cannotEmbed,
      hasResolved,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    (0, import_element56.useEffect)(() => {
      if (!preview || isEditingURL) {
        return;
      }
      const mergedAttributes = getMergedAttributes();
      if (onReplace) {
        const upgradedBlock = createUpgradedEmbedBlock(
          props,
          mergedAttributes
        );
        if (upgradedBlock) {
          __unstableMarkNextChangeAsNotPersistent();
          setAttributes(upgradedBlock.attributes);
          return;
        }
      }
      const hasChanges = Object.keys(mergedAttributes).some(
        (key) => mergedAttributes[key] !== attributes2[key]
      );
      if (hasChanges) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes(mergedAttributes);
      }
    }, [preview, isEditingURL]);
    const blockProps = (0, import_block_editor77.useBlockProps)();
    if (fetching) {
      return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(embed_loading_default, {}) });
    }
    const label = (0, import_i18n64.sprintf)((0, import_i18n64.__)("%s URL"), title);
    const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL;
    if (showEmbedPlaceholder) {
      return /* @__PURE__ */ (0, import_jsx_runtime280.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        EmbedPlaceholder,
        {
          icon: icon2,
          label,
          onFocus,
          onSubmit: (event) => {
            if (event) {
              event.preventDefault();
            }
            const rewrittenURL = rewriteXToTwitter(url);
            const blockClass = removeAspectRatioClasses(
              attributes2.className
            );
            setURL(rewrittenURL);
            setAttributes({
              url: rewrittenURL,
              ...findMoreSuitableBlock(rewrittenURL)?.attributes,
              className: blockClass
            });
            setIsEditingURL(false);
          },
          value: url,
          cannotEmbed,
          onChange: (value) => setURL(value),
          fallback: onReplace ? () => fallback(url, onReplace) : void 0,
          tryAgain: () => {
            invalidateResolution("getEmbedPreview", [url]);
          }
        }
      ) });
    }
    const {
      caption,
      type,
      allowResponsive,
      className: classFromPreview
    } = getMergedAttributes();
    const className = clsx_default(classFromPreview, props.className);
    return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(import_jsx_runtime280.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
        embed_controls_default,
        {
          showEditButton: preview && !cannotEmbed,
          themeSupportsResponsive,
          blockSupportsResponsive: responsive,
          allowResponsive,
          toggleResponsive,
          switchBackToURLInput: () => setIsEditingURL(true)
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
        "figure",
        {
          ...blockProps,
          className: clsx_default(blockProps.className, className, {
            [`is-type-${type}`]: type,
            [`is-provider-${providerNameSlug}`]: providerNameSlug,
            [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
          }),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
              EmbedPreview,
              {
                preview,
                previewable,
                className,
                url,
                type,
                caption,
                onCaptionChange: (value) => setAttributes({ caption: value }),
                isSelected,
                icon: icon2,
                label,
                insertBlocksAfter,
                attributes: attributes2,
                setAttributes
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(
              Caption,
              {
                attributes: attributes2,
                setAttributes,
                isSelected,
                insertBlocksAfter,
                label: (0, import_i18n64.__)("Embed caption text"),
                showToolbarButton: isSelected
              }
            )
          ]
        }
      )
    ] });
  };
  var edit_default9 = EmbedEdit;

  // packages/block-library/build-module/embed/save.mjs
  var import_block_editor78 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime281 = __toESM(require_jsx_runtime(), 1);
  function save16({ attributes: attributes2 }) {
    const { url, caption, type, providerNameSlug } = attributes2;
    if (!url) {
      return null;
    }
    const className = clsx_default("wp-block-embed", {
      [`is-type-${type}`]: type,
      [`is-provider-${providerNameSlug}`]: providerNameSlug,
      [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
    });
    return /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("figure", { ...import_block_editor78.useBlockProps.save({ className }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: "wp-block-embed__wrapper", children: `
${url}
` }),
      !import_block_editor78.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
        import_block_editor78.RichText.Content,
        {
          className: (0, import_block_editor78.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/embed/transforms.mjs
  var import_blocks21 = __toESM(require_blocks(), 1);
  var import_url9 = __toESM(require_url(), 1);
  var { name: EMBED_BLOCK } = block_default7;
  var transforms7 = {
    from: [
      {
        type: "raw",
        isMatch: (node) => {
          if (node.nodeName !== "P") {
            return false;
          }
          const trimmed = node.textContent.trim();
          if (!(0, import_url9.isURL)(trimmed) || !/^https:\/\//i.test(trimmed) || trimmed.match(/https:\/\//gi)?.length !== 1) {
            return false;
          }
          return !/\.(?!(html?|php)$)[a-z0-9]+$/i.test(
            (0, import_url9.getFilename)(trimmed) || ""
          );
        },
        transform: (node) => {
          const url = rewriteXToTwitter(node.textContent.trim());
          return (0, import_blocks21.createBlock)(EMBED_BLOCK, {
            url,
            ...findMoreSuitableBlock(url)?.attributes
          });
        }
      },
      {
        type: "shortcode",
        tag: "embed",
        transform: (_attrs, { shortcode }) => {
          const url = rewriteXToTwitter(shortcode.content?.trim());
          return (0, import_blocks21.createBlock)(EMBED_BLOCK, {
            url,
            ...findMoreSuitableBlock(url)?.attributes
          });
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        isMatch: ({ url }) => !!url,
        transform: ({ url, caption, className }) => {
          let value = `<a href="${url}">${url}</a>`;
          if (caption?.trim()) {
            value += `<br />${caption}`;
          }
          return (0, import_blocks21.createBlock)("core/paragraph", {
            content: value,
            className: removeAspectRatioClasses(className)
          });
        }
      }
    ]
  };
  var transforms_default8 = transforms7;

  // packages/block-library/build-module/embed/variations.mjs
  var import_i18n65 = __toESM(require_i18n(), 1);
  function getTitle(providerName) {
    return (0, import_i18n65.sprintf)(
      /* translators: %s: provider name */
      (0, import_i18n65.__)("%s Embed"),
      providerName
    );
  }
  var variations4 = [
    {
      name: "twitter",
      title: getTitle("X"),
      icon: embedTwitterIcon,
      keywords: ["x", "twitter", "tweet", (0, import_i18n65.__)("social")],
      description: (0, import_i18n65.__)("Embed an X post."),
      patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i],
      attributes: { providerNameSlug: "twitter", responsive: true }
    },
    {
      name: "youtube",
      title: getTitle("YouTube"),
      icon: embedYouTubeIcon,
      keywords: [(0, import_i18n65.__)("music"), (0, import_i18n65.__)("video")],
      description: (0, import_i18n65.__)("Embed a YouTube video."),
      patterns: [
        /^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,
        /^https?:\/\/youtu\.be\/.+/i
      ],
      attributes: { providerNameSlug: "youtube", responsive: true }
    },
    {
      // Deprecate Facebook Embed per FB policy
      // See: https://developers.facebook.com/docs/plugins/oembed-legacy
      name: "facebook",
      title: getTitle("Facebook"),
      icon: embedFacebookIcon,
      keywords: [(0, import_i18n65.__)("social")],
      description: (0, import_i18n65.__)("Embed a Facebook post."),
      scope: ["block"],
      patterns: [],
      attributes: {
        providerNameSlug: "facebook",
        previewable: false,
        responsive: true
      }
    },
    {
      // Deprecate Instagram per FB policy
      // See: https://developers.facebook.com/docs/instagram/oembed-legacy
      name: "instagram",
      title: getTitle("Instagram"),
      icon: embedInstagramIcon,
      keywords: [(0, import_i18n65.__)("image"), (0, import_i18n65.__)("social")],
      description: (0, import_i18n65.__)("Embed an Instagram post."),
      scope: ["block"],
      patterns: [],
      attributes: { providerNameSlug: "instagram", responsive: true }
    },
    {
      name: "wordpress",
      title: getTitle("WordPress"),
      icon: embedWordPressIcon,
      keywords: [(0, import_i18n65.__)("post"), (0, import_i18n65.__)("blog")],
      description: (0, import_i18n65.__)("Embed a WordPress post."),
      attributes: {
        providerNameSlug: "wordpress"
      }
    },
    {
      name: "soundcloud",
      title: getTitle("SoundCloud"),
      icon: embedAudioIcon,
      keywords: [(0, import_i18n65.__)("music"), (0, import_i18n65.__)("audio")],
      description: (0, import_i18n65.__)("Embed SoundCloud content."),
      patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],
      attributes: { providerNameSlug: "soundcloud", responsive: true }
    },
    {
      name: "spotify",
      title: getTitle("Spotify"),
      icon: embedSpotifyIcon,
      keywords: [(0, import_i18n65.__)("music"), (0, import_i18n65.__)("audio")],
      description: (0, import_i18n65.__)("Embed Spotify content."),
      patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i],
      attributes: { providerNameSlug: "spotify", responsive: true }
    },
    {
      name: "flickr",
      title: getTitle("Flickr"),
      icon: embedFlickrIcon,
      keywords: [(0, import_i18n65.__)("image")],
      description: (0, import_i18n65.__)("Embed Flickr content."),
      patterns: [
        /^https?:\/\/(www\.)?flickr\.com\/.+/i,
        /^https?:\/\/flic\.kr\/.+/i
      ],
      attributes: { providerNameSlug: "flickr", responsive: true }
    },
    {
      name: "vimeo",
      title: getTitle("Vimeo"),
      icon: embedVimeoIcon,
      keywords: [(0, import_i18n65.__)("video")],
      description: (0, import_i18n65.__)("Embed a Vimeo video."),
      patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i],
      attributes: { providerNameSlug: "vimeo", responsive: true }
    },
    {
      name: "animoto",
      title: getTitle("Animoto"),
      icon: embedAnimotoIcon,
      description: (0, import_i18n65.__)("Embed an Animoto video."),
      patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],
      attributes: { providerNameSlug: "animoto", responsive: true }
    },
    {
      name: "cloudup",
      title: getTitle("Cloudup"),
      icon: embedContentIcon,
      description: (0, import_i18n65.__)("Embed Cloudup content."),
      patterns: [/^https?:\/\/cloudup\.com\/.+/i],
      attributes: { providerNameSlug: "cloudup", responsive: true }
    },
    {
      // Deprecated since CollegeHumor content is now powered by YouTube.
      name: "collegehumor",
      title: getTitle("CollegeHumor"),
      icon: embedVideoIcon,
      description: (0, import_i18n65.__)("Embed CollegeHumor content."),
      scope: ["block"],
      patterns: [],
      attributes: { providerNameSlug: "collegehumor", responsive: true }
    },
    {
      name: "crowdsignal",
      title: getTitle("Crowdsignal"),
      icon: embedContentIcon,
      keywords: ["polldaddy", (0, import_i18n65.__)("survey")],
      description: (0, import_i18n65.__)("Embed Crowdsignal (formerly Polldaddy) content."),
      patterns: [
        /^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i
      ],
      attributes: { providerNameSlug: "crowdsignal", responsive: true }
    },
    {
      name: "dailymotion",
      title: getTitle("Dailymotion"),
      icon: embedDailymotionIcon,
      keywords: [(0, import_i18n65.__)("video")],
      description: (0, import_i18n65.__)("Embed a Dailymotion video."),
      patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],
      attributes: { providerNameSlug: "dailymotion", responsive: true }
    },
    {
      name: "imgur",
      title: getTitle("Imgur"),
      icon: embedPhotoIcon,
      description: (0, import_i18n65.__)("Embed Imgur content."),
      patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i],
      attributes: { providerNameSlug: "imgur", responsive: true }
    },
    {
      name: "issuu",
      title: getTitle("Issuu"),
      icon: embedContentIcon,
      description: (0, import_i18n65.__)("Embed Issuu content."),
      patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i],
      attributes: { providerNameSlug: "issuu", responsive: true }
    },
    {
      name: "kickstarter",
      title: getTitle("Kickstarter"),
      icon: embedContentIcon,
      description: (0, import_i18n65.__)("Embed Kickstarter content."),
      patterns: [
        /^https?:\/\/(www\.)?kickstarter\.com\/.+/i,
        /^https?:\/\/kck\.st\/.+/i
      ],
      attributes: { providerNameSlug: "kickstarter", responsive: true }
    },
    {
      name: "mixcloud",
      title: getTitle("Mixcloud"),
      icon: embedAudioIcon,
      keywords: [(0, import_i18n65.__)("music"), (0, import_i18n65.__)("audio")],
      description: (0, import_i18n65.__)("Embed Mixcloud content."),
      patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],
      attributes: { providerNameSlug: "mixcloud", responsive: true }
    },
    {
      name: "pocket-casts",
      title: getTitle("Pocket Casts"),
      icon: embedPocketCastsIcon,
      keywords: [(0, import_i18n65.__)("podcast"), (0, import_i18n65.__)("audio")],
      description: (0, import_i18n65.__)("Embed a podcast player from Pocket Casts."),
      patterns: [/^https:\/\/pca.st\/\w+/i],
      attributes: { providerNameSlug: "pocket-casts", responsive: true }
    },
    {
      name: "reddit",
      title: getTitle("Reddit"),
      icon: embedRedditIcon,
      description: (0, import_i18n65.__)("Embed a Reddit thread."),
      patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i],
      attributes: { providerNameSlug: "reddit", responsive: true }
    },
    {
      name: "reverbnation",
      title: getTitle("ReverbNation"),
      icon: embedAudioIcon,
      description: (0, import_i18n65.__)("Embed ReverbNation content."),
      patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],
      attributes: { providerNameSlug: "reverbnation", responsive: true }
    },
    {
      name: "scribd",
      title: getTitle("Scribd"),
      icon: embedContentIcon,
      description: (0, import_i18n65.__)("Embed Scribd content."),
      patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i],
      attributes: { providerNameSlug: "scribd", responsive: true }
    },
    {
      name: "smugmug",
      title: getTitle("SmugMug"),
      icon: embedPhotoIcon,
      description: (0, import_i18n65.__)("Embed SmugMug content."),
      patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],
      attributes: {
        providerNameSlug: "smugmug",
        previewable: false,
        responsive: true
      }
    },
    {
      name: "speaker-deck",
      title: getTitle("Speaker Deck"),
      icon: embedContentIcon,
      description: (0, import_i18n65.__)("Embed Speaker Deck content."),
      patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],
      attributes: { providerNameSlug: "speaker-deck", responsive: true }
    },
    {
      name: "tiktok",
      title: getTitle("TikTok"),
      icon: embedVideoIcon,
      keywords: [(0, import_i18n65.__)("video")],
      description: (0, import_i18n65.__)("Embed a TikTok video."),
      patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i],
      attributes: { providerNameSlug: "tiktok", responsive: true }
    },
    {
      name: "ted",
      title: getTitle("TED"),
      icon: embedVideoIcon,
      description: (0, import_i18n65.__)("Embed a TED video."),
      patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],
      attributes: { providerNameSlug: "ted", responsive: true }
    },
    {
      name: "tumblr",
      title: getTitle("Tumblr"),
      icon: embedTumblrIcon,
      keywords: [(0, import_i18n65.__)("social")],
      description: (0, import_i18n65.__)("Embed a Tumblr post."),
      patterns: [/^https?:\/\/(.+)\.tumblr\.com\/.+/i],
      attributes: { providerNameSlug: "tumblr", responsive: true }
    },
    {
      name: "videopress",
      title: getTitle("VideoPress"),
      icon: embedVideoIcon,
      keywords: [(0, import_i18n65.__)("video")],
      description: (0, import_i18n65.__)("Embed a VideoPress video."),
      patterns: [/^https?:\/\/videopress\.com\/.+/i],
      attributes: { providerNameSlug: "videopress", responsive: true }
    },
    {
      name: "wordpress-tv",
      title: getTitle("WordPress.tv"),
      icon: embedVideoIcon,
      description: (0, import_i18n65.__)("Embed a WordPress.tv video."),
      patterns: [/^https?:\/\/wordpress\.tv\/.+/i],
      attributes: { providerNameSlug: "wordpress-tv", responsive: true }
    },
    {
      name: "amazon-kindle",
      title: getTitle("Amazon Kindle"),
      icon: embedAmazonIcon,
      keywords: [(0, import_i18n65.__)("ebook")],
      description: (0, import_i18n65.__)("Embed Amazon Kindle content."),
      patterns: [
        /^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,
        /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i
      ],
      attributes: { providerNameSlug: "amazon-kindle" }
    },
    {
      name: "pinterest",
      title: getTitle("Pinterest"),
      icon: embedPinterestIcon,
      keywords: [(0, import_i18n65.__)("social"), (0, import_i18n65.__)("bookmark")],
      description: (0, import_i18n65.__)("Embed Pinterest pins, boards, and profiles."),
      patterns: [
        /^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i
      ],
      attributes: { providerNameSlug: "pinterest" }
    },
    {
      name: "wolfram-cloud",
      title: getTitle("Wolfram"),
      icon: embedWolframIcon,
      description: (0, import_i18n65.__)("Embed Wolfram notebook content."),
      patterns: [/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],
      attributes: { providerNameSlug: "wolfram-cloud", responsive: true }
    },
    {
      name: "bluesky",
      title: getTitle("Bluesky"),
      icon: embedBlueskyIcon,
      description: (0, import_i18n65.__)("Embed a Bluesky post."),
      patterns: [/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],
      attributes: { providerNameSlug: "bluesky" }
    }
  ];
  variations4.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.providerNameSlug === variationAttributes.providerNameSlug;
  });
  var variations_default4 = variations4;

  // packages/block-library/build-module/embed/deprecated.mjs
  var import_block_editor79 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime282 = __toESM(require_jsx_runtime(), 1);
  var { attributes: blockAttributes3 } = block_default7;
  var v25 = {
    attributes: blockAttributes3,
    save({ attributes: attributes2 }) {
      const { url, caption, type, providerNameSlug } = attributes2;
      if (!url) {
        return null;
      }
      const className = clsx_default("wp-block-embed", {
        [`is-type-${type}`]: type,
        [`is-provider-${providerNameSlug}`]: providerNameSlug,
        [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
      });
      return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)("figure", { ...import_block_editor79.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime282.jsx)("div", { className: "wp-block-embed__wrapper", children: `
${url}
` }),
        !import_block_editor79.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_block_editor79.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v114 = {
    attributes: blockAttributes3,
    save({ attributes: { url, caption, type, providerNameSlug } }) {
      if (!url) {
        return null;
      }
      const embedClassName = clsx_default("wp-block-embed", {
        [`is-type-${type}`]: type,
        [`is-provider-${providerNameSlug}`]: providerNameSlug
      });
      return /* @__PURE__ */ (0, import_jsx_runtime282.jsxs)("figure", { className: embedClassName, children: [
        `
${url}
`,
        !import_block_editor79.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(import_block_editor79.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var deprecated5 = [v25, v114];
  var deprecated_default15 = deprecated5;

  // packages/block-library/build-module/embed/index.mjs
  var { name: name32 } = block_default7;
  var settings32 = {
    icon: embedContentIcon,
    edit: edit_default9,
    save: save16,
    transforms: transforms_default8,
    variations: variations_default4,
    deprecated: deprecated_default15
  };
  var init32 = () => initBlock({ name: name32, metadata: block_default7, settings: settings32 });

  // packages/block-library/build-module/file/index.mjs
  var file_exports = {};
  __export(file_exports, {
    init: () => init33,
    metadata: () => block_default33,
    name: () => name33,
    settings: () => settings33
  });
  var import_i18n71 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/file/deprecated.mjs
  var import_block_editor80 = __toESM(require_block_editor(), 1);
  var import_i18n66 = __toESM(require_i18n(), 1);
  var import_jsx_runtime283 = __toESM(require_jsx_runtime(), 1);
  var v33 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileId,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText: downloadButtonText2,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor80.RichText.isEmpty(fileName) ? (0, import_i18n66.__)("PDF embed") : (0, import_i18n66.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n66.__)("Embed of %s."),
        fileName
      );
      const hasFilename = !import_block_editor80.RichText.isEmpty(fileName);
      const describedById = hasFilename ? fileId : void 0;
      return href && /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)("div", { ...import_block_editor80.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_jsx_runtime283.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        hasFilename && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            id: describedById,
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            href,
            className: clsx_default(
              "wp-block-file__button",
              (0, import_block_editor80.__experimentalGetElementClassName)("button")
            ),
            download: true,
            "aria-describedby": describedById,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: downloadButtonText2 })
          }
        )
      ] });
    }
  };
  var v26 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileId,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText: downloadButtonText2,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor80.RichText.isEmpty(fileName) ? (0, import_i18n66.__)("PDF embed") : (0, import_i18n66.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n66.__)("Embed of %s."),
        fileName
      );
      const hasFilename = !import_block_editor80.RichText.isEmpty(fileName);
      const describedById = hasFilename ? fileId : void 0;
      return href && /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)("div", { ...import_block_editor80.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_jsx_runtime283.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        hasFilename && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            id: describedById,
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            href,
            className: "wp-block-file__button",
            download: true,
            "aria-describedby": describedById,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: downloadButtonText2 })
          }
        )
      ] });
    }
  };
  var v115 = {
    attributes: {
      id: {
        type: "number"
      },
      href: {
        type: "string"
      },
      fileName: {
        type: "string",
        source: "html",
        selector: "a:not([download])"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "string",
        source: "html",
        selector: "a[download]"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        href,
        fileName,
        textLinkHref,
        textLinkTarget,
        showDownloadButton,
        downloadButtonText: downloadButtonText2,
        displayPreview,
        previewHeight
      } = attributes2;
      const pdfEmbedLabel = import_block_editor80.RichText.isEmpty(fileName) ? (0, import_i18n66.__)("PDF embed") : (0, import_i18n66.sprintf)(
        /* translators: %s: filename. */
        (0, import_i18n66.__)("Embed of %s."),
        fileName
      );
      return href && /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)("div", { ...import_block_editor80.useBlockProps.save(), children: [
        displayPreview && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_jsx_runtime283.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "object",
          {
            className: "wp-block-file__embed",
            data: href,
            type: "application/pdf",
            style: {
              width: "100%",
              height: `${previewHeight}px`
            },
            "aria-label": pdfEmbedLabel
          }
        ) }),
        !import_block_editor80.RichText.isEmpty(fileName) && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            href: textLinkHref,
            target: textLinkTarget,
            rel: textLinkTarget ? "noreferrer noopener" : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: fileName })
          }
        ),
        showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
          "a",
          {
            href,
            className: "wp-block-file__button",
            download: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(import_block_editor80.RichText.Content, { value: downloadButtonText2 })
          }
        )
      ] });
    }
  };
  var deprecated6 = [v33, v26, v115];
  var deprecated_default16 = deprecated6;

  // packages/block-library/build-module/file/edit.mjs
  var import_blob8 = __toESM(require_blob(), 1);
  var import_components42 = __toESM(require_components(), 1);
  var import_data33 = __toESM(require_data(), 1);
  var import_block_editor82 = __toESM(require_block_editor(), 1);
  var import_element57 = __toESM(require_element(), 1);
  var import_compose22 = __toESM(require_compose(), 1);
  var import_i18n68 = __toESM(require_i18n(), 1);
  var import_core_data18 = __toESM(require_core_data(), 1);
  var import_notices5 = __toESM(require_notices(), 1);
  var import_url10 = __toESM(require_url(), 1);

  // packages/block-library/build-module/file/inspector.mjs
  var import_i18n67 = __toESM(require_i18n(), 1);
  var import_components41 = __toESM(require_components(), 1);
  var import_block_editor81 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime284 = __toESM(require_jsx_runtime(), 1);
  function FileBlockInspector({
    hrefs,
    openInNewWindow,
    showDownloadButton,
    changeLinkDestinationOption,
    changeOpenInNewWindow,
    changeShowDownloadButton,
    displayPreview,
    changeDisplayPreview,
    previewHeight,
    changePreviewHeight
  }) {
    const { href, textLinkHref, attachmentPage } = hrefs;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let linkDestinationOptions = [{ value: href, label: (0, import_i18n67.__)("URL") }];
    if (attachmentPage) {
      linkDestinationOptions = [
        { value: href, label: (0, import_i18n67.__)("Media file") },
        { value: attachmentPage, label: (0, import_i18n67.__)("Attachment page") }
      ];
    }
    return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_jsx_runtime284.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(import_block_editor81.InspectorControls, { children: [
      href.endsWith(".pdf") && /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(
        import_components41.__experimentalToolsPanel,
        {
          label: (0, import_i18n67.__)("PDF settings"),
          resetAll: () => {
            changeDisplayPreview(true);
            changePreviewHeight(600);
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n67.__)("Show inline embed"),
                isShownByDefault: true,
                hasValue: () => !displayPreview,
                onDeselect: () => changeDisplayPreview(true),
                children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n67.__)("Show inline embed"),
                    help: displayPreview ? (0, import_i18n67.__)(
                      "Note: Most phone and tablet browsers won't display embedded PDFs."
                    ) : null,
                    checked: !!displayPreview,
                    onChange: changeDisplayPreview
                  }
                )
              }
            ),
            displayPreview && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n67.__)("Height in pixels"),
                isShownByDefault: true,
                hasValue: () => previewHeight !== 600,
                onDeselect: () => changePreviewHeight(600),
                children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                  import_components41.RangeControl,
                  {
                    label: (0, import_i18n67.__)("Height in pixels"),
                    min: MIN_PREVIEW_HEIGHT,
                    max: Math.max(
                      MAX_PREVIEW_HEIGHT,
                      previewHeight
                    ),
                    value: previewHeight,
                    onChange: changePreviewHeight
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime284.jsxs)(
        import_components41.__experimentalToolsPanel,
        {
          label: (0, import_i18n67.__)("Settings"),
          resetAll: () => {
            changeLinkDestinationOption(href);
            changeOpenInNewWindow(false);
            changeShowDownloadButton(true);
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n67.__)("Link to"),
                isShownByDefault: true,
                hasValue: () => textLinkHref !== href,
                onDeselect: () => changeLinkDestinationOption(href),
                children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                  import_components41.SelectControl,
                  {
                    label: (0, import_i18n67.__)("Link to"),
                    value: textLinkHref,
                    options: linkDestinationOptions,
                    onChange: changeLinkDestinationOption
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n67.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => !!openInNewWindow,
                onDeselect: () => changeOpenInNewWindow(false),
                children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n67.__)("Open in new tab"),
                    checked: openInNewWindow,
                    onChange: changeOpenInNewWindow
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
              import_components41.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n67.__)("Show download button"),
                isShownByDefault: true,
                hasValue: () => !showDownloadButton,
                onDeselect: () => changeShowDownloadButton(true),
                children: /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(
                  import_components41.ToggleControl,
                  {
                    label: (0, import_i18n67.__)("Show download button"),
                    checked: showDownloadButton,
                    onChange: changeShowDownloadButton
                  }
                )
              }
            )
          ]
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/file/utils/index.mjs
  var browserSupportsPdfs = () => {
    if (window.navigator.pdfViewerEnabled) {
      return true;
    }
    if (window.navigator.userAgent.indexOf("Mobi") > -1) {
      return false;
    }
    if (window.navigator.userAgent.indexOf("Android") > -1) {
      return false;
    }
    if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
      return false;
    }
    if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
      return false;
    }
    return true;
  };
  var createActiveXObject = (type) => {
    let ax;
    try {
      ax = new window.ActiveXObject(type);
    } catch {
      ax = void 0;
    }
    return ax;
  };

  // packages/block-library/build-module/file/edit.mjs
  var import_jsx_runtime285 = __toESM(require_jsx_runtime(), 1);
  var MIN_PREVIEW_HEIGHT = 200;
  var MAX_PREVIEW_HEIGHT = 2e3;
  function ClipboardToolbarButton({ text, disabled: disabled2 }) {
    const { createNotice } = (0, import_data33.useDispatch)(import_notices5.store);
    const ref = (0, import_compose22.useCopyToClipboard)(text, () => {
      createNotice("info", (0, import_i18n68.__)("Copied URL to clipboard."), {
        isDismissible: true,
        type: "snackbar"
      });
    });
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
      import_components42.ToolbarButton,
      {
        className: "components-clipboard-toolbar-button",
        ref,
        disabled: disabled2,
        children: (0, import_i18n68.__)("Copy URL")
      }
    );
  }
  function FileEdit({ attributes: attributes2, isSelected, setAttributes, clientId }) {
    const {
      id,
      fileName,
      href,
      textLinkHref,
      textLinkTarget,
      showDownloadButton,
      downloadButtonText: downloadButtonText2,
      displayPreview,
      previewHeight
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element57.useState)(attributes2.blob);
    const { media } = (0, import_data33.useSelect)(
      (select10) => ({
        media: !!id ? select10(import_core_data18.store).getEntityRecord(
          "postType",
          "attachment",
          id,
          { context: "view" }
        ) : void 0
      }),
      [id]
    );
    const { createErrorNotice } = (0, import_data33.useDispatch)(import_notices5.store);
    const { toggleSelection } = (0, import_data33.useDispatch)(import_block_editor82.store);
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      onChange: onSelectFile,
      onError: onUploadError
    });
    function onSelectFile(newMedia) {
      if (!newMedia || !newMedia.url) {
        setAttributes({
          href: void 0,
          fileName: void 0,
          textLinkHref: void 0,
          id: void 0,
          fileId: void 0,
          displayPreview: void 0,
          previewHeight: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob8.isBlobURL)(newMedia.url)) {
        setTemporaryURL(newMedia.url);
        return;
      }
      const isPdf = (
        // Media Library and REST API use different properties for mime type.
        (newMedia.mime || newMedia.mime_type) === "application/pdf" || (0, import_url10.getFilename)(newMedia.url).toLowerCase().endsWith(".pdf")
      );
      const pdfAttributes = {
        displayPreview: isPdf ? attributes2.displayPreview ?? true : void 0,
        previewHeight: isPdf ? attributes2.previewHeight ?? 600 : void 0
      };
      setAttributes({
        href: newMedia.url,
        fileName: newMedia.title,
        textLinkHref: newMedia.url,
        id: newMedia.id,
        fileId: `wp-block-file--media-${clientId}`,
        blob: void 0,
        ...pdfAttributes
      });
      setTemporaryURL();
    }
    function onUploadError(message) {
      setAttributes({ href: void 0 });
      createErrorNotice(message, { type: "snackbar" });
    }
    function changeLinkDestinationOption(newHref) {
      setAttributes({ textLinkHref: newHref });
    }
    function changeOpenInNewWindow(newValue) {
      setAttributes({
        textLinkTarget: newValue ? "_blank" : false
      });
    }
    function changeShowDownloadButton(newValue) {
      setAttributes({ showDownloadButton: newValue });
    }
    function changeDisplayPreview(newValue) {
      setAttributes({ displayPreview: newValue });
    }
    function handleOnResizeStop(event, direction, elt, delta) {
      toggleSelection(true);
      const newHeight = parseInt(previewHeight + delta.height, 10);
      setAttributes({ previewHeight: newHeight });
    }
    function changePreviewHeight(newValue) {
      const newHeight = Math.max(
        parseInt(newValue, 10),
        MIN_PREVIEW_HEIGHT
      );
      setAttributes({ previewHeight: newHeight });
    }
    const attachmentPage = media && media.link;
    const blockProps = (0, import_block_editor82.useBlockProps)({
      className: clsx_default(
        !!temporaryURL && (0, import_components42.__unstableGetAnimateClassName)({ type: "loading" }),
        {
          "is-transient": !!temporaryURL
        }
      )
    });
    const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
    if (!href && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        import_block_editor82.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(import_block_editor82.BlockIcon, { icon: file_default }),
          labels: {
            title: (0, import_i18n68.__)("File"),
            instructions: (0, import_i18n68.__)(
              "Drag and drop a file, upload, or choose from your library."
            )
          },
          onSelect: onSelectFile,
          onError: onUploadError,
          accept: "*"
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_jsx_runtime285.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
        FileBlockInspector,
        {
          hrefs: {
            href: href || temporaryURL,
            textLinkHref,
            attachmentPage
          },
          ...{
            openInNewWindow: !!textLinkTarget,
            showDownloadButton,
            changeLinkDestinationOption,
            changeOpenInNewWindow,
            changeShowDownloadButton,
            displayPreview,
            changeDisplayPreview,
            previewHeight,
            changePreviewHeight
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(import_block_editor82.BlockControls, { group: "other", children: [
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
          import_block_editor82.MediaReplaceFlow,
          {
            mediaId: id,
            mediaURL: href,
            accept: "*",
            onSelect: onSelectFile,
            onError: onUploadError,
            onReset: () => onSelectFile(void 0)
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
          ClipboardToolbarButton,
          {
            text: href,
            disabled: (0, import_blob8.isBlobURL)(href)
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { ...blockProps, children: [
        displayPreviewInEditor && /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(
          import_components42.ResizableBox,
          {
            size: { height: previewHeight, width: "100%" },
            minHeight: MIN_PREVIEW_HEIGHT,
            maxHeight: MAX_PREVIEW_HEIGHT,
            grid: [1, 10],
            enable: {
              top: false,
              right: false,
              bottom: true,
              left: false,
              topRight: false,
              bottomRight: false,
              bottomLeft: false,
              topLeft: false
            },
            onResizeStart: () => toggleSelection(false),
            onResizeStop: handleOnResizeStop,
            showHandle: isSelected,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
                "object",
                {
                  className: "wp-block-file__preview",
                  data: href,
                  type: "application/pdf",
                  "aria-label": (0, import_i18n68.__)(
                    "Embed of the selected PDF file."
                  )
                }
              ),
              !isSelected && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("div", { className: "wp-block-file__preview-overlay" })
            ]
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)("div", { className: "wp-block-file__content-wrapper", children: [
          /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_block_editor82.RichText,
            {
              identifier: "fileName",
              tagName: "a",
              value: fileName,
              placeholder: (0, import_i18n68.__)("Write file name\u2026"),
              withoutInteractiveFormatting: true,
              onChange: (text) => setAttributes({
                fileName: removeAnchorTag(text)
              }),
              href: textLinkHref
            }
          ),
          showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime285.jsx)("div", { className: "wp-block-file__button-richtext-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
            import_block_editor82.RichText,
            {
              identifier: "downloadButtonText",
              tagName: "div",
              "aria-label": (0, import_i18n68.__)("Download button text"),
              className: clsx_default(
                "wp-block-file__button",
                (0, import_block_editor82.__experimentalGetElementClassName)(
                  "button"
                )
              ),
              value: downloadButtonText2,
              withoutInteractiveFormatting: true,
              placeholder: (0, import_i18n68.__)("Add text\u2026"),
              onChange: (text) => setAttributes({
                downloadButtonText: removeAnchorTag(text)
              })
            }
          ) })
        ] })
      ] })
    ] });
  }
  var edit_default10 = FileEdit;

  // packages/block-library/build-module/file/block.json
  var block_default33 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/file",
    title: "File",
    category: "media",
    description: "Add a link to a downloadable file.",
    keywords: ["document", "pdf", "download"],
    textdomain: "default",
    attributes: {
      id: {
        type: "number"
      },
      blob: {
        type: "string",
        role: "local"
      },
      href: {
        type: "string",
        role: "content"
      },
      fileId: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "id"
      },
      fileName: {
        type: "rich-text",
        source: "rich-text",
        selector: "a:not([download])",
        role: "content"
      },
      textLinkHref: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "href",
        role: "content"
      },
      textLinkTarget: {
        type: "string",
        source: "attribute",
        selector: "a:not([download])",
        attribute: "target"
      },
      showDownloadButton: {
        type: "boolean",
        default: true
      },
      downloadButtonText: {
        type: "rich-text",
        source: "rich-text",
        selector: "a[download]",
        role: "content"
      },
      displayPreview: {
        type: "boolean"
      },
      previewHeight: {
        type: "number",
        default: 600
      }
    },
    supports: {
      anchor: true,
      align: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      interactivity: true
    },
    editorStyle: "wp-block-file-editor",
    style: "wp-block-file"
  };

  // packages/block-library/build-module/file/save.mjs
  var import_block_editor83 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime286 = __toESM(require_jsx_runtime(), 1);
  function save17({ attributes: attributes2 }) {
    const {
      href,
      fileId,
      fileName,
      textLinkHref,
      textLinkTarget,
      showDownloadButton,
      downloadButtonText: downloadButtonText2,
      displayPreview,
      previewHeight
    } = attributes2;
    const pdfEmbedLabel = import_block_editor83.RichText.isEmpty(fileName) ? "PDF embed" : (
      // To do: use toPlainText, but we need ensure it's RichTextData. See
      // https://github.com/WordPress/gutenberg/pull/56710.
      fileName.toString()
    );
    const hasFilename = !import_block_editor83.RichText.isEmpty(fileName);
    const describedById = hasFilename ? fileId : void 0;
    return href && /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)("div", { ...import_block_editor83.useBlockProps.save(), children: [
      displayPreview && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(import_jsx_runtime286.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
        "object",
        {
          className: "wp-block-file__embed",
          data: href,
          type: "application/pdf",
          style: {
            width: "100%",
            height: `${previewHeight}px`
          },
          "aria-label": pdfEmbedLabel
        }
      ) }),
      hasFilename && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
        "a",
        {
          id: describedById,
          href: textLinkHref,
          target: textLinkTarget,
          rel: textLinkTarget ? "noreferrer noopener" : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(import_block_editor83.RichText.Content, { value: fileName })
        }
      ),
      showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
        "a",
        {
          href,
          className: clsx_default(
            "wp-block-file__button",
            (0, import_block_editor83.__experimentalGetElementClassName)("button")
          ),
          download: true,
          "aria-describedby": describedById,
          children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(import_block_editor83.RichText.Content, { value: downloadButtonText2 })
        }
      )
    ] });
  }

  // packages/block-library/build-module/file/transforms.mjs
  var import_blob9 = __toESM(require_blob(), 1);
  var import_blocks22 = __toESM(require_blocks(), 1);
  var import_data34 = __toESM(require_data(), 1);
  var import_core_data19 = __toESM(require_core_data(), 1);
  var import_i18n69 = __toESM(require_i18n(), 1);
  var import_url11 = __toESM(require_url(), 1);
  var downloadButtonText = (0, import_i18n69._x)("Download", "button label");
  var toMediaTransform = (blockName, mediaType, srcAttribute) => ({
    type: "block",
    blocks: [blockName],
    isMatch: ({ id }) => {
      if (!id) {
        return false;
      }
      const { getEntityRecord } = (0, import_data34.select)(import_core_data19.store);
      const media = getEntityRecord("postType", "attachment", id, {
        context: "view"
      });
      return !!media && media.mime_type.includes(mediaType);
    },
    transform: (attributes2) => {
      return (0, import_blocks22.createBlock)(blockName, {
        [srcAttribute]: attributes2.href,
        caption: attributes2.fileName,
        id: attributes2.id,
        anchor: attributes2.anchor
      });
    }
  });
  var transforms8 = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length > 0;
        },
        // We define a lower priority (higher number) than the default of 10. This
        // ensures that the File block is only created as a fallback.
        priority: 15,
        transform: (files) => {
          const blocks = [];
          files.forEach((file) => {
            const blobURL = (0, import_blob9.createBlobURL)(file);
            if (file.type.startsWith("video/")) {
              blocks.push(
                (0, import_blocks22.createBlock)("core/video", {
                  blob: (0, import_blob9.createBlobURL)(file)
                })
              );
            } else if (file.type.startsWith("image/")) {
              blocks.push(
                (0, import_blocks22.createBlock)("core/image", {
                  blob: (0, import_blob9.createBlobURL)(file)
                })
              );
            } else if (file.type.startsWith("audio/")) {
              blocks.push(
                (0, import_blocks22.createBlock)("core/audio", {
                  blob: (0, import_blob9.createBlobURL)(file)
                })
              );
            } else {
              blocks.push(
                (0, import_blocks22.createBlock)("core/file", {
                  blob: blobURL,
                  fileName: file.name,
                  downloadButtonText
                })
              );
            }
          });
          return blocks;
        }
      },
      {
        type: "block",
        blocks: ["core/audio", "core/video", "core/image"],
        transform: (attributes2) => {
          const href = attributes2.src ?? attributes2.url;
          return (0, import_blocks22.createBlock)("core/file", {
            href,
            fileName: attributes2.caption || (0, import_url11.getFilename)(href),
            textLinkHref: href,
            id: attributes2.id,
            anchor: attributes2.anchor,
            downloadButtonText
          });
        }
      }
    ],
    to: [
      toMediaTransform("core/audio", "audio", "src"),
      toMediaTransform("core/video", "video", "src"),
      toMediaTransform("core/image", "image", "url")
    ]
  };
  var transforms_default9 = transforms8;

  // packages/block-library/build-module/file/variations.mjs
  var import_i18n70 = __toESM(require_i18n(), 1);
  var variations5 = [
    {
      name: "default",
      isDefault: true,
      // Translatable defaults can't live in `block.json`, so set it here.
      attributes: {
        downloadButtonText: (0, import_i18n70._x)("Download", "button label")
      }
    }
  ];
  var variations_default5 = variations5;

  // packages/block-library/build-module/file/index.mjs
  var { name: name33 } = block_default33;
  var settings33 = {
    icon: file_default,
    example: {
      attributes: {
        href: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",
        fileName: (0, import_i18n71._x)("Armstrong_Small_Step", "Name of the file")
      }
    },
    transforms: transforms_default9,
    deprecated: deprecated_default16,
    edit: edit_default10,
    save: save17,
    variations: variations_default5
  };
  var init33 = () => initBlock({ name: name33, metadata: block_default33, settings: settings33 });

  // packages/block-library/build-module/gallery/index.mjs
  var gallery_exports = {};
  __export(gallery_exports, {
    init: () => init34,
    metadata: () => block_default34,
    name: () => name34,
    settings: () => settings34
  });

  // packages/block-library/build-module/gallery/deprecated.mjs
  var import_block_editor84 = __toESM(require_block_editor(), 1);
  var import_blocks23 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/gallery/constants.mjs
  var LINK_DESTINATION_NONE = "none";
  var LINK_DESTINATION_MEDIA = "media";
  var LINK_DESTINATION_LIGHTBOX = "lightbox";
  var LINK_DESTINATION_ATTACHMENT = "attachment";
  var LINK_DESTINATION_MEDIA_WP_CORE = "file";
  var LINK_DESTINATION_ATTACHMENT_WP_CORE = "post";
  var DEFAULT_MEDIA_SIZE_SLUG2 = "large";
  var MAX_COLUMNS = 8;

  // packages/block-library/build-module/gallery/deprecated.mjs
  var import_jsx_runtime287 = __toESM(require_jsx_runtime(), 1);
  var DEPRECATED_LINK_DESTINATION_MEDIA = "file";
  var DEPRECATED_LINK_DESTINATION_ATTACHMENT = "post";
  function defaultColumnsNumberV1(attributes2) {
    return Math.min(3, attributes2?.images?.length);
  }
  function getHrefAndDestination(image, destination) {
    switch (destination) {
      case DEPRECATED_LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA
        };
      case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT
        };
      case LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA
        };
      case LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT
        };
      case LINK_DESTINATION_NONE:
        return {
          href: void 0,
          linkDestination: LINK_DESTINATION_NONE
        };
    }
    return {};
  }
  function runV2Migration(attributes2) {
    let linkTo = attributes2.linkTo ? attributes2.linkTo : "none";
    if (linkTo === "post") {
      linkTo = "attachment";
    } else if (linkTo === "file") {
      linkTo = "media";
    }
    const imageBlocks = attributes2.images.map((image) => {
      return getImageBlock(image, attributes2.sizeSlug, linkTo);
    });
    const { images, ids, ...restAttributes } = attributes2;
    return [
      {
        ...restAttributes,
        linkTo,
        allowResize: false
      },
      imageBlocks
    ];
  }
  function getImageBlock(image, sizeSlug, linkTo) {
    return (0, import_blocks23.createBlock)("core/image", {
      ...image.id && { id: parseInt(image.id) },
      url: image.url,
      alt: image.alt,
      caption: image.caption,
      sizeSlug,
      ...getHrefAndDestination(image, linkTo)
    });
  }
  var v72 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      shortCodeTransforms: {
        type: "array",
        default: [],
        items: {
          type: "object"
        }
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string"
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      },
      allowResize: {
        type: "boolean",
        default: false
      }
    },
    save({ attributes: attributes2 }) {
      const { caption, columns, imageCrop } = attributes2;
      const className = clsx_default("has-nested-images", {
        [`columns-${columns}`]: columns !== void 0,
        [`columns-default`]: columns === void 0,
        "is-cropped": imageCrop
      });
      const blockProps = import_block_editor84.useBlockProps.save({ className });
      const innerBlocksProps = import_block_editor84.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        !import_block_editor84.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
          import_block_editor84.RichText.Content,
          {
            tagName: "figcaption",
            className: "blocks-gallery-caption",
            value: caption
          }
        )
      ] });
    }
  };
  var v62 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      }
    },
    supports: {
      anchor: true,
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      const className = `columns-${columns} ${imageCrop ? "is-cropped" : ""}`;
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { ...import_block_editor84.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
          let href;
          switch (linkTo) {
            case DEPRECATED_LINK_DESTINATION_MEDIA:
              href = image.fullUrl || image.url;
              break;
            case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
              href = image.link;
              break;
          }
          const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
            "img",
            {
              src: image.url,
              alt: image.alt,
              "data-id": image.id,
              "data-full-url": image.fullUrl,
              "data-link": image.link,
              className: image.id ? `wp-image-${image.id}` : null
            }
          );
          return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
            "li",
            {
              className: "blocks-gallery-item",
              children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { children: [
                href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img,
                !import_block_editor84.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                  import_block_editor84.RichText.Content,
                  {
                    tagName: "figcaption",
                    className: "blocks-gallery-item__caption",
                    value: image.caption
                  }
                )
              ] })
            },
            image.id || image.url
          );
        }) }),
        !import_block_editor84.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
          import_block_editor84.RichText.Content,
          {
            tagName: "figcaption",
            className: "blocks-gallery-caption",
            value: caption
          }
        )
      ] });
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var v52 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      }
    },
    supports: {
      align: true
    },
    isEligible({ linkTo }) {
      return !linkTo || linkTo === "attachment" || linkTo === "media";
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
        "figure",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
              let href;
              switch (linkTo) {
                case "media":
                  href = image.fullUrl || image.url;
                  break;
                case "attachment":
                  href = image.link;
                  break;
              }
              const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                "img",
                {
                  src: image.url,
                  alt: image.alt,
                  "data-id": image.id,
                  "data-full-url": image.fullUrl,
                  "data-link": image.link,
                  className: image.id ? `wp-image-${image.id}` : null
                }
              );
              return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                "li",
                {
                  className: "blocks-gallery-item",
                  children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { children: [
                    href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img,
                    !import_block_editor84.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                      import_block_editor84.RichText.Content,
                      {
                        tagName: "figcaption",
                        className: "blocks-gallery-item__caption",
                        value: image.caption
                      }
                    )
                  ] })
                },
                image.id || image.url
              );
            }) }),
            !import_block_editor84.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              import_block_editor84.RichText.Content,
              {
                tagName: "figcaption",
                className: "blocks-gallery-caption",
                value: caption
              }
            )
          ]
        }
      );
    }
  };
  var v42 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "string",
            source: "html",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        default: []
      },
      columns: {
        type: "number"
      },
      caption: {
        type: "string",
        source: "html",
        selector: ".blocks-gallery-caption"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    isEligible({ ids }) {
      return ids && ids.some((id) => typeof id === "string");
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        caption,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
        "figure",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
              let href;
              switch (linkTo) {
                case "media":
                  href = image.fullUrl || image.url;
                  break;
                case "attachment":
                  href = image.link;
                  break;
              }
              const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                "img",
                {
                  src: image.url,
                  alt: image.alt,
                  "data-id": image.id,
                  "data-full-url": image.fullUrl,
                  "data-link": image.link,
                  className: image.id ? `wp-image-${image.id}` : null
                }
              );
              return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                "li",
                {
                  className: "blocks-gallery-item",
                  children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { children: [
                    href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img,
                    !import_block_editor84.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                      import_block_editor84.RichText.Content,
                      {
                        tagName: "figcaption",
                        className: "blocks-gallery-item__caption",
                        value: image.caption
                      }
                    )
                  ] })
                },
                image.id || image.url
              );
            }) }),
            !import_block_editor84.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              import_block_editor84.RichText.Content,
              {
                tagName: "figcaption",
                className: "blocks-gallery-caption",
                value: caption
              }
            )
          ]
        }
      );
    }
  };
  var v34 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "ul.wp-block-gallery .blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          caption: {
            type: "string",
            source: "html",
            selector: "figcaption"
          }
        }
      },
      ids: {
        type: "array",
        default: []
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        "ul",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: images.map((image) => {
            let href;
            switch (linkTo) {
              case "media":
                href = image.fullUrl || image.url;
                break;
              case "attachment":
                href = image.link;
                break;
            }
            const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              "img",
              {
                src: image.url,
                alt: image.alt,
                "data-id": image.id,
                "data-full-url": image.fullUrl,
                "data-link": image.link,
                className: image.id ? `wp-image-${image.id}` : null
              }
            );
            return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              "li",
              {
                className: "blocks-gallery-item",
                children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { children: [
                  href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img,
                  image.caption && image.caption.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                    import_block_editor84.RichText.Content,
                    {
                      tagName: "figcaption",
                      value: image.caption
                    }
                  )
                ] })
              },
              image.id || image.url
            );
          })
        }
      );
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var v27 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "ul.wp-block-gallery .blocks-gallery-item",
        query: {
          url: {
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          alt: {
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          link: {
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          caption: {
            type: "string",
            source: "html",
            selector: "figcaption"
          }
        }
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      }
    },
    isEligible({ images, ids }) {
      return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || images.some((id, index2) => {
        if (!id && ids[index2] !== null) {
          return true;
        }
        return parseInt(id, 10) !== ids[index2];
      }));
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        imageCrop,
        linkTo
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
        "ul",
        {
          className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
          children: images.map((image) => {
            let href;
            switch (linkTo) {
              case "media":
                href = image.url;
                break;
              case "attachment":
                href = image.link;
                break;
            }
            const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              "img",
              {
                src: image.url,
                alt: image.alt,
                "data-id": image.id,
                "data-link": image.link,
                className: image.id ? `wp-image-${image.id}` : null
              }
            );
            return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
              "li",
              {
                className: "blocks-gallery-item",
                children: /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)("figure", { children: [
                  href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img,
                  image.caption && image.caption.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
                    import_block_editor84.RichText.Content,
                    {
                      tagName: "figcaption",
                      value: image.caption
                    }
                  )
                ] })
              },
              image.id || image.url
            );
          })
        }
      );
    }
  };
  var v116 = {
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: "div.wp-block-gallery figure.blocks-gallery-image img",
        query: {
          url: {
            source: "attribute",
            attribute: "src"
          },
          alt: {
            source: "attribute",
            attribute: "alt",
            default: ""
          },
          id: {
            source: "attribute",
            attribute: "data-id"
          }
        }
      },
      columns: {
        type: "number"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      linkTo: {
        type: "string",
        default: "none"
      },
      align: {
        type: "string",
        default: "none"
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const {
        images,
        columns = defaultColumnsNumberV1(attributes2),
        align,
        imageCrop,
        linkTo
      } = attributes2;
      const className = clsx_default(`columns-${columns}`, {
        alignnone: align === "none",
        "is-cropped": imageCrop
      });
      return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("div", { className, children: images.map((image) => {
        let href;
        switch (linkTo) {
          case "media":
            href = image.url;
            break;
          case "attachment":
            href = image.link;
            break;
        }
        const img = /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
          "img",
          {
            src: image.url,
            alt: image.alt,
            "data-id": image.id
          }
        );
        return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(
          "figure",
          {
            className: "blocks-gallery-image",
            children: href ? /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("a", { href, children: img }) : img
          },
          image.id || image.url
        );
      }) });
    },
    migrate(attributes2) {
      return runV2Migration(attributes2);
    }
  };
  var deprecated_default17 = [v72, v62, v52, v42, v34, v27, v116];

  // packages/block-library/build-module/gallery/edit.mjs
  var import_components44 = __toESM(require_components(), 1);
  var import_block_editor89 = __toESM(require_block_editor(), 1);
  var import_element62 = __toESM(require_element(), 1);
  var import_i18n75 = __toESM(require_i18n(), 1);
  var import_data38 = __toESM(require_data(), 1);
  var import_blocks25 = __toESM(require_blocks(), 1);
  var import_blob10 = __toESM(require_blob(), 1);
  var import_notices6 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/gallery/shared-icon.mjs
  var import_block_editor85 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime288 = __toESM(require_jsx_runtime(), 1);
  var sharedIcon = /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(import_block_editor85.BlockIcon, { icon: gallery_default });

  // packages/block-library/build-module/gallery/shared.mjs
  function defaultColumnsNumber(imageCount) {
    return imageCount ? Math.min(3, imageCount) : 3;
  }
  function isObject(value) {
    return !!value && typeof value === "object" && !Array.isArray(value);
  }
  function isGalleryFlexLayout(layout) {
    const layoutType = isObject(layout) ? layout.type : void 0;
    return typeof layoutType !== "string" || layoutType === "" || layoutType === "flex";
  }
  var pickRelevantMediaFiles = (image, sizeSlug = "large") => {
    const imageProps = Object.fromEntries(
      Object.entries(image ?? {}).filter(
        ([key]) => ["alt", "id", "link"].includes(key)
      )
    );
    imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url || image?.source_url;
    const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
    if (fullUrl) {
      imageProps.fullUrl = fullUrl;
    }
    return imageProps;
  };

  // packages/block-library/build-module/image/constants.mjs
  var MIN_SIZE2 = 20;
  var LINK_DESTINATION_NONE2 = "none";
  var LINK_DESTINATION_MEDIA2 = "media";
  var LINK_DESTINATION_ATTACHMENT2 = "attachment";
  var LINK_DESTINATION_CUSTOM = "custom";
  var NEW_TAB_REL2 = ["noopener"];
  var ALLOWED_MEDIA_TYPES3 = ["image"];
  var SIZED_LAYOUTS = ["flex", "grid"];
  var DEFAULT_MEDIA_SIZE_SLUG3 = "full";

  // packages/block-library/build-module/gallery/utils.mjs
  function getHrefAndDestination2(image, galleryDestination, imageDestination, attributes2, lightboxSetting) {
    switch (imageDestination ? imageDestination : galleryDestination) {
      case LINK_DESTINATION_MEDIA_WP_CORE:
      case LINK_DESTINATION_MEDIA:
        return {
          href: image?.source_url || image?.url,
          linkDestination: LINK_DESTINATION_MEDIA2,
          lightbox: lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: false } : void 0
        };
      case LINK_DESTINATION_ATTACHMENT_WP_CORE:
      case LINK_DESTINATION_ATTACHMENT:
        return {
          href: image?.link,
          linkDestination: LINK_DESTINATION_ATTACHMENT2,
          lightbox: lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: false } : void 0
        };
      case LINK_DESTINATION_LIGHTBOX:
        return {
          href: void 0,
          lightbox: !lightboxSetting?.enabled ? { ...attributes2?.lightbox, enabled: true } : void 0,
          linkDestination: LINK_DESTINATION_NONE2
        };
      case LINK_DESTINATION_NONE:
        return {
          href: void 0,
          linkDestination: LINK_DESTINATION_NONE2,
          lightbox: void 0
        };
    }
    return {};
  }

  // packages/block-library/build-module/image/utils.mjs
  function evalAspectRatio(value) {
    const [width, height = 1] = value.split("/").map(Number);
    const aspectRatio = width / height;
    return aspectRatio === Infinity || aspectRatio === 0 ? NaN : aspectRatio;
  }
  function removeNewTabRel(currentRel) {
    let newRel = currentRel;
    if (currentRel !== void 0 && newRel) {
      NEW_TAB_REL2.forEach((relVal) => {
        const regExp = new RegExp("\\b" + relVal + "\\b", "gi");
        newRel = newRel.replace(regExp, "");
      });
      if (newRel !== currentRel) {
        newRel = newRel.trim();
      }
      if (!newRel) {
        newRel = void 0;
      }
    }
    return newRel;
  }
  function getUpdatedLinkTargetSettings(value, { rel }) {
    const linkTarget = value ? "_blank" : void 0;
    let updatedRel;
    if (!linkTarget && !rel) {
      updatedRel = void 0;
    } else {
      updatedRel = removeNewTabRel(rel);
    }
    return {
      linkTarget,
      rel: updatedRel
    };
  }
  function getImageSizeAttributes(image, size) {
    const url = image?.media_details?.sizes?.[size]?.source_url;
    if (url) {
      return { url, width: void 0, height: void 0, sizeSlug: size };
    }
    return {};
  }
  function isValidFileType(file) {
    return ALLOWED_MEDIA_TYPES3.some(
      (mediaType) => file.type.indexOf(mediaType) === 0
    );
  }
  function mediaPosition2({ x: x3, y: y2 } = { x: 0.5, y: 0.5 }) {
    return `${Math.round(x3 * 100)}% ${Math.round(y2 * 100)}%`;
  }

  // packages/block-library/build-module/gallery/gallery.mjs
  var import_i18n72 = __toESM(require_i18n(), 1);
  var import_jsx_runtime289 = __toESM(require_jsx_runtime(), 1);
  function Gallery(props) {
    const {
      attributes: attributes2,
      isSelected,
      setAttributes,
      insertBlocksAfter,
      blockProps,
      __unstableLayoutClassNames: layoutClassNames,
      isContentLocked,
      multiGallerySelection
    } = props;
    const { align, columns, imageCrop, layout } = attributes2;
    const isFlexLayout = isGalleryFlexLayout(layout);
    return /* @__PURE__ */ (0, import_jsx_runtime289.jsxs)(
      "figure",
      {
        ...blockProps,
        className: clsx_default(
          blockProps.className,
          layoutClassNames,
          "blocks-gallery-grid",
          {
            [`align${align}`]: align,
            [`columns-${columns}`]: isFlexLayout && columns !== void 0,
            [`columns-default`]: isFlexLayout && columns === void 0,
            "is-cropped": isFlexLayout && imageCrop
          }
        ),
        children: [
          blockProps.children,
          /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
            Caption,
            {
              attributes: attributes2,
              setAttributes,
              isSelected,
              insertBlocksAfter,
              showToolbarButton: !multiGallerySelection && !isContentLocked,
              className: "blocks-gallery-caption",
              label: (0, import_i18n72.__)("Gallery caption text"),
              placeholder: (0, import_i18n72.__)("Add gallery caption")
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/gallery/use-image-sizes.mjs
  var import_element58 = __toESM(require_element(), 1);
  function useImageSizes(images, isSelected, getSettings2) {
    return (0, import_element58.useMemo)(() => getImageSizing(), [images, isSelected]);
    function getImageSizing() {
      if (!images || images.length === 0) {
        return;
      }
      const { imageSizes } = getSettings2();
      let resizedImages = {};
      if (isSelected) {
        resizedImages = images.reduce((currentResizedImages, img) => {
          if (!img.id) {
            return currentResizedImages;
          }
          const sizes = imageSizes.reduce((currentSizes, size) => {
            const defaultUrl = img.sizes?.[size.slug]?.url;
            const mediaDetailsUrl = img.media_details?.sizes?.[size.slug]?.source_url;
            return {
              ...currentSizes,
              [size.slug]: defaultUrl || mediaDetailsUrl
            };
          }, {});
          return {
            ...currentResizedImages,
            [parseInt(img.id, 10)]: sizes
          };
        }, {});
      }
      const resizedImageSizes = Object.values(resizedImages);
      return imageSizes.filter(
        ({ slug }) => resizedImageSizes.some((sizes) => sizes[slug])
      ).map(({ name: name118, slug }) => ({ value: slug, label: name118 }));
    }
  }

  // packages/block-library/build-module/gallery/use-get-new-images.mjs
  var import_element59 = __toESM(require_element(), 1);
  function useGetNewImages(images, imageData) {
    const [currentImages, setCurrentImages] = (0, import_element59.useState)([]);
    return (0, import_element59.useMemo)(() => getNewImages(), [images, imageData]);
    function getNewImages() {
      let imagesUpdated = false;
      const newCurrentImages = currentImages.filter(
        (currentImg) => images.find((img) => {
          return currentImg.clientId === img.clientId;
        })
      );
      if (newCurrentImages.length < currentImages.length) {
        imagesUpdated = true;
      }
      images.forEach((image) => {
        if (image.fromSavedContent && !newCurrentImages.find(
          (currentImage) => currentImage.id === image.id
        )) {
          imagesUpdated = true;
          newCurrentImages.push(image);
        }
      });
      const newImages = images.filter(
        (image) => !newCurrentImages.find(
          (currentImage) => image.clientId && currentImage.clientId === image.clientId
        ) && imageData?.find((img) => img.id === image.id) && !image.fromSavedContent
      );
      if (imagesUpdated || newImages?.length > 0) {
        setCurrentImages([...newCurrentImages, ...newImages]);
      }
      return newImages.length > 0 ? newImages : null;
    }
  }

  // packages/block-library/build-module/gallery/use-get-media.mjs
  var import_data35 = __toESM(require_data(), 1);
  var import_core_data20 = __toESM(require_core_data(), 1);
  var EMPTY_IMAGE_MEDIA = [];
  function useGetMedia(innerBlockImages) {
    return (0, import_data35.useSelect)(
      (select10) => {
        const imageIds = innerBlockImages.map((imageBlock) => imageBlock.attributes.id).filter((id) => id !== void 0);
        if (imageIds.length === 0) {
          return EMPTY_IMAGE_MEDIA;
        }
        return select10(import_core_data20.store).getEntityRecords(
          "postType",
          "attachment",
          {
            include: imageIds.join(","),
            per_page: -1,
            orderby: "include"
          }
        ) ?? EMPTY_IMAGE_MEDIA;
      },
      [innerBlockImages]
    );
  }

  // packages/block-library/build-module/gallery/gallery-styles.mjs
  var import_block_editor86 = __toESM(require_block_editor(), 1);
  var import_data36 = __toESM(require_data(), 1);

  // packages/global-styles-engine/build-module/utils/object.mjs
  var getValueFromObjectPath = (object, path, defaultValue) => {
    const arrayPath = Array.isArray(path) ? path : path.split(".");
    let value = object;
    arrayPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value ?? defaultValue;
  };

  // packages/global-styles-engine/build-module/utils/common.mjs
  var import_style_engine = __toESM(require_style_engine(), 1);
  function getResolvedRefValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
      const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
        getValueFromObjectPath(tree, ruleValue.ref)
      );
      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
        return void 0;
      }
      if (resolvedRuleValue === void 0) {
        return ruleValue;
      }
      return resolvedRuleValue;
    }
    return ruleValue;
  }
  function getResolvedThemeFilePath(file, themeFileURIs) {
    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
      return file;
    }
    const uri = themeFileURIs.find(
      (themeFileUri) => themeFileUri?.name === file
    );
    if (!uri?.href) {
      return file;
    }
    return uri?.href;
  }
  function getResolvedValue(ruleValue, tree) {
    if (!ruleValue || !tree) {
      return ruleValue;
    }
    const resolvedValue = getResolvedRefValue(ruleValue, tree);
    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
      return {
        ...resolvedValue,
        url: getResolvedThemeFilePath(
          resolvedValue.url,
          tree?._links?.["wp:theme-file"]
        )
      };
    }
    return resolvedValue;
  }

  // packages/global-styles-engine/build-module/utils/duotone.mjs
  function getValuesFromColors(colors = []) {
    const values = {
      r: [],
      g: [],
      b: [],
      a: []
    };
    colors.forEach((color) => {
      const rgbColor = A(color).toRgb();
      values.r.push(rgbColor.r / 255);
      values.g.push(rgbColor.g / 255);
      values.b.push(rgbColor.b / 255);
      values.a.push(rgbColor.a);
    });
    return values;
  }
  function getDuotoneUnsetStylesheet(selector) {
    return `${selector}{filter:none}`;
  }
  function getDuotoneStylesheet(selector, id) {
    return `${selector}{filter:url(#${id})}`;
  }
  function getDuotoneFilter(id, colors) {
    const values = getValuesFromColors(colors);
    return `
<svg
	xmlns:xlink="http://www.w3.org/1999/xlink"
	viewBox="0 0 0 0"
	width="0"
	height="0"
	focusable="false"
	role="none"
	aria-hidden="true"
	style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
>
	<defs>
		<filter id="${id}">
			<!--
				Use sRGB instead of linearRGB so transparency looks correct.
				Use perceptual brightness to convert to grayscale.
			-->
			<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
			<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
			<feComponentTransfer color-interpolation-filters="sRGB">
				<feFuncR type="table" tableValues="${values.r.join(" ")}"></feFuncR>
				<feFuncG type="table" tableValues="${values.g.join(" ")}"></feFuncG>
				<feFuncB type="table" tableValues="${values.b.join(" ")}"></feFuncB>
				<feFuncA type="table" tableValues="${values.a.join(" ")}"></feFuncA>
			</feComponentTransfer>
			<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
			<feComposite in2="SourceGraphic" operator="in"></feComposite>
		</filter>
	</defs>
</svg>`;
  }

  // packages/global-styles-engine/build-module/utils/viewport.mjs
  var DEFAULT_VIEWPORT_BREAKPOINTS = {
    mobile: "480px",
    tablet: "782px"
  };
  var VIEWPORT_SIZE_REGEXP = /^(\d+|\d*\.\d+)(px|em|rem)$/;
  var DEFAULT_FONT_SIZE = 16;
  function isViewportSettings(configOrSettings) {
    return "mobile" in configOrSettings || "tablet" in configOrSettings;
  }
  function getViewportSettings(configOrSettings) {
    if (!configOrSettings || typeof configOrSettings !== "object") {
      return {};
    }
    if (isViewportSettings(configOrSettings)) {
      return configOrSettings;
    }
    return configOrSettings.settings?.viewport ?? {};
  }
  function isValidViewportSize(value) {
    return typeof value === "string" && VIEWPORT_SIZE_REGEXP.test(value.trim());
  }
  function getViewportBreakpointValueInPixels(value) {
    if (typeof value === "number") {
      return value;
    }
    if (typeof value !== "string") {
      return void 0;
    }
    const match = value.trim().match(VIEWPORT_SIZE_REGEXP);
    if (!match) {
      return void 0;
    }
    const numericValue = Number.parseFloat(match[1]);
    const unit = match[2];
    return unit === "px" ? numericValue : numericValue * DEFAULT_FONT_SIZE;
  }
  function getViewportBreakpoints(configOrSettings) {
    const viewportSettings = getViewportSettings(configOrSettings);
    const breakpoints = {};
    const breakpointValuesInPixels = {};
    Object.keys(DEFAULT_VIEWPORT_BREAKPOINTS).forEach((breakpoint) => {
      const key = breakpoint;
      const value = viewportSettings[key];
      const px = getViewportBreakpointValueInPixels(value);
      if (px !== void 0 && isValidViewportSize(value)) {
        breakpoints[key] = value.trim();
        breakpointValuesInPixels[key] = px;
      }
    });
    const breakpointNames = Object.keys(breakpoints);
    if (!breakpointNames.length) {
      return { ...DEFAULT_VIEWPORT_BREAKPOINTS };
    }
    if (1 === breakpointNames.length) {
      return breakpoints;
    }
    const mobile = breakpoints.mobile;
    const tablet = breakpoints.tablet;
    if (breakpointValuesInPixels.mobile >= breakpointValuesInPixels.tablet) {
      return { mobile };
    }
    return { mobile, tablet };
  }
  function getResponsiveMediaQueries(configOrSettings) {
    const breakpoints = getViewportBreakpoints(configOrSettings);
    const mediaQueries = {};
    if (breakpoints.mobile) {
      mediaQueries["@mobile"] = `@media (width <= ${breakpoints.mobile})`;
    }
    if (breakpoints.tablet) {
      mediaQueries["@tablet"] = breakpoints.mobile ? `@media (${breakpoints.mobile} < width <= ${breakpoints.tablet})` : `@media (width <= ${breakpoints.tablet})`;
    }
    return mediaQueries;
  }

  // packages/global-styles-engine/build-module/variation.mjs
  function getVariationStyle(globalStyles, name118, variation, { resolveRefs = true } = {}) {
    if (!globalStyles?.styles?.blocks?.[name118]?.variations?.[variation]) {
      return void 0;
    }
    const replaceRefs = (variationStyles) => {
      Object.keys(variationStyles).forEach((key) => {
        const value = variationStyles[key];
        if (typeof value === "object" && value !== null) {
          if (value.ref !== void 0) {
            if (typeof value.ref !== "string" || value.ref.trim() === "") {
              delete variationStyles[key];
            } else {
              const refValue = getValueFromObjectPath(
                globalStyles,
                value.ref
              );
              if (refValue !== void 0 && refValue !== null) {
                variationStyles[key] = refValue;
              } else {
                delete variationStyles[key];
              }
            }
          } else {
            replaceRefs(value);
            if (Object.keys(value).length === 0) {
              delete variationStyles[key];
            }
          }
        }
      });
    };
    const styles = JSON.parse(
      JSON.stringify(
        globalStyles.styles.blocks[name118].variations[variation]
      )
    );
    if (resolveRefs) {
      replaceRefs(styles);
    }
    return styles;
  }

  // packages/global-styles-engine/build-module/resolve-style.mjs
  var DEFAULT_STATE_VALUE = "default";
  function isDefaultBlockStyleState(selectedState) {
    const viewport = selectedState?.viewport;
    const pseudoState = selectedState?.pseudoState;
    return (!viewport || viewport === DEFAULT_STATE_VALUE) && (!pseudoState || pseudoState === DEFAULT_STATE_VALUE);
  }
  function getStyleStatePath(selectedState) {
    if (isDefaultBlockStyleState(selectedState)) {
      return [];
    }
    return [selectedState.viewport, selectedState.pseudoState].filter(
      (state) => !!state && state !== DEFAULT_STATE_VALUE
    );
  }
  function getStyleForState2(style2, selectedState) {
    const path = getStyleStatePath(selectedState);
    if (!path.length) {
      return style2;
    }
    return getValueFromObjectPath(style2, path);
  }
  var TREE_STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["blocks", "variations", "css"]);
  var EMPTY_INHERITANCE = Object.freeze({
    value: {},
    sources: {}
  });
  var SOURCE_DESCRIPTORS = {
    root: { layer: "root" },
    element: { layer: "element" },
    block: { layer: "block" },
    blockVariation: { layer: "blockVariation" }
  };
  function createSourceDescriptor(type) {
    const descriptor = SOURCE_DESCRIPTORS[type];
    if (!descriptor) {
      return null;
    }
    return { ...descriptor };
  }
  function createContribution(styles, source) {
    if (!styles || !source) {
      return null;
    }
    return { styles, source };
  }
  function getPathKey(path) {
    return path.join(".");
  }
  function getSourceForPath(source) {
    return { ...source };
  }
  function isExplicitEmpty(value) {
    if (value === "" || value === null) {
      return true;
    }
    if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) {
      return true;
    }
    return false;
  }
  function isRefObject(value) {
    return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.ref === "string";
  }
  function pickLayerRootContribution(layer) {
    if (!layer || typeof layer !== "object" || Array.isArray(layer)) {
      return null;
    }
    const contribution = {};
    for (const key of Object.keys(layer)) {
      if (TREE_STRUCTURAL_KEYS.has(key)) {
        continue;
      }
      if (key === "elements") {
        if (layer.elements && typeof layer.elements === "object") {
          contribution.elements = layer.elements;
        }
        continue;
      }
      if (isExplicitEmpty(layer[key])) {
        continue;
      }
      contribution[key] = layer[key];
    }
    return Object.keys(contribution).length === 0 ? null : contribution;
  }
  var ATOMIC_OBJECT_KEYS = /* @__PURE__ */ new Set(["backgroundImage"]);
  function deepMergeDroppingEmpties(target, source, globalStyles, sourceMetadata, sources, path = []) {
    if (!source || typeof source !== "object" || Array.isArray(source)) {
      return target;
    }
    for (const key of Object.keys(source)) {
      let sourceValue = source[key];
      if (isExplicitEmpty(sourceValue)) {
        continue;
      }
      if (isRefObject(sourceValue)) {
        if (sourceValue.ref.trim() === "") {
          continue;
        }
        const resolved = getValueFromObjectPath(
          globalStyles,
          sourceValue.ref
        );
        if (resolved === void 0 || resolved === null || isRefObject(resolved)) {
          continue;
        }
        sourceValue = resolved;
      }
      const nextPath = [...path, key];
      if (!ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && !isRefObject(sourceValue)) {
        const existing = target[key] && typeof target[key] === "object" && !Array.isArray(target[key]) ? target[key] : {};
        target[key] = deepMergeDroppingEmpties(
          { ...existing },
          sourceValue,
          globalStyles,
          sourceMetadata,
          sources,
          nextPath
        );
      } else {
        target[key] = ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) ? { ...sourceValue } : sourceValue;
        if (sourceMetadata && sources) {
          sources[getPathKey(nextPath)] = getSourceForPath(sourceMetadata);
        }
      }
    }
    return target;
  }
  function getStateSlice(layerObject, selectedState) {
    if (!layerObject) {
      return null;
    }
    const slice = getStyleForState2(layerObject, selectedState);
    return slice && typeof slice === "object" && !Array.isArray(slice) ? slice : null;
  }
  var NON_CASCADING_ROOT_PREFIXES = [
    "color.background",
    "color.gradient",
    "background",
    "spacing",
    "dimensions",
    "border",
    "shadow",
    "filter"
  ];
  function isNonCascadingRootPath(pathKey) {
    if (pathKey.startsWith("elements.")) {
      return false;
    }
    return NON_CASCADING_ROOT_PREFIXES.some(
      (prefix) => pathKey === prefix || pathKey.startsWith(`${prefix}.`)
    );
  }
  function deleteAtPath(target, pathSegments) {
    if (!target || typeof target !== "object") {
      return;
    }
    const [head, ...rest] = pathSegments;
    if (rest.length === 0) {
      delete target[head];
      return;
    }
    const child = target[head];
    if (child && typeof child === "object") {
      deleteAtPath(child, rest);
      if (Object.keys(child).length === 0) {
        delete target[head];
      }
    }
  }
  function dropNonCascadingRootLeaves(value, sources) {
    for (const pathKey of Object.keys(sources)) {
      if (sources[pathKey].layer === "root" && isNonCascadingRootPath(pathKey)) {
        deleteAtPath(value, pathKey.split("."));
        delete sources[pathKey];
      }
    }
  }
  function resolveThemeFileBackgroundImage(value, globalStyles, links) {
    const image = value?.background?.backgroundImage;
    if (!image) {
      return;
    }
    const resolved = getResolvedValue(image, {
      ...globalStyles,
      _links: links ?? void 0
    });
    if (resolved !== void 0) {
      value.background.backgroundImage = resolved;
    }
  }
  function computeResolvedStyle(globalStyles, {
    blockName,
    variationName = null,
    elements = null,
    viewport = null,
    pseudoState = null
  } = {}) {
    if (!globalStyles || !globalStyles.styles) {
      return EMPTY_INHERITANCE;
    }
    if (!blockName) {
      return EMPTY_INHERITANCE;
    }
    const styles = globalStyles.styles;
    const selectedState = { viewport, pseudoState };
    const root = styles;
    const block = styles.blocks?.[blockName] ?? null;
    const elementLayers = (elements ?? []).map((elementName) => styles.elements?.[elementName] ?? null).filter((layer) => !!layer);
    const variation = variationName ? getVariationStyle(globalStyles, blockName, variationName) ?? null : null;
    const contributions = [
      createContribution(
        pickLayerRootContribution(root),
        createSourceDescriptor("root")
      ),
      ...elementLayers.map(
        (layer) => createContribution(
          pickLayerRootContribution(layer),
          createSourceDescriptor("element")
        )
      ),
      block ? createContribution(
        pickLayerRootContribution(block),
        createSourceDescriptor("block")
      ) : null,
      variation ? createContribution(
        pickLayerRootContribution(variation),
        createSourceDescriptor("blockVariation")
      ) : null
    ];
    if (!isDefaultBlockStyleState(selectedState)) {
      contributions.push(
        createContribution(
          pickLayerRootContribution(
            getStateSlice(root, selectedState)
          ),
          createSourceDescriptor("root")
        ),
        ...elementLayers.map(
          (layer) => createContribution(
            pickLayerRootContribution(
              getStateSlice(layer, selectedState)
            ),
            createSourceDescriptor("element")
          )
        ),
        block ? createContribution(
          pickLayerRootContribution(
            getStateSlice(block, selectedState)
          ),
          createSourceDescriptor("block")
        ) : null,
        variation ? createContribution(
          pickLayerRootContribution(
            getStateSlice(variation, selectedState)
          ),
          createSourceDescriptor("blockVariation")
        ) : null
      );
    }
    const filteredContributions = contributions.filter(
      Boolean
    );
    if (filteredContributions.length === 0) {
      return EMPTY_INHERITANCE;
    }
    const sources = {};
    const value = filteredContributions.reduce(
      (mergedValue, contribution) => deepMergeDroppingEmpties(
        mergedValue,
        contribution.styles,
        globalStyles,
        contribution.source,
        sources
      ),
      {}
    );
    dropNonCascadingRootLeaves(value, sources);
    resolveThemeFileBackgroundImage(
      value,
      globalStyles,
      globalStyles._links ?? null
    );
    return { value, sources };
  }
  var NO_LINKS = {};
  var memo2 = /* @__PURE__ */ new WeakMap();
  function resolveStyle2(globalStyles, context = {}) {
    const styleData = globalStyles?.styles;
    if (!styleData || typeof styleData !== "object") {
      return computeResolvedStyle(globalStyles, context);
    }
    let byLinks = memo2.get(styleData);
    if (!byLinks) {
      byLinks = /* @__PURE__ */ new WeakMap();
      memo2.set(styleData, byLinks);
    }
    const linksKey = globalStyles?._links ?? NO_LINKS;
    let inner = byLinks.get(linksKey);
    if (!inner) {
      inner = /* @__PURE__ */ new Map();
      byLinks.set(linksKey, inner);
    }
    const sliceKey = `${context.elements?.join(",") ?? ""}:${context.viewport ?? ""}:${context.pseudoState ?? ""}`;
    const key = (context.blockName || "") + "" + (context.variationName || "") + "" + sliceKey;
    if (inner.has(key)) {
      return inner.get(key);
    }
    const result = computeResolvedStyle(globalStyles, context);
    inner.set(key, result);
    return result;
  }

  // packages/global-styles-engine/build-module/lock-unlock.mjs
  var import_private_apis2 = __toESM(require_private_apis(), 1);
  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
    "@wordpress/global-styles-engine"
  );

  // packages/global-styles-engine/build-module/private-apis.mjs
  var privateApis = {};
  lock2(privateApis, {
    getResponsiveMediaQueries,
    getViewportBreakpoints,
    getViewportBreakpointValueInPixels,
    getDuotoneFilter,
    getDuotoneStylesheet,
    getDuotoneUnsetStylesheet,
    resolveStyle: resolveStyle2,
    getVariationStyle
  });

  // packages/block-library/build-module/gallery/responsive-styles.mjs
  function isObject2(value) {
    return !!value && typeof value === "object" && !Array.isArray(value);
  }
  function isValidGalleryColumns(value) {
    return Number.isInteger(value) && value >= 1 && value <= MAX_COLUMNS;
  }
  var ASPECT_RATIO_PATTERN = /^(auto|\d+(\.\d+)?(\s*\/\s*\d+(\.\d+)?)?)$/;
  function isValidGalleryAspectRatio(value) {
    return typeof value === "string" && ASPECT_RATIO_PATTERN.test(value.trim());
  }
  function getViewportGalleryStyle(style2, viewport) {
    if (!isObject2(style2) || !isObject2(style2[viewport])) {
      return {};
    }
    return style2[viewport];
  }
  function cleanObject(value) {
    if (!isObject2(value)) {
      return value;
    }
    const entries = Object.entries(value).filter(
      ([, entryValue]) => entryValue !== void 0
    );
    return entries.length ? Object.fromEntries(entries) : void 0;
  }
  function getUpdatedGalleryStyle({
    style: style2,
    viewport,
    baseSettings,
    settings: settings117
  }) {
    const currentStyle = isObject2(style2) ? style2 : {};
    const nextViewportStyle = {
      ...getViewportGalleryStyle(currentStyle, viewport)
    };
    Object.entries(settings117).forEach(([key, value]) => {
      if (value === void 0 || value === baseSettings[key]) {
        delete nextViewportStyle[key];
      } else {
        nextViewportStyle[key] = value;
      }
    });
    const cleanedViewportStyle = cleanObject(nextViewportStyle);
    const nextStyle = { ...currentStyle };
    if (cleanedViewportStyle) {
      nextStyle[viewport] = cleanedViewportStyle;
    } else {
      delete nextStyle[viewport];
    }
    return cleanObject(nextStyle);
  }
  function getGallerySelector(selector) {
    return `${selector}.wp-block-gallery.has-nested-images`;
  }
  function getFlexGallerySelector(selector) {
    return `${getGallerySelector(selector)}:where(.is-layout-flex)`;
  }
  function getImageSelector(selector) {
    return `${getFlexGallerySelector(
      selector
    )} figure.wp-block-image:not(#individual-image)`;
  }
  function getColumnsCSS(selector, columns) {
    const width = columns === 1 ? "100%" : `calc((100% - (var(--wp--style--unstable-gallery-gap, 16px) * ${columns - 1})) / ${columns})`;
    return `${getImageSelector(selector)}{width:${width} !important;}`;
  }
  function getImageCropCSS(selector, imageCrop) {
    const imageSelector = getImageSelector(selector);
    const wrapperSelector = `${imageSelector} > div:not(.components-drop-zone)`;
    const linkSelector = `${imageSelector} > a`;
    const mediaSelector = `${imageSelector} a,${imageSelector} img`;
    if (imageCrop) {
      return `${imageSelector}{align-self:inherit !important;margin-bottom:0 !important;}${wrapperSelector},${linkSelector}{display:flex !important;}${mediaSelector}{width:100% !important;flex:1 0 0% !important;height:100% !important;object-fit:cover !important;}`;
    }
    return `${imageSelector}{align-self:auto !important;margin-top:0 !important;margin-bottom:auto !important;}${wrapperSelector}{display:block !important;}${linkSelector}{display:inline-block !important;}${mediaSelector}{width:auto !important;flex:0 1 auto !important;height:auto !important;object-fit:fill !important;}`;
  }
  function getAspectRatioCSS(selector, aspectRatio) {
    const imageSelector = `${getGallerySelector(
      selector
    )} figure.wp-block-image:not(#individual-image) img`;
    const ratio = aspectRatio.trim();
    if (ratio === "auto") {
      return `${imageSelector}{aspect-ratio:revert-layer !important;}`;
    }
    return `${imageSelector}{aspect-ratio:${ratio} !important;object-fit:cover !important;}`;
  }
  function getGalleryResponsiveCSS(selector, style2, mediaQueries) {
    if (!isObject2(mediaQueries)) {
      return "";
    }
    return Object.entries(mediaQueries).map(([viewport, mediaQuery]) => {
      if (typeof mediaQuery !== "string") {
        return "";
      }
      const viewportStyle = getViewportGalleryStyle(style2, viewport);
      let css = "";
      if (isValidGalleryColumns(viewportStyle.columns)) {
        css += getColumnsCSS(selector, viewportStyle.columns);
      }
      if (typeof viewportStyle.imageCrop === "boolean") {
        css += getImageCropCSS(selector, viewportStyle.imageCrop);
      }
      if (isValidGalleryAspectRatio(viewportStyle.aspectRatio)) {
        css += getAspectRatioCSS(selector, viewportStyle.aspectRatio);
      }
      return css ? `${mediaQuery}{${css}}` : "";
    }).join("");
  }

  // packages/block-library/build-module/gallery/gallery-styles.mjs
  var { getResponsiveMediaQueries: getResponsiveMediaQueries2 } = unlock(privateApis);
  var { globalStylesDataKey } = unlock(import_block_editor86.privateApis);
  var GALLERY_BLOCK_NAME = "core/gallery";
  var FALLBACK_VALUE = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
  function getGalleryGapCustomPropertyStyle(selector, blockGap) {
    let column = FALLBACK_VALUE;
    if (blockGap) {
      column = typeof blockGap === "string" ? (0, import_block_editor86.__experimentalGetGapCSSValue)(blockGap) || FALLBACK_VALUE : (0, import_block_editor86.__experimentalGetGapCSSValue)(blockGap?.left) || FALLBACK_VALUE;
    }
    return `${selector} {
		--wp--style--unstable-gallery-gap: ${column === "0" ? "0px" : column}
	}`;
  }
  function getBlockGapValue(style2) {
    if (!Object.hasOwn(style2?.spacing || {}, "blockGap")) {
      return void 0;
    }
    return style2.spacing.blockGap;
  }
  function GalleryStyles({ style: style2, clientId, isFlexLayout }) {
    const selector = `.wp-block-gallery-${clientId}`;
    const [viewportSettings] = (0, import_block_editor86.useSettings)("viewport");
    const globalStyles = (0, import_data36.useSelect)(
      (select10) => select10(import_block_editor86.store).getSettings()?.[globalStylesDataKey],
      []
    );
    const responsiveMediaQueries = getResponsiveMediaQueries2(viewportSettings);
    let css = "";
    if (isFlexLayout) {
      const globalGalleryStyles = globalStyles?.blocks?.[GALLERY_BLOCK_NAME] || {};
      const styleBlockGap = getBlockGapValue(style2);
      const globalGalleryBlockGap = globalGalleryStyles?.spacing?.blockGap ?? FALLBACK_VALUE;
      const blockGap = styleBlockGap === void 0 ? globalGalleryBlockGap : styleBlockGap;
      css += getGalleryGapCustomPropertyStyle(selector, blockGap);
      Object.entries(responsiveMediaQueries).forEach(
        ([viewport, mediaQuery]) => {
          const styleViewportBlockGap = getBlockGapValue(
            style2?.[viewport]
          );
          const globalViewportBlockGap = styleBlockGap === void 0 ? globalGalleryStyles?.[viewport]?.spacing?.blockGap : void 0;
          const viewportBlockGap = styleViewportBlockGap === void 0 ? globalViewportBlockGap : styleViewportBlockGap;
          if (viewportBlockGap === void 0 || viewportBlockGap === null) {
            return;
          }
          css += `${mediaQuery}{${getGalleryGapCustomPropertyStyle(
            selector,
            viewportBlockGap
          )}}`;
        }
      );
    }
    css += getGalleryResponsiveCSS(selector, style2, responsiveMediaQueries);
    (0, import_block_editor86.useStyleOverride)({ css });
    return null;
  }

  // packages/block-library/build-module/gallery/use-dynamic-gallery.mjs
  var import_element60 = __toESM(require_element(), 1);
  var import_data37 = __toESM(require_data(), 1);
  var import_block_editor87 = __toESM(require_block_editor(), 1);
  var import_core_data21 = __toESM(require_core_data(), 1);
  var import_blocks24 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/gallery/dynamic-source.mjs
  var import_i18n73 = __toESM(require_i18n(), 1);
  var ATTACHED_MEDIA = "core/attached-media";
  var DEFAULT_ORDERBY = "date";
  var DEFAULT_ORDER = "desc";
  var DYNAMIC_SOURCES = {
    [ATTACHED_MEDIA]: {
      // Short label for the entry affordance / future source chooser. Mirrors
      // the "Attached images" media inserter category name.
      title: (0, import_i18n73.__)("Use attached images"),
      // Help text shown beneath the Source controls.
      description: (0, import_i18n73.__)("Images attached to the post."),
      // Empty-state copy for the canvas preview.
      emptyMessage: (0, import_i18n73.__)("Images attached to the post will appear here.")
    }
  };
  function getDynamicSource(source) {
    return DYNAMIC_SOURCES[source];
  }
  var MAX_IMAGES = 100;
  function getSourceQuery(dynamicContent, { postId }) {
    const { source, args = {} } = dynamicContent ?? {};
    switch (source) {
      case ATTACHED_MEDIA:
        if (!postId) {
          return null;
        }
        return {
          parent: postId,
          per_page: MAX_IMAGES,
          // The gallery only accepts images, so constrain the source to
          // image media (matching the server resolver). This keeps the
          // editor preview in step with the rendered output for posts
          // that also have non-image attachments.
          media_type: "image",
          // Map the camelCase `args` to the REST-named media collection
          // params. Unexpected values (only reachable via hand-edited
          // markup) are coerced back to the defaults — mirroring the server
          // resolver's allow list — so the editor preview stays in step with
          // the frontend instead of issuing an invalid REST query.
          orderby: args.orderBy === "date" || args.orderBy === "title" ? args.orderBy : DEFAULT_ORDERBY,
          order: args.order === "asc" || args.order === "desc" ? args.order : DEFAULT_ORDER
        };
    }
    return null;
  }

  // packages/block-library/build-module/gallery/use-dynamic-gallery.mjs
  var EMPTY_ARRAY2 = [];
  function buildImageBlockAttributes(media, galleryAttributes) {
    const { sizeSlug, linkTo, linkTarget, aspectRatio } = galleryAttributes;
    const hasAspectRatio = !!aspectRatio && aspectRatio !== "auto";
    return {
      id: media.id,
      ...pickRelevantMediaFiles(media, sizeSlug),
      ...getHrefAndDestination2(media, linkTo),
      ...getUpdatedLinkTargetSettings(linkTarget, galleryAttributes),
      sizeSlug,
      // Raw caption, mirroring the frontend (`index.php`). Gap: the REST API
      // exposes no caption run through `wp_get_attachment_caption`, so neither
      // side applies that filter.
      caption: media.caption?.raw || "",
      alt: media.alt_text || "",
      aspectRatio: hasAspectRatio ? aspectRatio : void 0,
      // Pair `scale` with `aspectRatio` so the image crops rather than stretches,
      // matching the image block's UI and the frontend (`index.php`).
      scale: hasAspectRatio ? "cover" : void 0
    };
  }
  function buildImageBlocks(media, galleryAttributes) {
    return media.map(
      (mediaItem) => (0, import_blocks24.createBlock)(
        "core/image",
        buildImageBlockAttributes(mediaItem, galleryAttributes)
      )
    );
  }
  function useDynamicGallery({
    attributes: attributes2,
    setAttributes,
    clientId,
    postId,
    postType
  }) {
    const { dynamicContent } = attributes2;
    const canUseDynamicSource = !!postType;
    const sourceDescriptor = getDynamicSource(dynamicContent?.source);
    const sourceOrderby = dynamicContent?.args?.orderBy ?? DEFAULT_ORDERBY;
    const sourceOrder = dynamicContent?.args?.order ?? DEFAULT_ORDER;
    const registry = (0, import_data37.useRegistry)();
    const { replaceInnerBlocks, __unstableMarkNextChangeAsNotPersistent } = (0, import_data37.useDispatch)(import_block_editor87.store);
    const query = (0, import_element60.useMemo)(
      () => dynamicContent ? getSourceQuery(dynamicContent, { postId }) : null,
      [dynamicContent, postId]
    );
    const { dynamicMedia, dynamicMediaTotal, isResolvingDynamic } = (0, import_data37.useSelect)(
      (select10) => {
        if (!query) {
          return {
            dynamicMedia: EMPTY_ARRAY2,
            dynamicMediaTotal: 0,
            isResolvingDynamic: false
          };
        }
        const selectorArgs = ["postType", "attachment", query];
        return {
          dynamicMedia: select10(import_core_data21.store).getEntityRecords(...selectorArgs) ?? EMPTY_ARRAY2,
          // Total matching attachments (the `X-WP-Total` header), which the
          // query's `per_page` cap doesn't bound — so it reveals when the
          // post has more attached images than are shown.
          dynamicMediaTotal: select10(import_core_data21.store).getEntityRecordsTotalItems(
            ...selectorArgs
          ) ?? 0,
          isResolvingDynamic: !select10(import_core_data21.store).hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [query]
    );
    const hasMoreImagesThanCap = dynamicMediaTotal > MAX_IMAGES;
    const { sizeSlug, linkTo, linkTarget, aspectRatio } = attributes2;
    const imageAttributes = (0, import_element60.useMemo)(
      () => ({ sizeSlug, linkTo, linkTarget, aspectRatio }),
      [sizeSlug, linkTo, linkTarget, aspectRatio]
    );
    const dynamicImageBlocks = (0, import_element60.useMemo)(
      () => buildImageBlocks(dynamicMedia, imageAttributes),
      [dynamicMedia, imageAttributes]
    );
    const galleryContext = (0, import_element60.useMemo)(
      () => ({
        allowResize: attributes2.allowResize ?? false,
        imageCrop: attributes2.imageCrop,
        fixedHeight: attributes2.fixedHeight,
        navigationButtonType: attributes2.navigationButtonType
      }),
      [
        attributes2.allowResize,
        attributes2.imageCrop,
        attributes2.fixedHeight,
        attributes2.navigationButtonType
      ]
    );
    function enableDynamicMode() {
      registry.batch(() => {
        setAttributes({ dynamicContent: { source: ATTACHED_MEDIA } });
        __unstableMarkNextChangeAsNotPersistent();
        replaceInnerBlocks(clientId, []);
      });
    }
    function convertToStatic() {
      registry.batch(() => {
        replaceInnerBlocks(
          clientId,
          buildImageBlocks(dynamicMedia, imageAttributes)
        );
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ dynamicContent: void 0 });
      });
    }
    function setSourceOrder(nextOrderby, nextOrder) {
      const nextArgs = { ...dynamicContent?.args };
      delete nextArgs.orderBy;
      delete nextArgs.order;
      if (nextOrderby !== void 0 && (nextOrderby !== DEFAULT_ORDERBY || nextOrder !== DEFAULT_ORDER)) {
        nextArgs.orderBy = nextOrderby;
        nextArgs.order = nextOrder;
      }
      const nextSource = { ...dynamicContent };
      if (Object.keys(nextArgs).length) {
        nextSource.args = nextArgs;
      } else {
        delete nextSource.args;
      }
      setAttributes({ dynamicContent: nextSource });
    }
    function resetSource() {
      setAttributes({
        dynamicContent: { source: dynamicContent.source }
      });
    }
    return {
      dynamicContent,
      canUseDynamicSource,
      sourceDescriptor,
      hasMoreImagesThanCap,
      dynamicMediaTotal,
      sourceOrderby,
      sourceOrder,
      dynamicMedia,
      dynamicImageBlocks,
      isResolvingDynamic,
      galleryContext,
      enableDynamicMode,
      convertToStatic,
      setSourceOrder,
      resetSource
    };
  }

  // packages/block-library/build-module/gallery/dynamic-gallery.mjs
  var import_i18n74 = __toESM(require_i18n(), 1);
  var import_element61 = __toESM(require_element(), 1);
  var import_components43 = __toESM(require_components(), 1);
  var import_block_editor88 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime290 = __toESM(require_jsx_runtime(), 1);
  var ORDER_OPTIONS = [
    { label: (0, import_i18n74.__)("Newest to oldest"), value: "date/desc" },
    { label: (0, import_i18n74.__)("Oldest to newest"), value: "date/asc" },
    {
      /* translators: Label for ordering images by title in ascending order. */
      label: (0, import_i18n74.__)("A \u2192 Z"),
      value: "title/asc"
    },
    {
      /* translators: Label for ordering images by title in descending order. */
      label: (0, import_i18n74.__)("Z \u2192 A"),
      value: "title/desc"
    }
  ];
  function OrderControl({ orderby, order, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
      import_components43.SelectControl,
      {
        label: (0, import_i18n74.__)("Order by"),
        value: `${orderby}/${order}`,
        options: ORDER_OPTIONS,
        onChange: (value) => {
          const [newOrderby, newOrder] = value.split("/");
          onChange({ orderby: newOrderby, order: newOrder });
        }
      }
    );
  }
  function DetachGalleryDialog({ onConfirm, onCancel }) {
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
      import_components43.__experimentalConfirmDialog,
      {
        isOpen: true,
        title: (0, import_i18n74.__)("Detach Gallery"),
        __experimentalHideHeader: false,
        confirmButtonText: (0, import_i18n74.__)("Detach"),
        onConfirm,
        onCancel,
        size: "medium",
        children: (0, import_i18n74.__)(
          "The gallery displays the images attached to the post. Detaching will enable you to add, delete, or reorder images. However, new attachments will no longer be added automatically."
        )
      }
    );
  }
  function GallerySourcePanel({
    dynamic,
    dropdownMenuProps,
    hasImages
  }) {
    const {
      dynamicContent,
      canUseDynamicSource,
      sourceDescriptor,
      sourceOrderby,
      sourceOrder,
      setSourceOrder,
      convertToStatic,
      enableDynamicMode,
      resetSource,
      isResolvingDynamic,
      hasMoreImagesThanCap,
      dynamicMediaTotal
    } = dynamic;
    const isDynamic = !!dynamicContent;
    const [isConfirming, setIsConfirming] = (0, import_element61.useState)(false);
    const [isConfirmingDetach, setIsConfirmingDetach] = (0, import_element61.useState)(false);
    function requestEnableDynamicMode() {
      if (hasImages) {
        setIsConfirming(true);
      } else {
        enableDynamicMode();
      }
    }
    if (isDynamic) {
      return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(import_jsx_runtime290.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(
          import_components43.__experimentalToolsPanel,
          {
            label: (0, import_i18n74.__)("Source"),
            resetAll: resetSource,
            dropdownMenuProps,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("div", { className: "wp-block-gallery__source-settings", children: [
                /* @__PURE__ */ (0, import_jsx_runtime290.jsx)("p", { className: "wp-block-gallery__source-description", children: sourceDescriptor?.description ?? (0, import_i18n74.__)("Dynamic images.") }),
                /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
                  import_components43.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "secondary",
                    onClick: () => setIsConfirmingDetach(true),
                    disabled: isResolvingDynamic,
                    accessibleWhenDisabled: true,
                    children: (0, import_i18n74.__)("Detach Gallery")
                  }
                )
              ] }),
              hasMoreImagesThanCap && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
                import_components43.Notice,
                {
                  className: "wp-block-gallery__source-notice",
                  status: "warning",
                  isDismissible: false,
                  children: (0, import_i18n74.sprintf)(
                    /* translators: 1: number of images shown. 2: total number of matching images. */
                    (0, import_i18n74.__)(
                      "Only the first %1$d of %2$d images will be displayed."
                    ),
                    MAX_IMAGES,
                    dynamicMediaTotal
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
                import_components43.__experimentalToolsPanelItem,
                {
                  isShownByDefault: true,
                  label: (0, import_i18n74.__)("Order by"),
                  hasValue: () => sourceOrderby !== DEFAULT_ORDERBY || sourceOrder !== DEFAULT_ORDER,
                  onDeselect: () => setSourceOrder(void 0, void 0),
                  children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
                    OrderControl,
                    {
                      orderby: sourceOrderby,
                      order: sourceOrder,
                      onChange: ({ orderby, order }) => setSourceOrder(orderby, order)
                    }
                  )
                }
              )
            ]
          }
        ),
        isConfirmingDetach && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          DetachGalleryDialog,
          {
            onConfirm: () => {
              convertToStatic();
              setIsConfirmingDetach(false);
            },
            onCancel: () => setIsConfirmingDetach(false)
          }
        )
      ] });
    }
    if (!canUseDynamicSource) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(import_jsx_runtime290.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_components43.PanelBody, { title: (0, import_i18n74.__)("Source"), children: /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("div", { className: "wp-block-gallery__source-settings", children: [
        /* @__PURE__ */ (0, import_jsx_runtime290.jsx)("p", { className: "wp-block-gallery__source-description", children: (0, import_i18n74.__)("Images added to the gallery.") }),
        /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          import_components43.Button,
          {
            __next40pxDefaultSize: true,
            variant: "secondary",
            onClick: requestEnableDynamicMode,
            children: (0, import_i18n74.__)("Use attached images")
          }
        )
      ] }) }),
      isConfirming && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
        import_components43.__experimentalConfirmDialog,
        {
          isOpen: true,
          title: (0, import_i18n74.__)("Use images attached to the post?"),
          __experimentalHideHeader: false,
          confirmButtonText: (0, import_i18n74.__)("Use attached images"),
          onConfirm: () => {
            enableDynamicMode();
            setIsConfirming(false);
          },
          onCancel: () => setIsConfirming(false),
          size: "medium",
          children: (0, import_i18n74.__)(
            "The images in this gallery will be replaced, but will remain in the media library."
          )
        }
      )
    ] });
  }
  function GalleryImagesPreview({ imageBlocks, layout }) {
    const { children, ref, className } = (0, import_block_editor88.__experimentalUseBlockPreview)({
      blocks: imageBlocks,
      layout
    });
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
      "div",
      {
        ref,
        className,
        style: { display: "contents" },
        children
      }
    );
  }
  function GalleryDynamicView({
    dynamic,
    blockProps,
    innerBlocksProps,
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter,
    isContentLocked,
    multiGallerySelection
  }) {
    const {
      sourceDescriptor,
      dynamicImageBlocks,
      galleryContext,
      isResolvingDynamic,
      convertToStatic
    } = dynamic;
    const blockEditingMode = (0, import_block_editor88.useBlockEditingMode)();
    const [isConfirmingDetach, setIsConfirmingDetach] = (0, import_element61.useState)(false);
    const previewLayout = (0, import_element61.useMemo)(
      () => isGalleryFlexLayout(attributes2.layout) ? { ...attributes2.layout, type: "flex" } : attributes2.layout,
      [attributes2.layout]
    );
    const emptyInstructions = isResolvingDynamic ? (0, import_i18n74.__)("Loading images\u2026") : sourceDescriptor?.emptyMessage ?? (0, import_i18n74.__)("Dynamic images will appear here.");
    return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(import_jsx_runtime290.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(import_jsx_runtime290.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_block_editor88.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          import_components43.ToolbarButton,
          {
            onClick: () => setIsConfirmingDetach(true),
            disabled: isResolvingDynamic,
            children: (0, import_i18n74.__)("Detach")
          }
        ) }),
        isConfirmingDetach && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          DetachGalleryDialog,
          {
            onConfirm: () => {
              convertToStatic();
              setIsConfirmingDetach(false);
            },
            onCancel: () => setIsConfirmingDetach(false)
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("figure", { ...blockProps, children: [
        dynamicImageBlocks.length ? /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_block_editor88.BlockContextProvider, { value: galleryContext, children: /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          GalleryImagesPreview,
          {
            imageBlocks: dynamicImageBlocks,
            layout: previewLayout
          }
        ) }) : /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          import_components43.Placeholder,
          {
            icon: sharedIcon,
            label: (0, import_i18n74.__)("Gallery"),
            instructions: emptyInstructions,
            children: isResolvingDynamic && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(import_components43.Spinner, {})
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected,
            insertBlocksAfter,
            showToolbarButton: !multiGallerySelection && !isContentLocked,
            className: "blocks-gallery-caption",
            label: (0, import_i18n74.__)("Gallery caption text"),
            placeholder: (0, import_i18n74.__)("Add gallery caption")
          }
        )
      ] }),
      innerBlocksProps.children
    ] });
  }

  // packages/block-library/build-module/gallery/edit.mjs
  var import_jsx_runtime291 = __toESM(require_jsx_runtime(), 1);
  var LINK_OPTIONS = [
    {
      icon: custom_link_default,
      label: (0, import_i18n75.__)("Link images to attachment pages"),
      value: LINK_DESTINATION_ATTACHMENT,
      noticeText: (0, import_i18n75.__)("Attachment Pages")
    },
    {
      icon: image_default,
      label: (0, import_i18n75.__)("Link images to media files"),
      value: LINK_DESTINATION_MEDIA,
      noticeText: (0, import_i18n75.__)("Media Files")
    },
    {
      icon: fullscreen_default,
      label: (0, import_i18n75.__)("Enlarge on click"),
      value: LINK_DESTINATION_LIGHTBOX,
      noticeText: (0, import_i18n75.__)("Lightbox effect"),
      infoText: (0, import_i18n75.__)("Scale images with a lightbox effect")
    },
    {
      icon: link_off_default,
      label: (0, import_i18n75._x)("None", "Media item link option"),
      value: LINK_DESTINATION_NONE,
      noticeText: (0, import_i18n75.__)("None")
    }
  ];
  var NAVIGATION_BUTTON_TYPE_OPTIONS = [
    {
      label: (0, import_i18n75.__)("Icon"),
      value: "icon"
    },
    {
      label: (0, import_i18n75.__)("Text"),
      value: "text"
    },
    {
      label: (0, import_i18n75.__)("Both"),
      value: "both"
    }
  ];
  var ALLOWED_MEDIA_TYPES4 = ["image"];
  var PLACEHOLDER_TEXT = (0, import_i18n75.__)(
    "Drag and drop images, upload, or choose from your library."
  );
  var DEFAULT_BLOCK3 = { name: "core/image" };
  var EMPTY_ARRAY3 = [];
  function GalleryEdit(props) {
    const {
      setAttributes,
      attributes: attributes2,
      className,
      clientId,
      isSelected,
      insertBlocksAfter,
      isContentLocked,
      context,
      __unstableLayoutClassNames: layoutClassNames
    } = props;
    const postId = context?.postId;
    const postType = context?.postType;
    const blockEditingMode = (0, import_block_editor89.useBlockEditingMode)();
    const [lightboxSetting, defaultRatios, themeRatios, showDefaultRatios] = (0, import_block_editor89.useSettings)(
      "blocks.core/image.lightbox",
      "dimensions.aspectRatios.default",
      "dimensions.aspectRatios.theme",
      "dimensions.defaultAspectRatios"
    );
    const linkOptions = !lightboxSetting?.allowEditing ? LINK_OPTIONS.filter(
      (option) => option.value !== LINK_DESTINATION_LIGHTBOX
    ) : LINK_OPTIONS;
    const {
      align,
      navigationButtonType,
      columns,
      imageCrop,
      randomOrder,
      linkTarget,
      linkTo,
      sizeSlug,
      aspectRatio,
      layout
    } = attributes2;
    const isFlexLayout = isGalleryFlexLayout(layout);
    const previousLayoutRef = (0, import_element62.useRef)(layout);
    const {
      __unstableMarkNextChangeAsNotPersistent,
      replaceInnerBlocks,
      updateBlockAttributes,
      selectBlock
    } = (0, import_data38.useDispatch)(import_block_editor89.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data38.useDispatch)(import_notices6.store);
    (0, import_element62.useEffect)(() => {
      const previousLayout = previousLayoutRef.current;
      previousLayoutRef.current = layout;
      if (!isObject(previousLayout) || !isObject(layout) || previousLayout.type === layout.type) {
        return;
      }
      const nextLayout = { ...layout };
      let hasPreservedGridSetting = false;
      if (!Object.hasOwn(layout, "columnCount") && Number.isInteger(previousLayout.columnCount) && previousLayout.columnCount > 0) {
        nextLayout.columnCount = previousLayout.columnCount;
        hasPreservedGridSetting = true;
      }
      if (!Object.hasOwn(layout, "minimumColumnWidth") && typeof previousLayout.minimumColumnWidth === "string") {
        nextLayout.minimumColumnWidth = previousLayout.minimumColumnWidth;
        hasPreservedGridSetting = true;
      }
      if (hasPreservedGridSetting) {
        previousLayoutRef.current = nextLayout;
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ layout: nextLayout });
      }
    }, [layout, setAttributes, __unstableMarkNextChangeAsNotPersistent]);
    const {
      getBlock,
      getSettings: getSettings2,
      innerBlockImages,
      multiGallerySelection,
      selectedStyleState
    } = (0, import_data38.useSelect)(
      (select10) => {
        const {
          getBlockName,
          getMultiSelectedBlockClientIds,
          getSettings: _getSettings,
          getBlock: _getBlock,
          getSelectedBlockStyleState
        } = select10(import_block_editor89.store);
        const multiSelectedClientIds = getMultiSelectedBlockClientIds();
        return {
          getBlock: _getBlock,
          getSettings: _getSettings,
          innerBlockImages: _getBlock(clientId)?.innerBlocks ?? EMPTY_ARRAY3,
          multiGallerySelection: multiSelectedClientIds.length && multiSelectedClientIds.every(
            (_clientId) => getBlockName(_clientId) === "core/gallery"
          ),
          selectedStyleState: getSelectedBlockStyleState(clientId)
        };
      },
      [clientId]
    );
    const isViewportStyleState = selectedStyleState?.viewport && selectedStyleState.viewport !== "default";
    const viewportStyle = isViewportStyleState ? getViewportGalleryStyle(
      attributes2.style,
      selectedStyleState.viewport
    ) : {};
    const baseColumns = isValidGalleryColumns(columns) ? columns : void 0;
    const baseImageCrop = typeof imageCrop === "boolean" ? imageCrop : true;
    const baseAspectRatio = aspectRatio || "auto";
    const hasViewportColumns = isViewportStyleState && Object.hasOwn(viewportStyle, "columns") && isValidGalleryColumns(viewportStyle.columns);
    const hasViewportImageCrop = isViewportStyleState && Object.hasOwn(viewportStyle, "imageCrop") && typeof viewportStyle.imageCrop === "boolean";
    const hasViewportAspectRatio = isViewportStyleState && Object.hasOwn(viewportStyle, "aspectRatio") && typeof viewportStyle.aspectRatio === "string" && !!viewportStyle.aspectRatio;
    const activeColumns = hasViewportColumns ? viewportStyle.columns : baseColumns;
    const activeImageCrop = hasViewportImageCrop ? viewportStyle.imageCrop : baseImageCrop;
    const activeAspectRatio = hasViewportAspectRatio ? viewportStyle.aspectRatio : baseAspectRatio;
    const images = (0, import_element62.useMemo)(
      () => innerBlockImages?.map((block) => ({
        clientId: block.clientId,
        id: block.attributes.id,
        url: block.attributes.url,
        attributes: block.attributes,
        fromSavedContent: Boolean(block.originalContent)
      })),
      [innerBlockImages]
    );
    const imageData = useGetMedia(innerBlockImages);
    const newImages = useGetNewImages(images, imageData);
    const hasImages = !!images.length;
    const isDynamic = !!attributes2.dynamicContent;
    const dynamic = useDynamicGallery({
      attributes: attributes2,
      setAttributes,
      clientId,
      postId,
      postType
    });
    const displayedImageCount = isDynamic ? dynamic.dynamicMedia.length : images.length;
    let hasLightboxImages;
    if (isDynamic) {
      hasLightboxImages = linkTo === LINK_DESTINATION_LIGHTBOX;
    } else if (lightboxSetting?.enabled) {
      hasLightboxImages = images.filter(
        (image) => image.attributes?.lightbox?.enabled === void 0 || image.attributes?.lightbox?.enabled === true
      ).length > 0;
    } else {
      hasLightboxImages = images.filter((image) => image.attributes.lightbox?.enabled).length > 0;
    }
    const themeOptions = themeRatios?.map(({ name: name118, ratio }) => ({
      label: name118,
      value: ratio
    }));
    const defaultOptions = defaultRatios?.map(({ name: name118, ratio }) => ({
      label: name118,
      value: ratio
    }));
    const aspectRatioOptions = [
      {
        label: (0, import_i18n75._x)(
          "Original",
          "Aspect ratio option for dimensions control"
        ),
        value: "auto"
      },
      ...showDefaultRatios ? defaultOptions || [] : [],
      ...themeOptions || []
    ];
    (0, import_element62.useEffect)(() => {
      newImages?.forEach((newImage) => {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(newImage.clientId, {
          ...buildImageAttributes(newImage.attributes),
          id: newImage.id,
          align: void 0
        });
      });
    }, [newImages]);
    const imageSizeOptions = useImageSizes(
      isDynamic ? dynamic.dynamicMedia : imageData,
      isSelected,
      getSettings2
    );
    function buildImageAttributes(imageAttributes) {
      const image = imageAttributes.id ? imageData.find(({ id }) => id === imageAttributes.id) : null;
      let newClassName;
      if (imageAttributes.className && imageAttributes.className !== "") {
        newClassName = imageAttributes.className;
      }
      let newLinkTarget;
      if (imageAttributes.linkTarget || imageAttributes.rel) {
        newLinkTarget = {
          linkTarget: imageAttributes.linkTarget,
          rel: imageAttributes.rel
        };
      } else {
        newLinkTarget = getUpdatedLinkTargetSettings(
          linkTarget,
          attributes2
        );
      }
      return {
        ...pickRelevantMediaFiles(image, sizeSlug),
        ...getHrefAndDestination2(
          image,
          linkTo,
          imageAttributes?.linkDestination
        ),
        ...newLinkTarget,
        className: newClassName,
        sizeSlug,
        caption: imageAttributes.caption.length > 0 ? imageAttributes.caption : image.caption?.raw,
        alt: imageAttributes.alt || image.alt_text,
        aspectRatio: aspectRatio === "auto" ? void 0 : aspectRatio,
        scale: aspectRatio && aspectRatio !== "auto" ? "cover" : void 0
      };
    }
    function isValidFileType2(file) {
      const mediaTypeSelector = file.type;
      return ALLOWED_MEDIA_TYPES4.some(
        (mediaType) => mediaTypeSelector?.indexOf(mediaType) === 0
      ) || file.blob;
    }
    function updateImages(selectedImages) {
      const newFileUploads = Object.prototype.toString.call(selectedImages) === "[object FileList]";
      const imageArray = newFileUploads ? Array.from(selectedImages).map((file) => {
        if (!file.url) {
          return {
            blob: (0, import_blob10.createBlobURL)(file)
          };
        }
        return file;
      }) : selectedImages;
      if (!imageArray.every(isValidFileType2)) {
        createErrorNotice(
          (0, import_i18n75.__)(
            "If uploading to a gallery all files need to be image formats"
          ),
          { id: "gallery-upload-invalid-file", type: "snackbar" }
        );
      }
      const processedImages = imageArray.filter((file) => file.url || isValidFileType2(file)).map((file) => {
        if (!file.url) {
          return {
            blob: file.blob || (0, import_blob10.createBlobURL)(file)
          };
        }
        return file;
      });
      const newOrderMap = processedImages.reduce(
        (result, image, index2) => (result[image.id] = index2, result),
        {}
      );
      const existingImageBlocks = !newFileUploads ? innerBlockImages.filter(
        (block) => processedImages.find(
          (img) => img.id === block.attributes.id
        )
      ) : innerBlockImages;
      const newImageList = processedImages.filter(
        (img) => !existingImageBlocks.find(
          (existingImg) => img.id === existingImg.attributes.id
        )
      );
      const newBlocks = newImageList.map((image) => {
        return (0, import_blocks25.createBlock)("core/image", {
          id: image.id,
          blob: image.blob,
          url: image.url,
          caption: image.caption,
          alt: image.alt
        });
      });
      replaceInnerBlocks(
        clientId,
        existingImageBlocks.concat(newBlocks).sort(
          (a, b) => newOrderMap[a.attributes.id] - newOrderMap[b.attributes.id]
        )
      );
      if (newBlocks?.length > 0) {
        selectBlock(newBlocks[0].clientId);
      }
    }
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    function setLinkTo(value) {
      setAttributes({ linkTo: value });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
        changedAttributes[block.clientId] = getHrefAndDestination2(
          image,
          value,
          false,
          block.attributes,
          lightboxSetting
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const linkToText = [...linkOptions].find(
        (linkType) => linkType.value === value
      );
      createSuccessNotice(
        (0, import_i18n75.sprintf)(
          /* translators: %s: image size settings */
          (0, import_i18n75.__)("All gallery image links updated to: %s"),
          linkToText.noticeText
        ),
        {
          id: "gallery-attributes-linkTo",
          type: "snackbar"
        }
      );
    }
    function setGallerySettings(settings117) {
      if (!isViewportStyleState) {
        setAttributes(settings117);
        return;
      }
      setAttributes({
        style: getUpdatedGalleryStyle({
          style: attributes2.style,
          viewport: selectedStyleState.viewport,
          baseSettings: {
            columns: baseColumns,
            imageCrop: baseImageCrop,
            aspectRatio: baseAspectRatio
          },
          settings: settings117
        })
      });
    }
    function setColumnsNumber(value) {
      setGallerySettings({ columns: value });
    }
    function toggleImageCrop() {
      setGallerySettings({ imageCrop: !activeImageCrop });
    }
    function toggleRandomOrder() {
      setAttributes({ randomOrder: !randomOrder });
    }
    function toggleOpenInNewTab(openInNewTab) {
      const newLinkTarget = openInNewTab ? "_blank" : void 0;
      setAttributes({ linkTarget: newLinkTarget });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        changedAttributes[block.clientId] = getUpdatedLinkTargetSettings(
          newLinkTarget,
          block.attributes
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const noticeText = openInNewTab ? (0, import_i18n75.__)("All gallery images updated to open in new tab") : (0, import_i18n75.__)("All gallery images updated to not open in new tab");
      createSuccessNotice(noticeText, {
        id: "gallery-attributes-openInNewTab",
        type: "snackbar"
      });
    }
    function updateImagesSize(newSizeSlug) {
      setAttributes({ sizeSlug: newSizeSlug });
      const changedAttributes = {};
      const blocks = [];
      getBlock(clientId).innerBlocks.forEach((block) => {
        blocks.push(block.clientId);
        const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
        changedAttributes[block.clientId] = getImageSizeAttributes(
          image,
          newSizeSlug
        );
      });
      updateBlockAttributes(blocks, changedAttributes, {
        uniqueByBlock: true
      });
      const imageSize = imageSizeOptions.find(
        (size) => size.value === newSizeSlug
      );
      createSuccessNotice(
        (0, import_i18n75.sprintf)(
          /* translators: %s: image size settings */
          (0, import_i18n75.__)("All gallery image sizes updated to: %s"),
          imageSize?.label ?? newSizeSlug
        ),
        {
          id: "gallery-attributes-sizeSlug",
          type: "snackbar"
        }
      );
    }
    function setAspectRatio(value) {
      if (isViewportStyleState) {
        setGallerySettings({ aspectRatio: value });
      } else {
        const cleanValue = !value || value === "auto" ? void 0 : value;
        setAttributes({ aspectRatio: value ?? "auto" });
        const changedAttributes = {};
        const blocks = [];
        getBlock(clientId).innerBlocks.forEach((block) => {
          blocks.push(block.clientId);
          changedAttributes[block.clientId] = {
            aspectRatio: cleanValue,
            scale: cleanValue ? "cover" : void 0
          };
        });
        updateBlockAttributes(blocks, changedAttributes, true);
      }
      const noticeValue = value ?? baseAspectRatio;
      const aspectRatioText = aspectRatioOptions.find(
        (option) => option.value === noticeValue
      );
      const noticeText = isViewportStyleState ? (0, import_i18n75.sprintf)(
        /* translators: 1: viewport name, 2: aspect ratio setting */
        (0, import_i18n75.__)(
          "Gallery images in the %1$s viewport updated to aspect ratio: %2$s"
        ),
        selectedStyleState.viewport.replace("@", ""),
        aspectRatioText?.label || noticeValue
      ) : (0, import_i18n75.sprintf)(
        /* translators: %s: aspect ratio setting */
        (0, import_i18n75.__)("All gallery images updated to aspect ratio: %s"),
        aspectRatioText?.label || noticeValue
      );
      createSuccessNotice(noticeText, {
        id: "gallery-attributes-aspectRatio",
        type: "snackbar"
      });
    }
    (0, import_element62.useEffect)(() => {
      if (!linkTo) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          linkTo: window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE
        });
      }
    }, [linkTo]);
    const hasImageIds = hasImages && images.some((image) => !!image.id);
    const imagesUploading = images.some(
      (img) => !img.id && img.url?.indexOf("blob:") === 0
    );
    const mediaPlaceholderProps = {
      addToGallery: false,
      disableMediaButtons: imagesUploading,
      value: {}
    };
    const blockProps = (0, import_block_editor89.useBlockProps)({
      className: clsx_default(
        className,
        "has-nested-images",
        `wp-block-gallery-${clientId}`,
        // In dynamic mode there are no inner blocks and the gallery isn't
        // rendered through the `Gallery` component, so the classes that
        // component normally composes onto the `<figure>` (see `gallery.jsx`)
        // must be added here to keep the preview's flex/crop layout matching
        // the static gallery and the frontend.
        isDynamic && [
          layoutClassNames,
          "blocks-gallery-grid",
          {
            [`align${align}`]: align,
            [`columns-${columns}`]: isFlexLayout && columns !== void 0,
            "columns-default": isFlexLayout && columns === void 0,
            "is-cropped": isFlexLayout && imageCrop
          }
        ]
      )
    });
    const innerBlocksProps = (0, import_block_editor89.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK3,
      directInsert: true,
      orientation: "horizontal",
      renderAppender: false,
      // In dynamic mode nothing may be inserted: the images are resolved from
      // the source, not authored as inner blocks. `allowedBlocks: []` enforces
      // this in every context — unlike `templateLock: 'all'`, it isn't relaxed
      // to `contentOnly` by a content-locked ancestor — so it blocks insertion
      // and drag-and-drop (via `canInsertBlockType`). It's also what opts the
      // gallery out of the List View: a block that can't be inserted into and
      // has no inner blocks has nothing to navigate or add (see
      // `shouldRenderBlockListView`). This reaches the block's list settings
      // only while the inner blocks are mounted, which is why the dynamic view
      // still renders the (empty) inner blocks.
      allowedBlocks: isDynamic ? EMPTY_ARRAY3 : void 0
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    if (!hasImages && !isDynamic) {
      return /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)("div", { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
          import_block_editor89.MediaPlaceholder,
          {
            handleUpload: false,
            icon: sharedIcon,
            labels: {
              title: (0, import_i18n75.__)("Gallery"),
              instructions: PLACEHOLDER_TEXT
            },
            onSelect: updateImages,
            allowedTypes: ALLOWED_MEDIA_TYPES4,
            multiple: true,
            onError: onUploadError,
            ...mediaPlaceholderProps,
            children: blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
              import_components44.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                onClick: dynamic.enableDynamicMode,
                children: getDynamicSource(ATTACHED_MEDIA).title
              }
            )
          }
        )
      ] });
    }
    const hasLinkTo = linkTo && linkTo !== "none";
    const hasViewportSettings = isFlexLayout || aspectRatioOptions.length > 1;
    return /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(import_jsx_runtime291.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
        import_block_editor89.InspectorControls,
        {
          group: isViewportStyleState && hasViewportSettings ? "viewport" : "default",
          children: [
            !isViewportStyleState && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
              GallerySourcePanel,
              {
                dynamic,
                dropdownMenuProps,
                hasImages
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(
              import_components44.__experimentalToolsPanel,
              {
                label: (0, import_i18n75.__)("Settings"),
                resetAll: () => {
                  if (isViewportStyleState) {
                    setGallerySettings({
                      columns: void 0,
                      imageCrop: void 0,
                      aspectRatio: void 0
                    });
                    return;
                  }
                  setAttributes({
                    navigationButtonType: "icon",
                    randomOrder: false,
                    ...isFlexLayout && {
                      columns: void 0,
                      imageCrop: true
                    }
                  });
                  setAspectRatio("auto");
                  if (sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG2) {
                    updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG2);
                  }
                  if (linkTarget) {
                    toggleOpenInNewTab(false);
                  }
                },
                dropdownMenuProps,
                children: [
                  isFlexLayout && displayedImageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      isShownByDefault: true,
                      label: (0, import_i18n75.__)("Columns"),
                      hasValue: () => isViewportStyleState ? hasViewportColumns : !!activeColumns && activeColumns !== displayedImageCount,
                      onDeselect: () => setColumnsNumber(void 0),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.RangeControl,
                        {
                          label: (0, import_i18n75.__)("Columns"),
                          value: activeColumns ? activeColumns : defaultColumnsNumber(
                            displayedImageCount
                          ),
                          onChange: setColumnsNumber,
                          min: 1,
                          max: Math.min(
                            MAX_COLUMNS,
                            displayedImageCount
                          ),
                          required: true
                        }
                      )
                    }
                  ),
                  !isViewportStyleState && imageSizeOptions?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      isShownByDefault: true,
                      label: (0, import_i18n75.__)("Resolution"),
                      hasValue: () => sizeSlug !== DEFAULT_MEDIA_SIZE_SLUG2,
                      onDeselect: () => updateImagesSize(DEFAULT_MEDIA_SIZE_SLUG2),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.SelectControl,
                        {
                          label: (0, import_i18n75.__)("Resolution"),
                          help: (0, import_i18n75.__)(
                            "Select the size of the source images."
                          ),
                          value: sizeSlug,
                          options: imageSizeOptions,
                          onChange: updateImagesSize,
                          hideCancelButton: true
                        }
                      )
                    }
                  ),
                  isFlexLayout && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      isShownByDefault: true,
                      label: (0, import_i18n75.__)("Crop images to fit"),
                      hasValue: () => isViewportStyleState ? hasViewportImageCrop : !activeImageCrop,
                      onDeselect: () => setGallerySettings({
                        imageCrop: isViewportStyleState ? void 0 : true
                      }),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.ToggleControl,
                        {
                          label: (0, import_i18n75.__)("Crop images to fit"),
                          checked: activeImageCrop,
                          onChange: toggleImageCrop
                        }
                      )
                    }
                  ),
                  !isViewportStyleState && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      isShownByDefault: true,
                      label: (0, import_i18n75.__)("Randomize order"),
                      hasValue: () => !!randomOrder,
                      onDeselect: () => setAttributes({ randomOrder: false }),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.ToggleControl,
                        {
                          label: (0, import_i18n75.__)("Randomize order"),
                          checked: !!randomOrder,
                          onChange: toggleRandomOrder
                        }
                      )
                    }
                  ),
                  !isViewportStyleState && hasLinkTo && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      isShownByDefault: true,
                      label: (0, import_i18n75.__)("Open images in new tab"),
                      hasValue: () => !!linkTarget,
                      onDeselect: () => toggleOpenInNewTab(false),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.ToggleControl,
                        {
                          label: (0, import_i18n75.__)("Open images in new tab"),
                          checked: linkTarget === "_blank",
                          onChange: toggleOpenInNewTab
                        }
                      )
                    }
                  ),
                  aspectRatioOptions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      hasValue: () => isViewportStyleState ? hasViewportAspectRatio : activeAspectRatio !== "auto",
                      label: (0, import_i18n75.__)("Aspect ratio"),
                      onDeselect: () => (
                        // In a viewport state this clears the override
                        // so the base ratio applies again, rather than
                        // overriding it with Original.
                        setAspectRatio(
                          isViewportStyleState ? void 0 : "auto"
                        )
                      ),
                      isShownByDefault: true,
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.SelectControl,
                        {
                          label: (0, import_i18n75.__)("Aspect ratio"),
                          help: (0, import_i18n75.__)(
                            "Set a consistent aspect ratio for all images in the gallery."
                          ),
                          value: activeAspectRatio,
                          options: aspectRatioOptions,
                          onChange: setAspectRatio
                        }
                      )
                    }
                  ),
                  !isViewportStyleState && lightboxSetting?.allowEditing && hasLightboxImages && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                    import_components44.__experimentalToolsPanelItem,
                    {
                      label: (0, import_i18n75.__)("Navigation button type"),
                      isShownByDefault: true,
                      hasValue: () => navigationButtonType !== "icon",
                      onDeselect: () => setAttributes({
                        navigationButtonType: "icon"
                      }),
                      children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                        import_components44.__experimentalToggleGroupControl,
                        {
                          label: (0, import_i18n75.__)("Navigation button type"),
                          value: navigationButtonType,
                          onChange: (value) => setAttributes({
                            navigationButtonType: value
                          }),
                          isBlock: true,
                          help: (0, import_i18n75.__)(
                            "Adjust the appearance of buttons in the lightbox."
                          ),
                          children: NAVIGATION_BUTTON_TYPE_OPTIONS.map(
                            (option) => /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
                              import_components44.__experimentalToggleGroupControlOption,
                              {
                                value: option.value,
                                label: option.label
                              },
                              option.value
                            )
                          )
                        }
                      )
                    }
                  )
                ]
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_block_editor89.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_components44.ToolbarDropdownMenu, { icon: link_default, label: (0, import_i18n75.__)("Link"), children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_components44.MenuGroup, { children: linkOptions.map((linkItem) => {
        const isOptionSelected = linkTo === linkItem.value;
        return /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
          import_components44.MenuItem,
          {
            isSelected: isOptionSelected,
            className: clsx_default(
              "components-dropdown-menu__menu-item",
              {
                "is-active": isOptionSelected
              }
            ),
            iconPosition: "left",
            icon: linkItem.icon,
            onClick: () => {
              setLinkTo(linkItem.value);
              onClose();
            },
            role: "menuitemradio",
            info: linkItem.infoText,
            children: linkItem.label
          },
          linkItem.value
        );
      }) }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime291.jsxs)(import_jsx_runtime291.Fragment, { children: [
        !multiGallerySelection && !isDynamic && /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(import_block_editor89.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
          import_block_editor89.MediaReplaceFlow,
          {
            allowedTypes: ALLOWED_MEDIA_TYPES4,
            handleUpload: false,
            onSelect: updateImages,
            name: (0, import_i18n75.__)("Add"),
            multiple: true,
            mediaIds: images.filter((image) => image.id).map((image) => image.id),
            addToGallery: hasImageIds,
            variant: "toolbar"
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
          GalleryStyles,
          {
            style: attributes2.style,
            clientId,
            isFlexLayout
          }
        )
      ] }),
      isDynamic ? /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
        GalleryDynamicView,
        {
          ...props,
          dynamic,
          blockProps,
          innerBlocksProps,
          multiGallerySelection
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
        Gallery,
        {
          ...props,
          isContentLocked,
          images,
          blockProps: innerBlocksProps,
          insertBlocksAfter,
          multiGallerySelection
        }
      )
    ] });
  }

  // packages/block-library/build-module/gallery/block.json
  var block_default34 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/gallery",
    title: "Gallery",
    category: "media",
    usesContext: ["galleryId", "postId", "postType"],
    allowedBlocks: ["core/image"],
    description: "Display multiple images in a rich gallery.",
    keywords: ["images", "photos"],
    textdomain: "default",
    attributes: {
      images: {
        type: "array",
        default: [],
        source: "query",
        selector: ".blocks-gallery-item",
        query: {
          url: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "src"
          },
          fullUrl: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-full-url"
          },
          link: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-link"
          },
          alt: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "alt",
            default: ""
          },
          id: {
            type: "string",
            source: "attribute",
            selector: "img",
            attribute: "data-id"
          },
          caption: {
            type: "rich-text",
            source: "rich-text",
            selector: ".blocks-gallery-item__caption"
          }
        }
      },
      ids: {
        type: "array",
        items: {
          type: "number"
        },
        default: []
      },
      dynamicContent: {
        type: "object"
      },
      navigationButtonType: {
        type: "string",
        default: "icon",
        enum: ["icon", "text", "both"]
      },
      shortCodeTransforms: {
        type: "array",
        items: {
          type: "object"
        },
        default: []
      },
      columns: {
        type: "number",
        minimum: 1,
        maximum: 8
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: ".blocks-gallery-caption",
        role: "content"
      },
      imageCrop: {
        type: "boolean",
        default: true
      },
      randomOrder: {
        type: "boolean",
        default: false
      },
      fixedHeight: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string"
      },
      linkTo: {
        type: "string"
      },
      sizeSlug: {
        type: "string",
        default: "large"
      },
      allowResize: {
        type: "boolean",
        default: false
      },
      aspectRatio: {
        type: "string",
        default: "auto"
      }
    },
    providesContext: {
      allowResize: "allowResize",
      imageCrop: "imageCrop",
      fixedHeight: "fixedHeight",
      navigationButtonType: "navigationButtonType"
    },
    supports: {
      anchor: true,
      align: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true
        }
      },
      html: false,
      units: ["px", "em", "rem", "vh", "vw"],
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          sides: ["horizontal", "vertical"],
          __experimentalDefault: "var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )"
        },
        __experimentalDefaultControls: {
          blockGap: true,
          margin: false,
          padding: false
        }
      },
      color: {
        text: false,
        background: true,
        gradients: true
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowEditing: true,
        allowOrientation: false,
        allowJustification: false,
        allowVerticalAlignment: false,
        allowWrap: false,
        allowSizingOnChildren: true,
        default: {
          type: "flex"
        }
      },
      interactivity: {
        clientNavigation: true
      },
      listView: true
    },
    editorStyle: "wp-block-gallery-editor",
    style: "wp-block-gallery"
  };

  // packages/block-library/build-module/gallery/save.mjs
  var import_block_editor90 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime292 = __toESM(require_jsx_runtime(), 1);
  function saveWithInnerBlocks({ attributes: attributes2 }) {
    const { caption, columns, imageCrop, dynamicContent, layout } = attributes2;
    const isFlexLayout = isGalleryFlexLayout(layout);
    const captionElement = !import_block_editor90.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime292.jsx)(
      import_block_editor90.RichText.Content,
      {
        tagName: "figcaption",
        className: clsx_default(
          "blocks-gallery-caption",
          (0, import_block_editor90.__experimentalGetElementClassName)("caption")
        ),
        value: caption
      }
    );
    if (dynamicContent) {
      return captionElement || null;
    }
    const className = clsx_default("has-nested-images", {
      [`columns-${columns}`]: isFlexLayout && columns !== void 0,
      [`columns-default`]: isFlexLayout && columns === void 0,
      "is-cropped": isFlexLayout && imageCrop
    });
    const blockProps = import_block_editor90.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor90.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime292.jsxs)("figure", { ...innerBlocksProps, children: [
      innerBlocksProps.children,
      captionElement
    ] });
  }

  // packages/block-library/build-module/gallery/transforms.mjs
  var import_blocks26 = __toESM(require_blocks(), 1);
  var import_blob11 = __toESM(require_blob(), 1);
  var import_hooks25 = __toESM(require_hooks(), 1);
  var parseShortcodeIds = (ids) => {
    if (!ids) {
      return [];
    }
    return ids.split(",").map((id) => parseInt(id, 10));
  };
  var cloneInnerBlocks = (innerBlocks) => innerBlocks.map(
    (innerBlock) => (0, import_blocks26.createBlock)(
      innerBlock.name,
      innerBlock.attributes,
      cloneInnerBlocks(innerBlock.innerBlocks || [])
    )
  );
  function updateThirdPartyTransformToGallery(block) {
    if (block.name === "core/gallery" && block.attributes?.images.length > 0) {
      const innerBlocks = block.attributes.images.map(
        ({ url, id, alt }) => {
          return (0, import_blocks26.createBlock)("core/image", {
            url,
            id: id ? parseInt(id, 10) : null,
            alt,
            sizeSlug: block.attributes.sizeSlug,
            linkDestination: block.attributes.linkDestination
          });
        }
      );
      delete block.attributes.ids;
      delete block.attributes.images;
      block.innerBlocks = innerBlocks;
    }
    return block;
  }
  (0, import_hooks25.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/gallery/update-third-party-transform-to",
    updateThirdPartyTransformToGallery
  );
  function updateThirdPartyTransformFromGallery(toBlock, fromBlocks) {
    const from = Array.isArray(fromBlocks) ? fromBlocks : [fromBlocks];
    const galleryBlock = from.find(
      (transformedBlock) => transformedBlock.name === "core/gallery" && transformedBlock.innerBlocks.length > 0 && !transformedBlock.attributes.images?.length > 0 && !toBlock.name.includes("core/")
    );
    if (galleryBlock) {
      const images = galleryBlock.innerBlocks.map(
        ({ attributes: { url, id, alt } }) => ({
          url,
          id: id ? parseInt(id, 10) : null,
          alt
        })
      );
      const ids = images.map(({ id }) => id);
      galleryBlock.attributes.images = images;
      galleryBlock.attributes.ids = ids;
    }
    return toBlock;
  }
  (0, import_hooks25.addFilter)(
    "blocks.switchToBlockType.transformedBlock",
    "core/gallery/update-third-party-transform-from",
    updateThirdPartyTransformFromGallery
  );
  var transforms9 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/image"],
        transform: (attributes2) => {
          let { align, sizeSlug } = attributes2[0];
          align = attributes2.every(
            (attribute) => attribute.align === align
          ) ? align : void 0;
          sizeSlug = attributes2.every(
            (attribute) => attribute.sizeSlug === sizeSlug
          ) ? sizeSlug : void 0;
          const validImages = attributes2.filter(({ url }) => url);
          const innerBlocks = validImages.map((image) => {
            image.width = void 0;
            image.height = void 0;
            return (0, import_blocks26.createBlock)("core/image", image);
          });
          return (0, import_blocks26.createBlock)(
            "core/gallery",
            {
              align,
              sizeSlug
            },
            innerBlocks
          );
        }
      },
      {
        type: "shortcode",
        tag: "gallery",
        transform({ named: { ids, columns = 3, link, orderby, size } }) {
          const imageIds = parseShortcodeIds(ids).map(
            (id) => parseInt(id, 10)
          );
          let linkTo = LINK_DESTINATION_NONE;
          if (link === "post") {
            linkTo = LINK_DESTINATION_ATTACHMENT;
          } else if (link === "file") {
            linkTo = LINK_DESTINATION_MEDIA;
          }
          const galleryBlock = (0, import_blocks26.createBlock)(
            "core/gallery",
            {
              columns: parseInt(columns, 10),
              linkTo,
              randomOrder: orderby === "rand",
              ...size && { sizeSlug: size }
            },
            imageIds.map(
              (imageId) => (0, import_blocks26.createBlock)("core/image", {
                id: imageId,
                ...size && { sizeSlug: size }
              })
            )
          );
          return galleryBlock;
        },
        isMatch({ named }) {
          return void 0 !== named.ids;
        }
      },
      {
        // When created by drag and dropping multiple files on an insertion point. Because multiple
        // files must not be transformed to a gallery when dropped within a gallery there is another transform
        // within the image block to handle that case. Therefore this transform has to have priority 1
        // set so that it overrides the image block transformation when multiple images are dropped outside
        // of a gallery block.
        type: "files",
        priority: 1,
        isMatch(files) {
          return files.length !== 1 && files.every(
            (file) => file.type.indexOf("image/") === 0
          );
        },
        transform(files) {
          const innerBlocks = files.map(
            (file) => (0, import_blocks26.createBlock)("core/image", {
              blob: (0, import_blob11.createBlobURL)(file)
            })
          );
          return (0, import_blocks26.createBlock)("core/gallery", {}, innerBlocks);
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        // A dynamic gallery has no inner blocks — its images are resolved
        // from a source at render time — so this transform would produce a
        // single empty image and drop the source.
        isMatch: ({ dynamicContent }) => !dynamicContent,
        transform: ({ align }, innerBlocks) => {
          if (innerBlocks.length > 0) {
            return innerBlocks.map(
              ({
                attributes: {
                  url,
                  alt,
                  caption,
                  title,
                  href,
                  rel,
                  linkClass,
                  id,
                  sizeSlug: imageSizeSlug,
                  linkDestination,
                  linkTarget,
                  anchor,
                  className
                }
              }) => (0, import_blocks26.createBlock)("core/image", {
                align,
                url,
                alt,
                caption,
                title,
                href,
                rel,
                linkClass,
                id,
                sizeSlug: imageSizeSlug,
                linkDestination,
                linkTarget,
                anchor,
                className
              })
            );
          }
          return (0, import_blocks26.createBlock)("core/image", { align });
        }
      },
      {
        type: "block",
        blocks: ["core/group"],
        variationName: "group-grid",
        // As above: with no inner blocks to clone, a dynamic gallery would
        // transform into an empty grid.
        isMatch: ({ dynamicContent }) => !dynamicContent,
        transform: (attributes2, innerBlocks) => {
          const {
            allowResize,
            aspectRatio,
            caption,
            columns,
            dynamicContent,
            fixedHeight,
            ids,
            imageCrop,
            images,
            linkTarget,
            linkTo,
            navigationButtonType,
            randomOrder,
            shortCodeTransforms,
            sizeSlug,
            ...rest
          } = attributes2;
          return (0, import_blocks26.createBlock)(
            "core/group",
            {
              ...rest,
              layout: {
                type: "grid",
                columnCount: columns ?? defaultColumnsNumber(innerBlocks.length)
              }
            },
            cloneInnerBlocks(innerBlocks)
          );
        }
      }
    ]
  };
  var transforms_default10 = transforms9;

  // packages/block-library/build-module/gallery/variations.mjs
  var import_i18n76 = __toESM(require_i18n(), 1);
  var variations6 = [
    {
      name: "dynamic-gallery",
      title: (0, import_i18n76.__)("Dynamic Gallery"),
      description: (0, import_i18n76.__)(
        "Display images from a source, such as those attached to the current post."
      ),
      attributes: {
        dynamicContent: { source: ATTACHED_MEDIA }
      },
      // Match any gallery that has a dynamic source configured, regardless of
      // the specific source or options, so the variation's title and
      // description describe the block whenever it runs in dynamic mode.
      isActive: (blockAttributes8) => !!blockAttributes8.dynamicContent,
      // No scopes for now. While dynamic mode only supports the "attached to the
      // current post" source, `'inserter'` is intentionally omitted: a dedicated
      // inserter entry would surface in post-less contexts (templates, template
      // parts, synced patterns) where there's no post to resolve images from. The
      // entry point is instead the inspector toggle on a regular Gallery.
      // `isActive` still relabels the block card to "Dynamic Gallery" regardless
      // of scope. Revisit adding `'inserter'` in a follow-up as the feature grows
      // beyond the post-attached source.
      scope: []
    },
    {
      name: "gallery-flex",
      title: (0, import_i18n76.__)("Gallery"),
      description: (0, import_i18n76.__)("Arrange images in flexible rows."),
      icon: gallery_default,
      attributes: {
        layout: {
          type: "flex"
        }
      },
      isActive: (blockAttributes8) => isGalleryFlexLayout(blockAttributes8.layout),
      scope: ["transform"]
    },
    {
      name: "gallery-grid",
      title: (0, import_i18n76.__)("Gallery Grid"),
      description: (0, import_i18n76.__)("Arrange images in a grid."),
      icon: grid_default,
      attributes: {
        layout: {
          type: "grid"
        }
      },
      isActive: (blockAttributes8) => blockAttributes8.layout?.type === "grid",
      scope: ["transform"]
    }
  ];
  var variations_default6 = variations6;

  // packages/block-library/build-module/gallery/index.mjs
  var { name: name34 } = block_default34;
  var settings34 = {
    icon: gallery_default,
    example: {
      attributes: {
        columns: 2
      },
      innerBlocks: [
        {
          name: "core/image",
          attributes: {
            url: "https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"
          }
        },
        {
          name: "core/image",
          attributes: {
            url: "https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"
          }
        }
      ]
    },
    transforms: transforms_default10,
    variations: variations_default6,
    edit: GalleryEdit,
    save: saveWithInnerBlocks,
    deprecated: deprecated_default17
  };
  var init34 = () => initBlock({ name: name34, metadata: block_default34, settings: settings34 });

  // packages/block-library/build-module/group/index.mjs
  var group_exports = {};
  __export(group_exports, {
    init: () => init35,
    metadata: () => block_default35,
    name: () => name35,
    settings: () => settings35
  });
  var import_i18n80 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/group/deprecated.mjs
  var import_block_editor91 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime293 = __toESM(require_jsx_runtime(), 1);
  var migrateAttributes = (attributes2) => {
    if (!attributes2.tagName) {
      attributes2 = {
        ...attributes2,
        tagName: "div"
      };
    }
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = { color: {} };
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    const { customTextColor, customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var deprecated7 = [
    // Version with default layout.
    {
      attributes: {
        tagName: {
          type: "string",
          default: "div"
        },
        templateLock: {
          type: ["string", "boolean"],
          enum: ["all", "insert", false]
        }
      },
      supports: {
        __experimentalOnEnter: true,
        __experimentalSettings: true,
        align: ["wide", "full"],
        anchor: true,
        ariaLabel: true,
        html: false,
        color: {
          gradients: true,
          link: true,
          __experimentalDefaultControls: {
            background: true,
            text: true
          }
        },
        spacing: {
          margin: ["top", "bottom"],
          padding: true,
          blockGap: true,
          __experimentalDefaultControls: {
            padding: true,
            blockGap: true
          }
        },
        __experimentalBorder: {
          color: true,
          radius: true,
          style: true,
          width: true,
          __experimentalDefaultControls: {
            color: true,
            radius: true,
            style: true,
            width: true
          }
        },
        typography: {
          fontSize: true,
          lineHeight: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true,
          __experimentalLetterSpacing: true,
          __experimentalTextTransform: true,
          __experimentalDefaultControls: {
            fontSize: true
          }
        },
        layout: true
      },
      save({ attributes: { tagName: Tag } }) {
        return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(Tag, { ...import_block_editor91.useInnerBlocksProps.save(import_block_editor91.useBlockProps.save()) });
      },
      isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
      migrate: (attributes2) => {
        const { layout = null } = attributes2;
        if (layout?.inherit || layout?.contentSize) {
          return {
            ...attributes2,
            layout: {
              ...layout,
              type: "constrained"
            }
          };
        }
      }
    },
    // Version of the block with the double div.
    {
      attributes: {
        tagName: {
          type: "string",
          default: "div"
        },
        templateLock: {
          type: ["string", "boolean"],
          enum: ["all", "insert", false]
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        color: {
          gradients: true,
          link: true
        },
        spacing: {
          padding: true
        },
        __experimentalBorder: {
          radius: true
        }
      },
      save({ attributes: attributes2 }) {
        const { tagName: Tag } = attributes2;
        return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(Tag, { ...import_block_editor91.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor91.InnerBlocks.Content, {}) }) });
      }
    },
    // Version of the block without global styles support
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      migrate: migrateAttributes,
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor91.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor91.getColorClassName)("color", textColor);
        const className = clsx_default(backgroundClass, textClass, {
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor91.InnerBlocks.Content, {}) }) });
      }
    },
    // Version of the group block with a bug that made text color class not applied.
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        }
      },
      migrate: migrateAttributes,
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      save({ attributes: attributes2 }) {
        const {
          backgroundColor,
          customBackgroundColor,
          textColor,
          customTextColor
        } = attributes2;
        const backgroundClass = (0, import_block_editor91.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const textClass = (0, import_block_editor91.getColorClassName)("color", textColor);
        const className = clsx_default(backgroundClass, {
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor91.InnerBlocks.Content, {}) }) });
      }
    },
    // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
    {
      attributes: {
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false
      },
      migrate: migrateAttributes,
      save({ attributes: attributes2 }) {
        const { backgroundColor, customBackgroundColor } = attributes2;
        const backgroundClass = (0, import_block_editor91.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const className = clsx_default(backgroundClass, {
          "has-background": backgroundColor || customBackgroundColor
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor
        };
        return /* @__PURE__ */ (0, import_jsx_runtime293.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0, import_jsx_runtime293.jsx)(import_block_editor91.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default18 = deprecated7;

  // packages/block-library/build-module/group/edit.mjs
  var import_data40 = __toESM(require_data(), 1);
  var import_block_editor93 = __toESM(require_block_editor(), 1);
  var import_element64 = __toESM(require_element(), 1);
  var import_i18n78 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/group/placeholder.mjs
  var import_data39 = __toESM(require_data(), 1);
  var import_block_editor92 = __toESM(require_block_editor(), 1);
  var import_i18n77 = __toESM(require_i18n(), 1);
  var import_blocks27 = __toESM(require_blocks(), 1);
  var import_components45 = __toESM(require_components(), 1);
  var import_element63 = __toESM(require_element(), 1);
  var import_jsx_runtime294 = __toESM(require_jsx_runtime(), 1);
  var getGroupPlaceholderIcons = (name118 = "group") => {
    const icons = {
      group: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
        import_components45.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_components45.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
        }
      ),
      "group-row": /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
        import_components45.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_components45.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
        }
      ),
      "group-stack": /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
        import_components45.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_components45.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z" })
        }
      ),
      "group-grid": /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
        import_components45.SVG,
        {
          xmlns: "http://www.w3.org/2000/svg",
          width: "48",
          height: "48",
          viewBox: "0 0 48 48",
          children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_components45.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z" })
        }
      )
    };
    return icons?.[name118];
  };
  function useShouldShowPlaceHolder({
    attributes: attributes2 = {
      style: void 0,
      backgroundColor: void 0,
      textColor: void 0,
      fontSize: void 0
    },
    usedLayoutType = "",
    hasInnerBlocks = false
  }) {
    const { style: style2, backgroundColor, textColor, fontSize } = attributes2;
    const [showPlaceholder, setShowPlaceholder] = (0, import_element63.useState)(
      !hasInnerBlocks && !backgroundColor && !fontSize && !textColor && !style2 && usedLayoutType !== "flex" && usedLayoutType !== "grid"
    );
    (0, import_element63.useEffect)(() => {
      if (!!hasInnerBlocks || !!backgroundColor || !!fontSize || !!textColor || !!style2 || usedLayoutType === "flex") {
        setShowPlaceholder(false);
      }
    }, [
      backgroundColor,
      fontSize,
      textColor,
      style2,
      usedLayoutType,
      hasInnerBlocks
    ]);
    return [showPlaceholder, setShowPlaceholder];
  }
  function GroupPlaceHolder({ name: name118, onSelect }) {
    const variations19 = (0, import_data39.useSelect)(
      (select10) => select10(import_blocks27.store).getBlockVariations(name118, "block"),
      [name118]
    );
    const blockProps = (0, import_block_editor92.useBlockProps)({
      className: "wp-block-group__placeholder"
    });
    (0, import_element63.useEffect)(() => {
      if (variations19 && variations19.length === 1) {
        onSelect(variations19[0]);
      }
    }, [onSelect, variations19]);
    return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
      import_components45.Placeholder,
      {
        instructions: (0, import_i18n77.__)("Group blocks together. Select a layout:"),
        children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
          "ul",
          {
            role: "list",
            className: "wp-block-group-placeholder__variations",
            "aria-label": (0, import_i18n77.__)("Block variations"),
            children: variations19.map((variation) => /* @__PURE__ */ (0, import_jsx_runtime294.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
              import_components45.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                icon: getGroupPlaceholderIcons(
                  variation.name
                ),
                iconSize: 48,
                onClick: () => onSelect(variation),
                className: "wp-block-group-placeholder__variation-button",
                label: `${variation.title}: ${variation.description}`
              }
            ) }, variation.name))
          }
        )
      }
    ) });
  }
  var placeholder_default = GroupPlaceHolder;

  // packages/block-library/build-module/group/edit.mjs
  var import_jsx_runtime295 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl4 } = unlock(import_block_editor93.privateApis);
  function GroupEditControls({ tagName, onSelectTagName, clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(import_block_editor93.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
      HTMLElementControl4,
      {
        tagName,
        onChange: onSelectTagName,
        clientId,
        options: [
          { label: (0, import_i18n78.__)("Default (<div>)"), value: "div" },
          { label: "<header>", value: "header" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<article>", value: "article" },
          { label: "<aside>", value: "aside" },
          { label: "<footer>", value: "footer" }
        ]
      }
    ) });
  }
  function GroupEdit({ attributes: attributes2, name: name118, setAttributes, clientId }) {
    const { hasInnerBlocks, themeSupportsLayout } = (0, import_data40.useSelect)(
      (select10) => {
        const { getBlock, getSettings: getSettings2 } = select10(import_block_editor93.store);
        const block = getBlock(clientId);
        return {
          hasInnerBlocks: !!(block && block.innerBlocks.length),
          themeSupportsLayout: getSettings2()?.supportsLayout
        };
      },
      [clientId]
    );
    const {
      tagName: TagName2 = "div",
      templateLock,
      allowedBlocks,
      layout = {}
    } = attributes2;
    const { type = "default" } = layout;
    const layoutSupportEnabled = themeSupportsLayout || type === "flex" || type === "grid";
    const ref = (0, import_element64.useRef)();
    const blockProps = (0, import_block_editor93.useBlockProps)({ ref });
    const [showPlaceholder, setShowPlaceholder] = useShouldShowPlaceHolder({
      attributes: attributes2,
      usedLayoutType: type,
      hasInnerBlocks
    });
    let renderAppender;
    if (showPlaceholder) {
      renderAppender = false;
    } else if (!hasInnerBlocks) {
      renderAppender = import_block_editor93.InnerBlocks.ButtonBlockAppender;
    }
    const innerBlocksProps = (0, import_block_editor93.useInnerBlocksProps)(
      layoutSupportEnabled ? blockProps : { className: "wp-block-group__inner-container" },
      {
        dropZoneElement: ref.current,
        templateLock,
        allowedBlocks,
        renderAppender
      }
    );
    const { selectBlock } = (0, import_data40.useDispatch)(import_block_editor93.store);
    const selectVariation = (nextVariation) => {
      setAttributes(nextVariation.attributes);
      selectBlock(clientId, -1);
      setShowPlaceholder(false);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(import_jsx_runtime295.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
        GroupEditControls,
        {
          tagName: TagName2,
          onSelectTagName: (value) => setAttributes({ tagName: value }),
          clientId
        }
      ),
      showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { children: [
        innerBlocksProps.children,
        /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
          placeholder_default,
          {
            name: name118,
            onSelect: selectVariation
          }
        )
      ] }),
      layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(TagName2, { ...innerBlocksProps }),
      !layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { ...innerBlocksProps }) })
    ] });
  }
  var edit_default11 = GroupEdit;

  // packages/block-library/build-module/group/block.json
  var block_default35 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/group",
    title: "Group",
    category: "design",
    description: "Gather blocks in a layout container.",
    keywords: ["container", "wrapper", "row", "section"],
    textdomain: "default",
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      __experimentalOnEnter: true,
      __experimentalSettings: true,
      align: ["wide", "full"],
      anchor: true,
      ariaLabel: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        blockGap: ["horizontal", "vertical"],
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      },
      dimensions: {
        minHeight: true,
        minWidth: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      position: {
        sticky: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      layout: {
        allowSizingOnChildren: true
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-group-editor",
    style: "wp-block-group"
  };

  // packages/block-library/build-module/group/save.mjs
  var import_block_editor94 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime296 = __toESM(require_jsx_runtime(), 1);
  function save18({ attributes: { tagName: Tag } }) {
    return /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Tag, { ...import_block_editor94.useInnerBlocksProps.save(import_block_editor94.useBlockProps.save()) });
  }

  // packages/block-library/build-module/group/transforms.mjs
  var import_blocks28 = __toESM(require_blocks(), 1);
  var transforms10 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        __experimentalConvert(blocks) {
          const alignments = ["wide", "full"];
          const widestAlignment = blocks.reduce(
            (accumulator, block) => {
              const { align } = block.attributes;
              return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
            },
            void 0
          );
          const groupInnerBlocks = blocks.map(
            (block) => (0, import_blocks28.cloneSanitizedBlock)(block)
          );
          return (0, import_blocks28.createBlock)(
            "core/group",
            {
              align: widestAlignment,
              layout: { type: "constrained" }
            },
            groupInnerBlocks
          );
        }
      }
    ]
  };
  var transforms_default11 = transforms10;

  // packages/block-library/build-module/group/variations.mjs
  var import_i18n79 = __toESM(require_i18n(), 1);
  var example = {
    innerBlocks: [
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("One.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("Two.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("Three.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("Four.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("Five.")
        }
      },
      {
        name: "core/paragraph",
        attributes: {
          content: (0, import_i18n79.__)("Six.")
        }
      }
    ]
  };
  var variations7 = [
    {
      name: "group",
      title: (0, import_i18n79.__)("Group"),
      description: (0, import_i18n79.__)("Gather blocks in a container."),
      attributes: { layout: { type: "constrained" } },
      isDefault: true,
      scope: ["block", "inserter", "transform"],
      icon: group_default
    },
    {
      name: "group-row",
      title: (0, import_i18n79._x)("Row", "single horizontal line"),
      description: (0, import_i18n79.__)("Arrange blocks horizontally."),
      attributes: { layout: { type: "flex", flexWrap: "nowrap" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type"],
      icon: row_default,
      example
    },
    {
      name: "group-stack",
      title: (0, import_i18n79.__)("Stack"),
      description: (0, import_i18n79.__)("Arrange blocks vertically."),
      attributes: { layout: { type: "flex", orientation: "vertical" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type", "layout.orientation"],
      icon: stack_default,
      example
    },
    {
      name: "group-grid",
      title: (0, import_i18n79.__)("Grid"),
      description: (0, import_i18n79.__)("Arrange blocks in a grid."),
      attributes: { layout: { type: "grid" } },
      scope: ["block", "inserter", "transform"],
      isActive: ["layout.type"],
      icon: grid_default,
      example
    }
  ];
  var variations_default7 = variations7;

  // packages/block-library/build-module/group/index.mjs
  var { name: name35 } = block_default35;
  var settings35 = {
    icon: group_default,
    example: {
      attributes: {
        layout: {
          type: "constrained",
          justifyContent: "center"
        },
        style: {
          spacing: {
            padding: {
              top: "4em",
              right: "3em",
              bottom: "4em",
              left: "3em"
            }
          }
        }
      },
      innerBlocks: [
        {
          name: "core/heading",
          attributes: {
            content: (0, import_i18n80.__)("La Mancha"),
            style: {
              typography: {
                textAlign: "center"
              }
            }
          }
        },
        {
          name: "core/paragraph",
          attributes: {
            style: {
              typography: {
                textAlign: "center"
              }
            },
            content: (0, import_i18n80.__)(
              "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
            )
          }
        },
        {
          name: "core/spacer",
          attributes: {
            height: "10px"
          }
        },
        {
          name: "core/button",
          attributes: {
            text: (0, import_i18n80.__)("Read more")
          }
        }
      ],
      viewportWidth: 600
    },
    transforms: transforms_default11,
    edit: edit_default11,
    save: save18,
    deprecated: deprecated_default18,
    variations: variations_default7
  };
  var init35 = () => initBlock({ name: name35, metadata: block_default35, settings: settings35 });

  // packages/block-library/build-module/heading/index.mjs
  var heading_exports = {};
  __export(heading_exports, {
    init: () => init36,
    metadata: () => block_default36,
    name: () => name36,
    settings: () => settings36
  });
  var import_i18n84 = __toESM(require_i18n(), 1);
  var import_blocks30 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/heading/deprecated.mjs
  var import_block_editor95 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime297 = __toESM(require_jsx_runtime(), 1);
  var blockSupports = {
    className: false,
    anchor: true
  };
  var blockAttributes4 = {
    align: {
      type: "string"
    },
    content: {
      type: "string",
      source: "html",
      selector: "h1,h2,h3,h4,h5,h6",
      default: ""
    },
    level: {
      type: "number",
      default: 2
    },
    placeholder: {
      type: "string"
    }
  };
  var migrateCustomColors2 = (attributes2) => {
    if (!attributes2.customTextColor) {
      return attributes2;
    }
    const style2 = {
      color: {
        text: attributes2.customTextColor
      }
    };
    const { customTextColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
  var migrateTextAlign = (attributes2) => {
    const { align, ...rest } = attributes2;
    return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes2;
  };
  var v117 = {
    supports: blockSupports,
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, level, content, textColor, customTextColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor95.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
        import_block_editor95.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            textAlign: align,
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    }
  };
  var v28 = {
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, customTextColor, level, textColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor95.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass,
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
        import_block_editor95.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    },
    supports: blockSupports
  };
  var v35 = {
    supports: blockSupports,
    attributes: {
      ...blockAttributes4,
      customTextColor: {
        type: "string"
      },
      textColor: {
        type: "string"
      }
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, customTextColor, level, textColor } = attributes2;
      const tagName = "h" + level;
      const textClass = (0, import_block_editor95.getColorClassName)("color", textColor);
      const className = clsx_default({
        [textClass]: textClass,
        "has-text-color": textColor || customTextColor,
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
        import_block_editor95.RichText.Content,
        {
          className: className ? className : void 0,
          tagName,
          style: {
            color: textClass ? void 0 : customTextColor
          },
          value: content
        }
      );
    }
  };
  var v43 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: false,
      color: { link: true },
      fontSize: true,
      lineHeight: true,
      __experimentalSelector: {
        "core/heading/h1": "h1",
        "core/heading/h2": "h2",
        "core/heading/h3": "h3",
        "core/heading/h4": "h4",
        "core/heading/h5": "h5",
        "core/heading/h6": "h6"
      },
      __unstablePasteTextInline: true
    },
    attributes: blockAttributes4,
    isEligible: ({ align }) => TEXT_ALIGN_OPTIONS.includes(align),
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    save({ attributes: attributes2 }) {
      const { align, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(TagName2, { ...import_block_editor95.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_block_editor95.RichText.Content, { value: content }) });
    }
  };
  var v53 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true,
          textTransform: true
        }
      },
      __experimentalSelector: "h1,h2,h3,h4,h5,h6",
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true
    },
    attributes: {
      textAlign: {
        type: "string"
      },
      content: {
        type: "string",
        source: "html",
        selector: "h1,h2,h3,h4,h5,h6",
        default: "",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      placeholder: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(TagName2, { ...import_block_editor95.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_block_editor95.RichText.Content, { value: content }) });
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    )
  };
  var v63 = {
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: true,
      splitting: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      }
    },
    attributes: {
      textAlign: {
        type: "string"
      },
      content: {
        type: "string",
        source: "html",
        selector: "h1,h2,h3,h4,h5,h6",
        default: "",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      placeholder: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content, level } = attributes2;
      const TagName2 = "h" + level;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(TagName2, { ...import_block_editor95.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_block_editor95.RichText.Content, { value: content }) });
    },
    migrate: (attributes2) => migrate_text_align_default(
      migrateCustomColors2(migrateTextAlign(attributes2))
    ),
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated8 = [v63, v53, v43, v35, v28, v117];
  var deprecated_default19 = deprecated8;

  // packages/block-library/build-module/heading/edit.mjs
  var import_i18n81 = __toESM(require_i18n(), 1);
  var import_element65 = __toESM(require_element(), 1);
  var import_data41 = __toESM(require_data(), 1);
  var import_block_editor96 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/heading/autogenerate-anchors.mjs
  var import_remove_accents = __toESM(require_remove_accents(), 1);
  var anchors = {};
  var getTextWithoutMarkup = (text) => {
    const dummyElement = document.createElement("div");
    dummyElement.innerHTML = text;
    return dummyElement.innerText;
  };
  var getSlug = (content) => {
    return (0, import_remove_accents.default)(getTextWithoutMarkup(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
  };
  var generateAnchor = (clientId, content) => {
    const slug = getSlug(content);
    if ("" === slug) {
      return null;
    }
    delete anchors[clientId];
    let anchor = slug;
    let i = 0;
    while (Object.values(anchors).includes(anchor)) {
      i += 1;
      anchor = slug + "-" + i;
    }
    return anchor;
  };
  var setAnchor = (clientId, anchor) => {
    anchors[clientId] = anchor;
  };

  // packages/block-library/build-module/heading/edit.mjs
  var import_jsx_runtime298 = __toESM(require_jsx_runtime(), 1);
  function HeadingEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      mergeBlocks,
      onReplace,
      style: style2,
      clientId
    } = props;
    useDeprecatedTextAlign(props);
    const { content, level, placeholder: placeholder2, anchor } = attributes2;
    const tagName = "h" + level;
    const blockProps = (0, import_block_editor96.useBlockProps)({
      style: style2
    });
    const { canGenerateAnchors } = (0, import_data41.useSelect)((select10) => {
      const { getGlobalBlockCount, getSettings: getSettings2 } = select10(import_block_editor96.store);
      const settings117 = getSettings2();
      return {
        canGenerateAnchors: !!settings117.generateAnchors || getGlobalBlockCount("core/table-of-contents") > 0
      };
    }, []);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data41.useDispatch)(import_block_editor96.store);
    (0, import_element65.useEffect)(() => {
      if (!canGenerateAnchors) {
        return;
      }
      if (!anchor && content) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          anchor: generateAnchor(clientId, content)
        });
      }
      setAnchor(clientId, anchor);
      return () => setAnchor(clientId, null);
    }, [
      anchor,
      content,
      clientId,
      canGenerateAnchors,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const onContentChange = (value) => {
      const newAttrs = { content: value };
      if (canGenerateAnchors && (!anchor || !value || generateAnchor(clientId, content) === anchor)) {
        newAttrs.anchor = generateAnchor(clientId, value);
      }
      setAttributes(newAttrs);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
      import_block_editor96.RichText,
      {
        identifier: "content",
        tagName,
        value: content,
        onChange: onContentChange,
        onMerge: mergeBlocks,
        onReplace,
        onRemove: onReplace ? () => onReplace([]) : void 0,
        placeholder: placeholder2 || (0, import_i18n81.__)("Heading"),
        ...blockProps
      }
    );
  }
  var edit_default12 = HeadingEdit;

  // packages/block-library/build-module/heading/block.json
  var block_default36 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/heading",
    title: "Heading",
    category: "text",
    description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
    keywords: ["title", "subtitle"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "h1,h2,h3,h4,h5,h6",
        role: "content"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      className: true,
      splitting: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        textShadow: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-heading-editor",
    style: "wp-block-heading"
  };

  // packages/block-library/build-module/heading/save.mjs
  var import_block_editor97 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime299 = __toESM(require_jsx_runtime(), 1);
  function save19({ attributes: attributes2 }) {
    const { content, level } = attributes2;
    const TagName2 = "h" + level;
    return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(TagName2, { ...import_block_editor97.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(import_block_editor97.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/heading/transforms.mjs
  var import_blocks29 = __toESM(require_blocks(), 1);
  var import_i18n82 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/heading/shared.mjs
  function getLevelFromHeadingNodeName(nodeName) {
    return Number(nodeName.substr(1));
  }

  // packages/block-library/build-module/heading/transforms.mjs
  var transforms11 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        // The level shortcuts are declared here as well as on the
        // variations, so that they reach a paragraph and not only a
        // heading. Both declarations describe the same shortcut, and only
        // one of them can apply to any given selection.
        shortcuts: [1, 2, 3, 4, 5, 6].map((level) => ({
          name: `core/block-editor/transform-to-heading-${level}`,
          description: (0, import_i18n82.sprintf)(
            /* translators: %d: heading level e.g: "1", "2", "3" */
            (0, import_i18n82.__)("Transform the selected block into a heading %d."),
            level
          ),
          keyCombination: {
            modifier: "access",
            character: `${level}`
          },
          variationName: `h${level}`
        })),
        transform: (attributes2) => attributes2.map((_attributes) => {
          const { content, anchor, style: style2 } = _attributes;
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks29.createBlock)("core/heading", {
            ...getTransformedAttributes(
              _attributes,
              "core/heading",
              ({ content: contentBinding }) => ({
                content: contentBinding
              })
            ),
            content,
            anchor,
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        })
      },
      {
        type: "raw",
        selector: "h1,h2,h3,h4,h5,h6",
        schema: ({ phrasingContentSchema, isPaste }) => {
          const schema2 = {
            children: phrasingContentSchema,
            attributes: isPaste ? [] : ["style", "id"]
          };
          return {
            h1: schema2,
            h2: schema2,
            h3: schema2,
            h4: schema2,
            h5: schema2,
            h6: schema2
          };
        },
        transform(node) {
          const attributes2 = (0, import_blocks29.getBlockAttributes)(
            "core/heading",
            node.outerHTML
          );
          const { textAlign } = node.style || {};
          attributes2.level = getLevelFromHeadingNodeName(node.nodeName);
          if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
            attributes2.style = {
              ...attributes2.style,
              typography: {
                ...attributes2.style?.typography,
                textAlign
              }
            };
          }
          return (0, import_blocks29.createBlock)("core/heading", attributes2);
        }
      },
      ...[1, 2, 3, 4, 5, 6].map((level) => ({
        type: "prefix",
        prefix: Array(level + 1).join("#"),
        transform(content) {
          return (0, import_blocks29.createBlock)("core/heading", {
            level,
            content
          });
        }
      })),
      ...[1, 2, 3, 4, 5, 6].map((level) => ({
        type: "enter",
        regExp: new RegExp(`^/(h|H)${level}$`),
        transform: () => (0, import_blocks29.createBlock)("core/heading", { level })
      }))
    ],
    to: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        shortcuts: [
          {
            name: "core/block-editor/transform-heading-to-paragraph",
            description: (0, import_i18n82.__)(
              "Transform the selected heading into a paragraph."
            ),
            keyCombination: {
              modifier: "access",
              character: "0"
            },
            aliases: [
              {
                modifier: "access",
                character: "7"
              }
            ]
          }
        ],
        transform: (attributes2) => attributes2.map((_attributes) => {
          const { content, style: style2 } = _attributes;
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks29.createBlock)("core/paragraph", {
            ...getTransformedAttributes(
              _attributes,
              "core/paragraph",
              ({ content: contentBinding }) => ({
                content: contentBinding
              })
            ),
            content,
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        })
      }
    ]
  };
  var transforms_default12 = transforms11;

  // packages/block-library/build-module/heading/variations.mjs
  var import_i18n83 = __toESM(require_i18n(), 1);
  var LEVEL_ICONS = [
    heading_level_1_default,
    heading_level_2_default,
    heading_level_3_default,
    heading_level_4_default,
    heading_level_5_default,
    heading_level_6_default
  ];
  var variations8 = [
    ...[1, 2, 3, 4, 5, 6].map((level) => ({
      name: `h${level}`,
      title: (0, import_i18n83.sprintf)(
        /* translators: %d: heading level e.g: "1", "2", "3" */
        (0, import_i18n83.__)("Heading %d"),
        level
      ),
      description: (0, import_i18n83.__)(
        "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."
      ),
      icon: LEVEL_ICONS[level - 1],
      attributes: { level },
      scope: ["block", "transform"],
      keywords: [`h${level}`],
      isActive: (blockAttributes8) => blockAttributes8.level === level,
      shortcut: {
        name: `core/block-editor/transform-to-heading-${level}`,
        description: (0, import_i18n83.sprintf)(
          /* translators: %d: heading level e.g: "1", "2", "3" */
          (0, import_i18n83.__)("Transform the selected block into a heading %d."),
          level
        ),
        keyCombination: {
          modifier: "access",
          character: `${level}`
        }
      }
    }))
  ];
  var variations_default8 = variations8;

  // packages/block-library/build-module/heading/index.mjs
  var { name: name36 } = block_default36;
  var settings36 = {
    icon: heading_default,
    example: {
      attributes: {
        content: (0, import_i18n84.__)("Code is Poetry"),
        level: 2,
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const { content, level } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = content?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || content;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return !hasContent ? (0, import_i18n84.sprintf)(
          /* translators: accessibility text. %s: heading level. */
          (0, import_i18n84.__)("Level %s. Empty."),
          level
        ) : (0, import_i18n84.sprintf)(
          /* translators: accessibility text. 1: heading level. 2: heading content. */
          (0, import_i18n84.__)("Level %1$s. %2$s"),
          level,
          content
        );
      }
    },
    transforms: transforms_default12,
    deprecated: deprecated_default19,
    merge(attributes2, attributesToMerge) {
      return {
        content: (attributes2.content || "") + (attributesToMerge.content || "")
      };
    },
    edit: edit_default12,
    save: save19,
    variations: variations_default8
  };
  var init36 = () => {
    const block = initBlock({ name: name36, metadata: block_default36, settings: settings36 });
    const levelOptions = (0, import_blocks30.getBlockType)(name36)?.attributes?.levelOptions?.default;
    if (levelOptions) {
      [1, 2, 3, 4, 5, 6].forEach((level) => {
        if (!levelOptions.includes(level)) {
          (0, import_blocks30.unregisterBlockVariation)(name36, `h${level}`);
        }
      });
    }
    return block;
  };

  // packages/block-library/build-module/home-link/index.mjs
  var home_link_exports = {};
  __export(home_link_exports, {
    init: () => init37,
    metadata: () => block_default37,
    name: () => name37,
    settings: () => settings37
  });
  var import_i18n86 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/home-link/block.json
  var block_default37 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/home-link",
    category: "design",
    parent: ["core/navigation"],
    title: "Home Link",
    description: "Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      opensInNewTab: {
        type: "boolean",
        default: false
      },
      description: {
        type: "string"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "fontSize",
      "customFontSize",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: false,
          radius: false,
          style: false,
          width: false
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-home-link-editor",
    style: "wp-block-home-link"
  };

  // packages/block-library/build-module/home-link/edit.mjs
  var import_block_editor98 = __toESM(require_block_editor(), 1);
  var import_components46 = __toESM(require_components(), 1);
  var import_i18n85 = __toESM(require_i18n(), 1);
  var import_data42 = __toESM(require_data(), 1);
  var import_core_data22 = __toESM(require_core_data(), 1);
  var import_dom11 = __toESM(require_dom(), 1);
  var import_jsx_runtime300 = __toESM(require_jsx_runtime(), 1);
  var preventDefault = (event) => event.preventDefault();
  function HomeEdit({ attributes: attributes2, setAttributes, context }) {
    const {
      homeUrl,
      onNavigateToEntityRecord,
      frontPageId,
      frontPageTemplateId
    } = (0, import_data42.useSelect)((select10) => {
      const { getEntityRecord, getDefaultTemplateId, canUser } = select10(import_core_data22.store);
      const baseUrl = getEntityRecord("root", "__unstableBase")?.home;
      const canReadSettings = canUser("read", {
        kind: "root",
        name: "site"
      });
      const site = canReadSettings ? getEntityRecord("root", "site") : null;
      const resolvedFrontPageId = site?.show_on_front === "page" ? site?.page_on_front : null;
      const resolvedFrontPageTemplateId = !resolvedFrontPageId ? getDefaultTemplateId({ slug: "front-page" }) : null;
      return {
        homeUrl: baseUrl,
        onNavigateToEntityRecord: select10(import_block_editor98.store).getSettings().onNavigateToEntityRecord,
        frontPageId: resolvedFrontPageId,
        frontPageTemplateId: resolvedFrontPageTemplateId
      };
    }, []);
    const { textColor, backgroundColor, style: style2 } = context;
    const { label, opensInNewTab, description } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockProps = (0, import_block_editor98.useBlockProps)({
      className: clsx_default("wp-block-navigation-item", {
        "has-text-color": !!textColor || !!style2?.color?.text,
        [`has-${textColor}-color`]: !!textColor,
        "has-background": !!backgroundColor || !!style2?.color?.background,
        [`has-${backgroundColor}-background-color`]: !!backgroundColor
      }),
      style: {
        color: style2?.color?.text,
        backgroundColor: style2?.color?.background
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(import_block_editor98.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
        import_components46.__experimentalToolsPanel,
        {
          label: (0, import_i18n85.__)("Settings"),
          resetAll: () => {
            setAttributes({
              label: "",
              opensInNewTab: false,
              description: ""
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_components46.__experimentalToolsPanelItem,
              {
                hasValue: () => !!label,
                label: (0, import_i18n85.__)("Text"),
                onDeselect: () => setAttributes({ label: "" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
                  import_components46.TextControl,
                  {
                    label: (0, import_i18n85.__)("Text"),
                    value: label ? (0, import_dom11.__unstableStripHTML)(label) : "",
                    onChange: (labelValue) => {
                      setAttributes({ label: labelValue });
                    },
                    autoComplete: "off"
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_components46.__experimentalToolsPanelItem,
              {
                hasValue: () => !!opensInNewTab,
                label: (0, import_i18n85.__)("Open in new tab"),
                onDeselect: () => setAttributes({ opensInNewTab: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
                  import_components46.CheckboxControl,
                  {
                    label: (0, import_i18n85.__)("Open in new tab"),
                    checked: opensInNewTab,
                    onChange: (value) => setAttributes({ opensInNewTab: value })
                  }
                )
              }
            ),
            onNavigateToEntityRecord && (frontPageId || frontPageTemplateId) && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_components46.Button,
              {
                variant: "secondary",
                onClick: () => {
                  if (frontPageId) {
                    onNavigateToEntityRecord({
                      postId: frontPageId,
                      postType: "page"
                    });
                  } else {
                    onNavigateToEntityRecord({
                      postId: frontPageTemplateId,
                      postType: "wp_template"
                    });
                  }
                },
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n85.__)("Edit")
              }
            ),
            homeUrl && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_components46.Button,
              {
                variant: "secondary",
                href: homeUrl,
                target: "_blank",
                icon: external_default,
                iconPosition: "right",
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n85.__)("View")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_components46.__experimentalToolsPanelItem,
              {
                hasValue: () => !!description,
                label: (0, import_i18n85.__)("Description"),
                onDeselect: () => setAttributes({ description: "" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
                  import_components46.TextareaControl,
                  {
                    label: (0, import_i18n85.__)("Description"),
                    value: description || "",
                    onChange: (descriptionValue) => {
                      setAttributes({
                        description: descriptionValue
                      });
                    },
                    help: (0, import_i18n85.__)(
                      "The description will be displayed in the menu if the current theme supports it."
                    )
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
        "a",
        {
          className: "wp-block-home-link__content wp-block-navigation-item__content",
          href: homeUrl,
          onClick: preventDefault,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
              import_block_editor98.RichText,
              {
                identifier: "label",
                className: "wp-block-home-link__label",
                value: label ?? (0, import_i18n85.__)("Home"),
                onChange: (labelValue) => {
                  setAttributes({ label: labelValue });
                },
                "aria-label": (0, import_i18n85.__)("Home link text"),
                placeholder: (0, import_i18n85.__)("Add label\u2026"),
                withoutInteractiveFormatting: true
              }
            ),
            description && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
          ]
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/home-link/save.mjs
  var import_block_editor99 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime301 = __toESM(require_jsx_runtime(), 1);
  function save20() {
    return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(import_block_editor99.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/home-link/index.mjs
  var { name: name37 } = block_default37;
  var settings37 = {
    icon: home_default,
    edit: HomeEdit,
    save: save20,
    example: {
      attributes: {
        label: (0, import_i18n86._x)("Home Link", "block example")
      }
    }
  };
  var init37 = () => initBlock({ name: name37, metadata: block_default37, settings: settings37 });

  // packages/block-library/build-module/html/index.mjs
  var html_exports = {};
  __export(html_exports, {
    init: () => init38,
    metadata: () => block_default38,
    name: () => name38,
    settings: () => settings38
  });
  var import_i18n90 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/html/edit.mjs
  var import_i18n89 = __toESM(require_i18n(), 1);
  var import_element68 = __toESM(require_element(), 1);
  var import_block_editor102 = __toESM(require_block_editor(), 1);
  var import_blocks31 = __toESM(require_blocks(), 1);
  var import_data45 = __toESM(require_data(), 1);
  var import_deprecated21 = __toESM(require_deprecated(), 1);
  var import_components49 = __toESM(require_components(), 1);

  // packages/block-library/build-module/html/modal.mjs
  var import_i18n88 = __toESM(require_i18n(), 1);
  var import_element67 = __toESM(require_element(), 1);
  var import_data44 = __toESM(require_data(), 1);
  var import_components48 = __toESM(require_components(), 1);
  var import_block_editor101 = __toESM(require_block_editor(), 1);
  var import_compose23 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/html/preview.mjs
  var import_element66 = __toESM(require_element(), 1);
  var import_block_editor100 = __toESM(require_block_editor(), 1);
  var import_components47 = __toESM(require_components(), 1);
  var import_data43 = __toESM(require_data(), 1);
  var import_i18n87 = __toESM(require_i18n(), 1);
  var import_jsx_runtime302 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_STYLES = `
	html,body,:root {
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		min-height: auto !important;
	}
`;
  function HTMLEditPreview({ content, isSelected }) {
    const settingStyles = (0, import_data43.useSelect)(
      (select10) => select10(import_block_editor100.store).getSettings().styles,
      []
    );
    const styles = (0, import_element66.useMemo)(
      () => [
        DEFAULT_STYLES,
        ...(0, import_block_editor100.transformStyles)(
          (settingStyles ?? []).filter((style2) => style2.css)
        )
      ],
      [settingStyles]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(import_jsx_runtime302.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
        import_components47.SandBox,
        {
          html: content,
          styles,
          title: (0, import_i18n87.__)("Custom HTML Preview"),
          tabIndex: -1
        }
      ),
      !isSelected && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "block-library-html__preview-overlay" })
    ] });
  }

  // packages/block-library/build-module/html/utils.mjs
  function parseContent(content = "") {
    if (!content || !content.trim()) {
      return { html: "", css: "", js: "" };
    }
    const doc = document.implementation.createHTMLDocument("");
    doc.body.innerHTML = content;
    const styleTag = doc.body.querySelector(
      'style[data-wp-block-html="css"]'
    );
    const css = styleTag ? styleTag.textContent.trim() : "";
    if (styleTag) {
      styleTag.remove();
    }
    const scriptTag = doc.body.querySelector(
      'script[data-wp-block-html="js"]'
    );
    const js = scriptTag ? scriptTag.textContent.trim() : "";
    if (scriptTag) {
      scriptTag.remove();
    }
    const html = doc.body.innerHTML.trim();
    return { html, css, js };
  }
  function serializeContent({ html = "", css = "", js = "" }) {
    const parts = [];
    if (css.trim()) {
      parts.push(`<style data-wp-block-html="css">
${css}
</style>`);
    }
    if (js.trim()) {
      parts.push(`<script data-wp-block-html="js">
${js}
<\/script>`);
    }
    if (html.trim()) {
      parts.push(html);
    }
    return parts.join("\n\n");
  }

  // packages/block-library/build-module/html/modal.mjs
  var import_jsx_runtime303 = __toESM(require_jsx_runtime(), 1);
  var { Tabs } = unlock(import_components48.privateApis);
  var { useNativeUndo } = unlock(import_block_editor101.privateApis);
  function HTMLEditModal({ onRequestClose, content, onUpdate }) {
    const { html, css, js } = parseContent(content);
    const [editedHtml, setEditedHtml] = (0, import_element67.useState)(html);
    const [editedCss, setEditedCss] = (0, import_element67.useState)(css);
    const [editedJs, setEditedJs] = (0, import_element67.useState)(js);
    const [isFullscreen, setIsFullscreen] = (0, import_element67.useState)(false);
    const nativeUndoRef = useNativeUndo();
    const isMobileViewport = (0, import_compose23.useViewportMatch)("small", "<");
    const { canUserUseUnfilteredHTML } = (0, import_data44.useSelect)((select10) => {
      const settings117 = select10(import_block_editor101.store).getSettings();
      return {
        canUserUseUnfilteredHTML: settings117.__experimentalCanUserUseUnfilteredHTML
      };
    }, []);
    const hasRestrictedContent = !canUserUseUnfilteredHTML && (css.trim() || js.trim());
    const handleUpdate = () => {
      onUpdate(
        serializeContent({
          html: editedHtml,
          css: canUserUseUnfilteredHTML ? editedCss : "",
          js: canUserUseUnfilteredHTML ? editedJs : ""
        })
      );
    };
    const handleUpdateAndClose = () => {
      handleUpdate();
      onRequestClose();
    };
    const toggleFullscreen = () => {
      setIsFullscreen((prevState) => !prevState);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(import_jsx_runtime303.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
      import_components48.Modal,
      {
        title: (0, import_i18n88.__)("Edit HTML"),
        onRequestClose,
        className: "block-library-html__modal",
        size: "large",
        isDismissible: false,
        shouldCloseOnClickOutside: false,
        isFullScreen: isFullscreen,
        __experimentalHideHeader: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Tabs, { orientation: "horizontal", defaultTabId: "html", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_components48.__experimentalVStack, { expanded: true, children: [
          /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
            import_components48.__experimentalHStack,
            {
              justify: "space-between",
              className: "block-library-html__modal-header",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(Tabs.TabList, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Tabs.Tab, { tabId: "html", children: "HTML" }),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Tabs.Tab, { tabId: "css", children: "CSS" }),
                  canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(Tabs.Tab, { tabId: "js", children: (0, import_i18n88.__)("JavaScript") })
                ] }) }),
                !isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    icon: isFullscreen ? square_default : fullscreen_default,
                    label: (0, import_i18n88.__)(
                      "Enable/disable fullscreen"
                    ),
                    onClick: toggleFullscreen,
                    variant: "tertiary"
                  }
                ) })
              ]
            }
          ),
          hasRestrictedContent && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
            import_components48.Notice,
            {
              status: "warning",
              isDismissible: false,
              className: "block-library-html__modal-notice",
              children: (0, import_i18n88.__)(
                "This block contains CSS or JavaScript that will be removed when you save because you do not have permission to use unfiltered HTML."
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
            import_components48.Flex,
            {
              direction: isMobileViewport ? "column" : "row",
              className: "block-library-html__modal-tabs",
              align: "stretch",
              gap: 8,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
                  "div",
                  {
                    ref: nativeUndoRef,
                    className: "block-library-html__modal-content",
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                        Tabs.TabPanel,
                        {
                          tabId: "html",
                          focusable: false,
                          className: "block-library-html__modal-tab",
                          children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                            import_block_editor101.PlainText,
                            {
                              value: editedHtml,
                              onChange: setEditedHtml,
                              placeholder: (0, import_i18n88.__)("Write HTML\u2026"),
                              "aria-label": (0, import_i18n88.__)("HTML"),
                              className: "block-library-html__modal-editor"
                            }
                          )
                        }
                      ),
                      canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                        Tabs.TabPanel,
                        {
                          tabId: "css",
                          focusable: false,
                          className: "block-library-html__modal-tab",
                          children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                            import_block_editor101.PlainText,
                            {
                              value: editedCss,
                              onChange: setEditedCss,
                              placeholder: (0, import_i18n88.__)("Write CSS\u2026"),
                              "aria-label": (0, import_i18n88.__)("CSS"),
                              className: "block-library-html__modal-editor"
                            }
                          )
                        }
                      ),
                      canUserUseUnfilteredHTML && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                        Tabs.TabPanel,
                        {
                          tabId: "js",
                          focusable: false,
                          className: "block-library-html__modal-tab",
                          children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                            import_block_editor101.PlainText,
                            {
                              value: editedJs,
                              onChange: setEditedJs,
                              placeholder: (0, import_i18n88.__)(
                                "Write JavaScript\u2026"
                              ),
                              "aria-label": (0, import_i18n88.__)("JavaScript"),
                              className: "block-library-html__modal-editor"
                            }
                          )
                        }
                      )
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "block-library-html__preview", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                  HTMLEditPreview,
                  {
                    content: serializeContent({
                      html: editedHtml,
                      css: editedCss,
                      js: editedJs
                    })
                  }
                ) })
              ]
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
            import_components48.__experimentalHStack,
            {
              alignment: "center",
              justify: "flex-end",
              spacing: 4,
              className: "block-library-html__modal-footer",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "tertiary",
                    onClick: onRequestClose,
                    children: (0, import_i18n88.__)("Cancel")
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
                  import_components48.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: handleUpdateAndClose,
                    children: (0, import_i18n88.__)("Update")
                  }
                )
              ]
            }
          )
        ] }) })
      }
    ) });
  }

  // packages/block-library/build-module/html/edit.mjs
  var import_jsx_runtime304 = __toESM(require_jsx_runtime(), 1);
  var { InnerContent } = unlock(import_block_editor102.privateApis);
  function HTMLEdit({ clientId, attributes: attributes2 }) {
    const [isModalOpen, setIsModalOpen] = (0, import_element68.useState)(false);
    const registry = (0, import_data45.useRegistry)();
    const { updateBlock, replaceInnerBlocks } = (0, import_data45.useDispatch)(import_block_editor102.store);
    const content = (0, import_data45.useSelect)(
      (select10) => {
        const block = select10(import_block_editor102.store).getBlock(clientId);
        return block ? (0, import_blocks31.getBlockContent)(block) : "";
      },
      [clientId]
    );
    const blockProps = (0, import_block_editor102.useBlockProps)({
      className: "block-library-html__edit"
    });
    const onUpdate = (nextContent) => {
      if (nextContent === content) {
        return;
      }
      const [parsedBlock] = (0, import_blocks31.parse)(
        `<!-- wp:html -->
${nextContent}
<!-- /wp:html -->`
      );
      const nextInnerBlocks = parsedBlock?.innerBlocks ?? [];
      const prevInnerBlocks = registry.select(import_block_editor102.store).getBlocks(clientId);
      const innerBlocksUnchanged = prevInnerBlocks.length === nextInnerBlocks.length && prevInnerBlocks.every(
        (block, index2) => (0, import_blocks31.serialize)(block) === (0, import_blocks31.serialize)(nextInnerBlocks[index2])
      );
      registry.batch(() => {
        updateBlock(clientId, {
          innerContent: parsedBlock?.innerContent ?? (nextContent ? [nextContent] : [])
        });
        if (!innerBlocksUnchanged) {
          replaceInnerBlocks(clientId, nextInnerBlocks, false);
        }
      });
    };
    (0, import_element68.useEffect)(() => {
      if (!attributes2.content) {
        return;
      }
      (0, import_deprecated21.default)("The content attribute on the Custom HTML block", {
        since: "7.1",
        alternative: "inner content"
      });
      updateBlock(clientId, {
        attributes: { content: void 0 },
        innerContent: [attributes2.content]
      });
    }, [attributes2.content]);
    if (!content?.trim()) {
      return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
          import_components49.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_block_editor102.BlockIcon, { icon: code_default }),
            label: (0, import_i18n89.__)("Custom HTML"),
            instructions: (0, import_i18n89.__)(
              "Add custom HTML code and preview how it looks."
            ),
            children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
              import_components49.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => setIsModalOpen(true),
                children: (0, import_i18n89.__)("Edit HTML")
              }
            )
          }
        ),
        isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
          HTMLEditModal,
          {
            onRequestClose: () => setIsModalOpen(false),
            content,
            onUpdate
          }
        )
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_block_editor102.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components49.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components49.ToolbarButton, { onClick: () => setIsModalOpen(true), children: (0, import_i18n89.__)("Edit code") }) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_block_editor102.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(import_components49.__experimentalVStack, { className: "block-library-html__edit-code", expanded: true, children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
        import_components49.Button,
        {
          className: "block-library-html__edit-code-button",
          __next40pxDefaultSize: true,
          variant: "secondary",
          onClick: () => setIsModalOpen(true),
          children: (0, import_i18n89.__)("Edit code")
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(InnerContent, { clientId }),
      isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
        HTMLEditModal,
        {
          onRequestClose: () => setIsModalOpen(false),
          content,
          onUpdate
        }
      )
    ] });
  }

  // packages/block-library/build-module/html/block.json
  var block_default38 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/html",
    title: "Custom HTML",
    category: "widgets",
    description: "Add custom HTML code and preview it as you edit.",
    keywords: ["embed"],
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        role: "local"
      }
    },
    supports: {
      customClassName: false,
      className: false,
      html: false,
      interactivity: {
        clientNavigation: true
      },
      listView: true,
      customCSS: false,
      visibility: false
    },
    editorStyle: "wp-block-html-editor"
  };

  // packages/block-library/build-module/html/save.mjs
  function save21() {
    return null;
  }

  // packages/block-library/build-module/html/transforms.mjs
  var import_blocks32 = __toESM(require_blocks(), 1);
  var import_rich_text3 = __toESM(require_rich_text(), 1);
  var transforms12 = {
    from: [
      {
        type: "block",
        blocks: ["core/code"],
        transform: ({ content: html }) => {
          const text = (0, import_rich_text3.create)({ html }).text;
          const [block] = (0, import_blocks32.parse)(
            `<!-- wp:html -->
${text}
<!-- /wp:html -->`
          );
          return block ?? (0, import_blocks32.createBlock)("core/html", {}, [], [text]);
        }
      }
    ]
  };
  var transforms_default13 = transforms12;

  // packages/block-library/build-module/html/index.mjs
  var { name: name38 } = block_default38;
  var settings38 = {
    icon: html_default,
    example: {
      innerContent: [
        "<marquee>" + (0, import_i18n90.__)("Welcome to the wonderful world of blocks\u2026") + "</marquee>"
      ]
    },
    edit: HTMLEdit,
    save: save21,
    transforms: transforms_default13
  };
  var init38 = () => initBlock({ name: name38, metadata: block_default38, settings: settings38 });

  // packages/block-library/build-module/icon/index.mjs
  var icon_exports = {};
  __export(icon_exports, {
    init: () => init39,
    metadata: () => block_default39,
    name: () => name39,
    settings: () => settings39
  });

  // packages/block-library/build-module/icon/edit.mjs
  var import_i18n93 = __toESM(require_i18n(), 1);
  var import_components52 = __toESM(require_components(), 1);
  var import_block_editor104 = __toESM(require_block_editor(), 1);
  var import_element71 = __toESM(require_element(), 1);
  var import_primitives165 = __toESM(require_primitives(), 1);
  var import_data47 = __toESM(require_data(), 1);
  var import_core_data24 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/icon/components/custom-inserter/index.mjs
  var import_i18n92 = __toESM(require_i18n(), 1);
  var import_components51 = __toESM(require_components(), 1);
  var import_element70 = __toESM(require_element(), 1);
  var import_compose25 = __toESM(require_compose(), 1);
  var import_data46 = __toESM(require_data(), 1);
  var import_core_data23 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/icon/components/custom-inserter/icon-grid.mjs
  var import_i18n91 = __toESM(require_i18n(), 1);
  var import_components50 = __toESM(require_components(), 1);
  var import_compose24 = __toESM(require_compose(), 1);
  var import_element69 = __toESM(require_element(), 1);
  var import_dom12 = __toESM(require_dom(), 1);
  var import_jsx_runtime305 = __toESM(require_jsx_runtime(), 1);
  var BATCH_SIZE = 20;
  function IconGrid({ icons, onChange, value }) {
    const shownIcons = (0, import_compose24.useAsyncList)(icons, {
      step: BATCH_SIZE
    });
    const selectedIconRef = (0, import_element69.useRef)();
    const selectedIndex = icons?.findIndex((icon2) => icon2.name === value) ?? -1;
    const isReadyToScroll = selectedIndex >= 0 && (shownIcons.length >= selectedIndex + BATCH_SIZE || shownIcons.length === icons.length);
    (0, import_element69.useLayoutEffect)(() => {
      const node = selectedIconRef.current;
      if (!isReadyToScroll || !node) {
        return;
      }
      if ((0, import_dom12.getScrollContainer)(node)?.scrollTop) {
        return;
      }
      node.scrollIntoView({ block: "center" });
    }, [isReadyToScroll]);
    return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "wp-block-icon__inserter-grid", children: !icons?.length ? /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "wp-block-icon__inserter-grid-no-results", children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("p", { children: (0, import_i18n91.__)("No results found.") }) }) : /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
      "div",
      {
        className: "wp-block-icon__inserter-grid-icons-list",
        "aria-label": (0, import_i18n91.__)("Icon library"),
        children: shownIcons.map((icon2) => {
          return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
            import_components50.Button,
            {
              ref: icon2.name === value ? selectedIconRef : void 0,
              className: "wp-block-icon__inserter-grid-icons-list-item",
              onClick: () => onChange(icon2.name),
              variant: icon2.name === value ? "primary" : void 0,
              __next40pxDefaultSize: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "wp-block-icon__inserter-grid-icons-list-item-icon", children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(html_renderer_default, { html: icon2.content }) }),
                /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "wp-block-icon__inserter-grid-icons-list-item-title", children: icon2.label })
              ]
            },
            icon2.name
          );
        })
      }
    ) });
  }

  // packages/block-library/build-module/utils/search-patterns.mjs
  var import_block_editor103 = __toESM(require_block_editor(), 1);
  var { normalizeString, searchItems } = unlock(import_block_editor103.privateApis);
  function normalizeSearchInput(input = "") {
    return normalizeString(input).trim();
  }
  function searchPatterns(patterns = [], searchValue = "") {
    return searchItems(patterns, searchValue, {
      fields: [{ get: (pattern) => pattern.title }]
    });
  }

  // packages/block-library/build-module/icon/components/custom-inserter/index.mjs
  var import_jsx_runtime306 = __toESM(require_jsx_runtime(), 1);
  function CustomInserterModal({ onClose, value, onChange }) {
    const [searchInput, setSearchInput] = (0, import_element70.useState)("");
    const [currentCollection, setCurrentCollection] = (0, import_element70.useState)(null);
    const debouncedSetSearchInput = (0, import_compose25.useDebounce)(setSearchInput, 300);
    const collections = (0, import_data46.useSelect)(
      (select10) => select10(import_core_data23.store).getEntityRecords(
        "root",
        "iconCollection"
      ),
      []
    );
    const selectedCollection = value?.split("/")[0];
    const collectionSlug = currentCollection ?? (collections?.some(({ slug }) => slug === selectedCollection) ? selectedCollection : collections?.[0]?.slug) ?? null;
    const { icons, hasResolvedIcons } = (0, import_data46.useSelect)(
      (select10) => {
        if (collectionSlug === null) {
          return { icons: null, hasResolvedIcons: false };
        }
        const query = collectionSlug === "" ? {} : { collection: collectionSlug };
        const { getEntityRecords, hasFinishedResolution } = select10(import_core_data23.store);
        return {
          icons: getEntityRecords("root", "icon", query),
          hasResolvedIcons: hasFinishedResolution("getEntityRecords", [
            "root",
            "icon",
            query
          ])
        };
      },
      [collectionSlug]
    );
    const filteredIcons = (0, import_element70.useMemo)(() => {
      if (!icons) {
        return [];
      }
      if (searchInput) {
        const input = normalizeSearchInput(searchInput);
        return icons.filter((icon2) => {
          const iconName = normalizeSearchInput(icon2.name);
          const iconLabel = normalizeSearchInput(icon2.label);
          return iconName.includes(input) || iconLabel.includes(input);
        });
      }
      return icons;
    }, [searchInput, icons]);
    return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
      import_components51.Modal,
      {
        className: "wp-block-icon__inserter-modal",
        title: (0, import_i18n92.__)("Icon library"),
        onRequestClose: onClose,
        isFullScreen: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
          tabs_exports.Root,
          {
            className: "wp-block-icon__inserter",
            orientation: "vertical",
            value: collectionSlug,
            onValueChange: setCurrentCollection,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
                Stack,
                {
                  direction: "column",
                  gap: "lg",
                  className: "wp-block-icon__inserter-sidebar",
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
                      import_components51.SearchControl,
                      {
                        value: searchInput,
                        onChange: debouncedSetSearchInput
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(tabs_exports.List, { children: [
                      /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(tabs_exports.Tab, { value: "", children: (0, import_i18n92.__)("All") }),
                      collections?.map((collection) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
                        tabs_exports.Tab,
                        {
                          value: collection.slug,
                          children: collection.label
                        },
                        collection.slug
                      ))
                    ] })
                  ]
                }
              ),
              [{ slug: "" }, ...collections ?? []].map(
                (collection) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
                  tabs_exports.Panel,
                  {
                    tabIndex: -1,
                    value: collection.slug,
                    className: "wp-block-icon__inserter-panel",
                    children: !hasResolvedIcons ? /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
                      "div",
                      {
                        className: "wp-block-icon__inserter-loading",
                        role: "status",
                        "aria-label": (0, import_i18n92.__)("Loading\u2026"),
                        children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_components51.Spinner, {})
                      }
                    ) : /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
                      IconGrid,
                      {
                        icons: filteredIcons,
                        onChange,
                        value
                      }
                    )
                  },
                  collection.slug
                )
              )
            ]
          }
        )
      }
    );
  }

  // packages/block-library/build-module/icon/edit.mjs
  var import_jsx_runtime307 = __toESM(require_jsx_runtime(), 1);
  var IconPlaceholder = ({ className, style: style2 }) => /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
    import_primitives165.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 60 60",
      preserveAspectRatio: "none",
      fill: "none",
      "aria-hidden": "true",
      className: clsx_default("wp-block-icon__placeholder", className),
      style: style2,
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_primitives165.Rect, { width: "60", height: "60", fill: "currentColor", fillOpacity: 0.1 }),
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_primitives165.Path,
          {
            vectorEffect: "non-scaling-stroke",
            stroke: "currentColor",
            strokeOpacity: 0.25,
            d: "M60 60 0 0"
          }
        )
      ]
    }
  );
  function Edit13({ attributes: attributes2, setAttributes }) {
    const { icon: icon2, ariaLabel, flipHorizontal, flipVertical, rotation } = attributes2;
    const [isInserterOpen, setInserterOpen] = (0, import_element71.useState)(false);
    const isContentOnlyMode = (0, import_block_editor104.useBlockEditingMode)() === "contentOnly";
    const colorProps = (0, import_block_editor104.__experimentalUseColorProps)(attributes2);
    const spacingProps = (0, import_block_editor104.__experimentalGetSpacingClassesAndStyles)({
      style: {
        spacing: {
          padding: attributes2.style?.spacing?.padding
        }
      }
    });
    const borderProps = (0, import_block_editor104.__experimentalUseBorderProps)(attributes2);
    const dimensionsProps = (0, import_block_editor104.getDimensionsClassesAndStyles)(attributes2);
    const selectedIcon = (0, import_data47.useSelect)(
      (select10) => {
        const { getEntityRecord } = select10(import_core_data24.store);
        return icon2 ? getEntityRecord("root", "icon", icon2) : null;
      },
      [icon2]
    );
    const iconToDisplay = selectedIcon?.content || "";
    const flipClasses = {
      "is-flip-horizontal": flipHorizontal,
      "is-flip-vertical": flipVertical
    };
    const rotationStyle = rotation ? { rotate: `${rotation}deg` } : {};
    const blockControls = /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_jsx_runtime307.Fragment, { children: [
      icon2 && /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_block_editor104.BlockControls, { group: "block", children: [
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.ToolbarButton,
          {
            icon: flip_horizontal_default,
            label: (0, import_i18n93.__)("Flip horizontal"),
            isPressed: flipHorizontal,
            onClick: () => setAttributes({
              flipHorizontal: !flipHorizontal
            })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.ToolbarButton,
          {
            icon: flip_vertical_default,
            label: (0, import_i18n93.__)("Flip vertical"),
            isPressed: flipVertical,
            onClick: () => setAttributes({
              flipVertical: !flipVertical
            })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.ToolbarButton,
          {
            icon: rotate_right_default,
            label: (0, import_i18n93.__)("Rotate"),
            onClick: () => setAttributes({
              rotation: ((rotation || 0) + 90) % 360
            })
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_block_editor104.BlockControls, { group: "other", children: [
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.ToolbarButton,
          {
            onClick: () => {
              setInserterOpen(true);
            },
            children: icon2 ? (0, import_i18n93.__)("Replace") : (0, import_i18n93.__)("Choose icon")
          }
        ),
        isContentOnlyMode && icon2 && // Add some extra controls for content attributes when content only mode is active.
        // With content only mode active, the inspector is hidden, so users need another way
        // to edit these attributes.
        /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.DropdownMenu,
          {
            icon: "",
            toggleProps: {
              as: import_components52.ToolbarButton
            },
            popoverProps: {
              className: "is-alternate"
            },
            text: (0, import_i18n93.__)("Label"),
            children: () => /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
              import_components52.TextControl,
              {
                className: "wp-block-icon__toolbar-content",
                label: (0, import_i18n93.__)("Label"),
                value: ariaLabel || "",
                onChange: (value) => setAttributes({
                  ariaLabel: value
                }),
                help: (0, import_i18n93.__)(
                  "Briefly describe the icon to help screen reader users. Leave blank for decorative icons."
                )
              }
            )
          }
        )
      ] })
    ] });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const inspectorControls = icon2 && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_jsx_runtime307.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(import_block_editor104.InspectorControls, { group: "settings", children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
      import_components52.__experimentalToolsPanel,
      {
        label: (0, import_i18n93.__)("Settings"),
        resetAll: () => setAttributes({
          ariaLabel: void 0
        }),
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
          import_components52.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n93.__)("Label"),
            isShownByDefault: true,
            hasValue: () => !!ariaLabel,
            onDeselect: () => setAttributes({ ariaLabel: void 0 }),
            children: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
              import_components52.TextControl,
              {
                label: (0, import_i18n93.__)("Label"),
                help: (0, import_i18n93.__)(
                  "Briefly describe the icon to help screen reader users. Leave blank for decorative icons."
                ),
                value: ariaLabel || "",
                onChange: (value) => setAttributes({ ariaLabel: value })
              }
            )
          }
        )
      }
    ) }) });
    return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(import_jsx_runtime307.Fragment, { children: [
      blockControls,
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime307.jsx)("div", { ...(0, import_block_editor104.useBlockProps)(), children: iconToDisplay ? /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
        html_renderer_default,
        {
          html: iconToDisplay,
          wrapperProps: {
            className: clsx_default(
              colorProps.className,
              borderProps.className,
              spacingProps.className,
              dimensionsProps.className,
              flipClasses
            ),
            style: {
              ...colorProps.style,
              ...borderProps.style,
              ...spacingProps.style,
              ...dimensionsProps.style,
              ...rotationStyle
            }
          }
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
        IconPlaceholder,
        {
          className: clsx_default(
            borderProps.className,
            spacingProps.className,
            dimensionsProps.className,
            flipClasses
          ),
          style: {
            ...borderProps.style,
            ...spacingProps.style,
            ...dimensionsProps.style,
            ...rotationStyle,
            height: "auto"
          }
        }
      ) }),
      isInserterOpen && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
        CustomInserterModal,
        {
          onClose: () => setInserterOpen(false),
          value: attributes2.icon,
          onChange: (name118) => {
            setAttributes({ icon: name118 });
            setInserterOpen(false);
          }
        }
      )
    ] });
  }
  var edit_default13 = Edit13;

  // packages/block-library/build-module/icon/block.json
  var block_default39 = {
    apiVersion: 3,
    $schema: "https://schemas.wp.org/trunk/block.json",
    name: "core/icon",
    title: "Icon",
    category: "media",
    description: "Insert an SVG icon.",
    keywords: ["icon", "svg"],
    textdomain: "default",
    attributes: {
      icon: {
        type: "string",
        role: "content"
      },
      flipHorizontal: {
        type: "boolean",
        default: false
      },
      flipVertical: {
        type: "boolean",
        default: false
      },
      rotation: {
        type: "number",
        default: 0
      }
    },
    supports: {
      anchor: true,
      ariaLabel: {
        __experimentalSkipSerialization: true
      },
      align: ["left", "center", "right"],
      html: false,
      color: {
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: false,
          radius: false,
          style: false,
          width: false
        }
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalSkipSerialization: ["padding"],
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      dimensions: {
        width: true,
        __experimentalSkipSerialization: ["width"],
        __experimentalDefaultControls: {
          width: true
        }
      }
    },
    selectors: {
      root: ".wp-block-icon svg",
      css: ".wp-block-icon",
      spacing: {
        margin: ".wp-block-icon"
      }
    },
    style: "wp-block-icon",
    editorStyle: "wp-block-icon-editor"
  };

  // packages/block-library/build-module/icon/icon.mjs
  var import_components54 = __toESM(require_components(), 1);
  var import_jsx_runtime308 = __toESM(require_jsx_runtime(), 1);
  var icon = /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_components54.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(import_components54.Path, { d: "M6 9.5h3.5V6H6v3.5Zm5 .5a1 1 0 0 1-.898.995L10 11H5.5l-.103-.005a1 1 0 0 1-.892-.893L4.5 10V5.5a1 1 0 0 1 1-1H10a1 1 0 0 1 1 1V10ZM18.25 7.75a2 2 0 1 0-4 0 2 2 0 0 0 4 0Zm1.5 0a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM6.88 13.535a1 1 0 0 1 1.74 0l2.534 4.472a1 1 0 0 1-.87 1.493H5.216a1 1 0 0 1-.87-1.493l2.534-4.472ZM6.074 18h3.352L7.75 15.041l-1.676 2.96ZM14.952 13h2.596a1 1 0 0 1 .866.5l1.298 2.25a1 1 0 0 1 0 1L18.414 19l-.074.11a1 1 0 0 1-.792.39h-2.596a1 1 0 0 1-.792-.39l-.074-.11-1.298-2.25a1.001 1.001 0 0 1 0-1l1.298-2.25a1 1 0 0 1 .866-.5Zm-.72 3.25 1.01 1.75h2.017l1.009-1.75-1.01-1.75h-2.017l-1.01 1.75Z" }) });
  var icon_default2 = icon;

  // packages/block-library/build-module/icon/variations.mjs
  var variations9 = [
    {
      name: "default",
      isDefault: true,
      attributes: { icon: "core/info" }
    }
  ];
  var variations_default9 = variations9;

  // packages/block-library/build-module/icon/index.mjs
  var { name: name39 } = block_default39;
  var settings39 = {
    icon: icon_default2,
    example: {
      attributes: {
        icon: "core/info",
        style: {
          dimensions: {
            width: "48px"
          }
        }
      }
    },
    variations: variations_default9,
    edit: edit_default13
  };
  var init39 = () => initBlock({ name: name39, metadata: block_default39, settings: settings39 });

  // packages/block-library/build-module/image/index.mjs
  var image_exports = {};
  __export(image_exports, {
    init: () => init40,
    metadata: () => block_default40,
    name: () => name40,
    settings: () => settings40
  });
  var import_i18n96 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/image/deprecated.mjs
  var import_block_editor105 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime309 = __toESM(require_jsx_runtime(), 1);
  var v118 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height } = attributes2;
      const extraImageProps = width || height ? { width, height } : {};
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("img", { src: url, alt, ...extraImageProps });
      let figureStyle = {};
      if (width) {
        figureStyle = { width };
      } else if (align === "left" || align === "right") {
        figureStyle = { maxWidth: "50%" };
      }
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
        "figure",
        {
          className: align ? `align${align}` : null,
          style: figureStyle,
          children: [
            href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("a", { href, children: image }) : image,
            !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor105.RichText.Content, { tagName: "figcaption", value: caption })
          ]
        }
      );
    }
  };
  var v29 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height, id } = attributes2;
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("figure", { className: align ? `align${align}` : null, children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("a", { href, children: image }) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor105.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v36 = {
    attributes: {
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "array",
        source: "children",
        selector: "figcaption"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      id: {
        type: "number"
      },
      align: {
        type: "string"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      linkDestination: {
        type: "string",
        default: "none"
      }
    },
    save({ attributes: attributes2 }) {
      const { url, alt, caption, align, href, width, height, id } = attributes2;
      const classes = clsx_default({
        [`align${align}`]: align,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height
        }
      );
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("figure", { className: classes, children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("a", { href, children: image }) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor105.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v44 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor105.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
      if ("left" === align || "right" === align || "center" === align) {
        return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("div", { ...import_block_editor105.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { className: classes, children: figure }) });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v54 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: ""
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        __experimentalDuotone: "img",
        text: false,
        background: false
      },
      __experimentalBorder: {
        radius: true,
        __experimentalDefaultControls: {
          radius: true
        }
      },
      __experimentalStyle: {
        spacing: {
          margin: "0 0 1em 0"
        }
      }
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: id ? `wp-image-${id}` : null,
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(import_block_editor105.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v64 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate(attributes2) {
      const { height, width } = attributes2;
      return {
        ...attributes2,
        width: typeof width === "number" ? `${width}px` : width,
        height: typeof height === "number" ? `${height}px` : height
      };
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor105.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale
          },
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          import_block_editor105.RichText.Content,
          {
            className: (0, import_block_editor105.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v73 = {
    attributes: {
      align: {
        type: "string"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate(attributes2) {
      const { width, height } = attributes2;
      return {
        ...attributes2,
        width: typeof width === "number" ? `${width}px` : width,
        height: typeof height === "number" ? `${height}px` : height
      };
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor105.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale,
            width,
            height
          },
          width,
          height,
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          import_block_editor105.RichText.Content,
          {
            className: (0, import_block_editor105.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v82 = {
    attributes: {
      align: {
        type: "string"
      },
      behaviors: {
        type: "object"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        role: "content"
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      }
    },
    migrate({ width, height, ...attributes2 }) {
      if (!attributes2.behaviors?.lightbox) {
        return attributes2;
      }
      const {
        behaviors: {
          lightbox: { enabled }
        }
      } = attributes2;
      const newAttributes = {
        ...attributes2,
        lightbox: {
          enabled
        }
      };
      delete newAttributes.behaviors;
      return newAttributes;
    },
    isEligible(attributes2) {
      return !!attributes2.behaviors;
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        id,
        linkTarget,
        sizeSlug,
        title
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor105.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default({
        [`align${align}`]: align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            aspectRatio,
            objectFit: scale,
            width,
            height
          },
          title
        }
      );
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        !import_block_editor105.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          import_block_editor105.RichText.Content,
          {
            className: (0, import_block_editor105.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var v92 = {
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      lightbox: {
        type: "object",
        enabled: {
          type: "boolean"
        }
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      focalPoint: {
        type: "object"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      }
    },
    supports: {
      interactivity: true,
      align: ["left", "center", "right", "wide", "full"],
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      spacing: {
        margin: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      shadow: {
        __experimentalSkipSerialization: true
      }
    },
    save({ attributes: attributes2 }) {
      const {
        url,
        alt,
        caption,
        align,
        href,
        rel,
        linkClass,
        width,
        height,
        aspectRatio,
        scale,
        focalPoint,
        id,
        linkTarget,
        sizeSlug,
        title,
        metadata: { bindings = {} } = {}
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      const borderProps = (0, import_block_editor105.__experimentalGetBorderClassesAndStyles)(attributes2);
      const shadowProps = (0, import_block_editor105.__experimentalGetShadowClassesAndStyles)(attributes2);
      const classes = clsx_default({
        alignnone: "none" === align,
        [`size-${sizeSlug}`]: sizeSlug,
        "is-resized": width || height,
        "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
      });
      const imageClasses = clsx_default(borderProps.className, {
        [`wp-image-${id}`]: !!id
      });
      const image = /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
        "img",
        {
          src: url,
          alt,
          className: imageClasses || void 0,
          style: {
            ...borderProps.style,
            ...shadowProps.style,
            aspectRatio,
            objectFit: scale,
            objectPosition: focalPoint && scale ? mediaPosition2(focalPoint) : void 0,
            width,
            height
          },
          title
        }
      );
      const displayCaption = !import_block_editor105.RichText.isEmpty(caption) || bindings.caption || bindings?.__default?.source === "core/pattern-overrides";
      const figure = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(import_jsx_runtime309.Fragment, { children: [
        href ? /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        ) : image,
        displayCaption && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
          import_block_editor105.RichText.Content,
          {
            className: (0, import_block_editor105.__experimentalGetElementClassName)(
              "caption"
            ),
            tagName: "figcaption",
            value: caption
          }
        )
      ] });
      return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("figure", { ...import_block_editor105.useBlockProps.save({ className: classes }), children: figure });
    }
  };
  var deprecated_default20 = [v92, v82, v73, v64, v54, v44, v36, v29, v118];

  // packages/block-library/build-module/image/edit.mjs
  var import_blob12 = __toESM(require_blob(), 1);
  var import_blocks34 = __toESM(require_blocks(), 1);
  var import_components56 = __toESM(require_components(), 1);
  var import_data50 = __toESM(require_data(), 1);
  var import_block_editor108 = __toESM(require_block_editor(), 1);
  var import_element75 = __toESM(require_element(), 1);
  var import_i18n95 = __toESM(require_i18n(), 1);
  var import_notices8 = __toESM(require_notices(), 1);
  var import_compose28 = __toESM(require_compose(), 1);
  var import_url13 = __toESM(require_url(), 1);
  var import_upload_media = __toESM(require_upload_media(), 1);

  // packages/block-library/build-module/image/image.mjs
  var import_components55 = __toESM(require_components(), 1);
  var import_compose26 = __toESM(require_compose(), 1);
  var import_data49 = __toESM(require_data(), 1);
  var import_block_editor107 = __toESM(require_block_editor(), 1);
  var import_element73 = __toESM(require_element(), 1);
  var import_i18n94 = __toESM(require_i18n(), 1);
  var import_url12 = __toESM(require_url(), 1);
  var import_blocks33 = __toESM(require_blocks(), 1);
  var import_notices7 = __toESM(require_notices(), 1);
  var import_core_data26 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/image/use-open-image-media-editor-modal.mjs
  var import_core_data25 = __toESM(require_core_data(), 1);
  var import_block_editor106 = __toESM(require_block_editor(), 1);
  var import_dom13 = __toESM(require_dom(), 1);
  var import_data48 = __toESM(require_data(), 1);
  var import_element72 = __toESM(require_element(), 1);
  function normalizeImageBlockCaption(caption) {
    if (typeof caption !== "string") {
      return "";
    }
    const textContent = (0, import_dom13.__unstableStripHTML)(caption).trim();
    if (!textContent) {
      return "";
    }
    return caption.replace(/\n/g, "<br>");
  }
  function getAttachmentCaption(attachment) {
    const caption = attachment?.caption;
    if (typeof caption === "string") {
      return normalizeImageBlockCaption(caption);
    }
    if (caption && typeof caption === "object" && Object.hasOwn(caption, "raw")) {
      return normalizeImageBlockCaption(caption.raw);
    }
    return void 0;
  }
  function getImageBlockMetadataFromAttachment(attachment) {
    return {
      alt: typeof attachment?.alt_text === "string" ? attachment.alt_text : attachment?.alt || "",
      caption: getAttachmentCaption(attachment)
    };
  }
  function normalizeMetadataAttribute(value) {
    return value || "";
  }
  function getSyncedImageBlockAttributes(currentAttributes, originalAttachment, updatedAttachment) {
    if (!originalAttachment || !updatedAttachment) {
      return {};
    }
    const originalMetadata = getImageBlockMetadataFromAttachment(originalAttachment);
    const updatedMetadata = getImageBlockMetadataFromAttachment(updatedAttachment);
    const syncedAttributes = {};
    const normalizedCurrentAlt = normalizeMetadataAttribute(
      currentAttributes.alt
    );
    if (originalMetadata.alt !== updatedMetadata.alt && (normalizedCurrentAlt === originalMetadata.alt || !normalizedCurrentAlt)) {
      syncedAttributes.alt = updatedMetadata.alt;
    }
    const normalizedCurrentCaption = normalizeMetadataAttribute(
      currentAttributes.caption
    );
    if (originalMetadata.caption !== void 0 && updatedMetadata.caption !== void 0 && originalMetadata.caption !== updatedMetadata.caption && (normalizedCurrentCaption === originalMetadata.caption || !normalizedCurrentCaption)) {
      syncedAttributes.caption = updatedMetadata.caption || void 0;
    }
    return syncedAttributes;
  }
  function getNewAttachmentSizeAttributes(sizeSlug, attachment) {
    const sizes = attachment.media_details?.sizes;
    if (!sizeSlug || sizeSlug === DEFAULT_MEDIA_SIZE_SLUG3 || !sizes) {
      return void 0;
    }
    const sizeUrl = sizes[sizeSlug]?.source_url;
    if (sizeUrl) {
      return { url: sizeUrl };
    }
    const fullUrl = attachment.source_url ?? sizes.full?.source_url;
    return fullUrl ? { url: fullUrl, sizeSlug: DEFAULT_MEDIA_SIZE_SLUG3 } : void 0;
  }
  function getNewAttachmentLinkAttributes(linkDestination, attachment) {
    if (linkDestination === LINK_DESTINATION_MEDIA2) {
      return attachment.source_url ? { href: attachment.source_url } : void 0;
    }
    if (linkDestination === LINK_DESTINATION_ATTACHMENT2) {
      return attachment.link ? { href: attachment.link } : void 0;
    }
    return void 0;
  }
  function getNewAttachmentImageBlockAttributes(blockAttributes8, attachment) {
    if (!attachment) {
      return void 0;
    }
    return {
      ...getNewAttachmentSizeAttributes(
        blockAttributes8.sizeSlug,
        attachment
      ),
      ...getNewAttachmentLinkAttributes(
        blockAttributes8.linkDestination,
        attachment
      )
    };
  }
  var { openMediaEditorModalKey: openMediaEditorModalKey2 } = unlock(import_block_editor106.privateApis);
  function getAttachmentFallbackForEmptyBlockMetadata({ alt, caption }) {
    const attachment = {};
    if (!alt) {
      attachment.alt_text = "";
    }
    if (!caption?.toString()) {
      attachment.caption = "";
    }
    return Object.keys(attachment).length ? attachment : void 0;
  }
  function hasKnownAttachmentMetadata(attachment) {
    if (!attachment) {
      return false;
    }
    const hasKnownAlt = typeof attachment.alt_text === "string" || typeof attachment.alt === "string";
    const hasKnownCaption = getImageBlockMetadataFromAttachment(attachment).caption !== void 0;
    return hasKnownAlt && hasKnownCaption;
  }
  function useOpenImageMediaEditorModal({
    attributes: attributes2,
    setAttributes,
    onClose,
    onUrlChange
  }) {
    const { id, url, alt, caption, sizeSlug, linkDestination } = attributes2;
    const registry = (0, import_data48.useRegistry)();
    const openMediaEditorModal = (0, import_data48.useSelect)(
      (select10) => select10(import_block_editor106.store).getSettings()[openMediaEditorModalKey2],
      []
    );
    const blockAttributesRef = (0, import_element72.useRef)({
      id,
      url,
      alt,
      caption: caption?.toString(),
      sizeSlug,
      linkDestination
    });
    const mediaEditorMetadataBaselineRef = (0, import_element72.useRef)();
    const mediaEditorMetadataSyncRequestRef = (0, import_element72.useRef)(0);
    const mediaEditorUndoMetadataRef = (0, import_element72.useRef)();
    (0, import_element72.useEffect)(() => {
      blockAttributesRef.current = {
        id,
        url,
        alt,
        caption: caption?.toString(),
        sizeSlug,
        linkDestination
      };
    }, [alt, caption, id, linkDestination, sizeSlug, url]);
    const getCachedAttachmentRecord = (0, import_element72.useCallback)(
      (attachmentId) => registry.select(import_core_data25.store).getEditedEntityRecord(
        "postType",
        "attachment",
        attachmentId
      ),
      [registry]
    );
    const resolveAttachmentRecord = (0, import_element72.useCallback)(
      async (attachmentId) => {
        const resolveSelect = registry.resolveSelect(import_core_data25.store);
        try {
          return await resolveSelect.getEntityRecord(
            "postType",
            "attachment",
            attachmentId
          );
        } catch {
          return void 0;
        }
      },
      [registry]
    );
    const resolveFreshAttachmentRecord = (0, import_element72.useCallback)(
      async (attachmentId) => {
        const { invalidateResolution } = registry.dispatch(import_core_data25.store);
        invalidateResolution("getEntityRecord", [
          "postType",
          "attachment",
          attachmentId
        ]);
        return resolveAttachmentRecord(attachmentId);
      },
      [registry, resolveAttachmentRecord]
    );
    const handleMediaUpdate = (0, import_element72.useCallback)(
      async ({ id: newId, url: newUrl }) => {
        if (typeof newId !== "number") {
          return;
        }
        const originalAttachment = mediaEditorMetadataBaselineRef.current;
        mediaEditorMetadataBaselineRef.current = void 0;
        const undoMetadata = mediaEditorUndoMetadataRef.current;
        mediaEditorUndoMetadataRef.current = void 0;
        const syncRequest = ++mediaEditorMetadataSyncRequestRef.current;
        const nextAttributes = {};
        const currentBlockAttributes = blockAttributesRef.current;
        const isNewAttachment = newId !== currentBlockAttributes.id;
        if (isNewAttachment) {
          nextAttributes.id = newId;
          nextAttributes.url = newUrl ?? currentBlockAttributes.url;
          if (nextAttributes.url !== currentBlockAttributes.url) {
            onUrlChange?.(nextAttributes.url);
          }
          blockAttributesRef.current = {
            ...blockAttributesRef.current,
            id: nextAttributes.id,
            url: nextAttributes.url
          };
        }
        if (originalAttachment || isNewAttachment) {
          const resolvedAttachment = await resolveFreshAttachmentRecord(newId);
          if (syncRequest !== mediaEditorMetadataSyncRequestRef.current) {
            return;
          }
          const attachmentRecord = resolvedAttachment ?? getCachedAttachmentRecord(newId);
          const latestBlockAttributes = blockAttributesRef.current;
          if (originalAttachment) {
            const resolvedMetadataAttributes = getSyncedImageBlockAttributes(
              latestBlockAttributes,
              originalAttachment,
              attachmentRecord
            );
            if (Object.keys(resolvedMetadataAttributes).length) {
              Object.assign(
                nextAttributes,
                resolvedMetadataAttributes
              );
              if (isNewAttachment) {
                mediaEditorUndoMetadataRef.current = {
                  id: currentBlockAttributes.id,
                  attributes: Object.fromEntries(
                    Object.keys(
                      resolvedMetadataAttributes
                    ).map((key) => [
                      key,
                      latestBlockAttributes[key]
                    ])
                  )
                };
              }
            }
          }
          if (isNewAttachment) {
            const derivedAttributes = getNewAttachmentImageBlockAttributes(
              latestBlockAttributes,
              attachmentRecord
            );
            if (derivedAttributes) {
              Object.assign(nextAttributes, derivedAttributes);
              if (derivedAttributes.url && derivedAttributes.url !== latestBlockAttributes.url) {
                onUrlChange?.(derivedAttributes.url);
              }
            }
          }
        }
        if (undoMetadata?.id === newId) {
          Object.assign(nextAttributes, undoMetadata.attributes);
        }
        if (Object.keys(nextAttributes).length) {
          blockAttributesRef.current = {
            ...blockAttributesRef.current,
            ...nextAttributes
          };
          setAttributes(nextAttributes);
        }
      },
      [
        getCachedAttachmentRecord,
        onUrlChange,
        resolveFreshAttachmentRecord,
        setAttributes
      ]
    );
    const openImageMediaEditorModal = (0, import_element72.useCallback)(async () => {
      if (!id || !openMediaEditorModal) {
        return;
      }
      mediaEditorUndoMetadataRef.current = void 0;
      const cachedAttachmentRecord = getCachedAttachmentRecord(id);
      const fallbackAttachmentRecord = getAttachmentFallbackForEmptyBlockMetadata(
        blockAttributesRef.current
      );
      const resolvedAttachmentRecord = hasKnownAttachmentMetadata(
        cachedAttachmentRecord
      ) ? void 0 : await resolveAttachmentRecord(id);
      mediaEditorMetadataBaselineRef.current = resolvedAttachmentRecord || (hasKnownAttachmentMetadata(cachedAttachmentRecord) ? cachedAttachmentRecord : fallbackAttachmentRecord) || cachedAttachmentRecord;
      openMediaEditorModal({
        id,
        onUpdate: handleMediaUpdate,
        onClose
      });
    }, [
      getCachedAttachmentRecord,
      handleMediaUpdate,
      id,
      onClose,
      openMediaEditorModal,
      resolveAttachmentRecord
    ]);
    return id && openMediaEditorModal ? openImageMediaEditorModal : void 0;
  }

  // packages/block-library/build-module/image/image.mjs
  var import_jsx_runtime310 = __toESM(require_jsx_runtime(), 1);
  var {
    DimensionsTool,
    ResolutionTool: ResolutionTool2,
    mediaEditKey,
    mediaSideloadFromUrlKey
  } = unlock(import_block_editor107.privateApis);
  var scaleOptions = [
    {
      value: "cover",
      label: (0, import_i18n94._x)("Cover", "Scale option for dimensions control"),
      help: (0, import_i18n94.__)("Image covers the space evenly.")
    },
    {
      value: "contain",
      label: (0, import_i18n94._x)("Contain", "Scale option for dimensions control"),
      help: (0, import_i18n94.__)("Image is contained without distortion.")
    }
  ];
  var WRITEMODE_POPOVER_PROPS = {
    placement: "bottom-start"
  };
  var ImageWrapper = ({ href, children }) => {
    if (!href) {
      return children;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
      "a",
      {
        href,
        onClick: (event) => event.preventDefault(),
        "aria-disabled": true,
        style: {
          // When the Image block is linked,
          // it's wrapped with a disabled <a /> tag.
          // Restore cursor style so it doesn't appear 'clickable'
          // and remove pointer events. Safari needs the display property.
          pointerEvents: "none",
          cursor: "default",
          display: "inline"
        },
        children
      }
    );
  };
  function ContentOnlyControls({
    attributes: attributes2,
    setAttributes,
    lockAltControls,
    lockAltControlsMessage,
    lockTitleControls,
    lockTitleControlsMessage
  }) {
    const [popoverAnchor, setPopoverAnchor] = (0, import_element73.useState)(null);
    const [isAltDialogOpen, setIsAltDialogOpen] = (0, import_element73.useState)(false);
    const [isTitleDialogOpen, setIsTitleDialogOpen] = (0, import_element73.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.ToolbarItem, { ref: setPopoverAnchor, children: (toggleProps) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.DropdownMenu,
        {
          icon: chevron_down_default,
          label: (0, import_i18n94.__)("More"),
          toggleProps: {
            ...toggleProps,
            description: (0, import_i18n94.__)("Displays more controls.")
          },
          popoverProps: WRITEMODE_POPOVER_PROPS,
          children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.MenuItem,
              {
                onClick: () => {
                  setIsAltDialogOpen(true);
                  onClose();
                },
                "aria-haspopup": "dialog",
                children: (0, import_i18n94._x)(
                  "Alternative text",
                  "Alternative text for an image. Block toolbar label, a low character count is preferred."
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.MenuItem,
              {
                onClick: () => {
                  setIsTitleDialogOpen(true);
                  onClose();
                },
                "aria-haspopup": "dialog",
                children: (0, import_i18n94.__)("Title text")
              }
            )
          ] })
        }
      ) }),
      isAltDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.Popover,
        {
          placement: "bottom-start",
          anchor: popoverAnchor,
          onClose: () => setIsAltDialogOpen(false),
          offset: 13,
          variant: "toolbar",
          children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
            import_components55.TextareaControl,
            {
              className: "wp-block-image__toolbar_content_textarea",
              label: (0, import_i18n94.__)("Alternative text"),
              value: attributes2.alt || "",
              onChange: (value) => setAttributes({ alt: value }),
              disabled: lockAltControls,
              help: lockAltControls ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_jsx_runtime310.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                  import_components55.ExternalLink,
                  {
                    href: (
                      // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                      (0, import_i18n94.__)(
                        "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                      )
                    ),
                    children: (0, import_i18n94.__)(
                      "Describe the purpose of the image."
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("br", {}),
                (0, import_i18n94.__)("Leave empty if decorative.")
              ] })
            }
          ) })
        }
      ),
      isTitleDialogOpen && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.Popover,
        {
          placement: "bottom-start",
          anchor: popoverAnchor,
          onClose: () => setIsTitleDialogOpen(false),
          offset: 13,
          variant: "toolbar",
          children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
            import_components55.TextControl,
            {
              className: "wp-block-image__toolbar_content_textarea",
              label: (0, import_i18n94.__)("Title attribute"),
              value: attributes2.title || "",
              onChange: (value) => setAttributes({
                title: value
              }),
              disabled: lockTitleControls,
              help: lockTitleControls ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_jsx_runtime310.Fragment, { children: lockTitleControlsMessage }) : (0, import_element73.createInterpolateElement)(
                (0, import_i18n94.__)(
                  "Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"
                ),
                {
                  a: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" })
                }
              )
            }
          ) })
        }
      )
    ] });
  }
  function Image2({
    temporaryURL,
    isSideloading,
    attributes: attributes2,
    setAttributes,
    isSingleSelected,
    insertBlocksAfter,
    onReplace,
    onSelectImage,
    onSelectURL,
    onUploadError,
    context,
    clientId,
    blockEditingMode,
    parentLayoutType,
    maxContentWidth
  }) {
    const {
      url = "",
      alt,
      align,
      id,
      href,
      rel,
      linkClass,
      linkDestination,
      title,
      width,
      height,
      aspectRatio,
      scale,
      focalPoint,
      linkTarget,
      sizeSlug,
      lightbox,
      metadata,
      isDecorative
    } = attributes2;
    const [imageElement, setImageElement] = (0, import_element73.useState)();
    const [resizeDelta, setResizeDelta] = (0, import_element73.useState)(null);
    const [pixelSize, setPixelSize] = (0, import_element73.useState)({});
    const [offsetTop, setOffsetTop] = (0, import_element73.useState)(0);
    const setResizeObserved = (0, import_compose26.useResizeObserver)(([entry]) => {
      if (!resizeDelta) {
        const [box] = entry.borderBoxSize;
        setPixelSize({ width: box.inlineSize, height: box.blockSize });
      }
      setOffsetTop(entry.target.offsetTop);
    });
    const effectResizeableBoxPlacement = (0, import_element73.useCallback)(() => {
      setOffsetTop(imageElement?.offsetTop ?? 0);
    }, [imageElement]);
    const setRefs = (0, import_compose26.useMergeRefs)([setImageElement, setResizeObserved]);
    const { allowResize = true, imageCrop = false } = context;
    const isCroppedGalleryImage = imageCrop && parentLayoutType === "flex";
    const { image, attachmentResolutionError } = (0, import_data49.useSelect)(
      (select10) => {
        const imageRecord = id && isSingleSelected ? select10(import_core_data26.store).getEntityRecord(
          "postType",
          "attachment",
          id,
          { context: "view" }
        ) : null;
        const resolutionError = id && isSingleSelected ? select10(import_core_data26.store).getResolutionError(
          "getEntityRecord",
          [
            "postType",
            "attachment",
            id,
            { context: "view" }
          ]
        ) : null;
        return {
          image: imageRecord,
          attachmentResolutionError: resolutionError
        };
      },
      [id, isSingleSelected]
    );
    const {
      canInsertCover,
      imageEditing,
      imageSizes,
      maxWidth,
      editMediaEntity
    } = (0, import_data49.useSelect)(
      (select10) => {
        const { getBlockRootClientId, canInsertBlockType, getSettings: getSettings22 } = select10(import_block_editor107.store);
        const rootClientId = getBlockRootClientId(clientId);
        const settings117 = getSettings22();
        return {
          imageEditing: settings117.imageEditing,
          imageSizes: settings117.imageSizes,
          maxWidth: settings117.maxWidth,
          editMediaEntity: settings117?.[mediaEditKey],
          canInsertCover: canInsertBlockType(
            "core/cover",
            rootClientId
          )
        };
      },
      [clientId]
    );
    const { getBlock, getSettings: getSettings2 } = (0, import_data49.useSelect)(import_block_editor107.store);
    const cropButtonRef = (0, import_element73.useRef)();
    const [pendingSwapUrl, setPendingSwapUrl] = (0, import_element73.useState)();
    const isSwappingMedia = !!pendingSwapUrl;
    const handleMediaEditorModalClose = (0, import_element73.useCallback)(
      () => cropButtonRef.current?.focus(),
      []
    );
    const openImageMediaEditorModal = useOpenImageMediaEditorModal({
      attributes: attributes2,
      setAttributes,
      onClose: handleMediaEditorModalClose,
      onUrlChange: setPendingSwapUrl
    });
    const {
      replaceBlocks,
      toggleSelection,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data49.useDispatch)(import_block_editor107.store);
    const { createErrorNotice, createSuccessNotice } = (0, import_data49.useDispatch)(import_notices7.store);
    const { editEntityRecord } = (0, import_data49.useDispatch)(import_core_data26.store);
    const isLargeViewport = (0, import_compose26.useViewportMatch)("medium");
    const isWideAligned = ["wide", "full"].includes(align);
    const [
      { loadedNaturalWidth, loadedNaturalHeight },
      setLoadedNaturalSize
    ] = (0, import_element73.useState)({});
    const [hasImageErrored, setHasImageErrored] = (0, import_element73.useState)(false);
    const hasNonContentControls = blockEditingMode === "default";
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const showDimensionsControls = allowResize && hasNonContentControls;
    const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
    const isUploading = !!temporaryURL || isSideloading;
    const imageSizeOptions = imageSizes.filter(
      ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
    ).map(({ name: name118, slug }) => ({ value: slug, label: name118 }));
    (0, import_element73.useEffect)(() => {
      if (!id || !isSingleSelected) {
        return;
      }
      if (attachmentResolutionError?.status === 404) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ id: void 0 });
      }
    }, [
      id,
      isSingleSelected,
      attachmentResolutionError,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const canUploadExternalImage = isSingleSelected && isExternalImage(id, url) && !!getSettings2()[mediaSideloadFromUrlKey];
    const { naturalWidth, naturalHeight } = (0, import_element73.useMemo)(() => {
      return {
        naturalWidth: imageElement?.naturalWidth || loadedNaturalWidth || void 0,
        naturalHeight: imageElement?.naturalHeight || loadedNaturalHeight || void 0
      };
    }, [loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete]);
    (0, import_element73.useEffect)(() => {
      if (pendingSwapUrl && pendingSwapUrl === url && imageElement?.complete) {
        setPendingSwapUrl(void 0);
      }
    }, [pendingSwapUrl, url, imageElement]);
    function onImageError() {
      setPendingSwapUrl(void 0);
      setHasImageErrored(true);
      const embedBlock = createUpgradedEmbedBlock({ attributes: { url } });
      if (void 0 !== embedBlock && onReplace) {
        onReplace(embedBlock);
      }
    }
    function onImageLoad(event) {
      setPendingSwapUrl(void 0);
      setHasImageErrored(false);
      setLoadedNaturalSize({
        loadedNaturalWidth: event.target?.naturalWidth,
        loadedNaturalHeight: event.target?.naturalHeight
      });
    }
    function onSetHref(props) {
      setAttributes(props);
    }
    function onSetLightbox(enable) {
      if (enable && !lightboxSetting?.enabled) {
        setAttributes({
          lightbox: { enabled: true },
          isDecorative: false
        });
      } else if (!enable && lightboxSetting?.enabled) {
        setAttributes({
          lightbox: { enabled: false }
        });
      } else {
        setAttributes({
          lightbox: void 0
        });
      }
    }
    function resetLightbox() {
      if (lightboxSetting?.enabled && lightboxSetting?.allowEditing) {
        setAttributes({
          lightbox: { enabled: false }
        });
      } else {
        setAttributes({
          lightbox: void 0
        });
      }
    }
    function onSetTitle(value) {
      setAttributes({ title: value });
    }
    function updateAlt(newAlt) {
      setAttributes({ alt: newAlt });
    }
    function updateIsDecorative(value) {
      setAttributes({
        isDecorative: value || void 0,
        ...value && {
          alt: "",
          caption: void 0,
          href: void 0,
          linkDestination: void 0,
          linkTarget: void 0,
          rel: void 0
        }
      });
    }
    const imperativeFocalPointPreview = (value) => {
      if (imageElement) {
        imageElement.style.setProperty(
          "object-position",
          mediaPosition2(value)
        );
      }
    };
    function updateImage(newSizeSlug) {
      const newUrl = image?.media_details?.sizes?.[newSizeSlug]?.source_url;
      if (!newUrl) {
        return null;
      }
      setAttributes({
        url: newUrl,
        sizeSlug: newSizeSlug
      });
    }
    function uploadExternal() {
      const mediaSideloadFromUrl = getSettings2()[mediaSideloadFromUrlKey];
      if (!mediaSideloadFromUrl) {
        return;
      }
      mediaSideloadFromUrl({
        url,
        onSuccess(img2) {
          onSelectImage(img2);
          createSuccessNotice((0, import_i18n94.__)("Image uploaded."), {
            type: "snackbar"
          });
        },
        onError(message) {
          createErrorNotice(message, { type: "snackbar" });
        }
      });
    }
    const canEditImage = id && naturalWidth && naturalHeight && imageEditing && !!editMediaEntity;
    const allowCrop = isSingleSelected && canEditImage && !!openImageMediaEditorModal && !isContentOnlyMode && !isUploading;
    function switchToCover() {
      replaceBlocks(
        clientId,
        (0, import_blocks33.switchToBlockType)(getBlock(clientId), "core/cover")
      );
    }
    const dimensionsUnitsOptions = (0, import_components55.__experimentalUseCustomUnits)({
      availableUnits: ["px"]
    });
    const [lightboxSetting] = (0, import_block_editor107.useSettings)("lightbox");
    const showLightboxSetting = (
      // If a block-level override is set, we should give users the option to
      // remove that override, even if the lightbox UI is disabled in the settings.
      !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing
    );
    const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { selectedStyleState, hasSelectedStyleState } = (0, import_data49.useSelect)(
      (select10) => {
        if (!isSingleSelected) {
          return {
            selectedStyleState: void 0,
            hasSelectedStyleState: false
          };
        }
        const { getSelectedBlockStyleState, hasSelectedBlockStyleState } = select10(import_block_editor107.store);
        return {
          selectedStyleState: getSelectedBlockStyleState(clientId),
          hasSelectedStyleState: hasSelectedBlockStyleState(clientId)
        };
      },
      [clientId, isSingleSelected]
    );
    const selectedStyleStateKey = getStyleStateKey(selectedStyleState);
    const activeWidth = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "width"
    });
    const activeHeight = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "height"
    });
    const activeAspectRatio = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "aspectRatio"
    });
    const activeScale = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "scale",
      styleKey: "objectFit"
    });
    const setDimensionAttributes = (nextDimensions) => {
      setAttributes(
        getDimensionUpdateAttributes({
          style: attributes2.style,
          selectedState: selectedStyleState,
          hasSelectedStyleState,
          nextDimensions,
          dimensionKeyMap: { scale: "objectFit" }
        })
      );
    };
    const dimensionsControl = showDimensionsControls && (SIZED_LAYOUTS.includes(parentLayoutType) ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
      DimensionsTool,
      {
        panelId: clientId,
        value: { aspectRatio: activeAspectRatio, scale: activeScale },
        onChange: ({ aspectRatio: newAspectRatio }) => {
          setDimensionAttributes({
            aspectRatio: newAspectRatio,
            scale: "cover"
          });
        },
        defaultAspectRatio: "auto",
        tools: ["aspectRatio"]
      },
      selectedStyleStateKey
    ) : /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
      DimensionsTool,
      {
        panelId: clientId,
        value: {
          width: activeWidth,
          height: activeHeight,
          scale: activeScale,
          aspectRatio: activeAspectRatio
        },
        onChange: ({
          width: newWidth,
          height: newHeight,
          scale: newScale,
          aspectRatio: newAspectRatio
        }) => {
          setDimensionAttributes({
            // CSS includes `height: auto`, but we need
            // `width: auto` to fix the aspect ratio when
            // only height is set due to the width and
            // height attributes set via the server.
            width: !newWidth && newHeight ? "auto" : newWidth,
            height: newHeight,
            aspectRatio: newAspectRatio,
            scale: newScale
          });
        },
        defaultScale: "cover",
        defaultAspectRatio: "auto",
        scaleOptions,
        unitsOptions: dimensionsUnitsOptions,
        tools: isWideAligned ? ["aspectRatio", "scale"] : ["aspectRatio", "widthHeight", "scale"]
      },
      selectedStyleStateKey
    ));
    const resetSettings = () => {
      setAttributes({
        lightbox: void 0
      });
      updateImage(DEFAULT_MEDIA_SIZE_SLUG3);
    };
    const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === "core/pattern-overrides";
    const {
      lockUrlControls = false,
      lockHrefControls = false,
      lockAltControls = false,
      lockAltControlsMessage,
      lockTitleControls = false,
      lockTitleControlsMessage,
      hideCaptionControls = false
    } = (0, import_data49.useSelect)(
      (select10) => {
        if (!isSingleSelected) {
          return {};
        }
        const {
          url: urlBinding,
          alt: altBinding,
          title: titleBinding,
          caption: captionBinding
        } = metadata?.bindings || {};
        const hasParentPattern = !!context["pattern/overrides"];
        const urlBindingSource = (0, import_blocks33.getBlockBindingsSource)(
          urlBinding?.source
        );
        const altBindingSource = (0, import_blocks33.getBlockBindingsSource)(
          altBinding?.source
        );
        const titleBindingSource = (0, import_blocks33.getBlockBindingsSource)(
          titleBinding?.source
        );
        return {
          lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
            select: select10,
            context,
            args: urlBinding?.args
          }),
          lockHrefControls: (
            // Disable editing the link of the URL if the image is inside a pattern instance.
            // This is a temporary solution until we support overriding the link on the frontend.
            hasParentPattern || arePatternOverridesEnabled
          ),
          hideCaptionControls: !!captionBinding,
          lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
            select: select10,
            context,
            args: altBinding?.args
          }),
          lockAltControlsMessage: altBindingSource?.label ? (0, import_i18n94.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n94.__)("Connected to %s"),
            altBindingSource.label
          ) : (0, import_i18n94.__)("Connected to dynamic data"),
          lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
            select: select10,
            context,
            args: titleBinding?.args
          }),
          lockTitleControlsMessage: titleBindingSource?.label ? (0, import_i18n94.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n94.__)("Connected to %s"),
            titleBindingSource.label
          ) : (0, import_i18n94.__)("Connected to dynamic data")
        };
      },
      [
        arePatternOverridesEnabled,
        context,
        isSingleSelected,
        metadata?.bindings
      ]
    );
    const showUrlInput = isSingleSelected && !lockHrefControls && !lockUrlControls && !isDecorative;
    const showCoverControls = isSingleSelected && canInsertCover && !isContentOnlyMode;
    const showBlockControls = showUrlInput || allowCrop || showCoverControls;
    const mediaControls = isSingleSelected && !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_jsx_runtime310.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.BlockControls, { group: isContentOnlyMode ? "inline" : "other", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
      import_block_editor107.MediaReplaceFlow,
      {
        mediaId: id,
        mediaURL: url,
        allowedTypes: ALLOWED_MEDIA_TYPES3,
        onSelect: onSelectImage,
        onSelectURL,
        onError: onUploadError,
        name: !url ? (0, import_i18n94.__)("Add image") : (0, import_i18n94.__)("Replace"),
        onReset: () => onSelectImage(void 0),
        variant: "toolbar"
      }
    ) }) });
    const controls = /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
      showBlockControls && /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_block_editor107.BlockControls, { group: "block", children: [
        showUrlInput && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
          import_block_editor107.__experimentalImageURLInputUI,
          {
            url: href || "",
            onChangeUrl: onSetHref,
            linkDestination,
            mediaUrl: image && image.source_url || url,
            mediaLink: image && image.link,
            linkTarget,
            linkClass,
            rel,
            showLightboxSetting,
            lightboxEnabled: lightboxChecked,
            onSetLightbox,
            resetLightbox
          }
        ),
        allowCrop && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
          import_components55.ToolbarButton,
          {
            ref: cropButtonRef,
            onClick: openImageMediaEditorModal,
            "aria-haspopup": "dialog",
            icon: crop_default,
            label: (0, import_i18n94.__)("Edit image"),
            disabled: isSwappingMedia
          }
        ),
        showCoverControls && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
          import_components55.ToolbarButton,
          {
            icon: overlay_text_default,
            label: (0, import_i18n94.__)("Add text over image"),
            onClick: switchToCover
          }
        )
      ] }),
      canUploadExternalImage && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.ToolbarButton,
        {
          onClick: uploadExternal,
          icon: upload_default,
          label: (0, import_i18n94.__)("Upload to Media Library")
        }
      ) }) }),
      isContentOnlyMode && // Add some extra controls for content attributes when content only mode is active.
      // With content only mode active, the inspector is hidden, so users need another way
      // to edit these attributes.
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        ContentOnlyControls,
        {
          attributes: attributes2,
          setAttributes,
          lockAltControls,
          lockAltControlsMessage,
          lockTitleControls,
          lockTitleControlsMessage
        }
      ) }),
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
        import_components55.__experimentalToolsPanel,
        {
          label: (0, import_i18n94.__)("Media"),
          resetAll: () => {
            onSelectImage(void 0);
            setAttributes({ isDecorative: false });
          },
          dropdownMenuProps,
          children: [
            !lockUrlControls && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n94.__)("Image"),
                hasValue: () => !!url,
                onDeselect: () => onSelectImage(void 0),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                  MediaControl,
                  {
                    mediaId: id,
                    mediaUrl: url,
                    alt,
                    filename: image?.media_details?.sizes?.full?.file || image?.slug || (0, import_url12.getFilename)(url),
                    allowedTypes: ALLOWED_MEDIA_TYPES3,
                    onSelect: onSelectImage,
                    onSelectURL,
                    onError: onUploadError,
                    onReset: () => onSelectImage(void 0),
                    isUploading,
                    emptyLabel: (0, import_i18n94.__)("Add image")
                  }
                )
              }
            ),
            !isDecorative && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n94.__)("Alternative text"),
                isShownByDefault: true,
                hasValue: () => !!alt,
                onDeselect: () => setAttributes({ alt: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                  import_components55.TextareaControl,
                  {
                    label: (0, import_i18n94.__)("Alternative text"),
                    value: alt || "",
                    onChange: updateAlt,
                    readOnly: lockAltControls,
                    help: lockAltControls ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_jsx_runtime310.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                      import_components55.ExternalLink,
                      {
                        href: (
                          // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                          (0, import_i18n94.__)(
                            "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                          )
                        ),
                        children: (0, import_i18n94.__)(
                          "Describe the purpose of the image."
                        )
                      }
                    )
                  }
                )
              }
            ),
            !lockAltControls && !lightboxChecked && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n94.__)("Mark as decorative"),
                isShownByDefault: true,
                hasValue: () => !!isDecorative,
                onDeselect: () => setAttributes({ isDecorative: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                  import_components55.CheckboxControl,
                  {
                    label: (0, import_i18n94.__)("Mark as decorative"),
                    checked: !!isDecorative,
                    onChange: updateIsDecorative,
                    help: (0, import_i18n94.__)(
                      "Hidden from assistive technologies."
                    )
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
        import_block_editor107.InspectorControls,
        {
          group: "dimensions",
          resetAllFilter: (attrs) => {
            return getDimensionResetAttributes({
              attributes: attrs,
              selectedState: selectedStyleState,
              hasSelectedStyleState,
              keys: ["aspectRatio", "height", "objectFit", "width"],
              defaultAttributes: {
                aspectRatio: void 0,
                width: void 0,
                height: void 0,
                scale: void 0,
                focalPoint: void 0
              }
            });
          },
          children: [
            dimensionsControl,
            !hasSelectedStyleState && url && scale && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
              import_components55.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n94.__)("Focal point"),
                isShownByDefault: true,
                hasValue: () => !!focalPoint,
                onDeselect: () => setAttributes({
                  focalPoint: void 0
                }),
                panelId: clientId,
                children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
                  import_components55.FocalPointPicker,
                  {
                    label: (0, import_i18n94.__)("Focal point"),
                    url,
                    value: focalPoint,
                    onDragStart: imperativeFocalPointPreview,
                    onDrag: imperativeFocalPointPreview,
                    onChange: (newFocalPoint) => setAttributes({
                      focalPoint: newFocalPoint
                    })
                  }
                )
              }
            )
          ]
        }
      ),
      !!imageSizeOptions.length && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.__experimentalToolsPanel,
        {
          label: (0, import_i18n94.__)("Settings"),
          resetAll: resetSettings,
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
            ResolutionTool2,
            {
              value: sizeSlug,
              defaultValue: DEFAULT_MEDIA_SIZE_SLUG3,
              onChange: updateImage,
              options: imageSizeOptions
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.TextControl,
        {
          label: (0, import_i18n94.__)("Title attribute"),
          value: title || "",
          onChange: onSetTitle,
          readOnly: lockTitleControls,
          help: lockTitleControls ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_jsx_runtime310.Fragment, { children: lockTitleControlsMessage }) : (0, import_element73.createInterpolateElement)(
            (0, import_i18n94.__)(
              "Describe the role of this image on the page. <a>(Note: many devices and browsers do not display this text.)</a>"
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" })
            }
          )
        }
      ) })
    ] });
    const filename = (0, import_url12.getFilename)(url);
    let defaultedAlt;
    if (isDecorative) {
      defaultedAlt = filename ? (0, import_i18n94.sprintf)(
        /* translators: %s: file name */
        (0, import_i18n94.__)(
          "This image has been marked as decorative; its file name is %s"
        ),
        filename
      ) : (0, import_i18n94.__)("This image has been marked as decorative.");
    } else if (alt) {
      defaultedAlt = alt;
    } else if (filename) {
      defaultedAlt = (0, import_i18n94.sprintf)(
        /* translators: %s: file name */
        (0, import_i18n94.__)("This image has an empty alt attribute; its file name is %s"),
        filename
      );
    } else {
      defaultedAlt = (0, import_i18n94.__)("This image has an empty alt attribute");
    }
    const borderProps = (0, import_block_editor107.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor107.__experimentalGetShadowClassesAndStyles)(attributes2);
    const { postType, postId, queryId } = context;
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const img = /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ImageWrapper, { href, children: temporaryURL && hasImageErrored ? (
      // Show a placeholder during upload when the blob URL can't be loaded. This can
      // happen when the user uploads a HEIC image in a browser that doesn't support them.
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.Placeholder,
        {
          className: "wp-block-image__placeholder",
          withIllustration: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.Spinner, {})
        }
      )
    ) : /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        "img",
        {
          src: temporaryURL || url,
          alt: defaultedAlt,
          onError: onImageError,
          onLoad: onImageLoad,
          ref: setRefs,
          className: clsx_default(borderProps.className, {
            "is-swapping-media": isSwappingMedia
          }),
          width: naturalWidth,
          height: naturalHeight,
          style: {
            aspectRatio,
            ...resizeDelta ? {
              width: pixelSize.width + resizeDelta.width,
              height: pixelSize.height + resizeDelta.height
            } : (() => {
              const style2 = {};
              if (width === "auto") {
                style2.width = "auto";
              } else if (width !== void 0 && width !== null) {
                style2.width = typeof width === "number" ? `${width}px` : width;
              }
              if (height === "auto") {
                style2.height = "auto";
              } else if (height !== void 0 && height !== null) {
                style2.height = typeof height === "number" ? `${height}px` : height;
              } else if (!isCroppedGalleryImage) {
                style2.height = "auto";
              }
              return style2;
            })(),
            objectFit: scale,
            objectPosition: focalPoint && scale ? mediaPosition2(focalPoint) : void 0,
            ...borderProps.style,
            ...shadowProps.style
          }
        }
      ),
      (isUploading || isSwappingMedia) && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.Spinner, {})
    ] }) });
    let resizableBox;
    if (isResizable && isSingleSelected && !isUploading && !SIZED_LAYOUTS.includes(parentLayoutType)) {
      const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
      const customRatio = pixelSize.width / pixelSize.height;
      const naturalRatio = naturalWidth / naturalHeight;
      const ratio = numericRatio || customRatio || naturalRatio || 1;
      const minWidth = naturalWidth < naturalHeight ? MIN_SIZE2 : MIN_SIZE2 * ratio;
      const minHeight = naturalHeight < naturalWidth ? MIN_SIZE2 : MIN_SIZE2 / ratio;
      const maxWidthBuffer = maxWidth * 2.5;
      const maxResizeWidth = maxContentWidth || maxWidthBuffer;
      let showRightHandle = false;
      let showLeftHandle = false;
      if (align === "center") {
        showRightHandle = true;
        showLeftHandle = true;
      } else if ((0, import_i18n94.isRTL)()) {
        if (align === "left") {
          showRightHandle = true;
        } else {
          showLeftHandle = true;
        }
      } else {
        if (align === "right") {
          showLeftHandle = true;
        } else {
          showRightHandle = true;
        }
      }
      resizableBox = /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        import_components55.ResizableBox,
        {
          ref: effectResizeableBoxPlacement,
          style: {
            position: "absolute",
            // To match the vertical-align: bottom of the img (from style.scss)
            // syncs the top with the img. This matters when the img height is
            // less than the line-height.
            inset: `${offsetTop}px 0 0 0`
          },
          size: pixelSize,
          minWidth,
          maxWidth: maxResizeWidth,
          minHeight,
          maxHeight: maxResizeWidth / ratio,
          lockAspectRatio: ratio,
          enable: {
            top: false,
            right: showRightHandle,
            bottom: true,
            left: showLeftHandle
          },
          onResizeStart: () => {
            toggleSelection(false);
          },
          onResize: (event, direction, elt, delta) => {
            setResizeDelta(delta);
          },
          onResizeStop: (event, direction, elt, delta) => {
            toggleSelection(true);
            setResizeDelta(null);
            setPixelSize((current) => ({
              width: current.width + delta.width,
              height: current.height + delta.height
            }));
            if (maxContentWidth && // Only do this if the image is bigger than the container to prevent it from being squished.
            // TODO: Remove this check if the image support setting 100% width.
            naturalWidth >= maxContentWidth && Math.abs(elt.offsetWidth - maxContentWidth) < 10) {
              setAttributes({
                width: void 0,
                height: void 0
              });
              return;
            }
            setAttributes({
              width: `${elt.offsetWidth}px`,
              height: "auto",
              aspectRatio: ratio === naturalRatio ? void 0 : String(ratio)
            });
          },
          resizeRatio: align === "center" ? 2 : 1
        }
      );
    }
    if (!url && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
        mediaControls,
        controls
      ] });
    }
    const setPostFeatureImage = () => {
      editEntityRecord("postType", postType, postId, {
        featured_media: id
      });
      createSuccessNotice((0, import_i18n94.__)("Post featured image updated."), {
        type: "snackbar"
      });
    };
    const featuredImageControl = !isDescendentOfQueryLoop && postId && id ? /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_block_editor107.BlockSettingsMenuControls, { children: ({ canEdit, selectedClientIds }) => canEdit && selectedClientIds.length === 1 && clientId === selectedClientIds[0] && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(import_components55.MenuItem, { onClick: setPostFeatureImage, children: (0, import_i18n94.__)("Set as featured image") }) }) : null;
    return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(import_jsx_runtime310.Fragment, { children: [
      mediaControls,
      controls,
      featuredImageControl,
      img,
      resizableBox,
      !isDecorative && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
        Caption,
        {
          attributes: attributes2,
          setAttributes,
          isSelected: isSingleSelected,
          insertBlocksAfter,
          label: (0, import_i18n94.__)("Image caption text"),
          showToolbarButton: isSingleSelected && (hasNonContentControls || isContentOnlyMode) && !hideCaptionControls
        }
      )
    ] });
  }

  // packages/block-library/build-module/image/use-max-width-observer.mjs
  var import_element74 = __toESM(require_element(), 1);
  var import_compose27 = __toESM(require_compose(), 1);
  var import_jsx_runtime311 = __toESM(require_jsx_runtime(), 1);
  function useMaxWidthObserver() {
    const [contentResizeListener, { width }] = (0, import_compose27.useResizeObserver)();
    const observerRef = (0, import_element74.useRef)();
    const maxWidthObserver = /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
      "div",
      {
        className: "wp-block",
        "aria-hidden": "true",
        style: {
          position: "absolute",
          inset: 0,
          width: "100%",
          height: 0,
          margin: 0
        },
        ref: observerRef,
        children: contentResizeListener
      }
    );
    return [maxWidthObserver, width];
  }

  // packages/block-library/build-module/image/edit.mjs
  var import_jsx_runtime312 = __toESM(require_jsx_runtime(), 1);
  var pickRelevantMediaFiles2 = (image, size) => {
    const imageProps = Object.fromEntries(
      Object.entries(image ?? {}).filter(
        ([key]) => ["alt", "id", "link", "caption"].includes(key)
      )
    );
    imageProps.url = image?.sizes?.[size]?.url || image?.media_details?.sizes?.[size]?.source_url || image.url;
    return imageProps;
  };
  var isExternalImage = (id, url) => url && !id && !(0, import_blob12.isBlobURL)(url);
  function hasSize(image, size) {
    return "url" in (image?.sizes?.[size] ?? {}) || "source_url" in (image?.media_details?.sizes?.[size] ?? {});
  }
  function ImageEdit({
    attributes: attributes2,
    setAttributes,
    isSelected: isSingleSelected,
    className,
    insertBlocksAfter,
    onReplace,
    context,
    clientId,
    __unstableParentLayout: parentLayout
  }) {
    const {
      url = "",
      caption,
      id,
      width,
      height,
      sizeSlug,
      aspectRatio,
      scale,
      align,
      metadata
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element75.useState)(attributes2.blob);
    const containerRef = (0, import_element75.useRef)();
    const layoutType = parentLayout?.type || parentLayout?.default?.type;
    const isMaxWidthContainerWidth = !layoutType || layoutType !== "flex" && layoutType !== "grid";
    const [maxWidthObserver, maxContentWidth] = useMaxWidthObserver();
    const [placeholderResizeListener, { width: placeholderWidth }] = (0, import_compose28.useResizeObserver)();
    const isSmallContainer = placeholderWidth && placeholderWidth < 160;
    const captionRef = (0, import_element75.useRef)();
    (0, import_element75.useEffect)(() => {
      captionRef.current = caption;
    }, [caption]);
    const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0, import_data50.useDispatch)(import_block_editor108.store);
    (0, import_element75.useEffect)(() => {
      if (["wide", "full"].includes(align)) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          width: void 0,
          height: void 0
        });
      }
    }, [__unstableMarkNextChangeAsNotPersistent, align, setAttributes]);
    const {
      getSettings: getSettings2,
      getBlockRootClientId,
      getBlockName,
      canInsertBlockType
    } = (0, import_data50.useSelect)(import_block_editor108.store);
    const blockEditingMode = (0, import_block_editor108.useBlockEditingMode)();
    const { createErrorNotice } = (0, import_data50.useDispatch)(import_notices8.store);
    function onUploadError(message) {
      createErrorNotice(message, {
        type: "snackbar",
        explicitDismiss: true
      });
      setTemporaryURL();
      setAttributes({
        src: void 0,
        id: void 0,
        url: void 0,
        blob: void 0
      });
    }
    function onFilesPreUpload(files) {
      if (files.length === 1) {
        setTemporaryURL((0, import_blob12.createBlobURL)(files[0]));
      }
    }
    function onSelectImagesList(images) {
      const win = containerRef.current?.ownerDocument.defaultView;
      if (images.every((file) => file instanceof win.File)) {
        const files = images;
        const rootClientId = getBlockRootClientId(clientId);
        if (files.some((file) => !isValidFileType(file))) {
          createErrorNotice(
            (0, import_i18n95.__)(
              "If uploading to a gallery all files need to be image formats"
            ),
            { id: "gallery-upload-invalid-file", type: "snackbar" }
          );
        }
        const imageBlocks = files.filter((file) => isValidFileType(file)).map(
          (file) => (0, import_blocks34.createBlock)("core/image", {
            blob: (0, import_blob12.createBlobURL)(file)
          })
        );
        if (getBlockName(rootClientId) === "core/gallery") {
          replaceBlock(clientId, imageBlocks);
        } else if (canInsertBlockType("core/gallery", rootClientId)) {
          const galleryBlock = (0, import_blocks34.createBlock)(
            "core/gallery",
            {},
            imageBlocks
          );
          replaceBlock(clientId, galleryBlock);
        }
      }
    }
    function onSelectImage(media) {
      if (Array.isArray(media)) {
        onSelectImagesList(media);
        return;
      }
      if (!media || !media.url) {
        setAttributes({
          url: void 0,
          alt: void 0,
          id: void 0,
          title: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob12.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      const { imageDefaultSize } = getSettings2();
      let newSize = DEFAULT_MEDIA_SIZE_SLUG3;
      if (sizeSlug && hasSize(media, sizeSlug)) {
        newSize = sizeSlug;
      } else if (hasSize(media, imageDefaultSize)) {
        newSize = imageDefaultSize;
      }
      let mediaAttributes = pickRelevantMediaFiles2(media, newSize);
      if (typeof mediaAttributes.caption === "string" && mediaAttributes.caption.includes("\n")) {
        mediaAttributes.caption = mediaAttributes.caption.replace(
          /\n/g,
          "<br>"
        );
      }
      if (captionRef.current && !mediaAttributes.caption) {
        const { caption: omittedCaption, ...restMediaAttributes } = mediaAttributes;
        mediaAttributes = restMediaAttributes;
      }
      let additionalAttributes;
      if (!media.id || media.id !== id) {
        additionalAttributes = {
          sizeSlug: newSize
        };
      }
      let linkDestination = attributes2.linkDestination;
      if (!linkDestination) {
        switch (window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE2) {
          case "file":
          case LINK_DESTINATION_MEDIA2:
            linkDestination = LINK_DESTINATION_MEDIA2;
            break;
          case "post":
          case LINK_DESTINATION_ATTACHMENT2:
            linkDestination = LINK_DESTINATION_ATTACHMENT2;
            break;
          case LINK_DESTINATION_CUSTOM:
            linkDestination = LINK_DESTINATION_CUSTOM;
            break;
          case LINK_DESTINATION_NONE2:
            linkDestination = LINK_DESTINATION_NONE2;
            break;
        }
      }
      let href;
      switch (linkDestination) {
        case LINK_DESTINATION_MEDIA2:
          href = media.url;
          break;
        case LINK_DESTINATION_ATTACHMENT2:
          href = media.link;
          break;
      }
      mediaAttributes.href = href;
      setAttributes({
        blob: void 0,
        ...mediaAttributes,
        ...additionalAttributes,
        linkDestination
      });
      setTemporaryURL();
    }
    function onSelectURL(newURL) {
      const normalizedNewURL = (0, import_url13.getProtocol)(newURL) ? newURL : (0, import_url13.prependHTTPS)(newURL);
      if (normalizedNewURL !== url) {
        setAttributes({
          blob: void 0,
          url: normalizedNewURL,
          id: void 0,
          sizeSlug: getSettings2().imageDefaultSize
        });
        setTemporaryURL();
      }
    }
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES3,
      onChange: onSelectImage,
      onError: onUploadError
    });
    const isExternal = isExternalImage(id, url);
    const src = isExternal ? url : void 0;
    const isSideloading = (0, import_data50.useSelect)(
      (select10) => {
        if (!window.__clientSideMediaProcessing || !id) {
          return false;
        }
        return select10(import_upload_media.store).isUploadingById(id);
      },
      [id]
    );
    const mediaPreview = !!url && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
      "img",
      {
        alt: (0, import_i18n95.__)("Edit image"),
        title: (0, import_i18n95.__)("Edit image"),
        className: "edit-image-preview",
        src: url
      }
    );
    const borderProps = (0, import_block_editor108.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor108.__experimentalGetShadowClassesAndStyles)(attributes2);
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL || isSideloading,
      "is-resized": !!width || !!height,
      [`size-${sizeSlug}`]: sizeSlug,
      "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
    });
    const blockProps = (0, import_block_editor108.useBlockProps)({
      ref: containerRef,
      className: classes
    });
    const { lockUrlControls = false, lockUrlControlsMessage } = (0, import_data50.useSelect)(
      (select10) => {
        if (!isSingleSelected) {
          return {};
        }
        const blockBindingsSource = (0, import_blocks34.getBlockBindingsSource)(
          metadata?.bindings?.url?.source
        );
        return {
          lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
            select: select10,
            context,
            args: metadata?.bindings?.url?.args
          }),
          lockUrlControlsMessage: blockBindingsSource?.label ? (0, import_i18n95.sprintf)(
            /* translators: %s: Label of the bindings source. */
            (0, import_i18n95.__)("Connected to %s"),
            blockBindingsSource.label
          ) : (0, import_i18n95.__)("Connected to dynamic data")
        };
      },
      [context, isSingleSelected, metadata?.bindings?.url]
    );
    const pinnedHeight = height === "auto" ? void 0 : height;
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
        import_components56.Placeholder,
        {
          className: clsx_default("block-editor-media-placeholder", {
            [borderProps.className]: !!borderProps.className && !isSingleSelected
          }),
          icon: !isSmallContainer && (lockUrlControls ? plugins_default : image_default),
          withIllustration: !isSingleSelected || isSmallContainer,
          label: !isSmallContainer && (0, import_i18n95.__)("Image"),
          instructions: !lockUrlControls && !isSmallContainer && (0, import_i18n95.__)(
            "Drag and drop an image, upload, or choose from your library."
          ),
          style: {
            aspectRatio: !(width && pinnedHeight) && aspectRatio ? aspectRatio : void 0,
            width: pinnedHeight && aspectRatio ? "100%" : width,
            height: width && aspectRatio ? "100%" : pinnedHeight,
            objectFit: scale,
            ...borderProps.style,
            ...shadowProps.style
          },
          children: [
            lockUrlControls && !isSmallContainer && lockUrlControlsMessage,
            !lockUrlControls && !isSmallContainer && content,
            placeholderResizeListener
          ]
        }
      );
    };
    return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
          Image2,
          {
            temporaryURL,
            isSideloading,
            attributes: attributes2,
            setAttributes,
            isSingleSelected,
            insertBlocksAfter,
            onReplace,
            onSelectImage,
            onSelectURL,
            onUploadError,
            context,
            clientId,
            blockEditingMode,
            parentLayoutType: layoutType,
            maxContentWidth
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
          import_block_editor108.MediaPlaceholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(import_block_editor108.BlockIcon, { icon: image_default }),
            onSelect: onSelectImage,
            onSelectURL,
            onFilesPreUpload,
            onError: onUploadError,
            placeholder: placeholder2,
            allowedTypes: ALLOWED_MEDIA_TYPES3,
            handleUpload: (files) => files.length === 1,
            value: { id, src },
            mediaPreview,
            disableMediaButtons: temporaryURL || url
          }
        )
      ] }),
      // The listener cannot be placed as the first element as it will break the in-between inserter.
      // See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120
      isSingleSelected && isMaxWidthContainerWidth && maxWidthObserver
    ] });
  }
  var edit_default14 = ImageEdit;

  // packages/block-library/build-module/image/block.json
  var block_default40 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/image",
    title: "Image",
    category: "media",
    usesContext: [
      "allowResize",
      "imageCrop",
      "fixedHeight",
      "navigationButtonType",
      "postId",
      "postType",
      "queryId",
      "galleryId"
    ],
    description: "Insert an image to make a visual statement.",
    keywords: ["img", "photo", "picture"],
    textdomain: "default",
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      url: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "src",
        role: "content"
      },
      alt: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      lightbox: {
        type: "object",
        enabled: {
          type: "boolean"
        }
      },
      title: {
        type: "string",
        source: "attribute",
        selector: "img",
        attribute: "title",
        role: "content"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "class"
      },
      id: {
        type: "number",
        role: "content"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      aspectRatio: {
        type: "string"
      },
      scale: {
        type: "string"
      },
      focalPoint: {
        type: "object"
      },
      sizeSlug: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure > a",
        attribute: "target"
      },
      isDecorative: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      interactivity: true,
      align: ["left", "center", "right", "wide", "full"],
      anchor: true,
      color: {
        text: false,
        background: false
      },
      filter: {
        duotone: true
      },
      spacing: {
        margin: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      shadow: {
        __experimentalSkipSerialization: true
      }
    },
    selectors: {
      dimensions: ".wp-block-image img, .wp-block-image .components-placeholder",
      border: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
      shadow: ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
      filter: {
        duotone: ".wp-block-image img, .wp-block-image .components-placeholder"
      }
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "rounded", label: "Rounded" }
    ],
    editorStyle: "wp-block-image-editor",
    style: "wp-block-image"
  };

  // packages/block-library/build-module/image/save.mjs
  var import_block_editor109 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime313 = __toESM(require_jsx_runtime(), 1);
  function save22({ attributes: attributes2 }) {
    const {
      url,
      alt,
      caption,
      align,
      href,
      rel,
      linkClass,
      width,
      height,
      aspectRatio,
      scale,
      focalPoint,
      id,
      linkTarget,
      sizeSlug,
      title,
      isDecorative,
      metadata: { bindings = {} } = {}
    } = attributes2;
    const newRel = !rel ? void 0 : rel;
    const borderProps = (0, import_block_editor109.__experimentalGetBorderClassesAndStyles)(attributes2);
    const shadowProps = (0, import_block_editor109.__experimentalGetShadowClassesAndStyles)(attributes2);
    const classes = clsx_default({
      // All other align classes are handled by block supports.
      // `{ align: 'none' }` is unique to transforms for the image block.
      alignnone: "none" === align,
      [`size-${sizeSlug}`]: sizeSlug,
      "is-resized": width || height,
      "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
    });
    const imageClasses = clsx_default(borderProps.className, {
      [`wp-image-${id}`]: !!id
    });
    const image = /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
      "img",
      {
        src: url,
        alt,
        className: imageClasses || void 0,
        style: (() => {
          const style2 = {
            ...borderProps.style,
            ...shadowProps.style,
            aspectRatio,
            objectFit: scale,
            objectPosition: focalPoint && scale ? mediaPosition2(focalPoint) : void 0
          };
          if (width !== void 0 || height !== void 0) {
            if (width === "auto") {
              style2.width = "auto";
            } else if (width !== void 0 && width !== null) {
              style2.width = typeof width === "number" ? `${width}px` : width;
            }
            if (height === "auto" || height === void 0 || height === null) {
              style2.height = "auto";
            } else {
              style2.height = typeof height === "number" ? `${height}px` : height;
            }
          }
          return style2;
        })(),
        title,
        role: isDecorative ? "none" : void 0
      }
    );
    const displayCaption = !import_block_editor109.RichText.isEmpty(caption) || bindings.caption || bindings?.__default?.source === "core/pattern-overrides";
    const figure = /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_jsx_runtime313.Fragment, { children: [
      href ? /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
        "a",
        {
          className: linkClass,
          href,
          target: linkTarget,
          rel: newRel,
          children: image
        }
      ) : image,
      displayCaption && /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
        import_block_editor109.RichText.Content,
        {
          className: (0, import_block_editor109.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("figure", { ...import_block_editor109.useBlockProps.save({ className: classes }), children: figure });
  }

  // packages/block-library/build-module/image/transforms.mjs
  var import_blob13 = __toESM(require_blob(), 1);
  var import_blocks35 = __toESM(require_blocks(), 1);
  var import_data51 = __toESM(require_data(), 1);
  var import_core_data27 = __toESM(require_core_data(), 1);
  function getCarriedGifConversionAttributes(attributes2) {
    const { align, anchor, className, style: style2 } = attributes2;
    const margin = style2?.spacing?.margin;
    return {
      ...align && { align },
      ...anchor && { anchor },
      ...className && { className },
      ...margin && { style: { spacing: { margin } } }
    };
  }
  function getAnimatedGifVideoCompanion(id, url) {
    if (!id) {
      return null;
    }
    const urlPath = url?.split(/[?#]/)[0];
    if (!urlPath?.toLowerCase().endsWith(".gif")) {
      return null;
    }
    const record = (0, import_data51.select)(import_core_data27.store).getEntityRecord(
      "postType",
      "attachment",
      id,
      { context: "view" }
    );
    const details = record?.media_details;
    if (!details?.animated_video || !record?.source_url) {
      return null;
    }
    const dir = record.source_url.slice(
      0,
      record.source_url.lastIndexOf("/") + 1
    );
    return {
      src: dir + details.animated_video,
      poster: details.animated_video_poster ? dir + details.animated_video_poster : void 0,
      width: details.width,
      height: details.height
    };
  }
  function stripFirstImage(attributes2, { shortcode }) {
    const { body } = document.implementation.createHTMLDocument("");
    body.innerHTML = shortcode.content;
    let nodeToRemove = body.querySelector("img");
    while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
      nodeToRemove = nodeToRemove.parentNode;
    }
    if (nodeToRemove) {
      nodeToRemove.parentNode.removeChild(nodeToRemove);
    }
    return body.innerHTML.trim();
  }
  function getFirstAnchorAttributeFormHTML(html, attributeName) {
    const { body } = document.implementation.createHTMLDocument("");
    body.innerHTML = html;
    const { firstElementChild } = body;
    if (firstElementChild && firstElementChild.nodeName === "A") {
      return firstElementChild.getAttribute(attributeName) || void 0;
    }
  }
  var imageSchema = {
    img: {
      attributes: ["src", "alt", "title", "width", "height"],
      classes: [
        "alignleft",
        "aligncenter",
        "alignright",
        "alignnone",
        /^wp-image-\d+$/
      ]
    }
  };
  function parsePixelDimension(value) {
    return value && /^\d+$/.test(value) ? `${value}px` : void 0;
  }
  var schema = ({ phrasingContentSchema }) => ({
    figure: {
      require: ["img"],
      children: {
        ...imageSchema,
        a: {
          attributes: ["href", "rel", "target"],
          classes: ["*"],
          children: imageSchema
        },
        figcaption: {
          children: phrasingContentSchema
        }
      }
    }
  });
  var transforms13 = {
    from: [
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "FIGURE" && !!node.querySelector("img"),
        schema,
        transform: (node) => {
          const img = node.querySelector("img");
          const className = node.className + " " + img.className;
          const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(
            className
          );
          const anchor = node.id === "" ? void 0 : node.id;
          const align = alignMatches ? alignMatches[1] : void 0;
          const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(
            className
          );
          const id = idMatches ? Number(idMatches[1]) : void 0;
          const anchorElement = node.querySelector("a");
          const linkDestination = anchorElement && anchorElement.href ? "custom" : void 0;
          const href = anchorElement && anchorElement.href ? anchorElement.href : void 0;
          const rel = anchorElement && anchorElement.rel ? anchorElement.rel : void 0;
          const linkClass = anchorElement && anchorElement.className ? anchorElement.className : void 0;
          const widthValue = parsePixelDimension(
            img.getAttribute("width")
          );
          const heightValue = parsePixelDimension(
            img.getAttribute("height")
          );
          const widthNumber = parseInt(widthValue, 10);
          const heightNumber = parseInt(heightValue, 10);
          const aspectRatio = widthNumber && heightNumber ? String(widthNumber / heightNumber) : void 0;
          const width = widthValue || (heightValue ? "auto" : void 0);
          const height = widthValue ? "auto" : heightValue;
          const attributes2 = (0, import_blocks35.getBlockAttributes)(
            "core/image",
            node.outerHTML,
            {
              align,
              id,
              linkDestination,
              href,
              rel,
              linkClass,
              anchor,
              width,
              height,
              aspectRatio
            }
          );
          if ((0, import_blob13.isBlobURL)(attributes2.url)) {
            attributes2.blob = attributes2.url;
            delete attributes2.url;
          }
          return (0, import_blocks35.createBlock)("core/image", attributes2);
        }
      },
      {
        // Note: when dragging and dropping multiple files onto a gallery this overrides the
        // gallery transform in order to add new images to the gallery instead of
        // creating a new gallery.
        type: "files",
        isMatch(files) {
          return files.every(
            (file) => file.type.indexOf("image/") === 0
          );
        },
        transform(files) {
          const blocks = files.map((file) => {
            return (0, import_blocks35.createBlock)("core/image", {
              blob: (0, import_blob13.createBlobURL)(file)
            });
          });
          return blocks;
        }
      },
      {
        type: "shortcode",
        tag: "caption",
        attributes: {
          url: {
            type: "string",
            source: "attribute",
            attribute: "src",
            selector: "img"
          },
          alt: {
            type: "string",
            source: "attribute",
            attribute: "alt",
            selector: "img"
          },
          caption: {
            shortcode: stripFirstImage
          },
          href: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "href"
              );
            }
          },
          rel: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "rel"
              );
            }
          },
          linkClass: {
            shortcode: (attributes2, { shortcode }) => {
              return getFirstAnchorAttributeFormHTML(
                shortcode.content,
                "class"
              );
            }
          },
          id: {
            type: "number",
            shortcode: ({ named: { id } }) => {
              if (!id) {
                return;
              }
              return parseInt(id.replace("attachment_", ""), 10);
            }
          },
          align: {
            type: "string",
            shortcode: ({ named: { align = "alignnone" } }) => {
              return align.replace("align", "");
            }
          }
        }
      }
    ],
    to: [
      {
        // Offer converting an animated GIF into the Video block's "GIF"
        // variation: a muted, looping, autoplaying video transcoded from
        // the GIF and sideloaded next to it when it was uploaded. Only
        // matches when that companion video exists, so ordinary images
        // never see this transform.
        type: "block",
        blocks: ["core/video"],
        isMatch: ({ id, url }) => !!getAnimatedGifVideoCompanion(id, url),
        transform(attributes2) {
          const { id, url, caption } = attributes2;
          const companion = getAnimatedGifVideoCompanion(id, url);
          return (0, import_blocks35.createBlock)("core/video", {
            ...getCarriedGifConversionAttributes(attributes2),
            id,
            src: companion.src,
            poster: companion.poster,
            caption,
            controls: false,
            loop: true,
            autoplay: true,
            muted: true,
            playsInline: true,
            /*
             * Carry the GIF's intrinsic dimensions so the <video>
             * keeps its aspect ratio from the first paint. Without
             * them the element collapses to the browser-default size
             * and then jumps once the poster/metadata load, which
             * shows up as a brief duplicated image during the swap.
             */
            width: companion.width,
            height: companion.height
          });
        }
      }
    ]
  };
  var transforms_default14 = transforms13;

  // packages/block-library/build-module/image/index.mjs
  var { name: name40 } = block_default40;
  var settings40 = {
    icon: image_default,
    example: {
      attributes: {
        sizeSlug: "large",
        url: "https://s.w.org/images/core/5.3/MtBlanc1.jpg",
        // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
        caption: (0, import_i18n96.__)("Mont Blanc appears\u2014still, snowy, and serene.")
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        const { caption, alt, url } = attributes2;
        if (!url) {
          return (0, import_i18n96.__)("Empty");
        }
        if (!alt) {
          return caption || "";
        }
        return alt + (caption ? ". " + caption : "");
      }
    },
    getEditWrapperProps(attributes2) {
      return {
        "data-align": attributes2.align
      };
    },
    transforms: transforms_default14,
    edit: edit_default14,
    save: save22,
    deprecated: deprecated_default20
  };
  var init40 = () => initBlock({ name: name40, metadata: block_default40, settings: settings40 });

  // packages/block-library/build-module/latest-comments/index.mjs
  var latest_comments_exports = {};
  __export(latest_comments_exports, {
    init: () => init41,
    metadata: () => block_default41,
    name: () => name41,
    settings: () => settings41
  });

  // packages/block-library/build-module/latest-comments/block.json
  var block_default41 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/latest-comments",
    title: "Latest Comments",
    category: "widgets",
    description: "Display a list of your most recent comments.",
    keywords: ["recent comments"],
    textdomain: "default",
    attributes: {
      commentsToShow: {
        type: "number",
        default: 5,
        minimum: 1,
        maximum: 100
      },
      displayAvatar: {
        type: "boolean",
        default: true
      },
      displayDate: {
        type: "boolean",
        default: true
      },
      displayContent: {
        type: "string",
        default: "excerpt",
        enum: ["none", "excerpt", "full"]
      }
    },
    supports: {
      anchor: true,
      align: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      shadow: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-latest-comments"
  };

  // packages/block-library/build-module/latest-comments/edit.mjs
  var import_block_editor110 = __toESM(require_block_editor(), 1);
  var import_components57 = __toESM(require_components(), 1);
  var import_i18n97 = __toESM(require_i18n(), 1);
  var import_server_side_render4 = __toESM(require_server_side_render(), 1);
  var import_compose29 = __toESM(require_compose(), 1);
  var import_jsx_runtime314 = __toESM(require_jsx_runtime(), 1);
  var MIN_COMMENTS = 1;
  var MAX_COMMENTS = 100;
  function LatestComments({ attributes: attributes2, setAttributes, name: name118 }) {
    const { commentsToShow, displayAvatar, displayDate, displayContent } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { content, status, error: error2 } = (0, import_server_side_render4.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name118,
      urlQueryArgs: {
        // The preview uses the site's locale to make it more true to how
        // the block appears on the frontend. Setting the locale
        // explicitly prevents any middleware from setting it to 'user'.
        _locale: "site"
      }
    });
    const disabledRef = (0, import_compose29.useDisabled)();
    const blockProps = (0, import_block_editor110.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(import_jsx_runtime314.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(import_block_editor110.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
        import_components57.__experimentalToolsPanel,
        {
          label: (0, import_i18n97.__)("Settings"),
          resetAll: () => {
            setAttributes({
              commentsToShow: 5,
              displayAvatar: true,
              displayDate: true,
              displayContent: "excerpt"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
              import_components57.__experimentalToolsPanelItem,
              {
                hasValue: () => !displayAvatar,
                label: (0, import_i18n97.__)("Display avatar"),
                onDeselect: () => setAttributes({ displayAvatar: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                  import_components57.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display avatar"),
                    checked: displayAvatar,
                    onChange: () => setAttributes({
                      displayAvatar: !displayAvatar
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
              import_components57.__experimentalToolsPanelItem,
              {
                hasValue: () => !displayDate,
                label: (0, import_i18n97.__)("Display date"),
                onDeselect: () => setAttributes({ displayDate: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                  import_components57.ToggleControl,
                  {
                    label: (0, import_i18n97.__)("Display date"),
                    checked: displayDate,
                    onChange: () => setAttributes({ displayDate: !displayDate })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
              import_components57.__experimentalToolsPanelItem,
              {
                hasValue: () => displayContent !== "excerpt",
                label: (0, import_i18n97.__)("Display content"),
                onDeselect: () => setAttributes({ displayContent: "excerpt" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                  import_components57.SelectControl,
                  {
                    label: (0, import_i18n97.__)("Display content"),
                    value: displayContent,
                    options: [
                      { label: (0, import_i18n97.__)("No content"), value: "none" },
                      { label: (0, import_i18n97.__)("Excerpt"), value: "excerpt" },
                      { label: (0, import_i18n97.__)("Full content"), value: "full" }
                    ],
                    onChange: (value) => setAttributes({
                      displayContent: value
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
              import_components57.__experimentalToolsPanelItem,
              {
                hasValue: () => commentsToShow !== 5,
                label: (0, import_i18n97.__)("Number of comments"),
                onDeselect: () => setAttributes({ commentsToShow: 5 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
                  import_components57.RangeControl,
                  {
                    label: (0, import_i18n97.__)("Number of comments"),
                    value: commentsToShow,
                    onChange: (value) => setAttributes({ commentsToShow: value }),
                    min: MIN_COMMENTS,
                    max: MAX_COMMENTS,
                    required: true
                  }
                )
              }
            )
          ]
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(import_components57.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("p", { children: (0, import_i18n97.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n97.__)("Error: %s"),
        error2
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/latest-comments/deprecated.mjs
  var v119 = {
    attributes: {
      commentsToShow: {
        type: "number",
        default: 5,
        minimum: 1,
        maximum: 100
      },
      displayAvatar: {
        type: "boolean",
        default: true
      },
      displayDate: {
        type: "boolean",
        default: true
      },
      displayExcerpt: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      align: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    isEligible(attributes2) {
      return attributes2?.displayExcerpt === false;
    },
    migrate(attributes2) {
      return {
        ...attributes2,
        displayContent: attributes2.displayExcerpt ? "excerpt" : "none"
      };
    }
  };
  var deprecated_default21 = [v119];

  // packages/block-library/build-module/latest-comments/index.mjs
  var { name: name41 } = block_default41;
  var settings41 = {
    icon: comment_default,
    example: {},
    edit: LatestComments,
    deprecated: deprecated_default21
  };
  var init41 = () => initBlock({ name: name41, metadata: block_default41, settings: settings41 });

  // packages/block-library/build-module/latest-posts/index.mjs
  var latest_posts_exports = {};
  __export(latest_posts_exports, {
    init: () => init42,
    metadata: () => block_default42,
    name: () => name42,
    settings: () => settings42
  });

  // packages/block-library/build-module/latest-posts/block.json
  var block_default42 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/latest-posts",
    title: "Latest Posts",
    category: "widgets",
    description: "Display a list of your most recent posts.",
    keywords: ["recent posts"],
    textdomain: "default",
    attributes: {
      categories: {
        type: "array",
        items: {
          type: "object"
        }
      },
      selectedAuthor: {
        type: "number"
      },
      postsToShow: {
        type: "number",
        default: 5
      },
      displayPostContent: {
        type: "boolean",
        default: false
      },
      displayPostContentRadio: {
        type: "string",
        default: "excerpt"
      },
      excerptLength: {
        type: "number",
        default: 55
      },
      displayAuthor: {
        type: "boolean",
        default: false
      },
      displayPostDate: {
        type: "boolean",
        default: false
      },
      order: {
        type: "string",
        default: "desc"
      },
      orderBy: {
        type: "string",
        default: "date"
      },
      displayFeaturedImage: {
        type: "boolean",
        default: false
      },
      featuredImageAlign: {
        type: "string",
        enum: ["left", "center", "right"]
      },
      featuredImageSizeSlug: {
        type: "string",
        default: "thumbnail"
      },
      featuredImageSizeWidth: {
        type: "number",
        default: null
      },
      featuredImageSizeHeight: {
        type: "number",
        default: null
      },
      addLinkToFeaturedImage: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      layout: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          __experimentalDefault: "1.25em"
        },
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      shadow: true,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-latest-posts-editor",
    style: "wp-block-latest-posts"
  };

  // packages/block-library/build-module/latest-posts/deprecated.mjs
  var currentSupports = {
    anchor: true,
    align: true,
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true,
        link: true
      }
    },
    html: false,
    layout: true,
    spacing: {
      margin: true,
      padding: true,
      blockGap: {
        __experimentalDefault: "1.25em"
      },
      __experimentalDefaultControls: {
        blockGap: true
      }
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    __experimentalBorder: {
      radius: true,
      color: true,
      width: true,
      style: true,
      __experimentalDefaultControls: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    interactivity: {
      clientNavigation: true
    }
  };
  var legacyLayoutAttributes = {
    postLayout: {
      type: "string",
      default: "list"
    },
    columns: {
      type: "number",
      default: 3
    }
  };
  var migrateCategories = (oldAttributes) => {
    if (!oldAttributes.categories || "string" !== typeof oldAttributes.categories) {
      return oldAttributes;
    }
    return {
      ...oldAttributes,
      categories: [{ id: Number(oldAttributes.categories) }]
    };
  };
  var migratePostLayout = (oldAttributes) => {
    const { postLayout, columns, ...attributesWithoutLegacyLayout } = oldAttributes;
    if (!postLayout) {
      return oldAttributes;
    }
    return {
      ...attributesWithoutLegacyLayout,
      layout: {
        type: postLayout === "grid" ? "grid" : "default",
        ...postLayout === "grid" && columns && { columnCount: columns }
      }
    };
  };
  var deprecated_default22 = [
    {
      attributes: {
        ...block_default42.attributes,
        ...legacyLayoutAttributes,
        categories: {
          type: ["array", "string"]
        }
      },
      supports: currentSupports,
      migrate: (oldAttributes) => migratePostLayout(migrateCategories(oldAttributes)),
      isEligible: ({ postLayout }) => postLayout,
      save: () => null
    },
    {
      attributes: {
        ...block_default42.attributes,
        categories: {
          type: "string"
        }
      },
      supports: {
        align: true,
        html: false
      },
      migrate: migrateCategories,
      isEligible: ({ categories }) => categories && "string" === typeof categories,
      save: () => null
    }
  ];

  // packages/block-library/build-module/latest-posts/edit.mjs
  var import_components58 = __toESM(require_components(), 1);
  var import_i18n98 = __toESM(require_i18n(), 1);
  var import_date2 = __toESM(require_date(), 1);
  var import_block_editor111 = __toESM(require_block_editor(), 1);
  var import_data52 = __toESM(require_data(), 1);
  var import_core_data28 = __toESM(require_core_data(), 1);
  var import_notices9 = __toESM(require_notices(), 1);
  var import_compose30 = __toESM(require_compose(), 1);
  var import_element76 = __toESM(require_element(), 1);

  // packages/block-library/build-module/latest-posts/constants.mjs
  var MIN_EXCERPT_LENGTH = 10;
  var MAX_EXCERPT_LENGTH = 100;
  var DEFAULT_EXCERPT_LENGTH = 55;

  // packages/block-library/build-module/latest-posts/edit.mjs
  var import_jsx_runtime315 = __toESM(require_jsx_runtime(), 1);
  var CATEGORIES_LIST_QUERY = {
    per_page: -1,
    _fields: "id,name",
    context: "view"
  };
  var USERS_LIST_QUERY = {
    per_page: -1,
    has_published_posts: ["post"],
    context: "view"
  };
  var imageAlignmentOptions = [
    {
      value: "none",
      icon: align_none_default,
      label: (0, import_i18n98.__)("None")
    },
    {
      value: "left",
      icon: position_left_default,
      label: (0, import_i18n98.__)("Left")
    },
    {
      value: "center",
      icon: position_center_default,
      label: (0, import_i18n98.__)("Center")
    },
    {
      value: "right",
      icon: position_right_default,
      label: (0, import_i18n98.__)("Right")
    }
  ];
  function getFeaturedImageDetails(post, size) {
    const image = post._embedded?.["wp:featuredmedia"]?.["0"];
    return {
      url: image?.media_details?.sizes?.[size]?.source_url ?? image?.source_url,
      alt: image?.alt_text
    };
  }
  function getCurrentAuthor(post) {
    return post._embedded?.author?.[0];
  }
  function Controls({ attributes: attributes2, setAttributes }) {
    const {
      postsToShow,
      order,
      orderBy,
      categories,
      selectedAuthor,
      displayFeaturedImage,
      displayPostContentRadio,
      displayPostContent,
      displayPostDate,
      displayAuthor,
      excerptLength,
      featuredImageAlign,
      featuredImageSizeSlug,
      featuredImageSizeWidth,
      featuredImageSizeHeight,
      addLinkToFeaturedImage
    } = attributes2;
    const {
      imageSizes,
      defaultImageWidth,
      defaultImageHeight,
      categoriesList,
      authorList
    } = (0, import_data52.useSelect)(
      (select10) => {
        const { getEntityRecords, getUsers } = select10(import_core_data28.store);
        const settings117 = select10(import_block_editor111.store).getSettings();
        return {
          defaultImageWidth: settings117.imageDimensions?.[featuredImageSizeSlug]?.width ?? 0,
          defaultImageHeight: settings117.imageDimensions?.[featuredImageSizeSlug]?.height ?? 0,
          imageSizes: settings117.imageSizes,
          categoriesList: getEntityRecords(
            "taxonomy",
            "category",
            CATEGORIES_LIST_QUERY
          ),
          authorList: getUsers(USERS_LIST_QUERY)
        };
      },
      [featuredImageSizeSlug]
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const imageSizeOptions = imageSizes.filter(({ slug }) => slug !== "full").map(({ name: name118, slug }) => ({
      value: slug,
      label: name118
    }));
    const categorySuggestions = categoriesList?.reduce((accumulator, category) => {
      accumulator[category.name] = category;
      return accumulator;
    }, {}) ?? {};
    const selectCategories = (tokens) => {
      const hasNoSuggestion = tokens.some(
        (token) => typeof token === "string" && !categorySuggestions[token]
      );
      if (hasNoSuggestion) {
        return;
      }
      const allCategories = tokens.map((token) => {
        return typeof token === "string" ? categorySuggestions[token] : token;
      });
      if (allCategories.includes(null)) {
        return false;
      }
      setAttributes({ categories: allCategories });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(import_jsx_runtime315.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
        import_components58.__experimentalToolsPanel,
        {
          label: (0, import_i18n98.__)("Post content"),
          resetAll: () => setAttributes({
            displayPostContent: false,
            displayPostContentRadio: "excerpt",
            excerptLength: DEFAULT_EXCERPT_LENGTH
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayPostContent,
                label: (0, import_i18n98.__)("Display post content"),
                onDeselect: () => setAttributes({ displayPostContent: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n98.__)("Display post content"),
                    checked: displayPostContent,
                    onChange: (value) => setAttributes({ displayPostContent: value })
                  }
                )
              }
            ),
            displayPostContent && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => displayPostContentRadio !== "excerpt",
                label: (0, import_i18n98.__)("Content length"),
                onDeselect: () => setAttributes({
                  displayPostContentRadio: "excerpt"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.RadioControl,
                  {
                    label: (0, import_i18n98.__)("Content length"),
                    selected: displayPostContentRadio,
                    options: [
                      { label: (0, import_i18n98.__)("Excerpt"), value: "excerpt" },
                      {
                        label: (0, import_i18n98.__)("Full post"),
                        value: "full_post"
                      }
                    ],
                    onChange: (value) => setAttributes({
                      displayPostContentRadio: value
                    })
                  }
                )
              }
            ),
            displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => excerptLength !== DEFAULT_EXCERPT_LENGTH,
                label: (0, import_i18n98.__)("Max number of words"),
                onDeselect: () => setAttributes({
                  excerptLength: DEFAULT_EXCERPT_LENGTH
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.RangeControl,
                  {
                    label: (0, import_i18n98.__)("Max number of words"),
                    value: excerptLength,
                    onChange: (value) => setAttributes({ excerptLength: value }),
                    min: MIN_EXCERPT_LENGTH,
                    max: MAX_EXCERPT_LENGTH
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
        import_components58.__experimentalToolsPanel,
        {
          label: (0, import_i18n98.__)("Post meta"),
          resetAll: () => setAttributes({
            displayAuthor: false,
            displayPostDate: false
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayAuthor,
                label: (0, import_i18n98.__)("Display author name"),
                onDeselect: () => setAttributes({ displayAuthor: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n98.__)("Display author name"),
                    checked: displayAuthor,
                    onChange: (value) => setAttributes({ displayAuthor: value })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayPostDate,
                label: (0, import_i18n98.__)("Display post date"),
                onDeselect: () => setAttributes({ displayPostDate: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n98.__)("Display post date"),
                    checked: displayPostDate,
                    onChange: (value) => setAttributes({ displayPostDate: value })
                  }
                )
              }
            )
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
        import_components58.__experimentalToolsPanel,
        {
          label: (0, import_i18n98.__)("Featured image"),
          resetAll: () => setAttributes({
            displayFeaturedImage: false,
            featuredImageAlign: void 0,
            featuredImageSizeSlug: "thumbnail",
            featuredImageSizeWidth: null,
            featuredImageSizeHeight: null,
            addLinkToFeaturedImage: false
          }),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
              import_components58.__experimentalToolsPanelItem,
              {
                hasValue: () => !!displayFeaturedImage,
                label: (0, import_i18n98.__)("Display featured image"),
                onDeselect: () => setAttributes({ displayFeaturedImage: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  import_components58.ToggleControl,
                  {
                    label: (0, import_i18n98.__)("Display featured image"),
                    checked: displayFeaturedImage,
                    onChange: (value) => setAttributes({ displayFeaturedImage: value })
                  }
                )
              }
            ),
            displayFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(import_jsx_runtime315.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                import_components58.__experimentalToolsPanelItem,
                {
                  hasValue: () => featuredImageSizeSlug !== "thumbnail" || featuredImageSizeWidth !== null || featuredImageSizeHeight !== null,
                  label: (0, import_i18n98.__)("Image size"),
                  onDeselect: () => setAttributes({
                    featuredImageSizeSlug: "thumbnail",
                    featuredImageSizeWidth: null,
                    featuredImageSizeHeight: null
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                    import_block_editor111.__experimentalImageSizeControl,
                    {
                      onChange: (value) => {
                        const newAttrs = {};
                        if (value.hasOwnProperty("width")) {
                          newAttrs.featuredImageSizeWidth = value.width;
                        }
                        if (value.hasOwnProperty("height")) {
                          newAttrs.featuredImageSizeHeight = value.height;
                        }
                        setAttributes(newAttrs);
                      },
                      slug: featuredImageSizeSlug,
                      width: featuredImageSizeWidth,
                      height: featuredImageSizeHeight,
                      imageWidth: defaultImageWidth,
                      imageHeight: defaultImageHeight,
                      imageSizeOptions,
                      imageSizeHelp: (0, import_i18n98.__)(
                        "Select the size of the source image."
                      ),
                      onChangeImage: (value) => setAttributes({
                        featuredImageSizeSlug: value,
                        featuredImageSizeWidth: void 0,
                        featuredImageSizeHeight: void 0
                      })
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                import_components58.__experimentalToolsPanelItem,
                {
                  hasValue: () => !!featuredImageAlign,
                  label: (0, import_i18n98.__)("Image alignment"),
                  onDeselect: () => setAttributes({
                    featuredImageAlign: void 0
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                    import_components58.__experimentalToggleGroupControl,
                    {
                      className: "editor-latest-posts-image-alignment-control",
                      label: (0, import_i18n98.__)("Image alignment"),
                      value: featuredImageAlign || "none",
                      onChange: (value) => setAttributes({
                        featuredImageAlign: value !== "none" ? value : void 0
                      }),
                      children: imageAlignmentOptions.map(
                        ({ value, icon: icon2, label }) => {
                          return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                            import_components58.__experimentalToggleGroupControlOptionIcon,
                            {
                              value,
                              icon: icon2,
                              label
                            },
                            value
                          );
                        }
                      )
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                import_components58.__experimentalToolsPanelItem,
                {
                  hasValue: () => !!addLinkToFeaturedImage,
                  label: (0, import_i18n98.__)("Add link to featured image"),
                  onDeselect: () => setAttributes({
                    addLinkToFeaturedImage: false
                  }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                    import_components58.ToggleControl,
                    {
                      label: (0, import_i18n98.__)("Add link to featured image"),
                      checked: addLinkToFeaturedImage,
                      onChange: (value) => setAttributes({
                        addLinkToFeaturedImage: value
                      })
                    }
                  )
                }
              )
            ] })
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
        import_components58.__experimentalToolsPanel,
        {
          label: (0, import_i18n98.__)("Sorting and filtering"),
          resetAll: () => setAttributes({
            order: "desc",
            orderBy: "date",
            postsToShow: 5,
            categories: void 0,
            selectedAuthor: void 0
          }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
            import_components58.__experimentalToolsPanelItem,
            {
              hasValue: () => order !== "desc" || orderBy !== "date" || postsToShow !== 5 || categories?.length > 0 || !!selectedAuthor,
              label: (0, import_i18n98.__)("Sort and filter"),
              onDeselect: () => setAttributes({
                order: "desc",
                orderBy: "date",
                postsToShow: 5,
                categories: void 0,
                selectedAuthor: void 0
              }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                import_components58.QueryControls,
                {
                  ...{ order, orderBy },
                  numberOfItems: postsToShow,
                  onOrderChange: (value) => setAttributes({ order: value }),
                  onOrderByChange: (value) => setAttributes({ orderBy: value }),
                  onNumberOfItemsChange: (value) => setAttributes({ postsToShow: value }),
                  categorySuggestions,
                  onCategoryChange: selectCategories,
                  selectedCategories: categories,
                  onAuthorChange: (value) => setAttributes({
                    selectedAuthor: "" !== value ? Number(value) : void 0
                  }),
                  authorList: authorList ?? [],
                  selectedAuthorId: selectedAuthor
                }
              )
            }
          )
        }
      )
    ] });
  }
  function LatestPostsEdit({
    attributes: attributes2,
    setAttributes,
    __unstableLayoutClassNames
  }) {
    const instanceId = (0, import_compose30.useInstanceId)(LatestPostsEdit);
    const {
      postsToShow,
      order,
      orderBy,
      categories,
      selectedAuthor,
      displayFeaturedImage,
      displayPostContentRadio,
      displayPostContent,
      displayPostDate,
      displayAuthor,
      layout,
      postLayout,
      columns,
      excerptLength,
      featuredImageAlign,
      featuredImageSizeSlug,
      featuredImageSizeWidth,
      featuredImageSizeHeight,
      addLinkToFeaturedImage
    } = attributes2;
    const { type: savedLayoutType, minimumColumnWidth } = layout || {};
    const layoutType = savedLayoutType || (postLayout === "grid" ? "grid" : "default");
    const columnCount = layout?.columnCount ?? (!savedLayoutType ? columns : void 0) ?? 3;
    const { latestPosts } = (0, import_data52.useSelect)(
      (select10) => {
        const { getEntityRecords } = select10(import_core_data28.store);
        const catIds = categories && categories.length > 0 ? categories.map((cat) => cat.id) : [];
        const latestPostsQuery = Object.fromEntries(
          Object.entries({
            categories: catIds,
            author: selectedAuthor,
            order,
            orderby: orderBy,
            per_page: postsToShow,
            _embed: "author,wp:featuredmedia",
            ignore_sticky: true
          }).filter(([, value]) => typeof value !== "undefined")
        );
        return {
          latestPosts: getEntityRecords(
            "postType",
            "post",
            latestPostsQuery
          )
        };
      },
      [postsToShow, order, orderBy, categories, selectedAuthor]
    );
    const { createWarningNotice } = (0, import_data52.useDispatch)(import_notices9.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n98.__)("Links are disabled in the editor."), {
        id: `block-library/core/latest-posts/redirection-prevented/${instanceId}`,
        type: "snackbar"
      });
    };
    const hasPosts = !!latestPosts?.length;
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_block_editor111.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
      Controls,
      {
        attributes: attributes2,
        setAttributes
      }
    ) });
    const blockProps = (0, import_block_editor111.useBlockProps)({
      className: clsx_default(__unstableLayoutClassNames, {
        "wp-block-latest-posts__list": true,
        "is-grid": layoutType === "grid",
        "has-dates": displayPostDate,
        "has-author": displayAuthor,
        [`columns-${columnCount}`]: layoutType === "grid" && columnCount,
        "has-native-responsive-grid": layoutType === "grid" && columnCount && minimumColumnWidth
      })
    });
    if (!hasPosts) {
      return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { ...blockProps, children: [
        inspectorControls,
        /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components58.Placeholder, { icon: pin_default, label: (0, import_i18n98.__)("Latest Posts"), children: !Array.isArray(latestPosts) ? /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components58.Spinner, {}) : (0, import_i18n98.__)("No posts found.") })
      ] });
    }
    const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
    const setDisplayLayout = (newDisplayLayout) => setAttributes({
      layout: { ...layout, ...newDisplayLayout },
      postLayout: void 0,
      columns: void 0
    });
    const layoutControls = [
      {
        icon: list_default,
        title: (0, import_i18n98._x)("List view", "Latest posts block display setting"),
        onClick: () => setDisplayLayout({ type: "default" }),
        isActive: layoutType === "default" || layoutType === "constrained"
      },
      {
        icon: grid_default,
        title: (0, import_i18n98._x)("Grid view", "Latest posts block display setting"),
        onClick: () => setDisplayLayout({
          type: "grid",
          columnCount
        }),
        isActive: layoutType === "grid"
      }
    ];
    const dateFormat = (0, import_date2.getSettings)().formats.date;
    return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(import_jsx_runtime315.Fragment, { children: [
      inspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_block_editor111.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(import_components58.ToolbarGroup, { controls: layoutControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("ul", { ...blockProps, children: displayPosts.map((post) => {
        const titleTrimmed = post.title.rendered.trim();
        let excerpt = post.excerpt.rendered;
        const currentAuthor = getCurrentAuthor(post);
        const excerptElement = document.createElement("div");
        excerptElement.innerHTML = excerpt;
        excerpt = excerptElement.textContent || excerptElement.innerText || "";
        const { url: imageSourceUrl, alt: featuredImageAlt } = getFeaturedImageDetails(post, featuredImageSizeSlug);
        const imageClasses = clsx_default({
          "wp-block-latest-posts__featured-image": true,
          [`align${featuredImageAlign}`]: !!featuredImageAlign
        });
        const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
        const featuredImage = renderFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
          "img",
          {
            src: imageSourceUrl,
            alt: featuredImageAlt,
            style: {
              maxWidth: featuredImageSizeWidth,
              maxHeight: featuredImageSizeHeight
            }
          }
        );
        const needsReadMore = excerptLength < excerpt.trim().split(" ").length && post.excerpt.raw === "";
        const postExcerpt = needsReadMore ? /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(import_jsx_runtime315.Fragment, { children: [
          excerpt.trim().split(" ", excerptLength).join(" "),
          (0, import_element76.createInterpolateElement)(
            (0, import_i18n98.sprintf)(
              /* translators: 1: Hidden accessibility text: Post title */
              (0, import_i18n98.__)(
                "\u2026 <a>Read more<span>: %1$s</span></a>"
              ),
              titleTrimmed || (0, import_i18n98.__)("(no title)")
            ),
            {
              a: (
                // eslint-disable-next-line jsx-a11y/anchor-has-content
                /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
                  "a",
                  {
                    className: "wp-block-latest-posts__read-more",
                    href: post.link,
                    rel: "noopener",
                    onClick: showRedirectionPreventedNotice
                  }
                )
              ),
              span: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("span", { className: "screen-reader-text" })
            }
          )
        ] }) : excerpt;
        return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("li", { children: [
          renderFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: imageClasses, children: addLinkToFeaturedImage ? /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
            "a",
            {
              href: post.link,
              onClick: showRedirectionPreventedNotice,
              children: featuredImage
            }
          ) : featuredImage }),
          /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
            "a",
            {
              className: "wp-block-latest-posts__post-title",
              href: post.link,
              dangerouslySetInnerHTML: !!titleTrimmed ? {
                __html: titleTrimmed
              } : void 0,
              onClick: showRedirectionPreventedNotice,
              children: !titleTrimmed ? (0, import_i18n98.__)("(no title)") : null
            }
          ),
          displayAuthor && currentAuthor && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "wp-block-latest-posts__post-author", children: (0, import_i18n98.sprintf)(
            /* translators: byline. %s: author. */
            (0, import_i18n98.__)("by %s"),
            currentAuthor.name
          ) }),
          displayPostDate && post.date_gmt && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
            "time",
            {
              dateTime: (0, import_date2.format)("c", post.date_gmt),
              className: "wp-block-latest-posts__post-date",
              children: (0, import_date2.dateI18n)(dateFormat, post.date_gmt)
            }
          ),
          displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "wp-block-latest-posts__post-excerpt", children: postExcerpt }),
          displayPostContent && displayPostContentRadio === "full_post" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
            "div",
            {
              className: "wp-block-latest-posts__post-full-content",
              dangerouslySetInnerHTML: {
                __html: post.content.rendered.trim()
              }
            }
          )
        ] }, post.id);
      }) })
    ] });
  }

  // packages/block-library/build-module/latest-posts/index.mjs
  var { name: name42 } = block_default42;
  var settings42 = {
    icon: post_list_default,
    example: {},
    edit: LatestPostsEdit,
    deprecated: deprecated_default22
  };
  var init42 = () => initBlock({ name: name42, metadata: block_default42, settings: settings42 });

  // packages/block-library/build-module/list/index.mjs
  var list_exports = {};
  __export(list_exports, {
    init: () => init43,
    metadata: () => block_default43,
    name: () => name43,
    settings: () => settings43
  });
  var import_i18n101 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/list/deprecated.mjs
  var import_block_editor112 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/list/utils.mjs
  var import_blocks36 = __toESM(require_blocks(), 1);
  var LIST_STYLES = {
    A: "upper-alpha",
    a: "lower-alpha",
    I: "upper-roman",
    i: "lower-roman"
  };
  function createListBlockFromDOMElement(listElement) {
    const type = listElement.getAttribute("type");
    const listAttributes = {
      ordered: "OL" === listElement.tagName,
      anchor: listElement.id ? listElement.id : void 0,
      start: listElement.getAttribute("start") ? parseInt(listElement.getAttribute("start"), 10) : void 0,
      reversed: listElement.hasAttribute("reversed") ? true : void 0,
      type: type && LIST_STYLES[type] ? LIST_STYLES[type] : void 0
    };
    const innerBlocks = Array.from(listElement.children).map(
      (listItem) => {
        const children = Array.from(listItem.childNodes).filter(
          (node) => node.nodeType !== node.TEXT_NODE || node.textContent.trim().length !== 0
        );
        children.reverse();
        const [nestedList, ...nodes] = children;
        const hasNestedList = nestedList?.tagName === "UL" || nestedList?.tagName === "OL";
        if (!hasNestedList) {
          return (0, import_blocks36.createBlock)("core/list-item", {
            content: listItem.innerHTML
          });
        }
        const htmlNodes = nodes.map((node) => {
          if (node.nodeType === node.TEXT_NODE) {
            return node.textContent;
          }
          return node.outerHTML;
        });
        htmlNodes.reverse();
        const childAttributes = {
          content: htmlNodes.join("").trim()
        };
        const childInnerBlocks = [
          createListBlockFromDOMElement(nestedList)
        ];
        return (0, import_blocks36.createBlock)(
          "core/list-item",
          childAttributes,
          childInnerBlocks
        );
      }
    );
    return (0, import_blocks36.createBlock)("core/list", listAttributes, innerBlocks);
  }
  function migrateToListV2(attributes2) {
    const { values, start, reversed, ordered, type, ...otherAttributes } = attributes2;
    const list = document.createElement(ordered ? "ol" : "ul");
    list.innerHTML = values;
    if (start) {
      list.setAttribute("start", start);
    }
    if (reversed) {
      list.setAttribute("reversed", true);
    }
    if (type) {
      list.setAttribute("type", type);
    }
    const [listBlock] = (0, import_blocks36.rawHandler)({ HTML: list.outerHTML });
    return [
      { ...otherAttributes, ...listBlock.attributes },
      listBlock.innerBlocks
    ];
  }
  function migrateTypeToInlineStyle(attributes2) {
    const { type } = attributes2;
    if (type && LIST_STYLES[type]) {
      return {
        ...attributes2,
        type: LIST_STYLES[type]
      };
    }
    return attributes2;
  }

  // packages/block-library/build-module/list/deprecated.mjs
  var import_jsx_runtime316 = __toESM(require_jsx_runtime(), 1);
  var v0 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      color: {
        gradients: true,
        link: true
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, values, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(TagName2, { ...import_block_editor112.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(import_block_editor112.RichText.Content, { value: values, multiline: "li" }) });
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var v120 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, values, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(TagName2, { ...import_block_editor112.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(import_block_editor112.RichText.Content, { value: values, multiline: "li" }) });
    },
    migrate: migrateToListV2
  };
  var v210 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalSlashInserter: true
    },
    isEligible({ type }) {
      return !!type;
    },
    save({ attributes: attributes2 }) {
      const { ordered, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(TagName2, { ...import_block_editor112.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(import_block_editor112.InnerBlocks.Content, {}) });
    },
    migrate: migrateTypeToInlineStyle
  };
  var v37 = {
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        __unstableMultilineWrapperTags: ["ol", "ul"],
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      className: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalSelector: "ol,ul",
      __experimentalOnMerge: "true",
      __experimentalSlashInserter: true
    },
    save({ attributes: attributes2 }) {
      const { ordered, type, reversed, start } = attributes2;
      const TagName2 = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
        TagName2,
        {
          ...import_block_editor112.useBlockProps.save({
            reversed,
            start,
            style: {
              listStyleType: ordered && type !== "decimal" ? type : void 0
            }
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(import_block_editor112.InnerBlocks.Content, {})
        }
      );
    }
  };
  var deprecated_default23 = [v37, v210, v120, v0];

  // packages/block-library/build-module/list/edit.mjs
  var import_block_editor114 = __toESM(require_block_editor(), 1);
  var import_components60 = __toESM(require_components(), 1);
  var import_data53 = __toESM(require_data(), 1);
  var import_i18n100 = __toESM(require_i18n(), 1);
  var import_blocks37 = __toESM(require_blocks(), 1);
  var import_element78 = __toESM(require_element(), 1);
  var import_deprecated25 = __toESM(require_deprecated(), 1);

  // packages/block-library/build-module/list/ordered-list-settings.mjs
  var import_i18n99 = __toESM(require_i18n(), 1);
  var import_block_editor113 = __toESM(require_block_editor(), 1);
  var import_components59 = __toESM(require_components(), 1);
  var import_jsx_runtime317 = __toESM(require_jsx_runtime(), 1);
  var LIST_STYLE_OPTIONS = [
    {
      label: (0, import_i18n99.__)("Numbers"),
      value: "decimal"
    },
    {
      label: (0, import_i18n99.__)("Uppercase letters"),
      value: "upper-alpha"
    },
    {
      label: (0, import_i18n99.__)("Lowercase letters"),
      value: "lower-alpha"
    },
    {
      label: (0, import_i18n99.__)("Uppercase Roman numerals"),
      value: "upper-roman"
    },
    {
      label: (0, import_i18n99.__)("Lowercase Roman numerals"),
      value: "lower-roman"
    }
  ];
  var OrderedListSettings = ({ setAttributes, reversed, start, type }) => {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(import_block_editor113.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
      import_components59.__experimentalToolsPanel,
      {
        label: (0, import_i18n99.__)("Settings"),
        resetAll: () => {
          setAttributes({
            type: void 0,
            start: void 0,
            reversed: void 0
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
            import_components59.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n99.__)("List style"),
              isShownByDefault: true,
              hasValue: () => !!type,
              onDeselect: () => setAttributes({
                type: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
                import_components59.SelectControl,
                {
                  label: (0, import_i18n99.__)("List style"),
                  options: LIST_STYLE_OPTIONS,
                  value: type || "decimal",
                  onChange: (newValue) => setAttributes({ type: newValue })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
            import_components59.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n99.__)("Start value"),
              isShownByDefault: true,
              hasValue: () => !!start,
              onDeselect: () => setAttributes({
                start: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
                import_components59.TextControl,
                {
                  label: (0, import_i18n99.__)("Start value"),
                  type: "number",
                  onChange: (value) => {
                    const int = parseInt(value, 10);
                    setAttributes({
                      // It should be possible to unset the value,
                      // e.g. with an empty string.
                      start: isNaN(int) ? void 0 : int
                    });
                  },
                  value: Number.isInteger(start) ? start.toString(10) : "",
                  step: "1"
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
            import_components59.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n99.__)("Reverse order"),
              isShownByDefault: true,
              hasValue: () => !!reversed,
              onDeselect: () => setAttributes({
                reversed: void 0
              }),
              children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
                import_components59.ToggleControl,
                {
                  label: (0, import_i18n99.__)("Reverse order"),
                  checked: reversed || false,
                  onChange: (value) => {
                    setAttributes({
                      // Unset the attribute if not reversed.
                      reversed: value || void 0
                    });
                  }
                }
              )
            }
          )
        ]
      }
    ) });
  };
  var ordered_list_settings_default = OrderedListSettings;

  // packages/block-library/build-module/list/tag-name.mjs
  var import_element77 = __toESM(require_element(), 1);
  var import_jsx_runtime318 = __toESM(require_jsx_runtime(), 1);
  function TagName(props, ref) {
    const { ordered, ...extraProps } = props;
    const Tag = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(Tag, { ref, ...extraProps });
  }
  var tag_name_default = (0, import_element77.forwardRef)(TagName);

  // packages/block-library/build-module/list/edit.mjs
  var import_jsx_runtime319 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK4 = {
    name: "core/list-item"
  };
  function useMigrateOnLoad(attributes2, clientId) {
    const registry = (0, import_data53.useRegistry)();
    const { updateBlockAttributes, replaceInnerBlocks, selectBlock } = (0, import_data53.useDispatch)(import_block_editor114.store);
    (0, import_element78.useEffect)(() => {
      if (!attributes2.values) {
        return;
      }
      const [newAttributes, newInnerBlocks] = migrateToListV2(attributes2);
      (0, import_deprecated25.default)("Value attribute on the list block", {
        since: "6.0",
        version: "6.5",
        alternative: "inner blocks"
      });
      const shouldReselectBlock = registry.select(import_block_editor114.store).hasSelectedInnerBlock(clientId, true);
      registry.batch(() => {
        updateBlockAttributes(clientId, newAttributes);
        replaceInnerBlocks(clientId, newInnerBlocks);
        if (shouldReselectBlock) {
          selectBlock(clientId);
        }
      });
    }, [attributes2.values]);
  }
  function useOutdentList(clientId) {
    const { replaceBlocks, selectionChange } = (0, import_data53.useDispatch)(import_block_editor114.store);
    const { getBlockRootClientId, getBlockAttributes: getBlockAttributes4, getBlock } = (0, import_data53.useSelect)(import_block_editor114.store);
    return (0, import_element78.useCallback)(() => {
      const parentBlockId = getBlockRootClientId(clientId);
      const parentBlockAttributes = getBlockAttributes4(parentBlockId);
      const newParentBlock = (0, import_blocks37.createBlock)(
        "core/list-item",
        parentBlockAttributes
      );
      const { innerBlocks } = getBlock(clientId);
      replaceBlocks([parentBlockId], [newParentBlock, ...innerBlocks]);
      selectionChange(innerBlocks[innerBlocks.length - 1].clientId);
    }, [clientId]);
  }
  function IndentUI({ clientId }) {
    const outdentList = useOutdentList(clientId);
    const canOutdent = (0, import_data53.useSelect)(
      (select10) => {
        const { getBlockRootClientId, getBlockName } = select10(import_block_editor114.store);
        return getBlockName(getBlockRootClientId(clientId)) === "core/list-item";
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(import_jsx_runtime319.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
      import_components60.ToolbarButton,
      {
        icon: (0, import_i18n100.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
        title: (0, import_i18n100.__)("Outdent"),
        description: (0, import_i18n100.__)("Outdent list item"),
        disabled: !canOutdent,
        onClick: outdentList
      }
    ) });
  }
  function Edit14({ attributes: attributes2, setAttributes, clientId }) {
    const { ordered, type, reversed, start } = attributes2;
    const blockProps = (0, import_block_editor114.useBlockProps)({
      style: {
        listStyleType: ordered && type !== "decimal" ? type : void 0
      }
    });
    const innerBlocksProps = (0, import_block_editor114.useInnerBlocksProps)(blockProps, {
      defaultBlock: DEFAULT_BLOCK4,
      directInsert: true,
      templateLock: false,
      __experimentalCaptureToolbars: true
    });
    useMigrateOnLoad(attributes2, clientId);
    const controls = /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_block_editor114.BlockControls, { group: "block", children: [
      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        import_components60.ToolbarButton,
        {
          icon: (0, import_i18n100.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
          title: (0, import_i18n100.__)("Unordered"),
          description: (0, import_i18n100.__)("Convert to unordered list"),
          isActive: ordered === false,
          onClick: () => {
            setAttributes({ ordered: false });
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        import_components60.ToolbarButton,
        {
          icon: (0, import_i18n100.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
          title: (0, import_i18n100.__)("Ordered"),
          description: (0, import_i18n100.__)("Convert to ordered list"),
          isActive: ordered === true,
          onClick: () => {
            setAttributes({ ordered: true });
          }
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(IndentUI, { clientId })
    ] });
    return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)(import_jsx_runtime319.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        tag_name_default,
        {
          ordered,
          reversed,
          start,
          ...innerBlocksProps
        }
      ),
      controls,
      ordered && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
        ordered_list_settings_default,
        {
          ...{
            setAttributes,
            reversed,
            start,
            type
          }
        }
      )
    ] });
  }

  // packages/block-library/build-module/list/block.json
  var block_default43 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/list",
    title: "List",
    category: "text",
    allowedBlocks: ["core/list-item"],
    description: "An organized collection of items displayed in a specific order.",
    keywords: ["bullet list", "ordered list", "numbered list"],
    textdomain: "default",
    attributes: {
      ordered: {
        type: "boolean",
        default: false,
        role: "content"
      },
      values: {
        type: "string",
        source: "html",
        selector: "ol,ul",
        multiline: "li",
        default: "",
        role: "content"
      },
      type: {
        type: "string"
      },
      start: {
        type: "number"
      },
      reversed: {
        type: "boolean"
      },
      placeholder: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __unstablePasteTextInline: true,
      __experimentalOnMerge: true,
      __experimentalSlashInserter: true,
      interactivity: {
        clientNavigation: true
      },
      listView: true
    },
    selectors: {
      border: ".wp-block-list:not(.wp-block-list .wp-block-list)"
    },
    editorStyle: "wp-block-list-editor",
    style: "wp-block-list"
  };

  // packages/block-library/build-module/list/save.mjs
  var import_block_editor115 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime320 = __toESM(require_jsx_runtime(), 1);
  function save23({ attributes: attributes2 }) {
    const { ordered, type, reversed, start } = attributes2;
    const TagName2 = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
      TagName2,
      {
        ...import_block_editor115.useBlockProps.save({
          reversed,
          start,
          style: {
            listStyleType: ordered && type !== "decimal" ? type : void 0
          }
        }),
        children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(import_block_editor115.InnerBlocks.Content, {})
      }
    );
  }

  // packages/block-library/build-module/list/transforms.mjs
  var import_blocks38 = __toESM(require_blocks(), 1);
  var import_rich_text4 = __toESM(require_rich_text(), 1);
  function getListContentSchema({ phrasingContentSchema }) {
    const listContentSchema = {
      ...phrasingContentSchema,
      ul: {},
      ol: { attributes: ["type", "start", "reversed"] }
    };
    ["ul", "ol"].forEach((tag) => {
      listContentSchema[tag].children = {
        li: {
          children: listContentSchema
        }
      };
    });
    return listContentSchema;
  }
  function getListContentFlat(blocks) {
    return blocks.flatMap(({ name: name118, attributes: attributes2, innerBlocks = [] }) => {
      if (name118 === "core/list-item") {
        return [attributes2.content, ...getListContentFlat(innerBlocks)];
      }
      return getListContentFlat(innerBlocks);
    });
  }
  var transforms14 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph", "core/heading"],
        transform: (blockAttributes8) => {
          let childBlocks = [];
          if (blockAttributes8.length > 1) {
            childBlocks = blockAttributes8.map(({ content }) => {
              return (0, import_blocks38.createBlock)("core/list-item", { content });
            });
          } else if (blockAttributes8.length === 1) {
            const value = (0, import_rich_text4.create)({
              html: blockAttributes8[0].content
            });
            childBlocks = (0, import_rich_text4.split)(value, "\n").map((result) => {
              return (0, import_blocks38.createBlock)("core/list-item", {
                content: (0, import_rich_text4.toHTMLString)({ value: result })
              });
            });
          }
          return (0, import_blocks38.createBlock)(
            "core/list",
            {
              anchor: blockAttributes8.anchor
            },
            childBlocks
          );
        }
      },
      {
        type: "raw",
        selector: "ol,ul",
        schema: (args) => ({
          ol: getListContentSchema(args).ol,
          ul: getListContentSchema(args).ul
        }),
        transform: createListBlockFromDOMElement
      },
      ...["*", "-"].map((prefix) => ({
        type: "prefix",
        prefix,
        transform(content) {
          return (0, import_blocks38.createBlock)("core/list", {}, [
            (0, import_blocks38.createBlock)("core/list-item", { content })
          ]);
        }
      })),
      ...["1.", "1)"].map((prefix) => ({
        type: "prefix",
        prefix,
        transform(content) {
          return (0, import_blocks38.createBlock)(
            "core/list",
            {
              ordered: true
            },
            [(0, import_blocks38.createBlock)("core/list-item", { content })]
          );
        }
      }))
    ],
    to: [
      ...["core/paragraph", "core/heading"].map((block) => ({
        type: "block",
        blocks: [block],
        transform: (_attributes, childBlocks) => {
          return getListContentFlat(childBlocks).map(
            (content) => (0, import_blocks38.createBlock)(block, {
              content
            })
          );
        }
      }))
    ]
  };
  var transforms_default15 = transforms14;

  // packages/block-library/build-module/list/index.mjs
  var { name: name43 } = block_default43;
  var TEMPLATE9 = [["core/list-item"]];
  var settings43 = {
    icon: list_default,
    example: {
      innerBlocks: [
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n101.__)("Alice.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n101.__)("The White Rabbit.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n101.__)("The Cheshire Cat.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n101.__)("The Mad Hatter.") }
        },
        {
          name: "core/list-item",
          attributes: { content: (0, import_i18n101.__)("The Queen of Hearts.") }
        }
      ]
    },
    transforms: transforms_default15,
    template: TEMPLATE9,
    templateInsertUpdatesSelection: true,
    edit: Edit14,
    save: save23,
    deprecated: deprecated_default23
  };
  var init43 = () => initBlock({ name: name43, metadata: block_default43, settings: settings43 });

  // packages/block-library/build-module/math/index.mjs
  var math_exports = {};
  __export(math_exports, {
    init: () => init44,
    metadata: () => block_default44,
    name: () => name44,
    settings: () => settings44
  });

  // packages/block-library/build-module/math/edit.mjs
  var import_i18n102 = __toESM(require_i18n(), 1);
  var import_block_editor116 = __toESM(require_block_editor(), 1);
  var import_components61 = __toESM(require_components(), 1);
  var import_element79 = __toESM(require_element(), 1);
  var import_data54 = __toESM(require_data(), 1);
  var import_compose31 = __toESM(require_compose(), 1);
  var import_jsx_runtime321 = __toESM(require_jsx_runtime(), 1);
  function MathEdit({ attributes: attributes2, setAttributes, isSelected }) {
    const { latex, mathML } = attributes2;
    const [blockRef, setBlockRef] = (0, import_element79.useState)();
    const [error2, setError] = (0, import_element79.useState)(null);
    const [latexToMathML, setLatexToMathML] = (0, import_element79.useState)();
    const formRef = (0, import_element79.useRef)();
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data54.useDispatch)(import_block_editor116.store);
    const renderLatest = (0, import_compose31.useEvent)((convert) => {
      if (!latex) {
        return;
      }
      try {
        const newMathML = convert(latex, { displayMode: true });
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ mathML: newMathML });
      } catch (err) {
        setError(err.message);
      }
    });
    (0, import_element79.useEffect)(() => {
      import("@wordpress/latex-to-mathml").then((module) => {
        setLatexToMathML(() => module.default);
        renderLatest(module.default);
      });
    }, [renderLatest]);
    const blockProps = (0, import_block_editor116.useBlockProps)({
      ref: setBlockRef,
      position: "relative"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("div", { ...blockProps, children: [
      mathML ? /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
        "math",
        {
          display: "block",
          dangerouslySetInnerHTML: { __html: mathML }
        }
      ) : (
        // Show the source until it renders, as the front end does.
        /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("math", { display: "block", children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("semantics", { children: /* @__PURE__ */ (0, import_jsx_runtime321.jsx)("annotation", { encoding: "application/x-tex", children: latex || "\u200B" }) }) })
      ),
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
        import_components61.Popover,
        {
          placement: "bottom-start",
          offset: 8,
          anchor: blockRef,
          focusOnMount: false,
          onFocusOutside: () => formRef.current?.reportValidity(),
          __unstableSlotName: "__unstable-block-tools-after",
          children: /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
            "form",
            {
              ref: formRef,
              style: { padding: "16px", minWidth: "300px" },
              onSubmit: (event) => event.preventDefault(),
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                  ValidatedTextareaControl,
                  {
                    label: (0, import_i18n102.__)("LaTeX math syntax"),
                    value: latex ?? "",
                    className: "wp-block-math__textarea-control",
                    customValidity: error2 ? { type: "invalid", message: error2 } : void 0,
                    onValueChange: (newLatex) => {
                      if (!latexToMathML) {
                        setAttributes({
                          latex: newLatex,
                          mathML: ""
                        });
                        return;
                      }
                      let newMathML = "";
                      try {
                        newMathML = latexToMathML(newLatex, {
                          displayMode: true
                        });
                        setError(null);
                      } catch (err) {
                        setError(err.message);
                      }
                      setAttributes({
                        mathML: newMathML,
                        latex: newLatex
                      });
                    },
                    placeholder: (0, import_i18n102.__)(
                      "e.g., x^2, \\frac{a}{b}, \\sqrt{x}"
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
                  Link,
                  {
                    openInNewTab: true,
                    className: "wp-block-math__learn-more",
                    href: (0, import_i18n102.__)(
                      "https://wordpress.org/documentation/article/math-block/"
                    ),
                    children: (0, import_i18n102.__)("Learn more about LaTeX syntax")
                  }
                )
              ]
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/math/block.json
  var block_default44 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/math",
    title: "Math",
    category: "text",
    description: "Display mathematical notation using LaTeX.",
    keywords: ["equation", "formula", "latex", "mathematics"],
    textdomain: "default",
    supports: {
      anchor: true,
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    attributes: {
      latex: {
        type: "string",
        source: "text",
        selector: 'math annotation[encoding="application/x-tex"]',
        role: "content"
      },
      mathML: {
        type: "string",
        source: "html",
        selector: "math"
      }
    }
  };

  // packages/block-library/build-module/math/save.mjs
  var import_block_editor117 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime322 = __toESM(require_jsx_runtime(), 1);
  function save24({ attributes: attributes2 }) {
    const { latex, mathML } = attributes2;
    if (!latex) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { ...import_block_editor117.useBlockProps.save(), children: mathML ? /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
      "math",
      {
        display: "block",
        dangerouslySetInnerHTML: { __html: mathML }
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("math", { display: "block", children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("semantics", { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)("annotation", { encoding: "application/x-tex", children: latex }) }) }) });
  }

  // packages/block-library/build-module/math/deprecated.mjs
  var import_block_editor118 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime323 = __toESM(require_jsx_runtime(), 1);
  var legacyAttributes = {
    latex: {
      type: "string",
      role: "content"
    },
    mathML: {
      type: "string",
      source: "html",
      selector: "math"
    }
  };
  var v211 = {
    attributes: legacyAttributes,
    save({ attributes: attributes2 }) {
      const { latex, mathML } = attributes2;
      if (!latex) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { ...import_block_editor118.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
        "math",
        {
          display: "block",
          dangerouslySetInnerHTML: { __html: mathML }
        }
      ) });
    }
  };
  var v121 = {
    attributes: legacyAttributes,
    save({ attributes: attributes2 }) {
      const { latex, mathML } = attributes2;
      if (!latex) {
        return null;
      }
      return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
        "math",
        {
          ...import_block_editor118.useBlockProps.save(),
          display: "block",
          dangerouslySetInnerHTML: { __html: mathML }
        }
      );
    }
  };
  var deprecated_default24 = [v211, v121];

  // packages/block-library/build-module/math/index.mjs
  var { name: name44 } = block_default44;
  var settings44 = {
    icon: math_default,
    example: {
      attributes: {
        latex: "x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
        mathML: '<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">\u2212</mo><mi>b</mi><mo>\xB1</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>\u2212</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'
      },
      viewportWidth: 300
    },
    edit: MathEdit,
    save: save24,
    deprecated: deprecated_default24
  };
  var init44 = () => initBlock({ name: name44, metadata: block_default44, settings: settings44 });

  // packages/block-library/build-module/list-item/index.mjs
  var list_item_exports = {};
  __export(list_item_exports, {
    init: () => init45,
    metadata: () => block_default45,
    name: () => name45,
    settings: () => settings45
  });
  var import_block_editor126 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/list-item/block.json
  var block_default45 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/list-item",
    title: "List Item",
    category: "text",
    parent: ["core/list"],
    allowedBlocks: ["core/list"],
    description: "An individual item within a list.",
    textdomain: "default",
    attributes: {
      placeholder: {
        type: "string"
      },
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "li",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      html: false,
      className: false,
      splitting: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        background: true,
        __experimentalDefaultControls: {
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-list > li",
      border: ".wp-block-list:not(.wp-block-list .wp-block-list) > li"
    }
  };

  // packages/block-library/build-module/list-item/edit.mjs
  var import_block_editor124 = __toESM(require_block_editor(), 1);
  var import_i18n103 = __toESM(require_i18n(), 1);
  var import_components62 = __toESM(require_components(), 1);
  var import_compose35 = __toESM(require_compose(), 1);
  var import_data59 = __toESM(require_data(), 1);
  var import_keycodes5 = __toESM(require_keycodes(), 1);

  // packages/block-library/build-module/list-item/hooks/use-enter.mjs
  var import_blocks40 = __toESM(require_blocks(), 1);
  var import_compose32 = __toESM(require_compose(), 1);
  var import_rich_text5 = __toESM(require_rich_text(), 1);
  var import_data55 = __toESM(require_data(), 1);
  var import_block_editor120 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/list-item/utils.mjs
  var import_block_editor119 = __toESM(require_block_editor(), 1);
  var import_blocks39 = __toESM(require_blocks(), 1);
  function getIndentTarget(select10, clientId) {
    return select10.getPreviousBlockClientId(clientId);
  }
  function getOutdentTarget(select10, clientId) {
    const listId = select10.getBlockRootClientId(clientId);
    const parentListItemId = select10.getBlockRootClientId(listId);
    if (!parentListItemId || select10.getBlockName(parentListItemId) !== "core/list-item") {
      return void 0;
    }
    return parentListItemId;
  }
  function moveBlocksToNestedList(registry, clientIds, sourceListId, listItemId) {
    const { getBlockOrder, getBlock } = registry.select(import_block_editor119.store);
    const { moveBlocksToPosition, removeBlocks, insertBlock } = registry.dispatch(import_block_editor119.store);
    const nestedLists = getBlockOrder(listItemId);
    const nestedListId = nestedLists[nestedLists.length - 1];
    if (nestedListId) {
      moveBlocksToPosition(clientIds, sourceListId, nestedListId);
      return;
    }
    const nestedList = (0, import_blocks39.cloneBlock)(
      getBlock(sourceListId),
      {},
      clientIds.map((id) => getBlock(id))
    );
    registry.batch(() => {
      removeBlocks(clientIds, false);
      insertBlock(nestedList, 0, listItemId, false);
    });
  }
  function indentListItems(registry, clientId) {
    const select10 = registry.select(import_block_editor119.store);
    const {
      getBlockRootClientId,
      getSelectedBlockClientIds,
      getSelectionStart,
      getSelectionEnd,
      hasMultiSelection,
      getMultiSelectedBlockClientIds
    } = select10;
    const { selectionChange, multiSelect } = registry.dispatch(import_block_editor119.store);
    const _hasMultiSelection = hasMultiSelection();
    const clientIds = _hasMultiSelection ? getMultiSelectedBlockClientIds() : getSelectedBlockClientIds();
    if (clientId === void 0) {
      clientId = clientIds[0];
    }
    const previousSiblingId = getIndentTarget(select10, clientId);
    if (!previousSiblingId) {
      return false;
    }
    const rootClientId = getBlockRootClientId(clientId);
    const selectionStart = getSelectionStart();
    const selectionEnd = getSelectionEnd();
    registry.batch(() => {
      moveBlocksToNestedList(
        registry,
        clientIds,
        rootClientId,
        previousSiblingId
      );
      if (!_hasMultiSelection) {
        selectionChange(
          clientIds[0],
          selectionEnd.attributeKey,
          selectionEnd.clientId === selectionStart.clientId ? selectionStart.offset : selectionEnd.offset,
          selectionEnd.offset
        );
      } else {
        multiSelect(clientIds[0], clientIds[clientIds.length - 1]);
      }
    });
    return true;
  }
  function outdentListItems(registry, clientIds) {
    const select10 = registry.select(import_block_editor119.store);
    const {
      getBlockRootClientId,
      getBlockName,
      getBlockOrder,
      getBlockIndex,
      getSelectedBlockClientIds
    } = select10;
    const { moveBlocksToPosition, removeBlock, multiSelect } = registry.dispatch(import_block_editor119.store);
    if (clientIds === void 0) {
      clientIds = getSelectedBlockClientIds();
    }
    if (!Array.isArray(clientIds)) {
      clientIds = [clientIds];
    }
    if (!clientIds.length) {
      return false;
    }
    const firstClientId = clientIds[0];
    if (getBlockName(firstClientId) !== "core/list-item") {
      return false;
    }
    const parentListItemId = getOutdentTarget(select10, firstClientId);
    if (!parentListItemId) {
      return false;
    }
    const parentListId = getBlockRootClientId(firstClientId);
    const lastClientId = clientIds[clientIds.length - 1];
    const order = getBlockOrder(parentListId);
    const followingListItems = order.slice(getBlockIndex(lastClientId) + 1);
    registry.batch(() => {
      if (followingListItems.length) {
        moveBlocksToNestedList(
          registry,
          followingListItems,
          parentListId,
          firstClientId
        );
      }
      moveBlocksToPosition(
        clientIds,
        parentListId,
        getBlockRootClientId(parentListItemId),
        getBlockIndex(parentListItemId) + 1
      );
      if (!getBlockOrder(parentListId).length) {
        const shouldSelectParent = false;
        removeBlock(parentListId, shouldSelectParent);
      }
      if (clientIds.length > 1) {
        multiSelect(firstClientId, lastClientId);
      }
    });
    return true;
  }

  // packages/block-library/build-module/list-item/hooks/use-enter.mjs
  var { subscribeOwnedListener } = unlock(import_rich_text5.privateApis);
  function useEnter2(clientId) {
    const registry = (0, import_data55.useRegistry)();
    return (0, import_compose32.useRefEffect)(
      (element) => {
        function onBeforeInput(event) {
          if (event.defaultPrevented || event.inputType !== "insertParagraph") {
            return;
          }
          const select10 = registry.select(import_block_editor120.store);
          const {
            getBlock,
            getBlockAttributes: getBlockAttributes4,
            getBlockRootClientId,
            getBlockIndex
          } = select10;
          const { replaceBlocks, selectionChange } = registry.dispatch(import_block_editor120.store);
          const { content } = getBlockAttributes4(clientId) ?? {};
          if (content?.length) {
            return;
          }
          event.preventDefault();
          const canOutdent = !!getOutdentTarget(select10, clientId);
          if (canOutdent) {
            outdentListItems(registry);
            return;
          }
          const topParentListBlock = getBlock(
            getBlockRootClientId(clientId)
          );
          const blockIndex = getBlockIndex(clientId);
          const head = (0, import_blocks40.cloneBlock)({
            ...topParentListBlock,
            innerBlocks: topParentListBlock.innerBlocks.slice(
              0,
              blockIndex
            )
          });
          const middle = (0, import_blocks40.createBlock)((0, import_blocks40.getDefaultBlockName)());
          const after = [
            ...topParentListBlock.innerBlocks[blockIndex].innerBlocks[0]?.innerBlocks || [],
            ...topParentListBlock.innerBlocks.slice(blockIndex + 1)
          ];
          const tail = after.length ? [
            (0, import_blocks40.cloneBlock)({
              ...topParentListBlock,
              innerBlocks: after
            })
          ] : [];
          replaceBlocks(
            topParentListBlock.clientId,
            [head, middle, ...tail],
            1
          );
          selectionChange(middle.clientId);
        }
        return subscribeOwnedListener(
          element,
          "beforeinput",
          onBeforeInput,
          true
        );
      },
      [clientId, registry]
    );
  }

  // packages/block-library/build-module/list-item/hooks/use-tab.mjs
  var import_compose33 = __toESM(require_compose(), 1);
  var import_rich_text6 = __toESM(require_rich_text(), 1);
  var import_keycodes3 = __toESM(require_keycodes(), 1);
  var import_block_editor121 = __toESM(require_block_editor(), 1);
  var import_data56 = __toESM(require_data(), 1);
  var import_dom14 = __toESM(require_dom(), 1);
  var { subscribeOwnedListener: subscribeOwnedListener2 } = unlock(import_rich_text6.privateApis);
  function useTab() {
    const registry = (0, import_data56.useRegistry)();
    return (0, import_compose33.useRefEffect)(
      (element) => {
        function onKeyDown(event) {
          const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
          if (event.defaultPrevented || keyCode !== import_keycodes3.SPACE && keyCode !== import_keycodes3.TAB || // Shift selects outdent; other modifiers pass through.
          altKey || metaKey || ctrlKey) {
            return;
          }
          const { getSelectionStart, getSelectionEnd } = registry.select(import_block_editor121.store);
          const isAtStart = getSelectionStart().offset === 0 && getSelectionEnd().offset === 0;
          if (!isAtStart && !(keyCode === import_keycodes3.TAB && (0, import_dom14.isEntirelySelected)(element))) {
            return;
          }
          const move = shiftKey ? outdentListItems : indentListItems;
          if (move(registry)) {
            event.preventDefault();
          }
        }
        return subscribeOwnedListener2(
          element,
          "keydown",
          onKeyDown,
          true
        );
      },
      [registry]
    );
  }

  // packages/block-library/build-module/list-item/hooks/use-multi-select-tab.mjs
  var import_compose34 = __toESM(require_compose(), 1);
  var import_keycodes4 = __toESM(require_keycodes(), 1);
  var import_block_editor122 = __toESM(require_block_editor(), 1);
  var import_data57 = __toESM(require_data(), 1);
  function useMultiSelectTab(clientId) {
    const registry = (0, import_data57.useRegistry)();
    const isActive = (0, import_data57.useSelect)(
      (select10) => {
        const {
          hasMultiSelection,
          getMultiSelectedBlockClientIds,
          getBlockName
        } = select10(import_block_editor122.store);
        if (!hasMultiSelection()) {
          return false;
        }
        const clientIds = getMultiSelectedBlockClientIds();
        return clientIds[0] === clientId && clientIds.every(
          (id) => getBlockName(id) === "core/list-item"
        );
      },
      [clientId]
    );
    return (0, import_compose34.useRefEffect)(
      (element) => {
        if (!isActive) {
          return;
        }
        function onKeyDown(event) {
          const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
          if (keyCode !== import_keycodes4.TAB || event.defaultPrevented || altKey || metaKey || ctrlKey) {
            return;
          }
          if (!event.target.contains(element)) {
            return;
          }
          if (shiftKey) {
            if (outdentListItems(registry)) {
              event.preventDefault();
            }
          } else if (indentListItems(registry)) {
            event.preventDefault();
          }
        }
        const { ownerDocument: ownerDocument2 } = element;
        ownerDocument2.addEventListener("keydown", onKeyDown, true);
        return () => {
          ownerDocument2.removeEventListener("keydown", onKeyDown, true);
        };
      },
      [isActive, registry]
    );
  }

  // packages/block-library/build-module/list-item/hooks/use-merge.mjs
  var import_data58 = __toESM(require_data(), 1);
  var import_block_editor123 = __toESM(require_block_editor(), 1);
  var import_blocks41 = __toESM(require_blocks(), 1);
  function useMerge(clientId, onMerge) {
    const registry = (0, import_data58.useRegistry)();
    return (forward) => {
      const select10 = registry.select(import_block_editor123.store);
      const {
        getPreviousBlockClientId,
        getNextBlockClientId,
        getBlockOrder,
        getBlockIndex,
        getBlockRootClientId,
        getBlockName,
        getBlock
      } = select10;
      const { mergeBlocks, moveBlocksToPosition, removeBlock, insertBlocks } = registry.dispatch(import_block_editor123.store);
      function getTrailingId(id) {
        const order = getBlockOrder(id);
        if (!order.length) {
          return id;
        }
        return getTrailingId(order[order.length - 1]);
      }
      function mergeWithNested(clientIdA, clientIdB) {
        registry.batch(() => {
          const [nestedListClientId] = getBlockOrder(clientIdB);
          if (nestedListClientId) {
            if (getPreviousBlockClientId(clientIdB) === clientIdA && !getBlockOrder(clientIdA).length) {
              moveBlocksToPosition(
                [nestedListClientId],
                clientIdB,
                clientIdA
              );
            } else if (getOutdentTarget(select10, clientIdB) === clientIdA) {
              moveBlocksToPosition(
                getBlockOrder(nestedListClientId),
                nestedListClientId,
                getBlockRootClientId(clientIdB),
                getBlockIndex(clientIdB) + 1
              );
            } else {
              moveBlocksToPosition(
                getBlockOrder(nestedListClientId),
                nestedListClientId,
                getBlockRootClientId(clientIdA)
              );
            }
          }
          const listId = getBlockRootClientId(clientIdB);
          mergeBlocks(clientIdA, clientIdB);
          if (!getBlockOrder(listId).length) {
            removeBlock(listId, false);
          }
        });
      }
      if (forward) {
        const innerListId = getBlockOrder(clientId)[0];
        let nextBlockClientId;
        let listItemId = clientId;
        if (innerListId) {
          nextBlockClientId = getBlockOrder(innerListId)[0];
        } else {
          while (!(nextBlockClientId = getNextBlockClientId(listItemId))) {
            const parentLi = getOutdentTarget(select10, listItemId);
            if (!parentLi) {
              break;
            }
            listItemId = parentLi;
          }
        }
        if (!nextBlockClientId) {
          const outerListId = getBlockRootClientId(listItemId);
          const followingBlockId = getNextBlockClientId(outerListId);
          if (followingBlockId) {
            if (getBlockName(followingBlockId) === "core/list") {
              registry.batch(() => {
                moveBlocksToPosition(
                  getBlockOrder(followingBlockId),
                  followingBlockId,
                  outerListId
                );
                removeBlock(followingBlockId, false);
              });
            } else {
              const transformed = (0, import_blocks41.switchToBlockType)(
                getBlock(followingBlockId),
                "core/list"
              );
              const newInnerBlocks = transformed?.[0]?.innerBlocks;
              if (newInnerBlocks?.length) {
                registry.batch(() => {
                  insertBlocks(
                    newInnerBlocks,
                    void 0,
                    outerListId,
                    false
                  );
                  removeBlock(followingBlockId, false);
                });
              }
            }
          }
        } else {
          mergeWithNested(clientId, nextBlockClientId);
        }
      } else {
        const previousBlockClientId = getPreviousBlockClientId(clientId);
        if (previousBlockClientId) {
          const trailingId = getTrailingId(previousBlockClientId);
          mergeWithNested(trailingId, clientId);
          return;
        }
        const parentListItemId = getOutdentTarget(select10, clientId);
        if (parentListItemId) {
          mergeWithNested(parentListItemId, clientId);
          return;
        }
        const blockOrder = getBlockOrder(clientId);
        if ((0, import_blocks41.isUnmodifiedBlock)(getBlock(clientId), "content") && blockOrder.length > 0) {
          registry.batch(() => {
            outdentListItems(
              registry,
              getBlockOrder(blockOrder[0])
            );
            removeBlock(clientId, true);
          });
        } else {
          onMerge(forward);
        }
      }
    };
  }

  // packages/block-library/build-module/list-item/edit.mjs
  var import_jsx_runtime324 = __toESM(require_jsx_runtime(), 1);
  function IndentUI2({ clientId }) {
    const registry = (0, import_data59.useRegistry)();
    const { canIndent, canOutdent } = (0, import_data59.useSelect)(
      (select10) => {
        const storeSelect = select10(import_block_editor124.store);
        return {
          canIndent: !!getIndentTarget(storeSelect, clientId),
          canOutdent: !!getOutdentTarget(storeSelect, clientId)
        };
      },
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(import_jsx_runtime324.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
        import_components62.ToolbarButton,
        {
          icon: (0, import_i18n103.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
          title: (0, import_i18n103.__)("Outdent"),
          shortcut: import_keycodes5.displayShortcut.shift("Tab"),
          description: (0, import_i18n103.__)("Outdent list item"),
          disabled: !canOutdent,
          onClick: () => outdentListItems(registry)
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
        import_components62.ToolbarButton,
        {
          icon: (0, import_i18n103.isRTL)() ? format_indent_rtl_default : format_indent_default,
          title: (0, import_i18n103.__)("Indent"),
          shortcut: "Tab",
          description: (0, import_i18n103.__)("Indent list item"),
          disabled: !canIndent,
          onClick: () => indentListItems(registry, clientId)
        }
      )
    ] });
  }
  function ListItemEdit({
    attributes: attributes2,
    setAttributes,
    clientId,
    mergeBlocks
  }) {
    const { placeholder: placeholder2, content } = attributes2;
    const blockProps = (0, import_block_editor124.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor124.useInnerBlocksProps)(blockProps, {
      renderAppender: false,
      __unstableDisableDropZone: true
    });
    const useEnterRef = useEnter2(clientId);
    const useTabRef = useTab();
    const useMultiSelectTabRef = useMultiSelectTab(clientId);
    const onMerge = useMerge(clientId, mergeBlocks);
    return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(import_jsx_runtime324.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("li", { ...innerBlocksProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
          import_block_editor124.RichText,
          {
            ref: (0, import_compose35.useMergeRefs)([
              useEnterRef,
              useTabRef,
              useMultiSelectTabRef
            ]),
            identifier: "content",
            tagName: "div",
            onChange: (nextContent) => setAttributes({ content: nextContent }),
            value: content,
            "aria-label": (0, import_i18n103.__)("List text"),
            placeholder: placeholder2 || (0, import_i18n103.__)("List"),
            onMerge
          }
        ),
        innerBlocksProps.children
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(import_block_editor124.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(IndentUI2, { clientId }) })
    ] });
  }

  // packages/block-library/build-module/list-item/save.mjs
  var import_block_editor125 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime325 = __toESM(require_jsx_runtime(), 1);
  function save25({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("li", { ...import_block_editor125.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(import_block_editor125.RichText.Content, { value: attributes2.content }),
      /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(import_block_editor125.InnerBlocks.Content, {})
    ] });
  }

  // packages/block-library/build-module/list-item/transforms.mjs
  var import_blocks42 = __toESM(require_blocks(), 1);
  var transforms15 = {
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2, innerBlocks = []) => [
          (0, import_blocks42.createBlock)("core/paragraph", attributes2),
          ...innerBlocks.map((block) => (0, import_blocks42.cloneBlock)(block))
        ]
      }
    ]
  };
  var transforms_default16 = transforms15;

  // packages/block-library/build-module/list-item/index.mjs
  var { name: name45 } = block_default45;
  var settings45 = {
    icon: list_item_default,
    edit: ListItemEdit,
    save: save25,
    merge(attributes2, attributesToMerge) {
      return {
        ...attributes2,
        content: attributes2.content + attributesToMerge.content
      };
    },
    transforms: transforms_default16,
    [unlock(import_block_editor126.privateApis).requiresWrapperOnCopy]: true,
    __experimentalLabel(attributes2, { context }) {
      const { content } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasContent = content?.trim().length > 0;
      if (context === "list-view" && (customName || hasContent)) {
        return customName || content;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
    }
  };
  var init45 = () => initBlock({ name: name45, metadata: block_default45, settings: settings45 });

  // packages/block-library/build-module/loginout/index.mjs
  var loginout_exports = {};
  __export(loginout_exports, {
    init: () => init46,
    metadata: () => block_default46,
    name: () => name46,
    settings: () => settings46
  });

  // packages/block-library/build-module/loginout/edit.mjs
  var import_block_editor127 = __toESM(require_block_editor(), 1);
  var import_components63 = __toESM(require_components(), 1);
  var import_i18n104 = __toESM(require_i18n(), 1);
  var import_jsx_runtime326 = __toESM(require_jsx_runtime(), 1);
  function LoginOutEdit({ attributes: attributes2, setAttributes }) {
    const { displayLoginAsForm, redirectToCurrent } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(import_jsx_runtime326.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(import_block_editor127.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
        import_components63.__experimentalToolsPanel,
        {
          label: (0, import_i18n104.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayLoginAsForm: false,
              redirectToCurrent: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
              import_components63.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n104.__)("Display login as form"),
                isShownByDefault: true,
                hasValue: () => displayLoginAsForm,
                onDeselect: () => setAttributes({ displayLoginAsForm: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
                  import_components63.ToggleControl,
                  {
                    label: (0, import_i18n104.__)("Display login as form"),
                    checked: displayLoginAsForm,
                    onChange: () => setAttributes({
                      displayLoginAsForm: !displayLoginAsForm
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
              import_components63.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n104.__)("Redirect to current URL"),
                isShownByDefault: true,
                hasValue: () => !redirectToCurrent,
                onDeselect: () => setAttributes({ redirectToCurrent: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
                  import_components63.ToggleControl,
                  {
                    label: (0, import_i18n104.__)("Redirect to current URL"),
                    checked: redirectToCurrent,
                    onChange: () => setAttributes({
                      redirectToCurrent: !redirectToCurrent
                    })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
        "div",
        {
          ...(0, import_block_editor127.useBlockProps)({
            className: "logged-in"
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("a", { href: "#login-pseudo-link", children: (0, import_i18n104.__)("Log out") })
        }
      )
    ] });
  }

  // packages/block-library/build-module/loginout/block.json
  var block_default46 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/loginout",
    title: "Login/out",
    category: "theme",
    description: "Show login & logout links.",
    keywords: ["login", "logout", "form"],
    textdomain: "default",
    attributes: {
      displayLoginAsForm: {
        type: "boolean",
        default: false
      },
      redirectToCurrent: {
        type: "boolean",
        default: true
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      className: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        background: true,
        text: false,
        gradients: true,
        link: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true,
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-loginout"
  };

  // packages/block-library/build-module/loginout/index.mjs
  var { name: name46 } = block_default46;
  var settings46 = {
    icon: login_default,
    edit: LoginOutEdit
  };
  var init46 = () => initBlock({ name: name46, metadata: block_default46, settings: settings46 });

  // packages/block-library/build-module/media-text/index.mjs
  var media_text_exports = {};
  __export(media_text_exports, {
    init: () => init47,
    metadata: () => block_default47,
    name: () => name47,
    settings: () => settings47
  });
  var import_i18n108 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/media-text/constants.mjs
  var import_i18n105 = __toESM(require_i18n(), 1);
  var ALLOWED_MEDIA_TYPES5 = ["image", "video"];
  var DEFAULT_MEDIA_SIZE_SLUG4 = "full";
  var WIDTH_CONSTRAINT_PERCENTAGE = 15;
  var LINK_DESTINATION_NONE3 = "none";
  var LINK_DESTINATION_MEDIA3 = "media";
  var LINK_DESTINATION_ATTACHMENT3 = "attachment";
  var TEMPLATE10 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n105._x)("Content\u2026", "content placeholder")
      }
    ]
  ];

  // packages/block-library/build-module/media-text/deprecated.mjs
  var import_block_editor128 = __toESM(require_block_editor(), 1);
  var import_compose36 = __toESM(require_compose(), 1);
  var import_jsx_runtime327 = __toESM(require_jsx_runtime(), 1);
  var v1ToV5ImageFillStyles = (url, focalPoint) => {
    return url ? {
      backgroundImage: `url(${url})`,
      backgroundPosition: focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : `50% 50%`
    } : {};
  };
  var v6ToV7ImageFillStyles = (url, focalPoint) => {
    return url ? {
      backgroundImage: `url(${url})`,
      backgroundPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
        focalPoint.y * 100
      )}%` : `50% 50%`
    } : {};
  };
  var DEFAULT_MEDIA_WIDTH = 50;
  var noop2 = () => {
  };
  var migrateCustomColors3 = (attributes2) => {
    if (!attributes2.customBackgroundColor) {
      return attributes2;
    }
    const style2 = {
      color: {
        background: attributes2.customBackgroundColor
      }
    };
    const { customBackgroundColor, ...restAttributes } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var migrateDefaultAlign = (attributes2) => {
    if (attributes2.align) {
      return attributes2;
    }
    return {
      ...attributes2,
      align: "wide"
    };
  };
  var v0Attributes = {
    align: {
      type: "string",
      default: "wide"
    },
    mediaAlt: {
      type: "string",
      source: "attribute",
      selector: "figure img",
      attribute: "alt",
      default: ""
    },
    mediaPosition: {
      type: "string",
      default: "left"
    },
    mediaId: {
      type: "number"
    },
    mediaType: {
      type: "string"
    },
    mediaWidth: {
      type: "number",
      default: 50
    },
    isStackedOnMobile: {
      type: "boolean",
      default: false
    }
  };
  var v4ToV5BlockAttributes = {
    ...v0Attributes,
    isStackedOnMobile: {
      type: "boolean",
      default: true
    },
    mediaUrl: {
      type: "string",
      source: "attribute",
      selector: "figure video,figure img",
      attribute: "src"
    },
    mediaLink: {
      type: "string"
    },
    linkDestination: {
      type: "string"
    },
    linkTarget: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "target"
    },
    href: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "href"
    },
    rel: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "rel"
    },
    linkClass: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "class"
    },
    mediaSizeSlug: {
      type: "string"
    },
    verticalAlignment: {
      type: "string"
    },
    imageFill: {
      type: "boolean"
    },
    focalPoint: {
      type: "object"
    }
  };
  var v6Attributes = {
    ...v4ToV5BlockAttributes,
    mediaAlt: {
      type: "string",
      source: "attribute",
      selector: "figure img",
      attribute: "alt",
      default: "",
      role: "content"
    },
    mediaId: {
      type: "number",
      role: "content"
    },
    mediaUrl: {
      type: "string",
      source: "attribute",
      selector: "figure video,figure img",
      attribute: "src",
      role: "content"
    },
    href: {
      type: "string",
      source: "attribute",
      selector: "figure a",
      attribute: "href",
      role: "content"
    },
    mediaType: {
      type: "string",
      role: "content"
    }
  };
  var v7Attributes = {
    ...v6Attributes,
    align: {
      type: "string",
      // v7 changed the default for the `align` attribute.
      default: "none"
    },
    // New attribute.
    useFeaturedImage: {
      type: "boolean",
      default: false
    }
  };
  var v4ToV5Supports = {
    anchor: true,
    align: ["wide", "full"],
    html: false,
    color: {
      gradients: true,
      link: true
    }
  };
  var v6Supports = {
    ...v4ToV5Supports,
    color: {
      gradients: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    spacing: {
      margin: true,
      padding: true
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    }
  };
  var v7Supports = {
    ...v6Supports,
    __experimentalBorder: {
      color: true,
      radius: true,
      style: true,
      width: true,
      __experimentalDefaultControls: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    color: {
      gradients: true,
      heading: true,
      link: true,
      __experimentalDefaultControls: {
        background: true,
        text: true
      }
    },
    interactivity: {
      clientNavigation: true
    }
  };
  var v74 = {
    attributes: v7Attributes,
    supports: v7Supports,
    usesContext: ["postId", "postType"],
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = mediaUrl ? /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      ) : null;
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "div",
            {
              ...import_block_editor128.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop2)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "div",
          {
            ...import_block_editor128.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    }
  };
  var v65 = {
    attributes: v6Attributes,
    supports: v6Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "div",
            {
              ...import_block_editor128.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop2)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "div",
          {
            ...import_block_editor128.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign,
    isEligible(attributes2, innerBlocks, { block }) {
      const { attributes: finalizedAttributes } = block;
      return attributes2.align === void 0 && !!finalizedAttributes.className?.includes("alignwide");
    }
  };
  var v55 = {
    attributes: v4ToV5BlockAttributes,
    supports: v4ToV5Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      if ("right" === mediaPosition3) {
        return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "div",
            {
              ...import_block_editor128.useInnerBlocksProps.save({
                className: "wp-block-media-text__content"
              })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
            "figure",
            {
              className: "wp-block-media-text__media",
              style: backgroundStyles,
              children: (mediaTypeRenders[mediaType] || noop2)()
            }
          )
        ] });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "div",
          {
            ...import_block_editor128.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign
  };
  var v45 = {
    attributes: v4ToV5BlockAttributes,
    supports: v4ToV5Supports,
    save({ attributes: attributes2 }) {
      const {
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
      const newRel = !rel ? void 0 : rel;
      const imageClasses = clsx_default({
        [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
        [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
      });
      let image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: imageClasses || null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { ...import_block_editor128.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "div",
          {
            ...import_block_editor128.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        )
      ] });
    },
    migrate: migrateDefaultAlign
  };
  var v38 = {
    attributes: {
      ...v0Attributes,
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaLink: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "target"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "href"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "class"
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      }
    },
    migrate: (0, import_compose36.compose)(migrateCustomColors3, migrateDefaultAlign),
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint,
        linkClass,
        href,
        linkTarget,
        rel
      } = attributes2;
      const newRel = !rel ? void 0 : rel;
      let image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
        "img",
        {
          src: mediaUrl,
          alt: mediaAlt,
          className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
        }
      );
      if (href) {
        image = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "a",
          {
            className: linkClass,
            href,
            target: linkTarget,
            rel: newRel,
            children: image
          }
        );
      }
      const mediaTypeRenders = {
        image: () => image,
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor128.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        "has-background": backgroundClass || customBackgroundColor,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(import_block_editor128.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var v212 = {
    attributes: {
      ...v0Attributes,
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src"
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      }
    },
    migrate: (0, import_compose36.compose)(migrateCustomColors3, migrateDefaultAlign),
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth,
        mediaId,
        verticalAlignment,
        imageFill,
        focalPoint
      } = attributes2;
      const mediaTypeRenders = {
        image: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "img",
          {
            src: mediaUrl,
            alt: mediaAlt,
            className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
          }
        ),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor128.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile,
        [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
        "is-image-fill": imageFill
      });
      const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
          "figure",
          {
            className: "wp-block-media-text__media",
            style: backgroundStyles,
            children: (mediaTypeRenders[mediaType] || noop2)()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(import_block_editor128.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var v123 = {
    attributes: {
      ...v0Attributes,
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src"
      }
    },
    migrate: migrateDefaultAlign,
    save({ attributes: attributes2 }) {
      const {
        backgroundColor,
        customBackgroundColor,
        isStackedOnMobile,
        mediaAlt,
        mediaPosition: mediaPosition3,
        mediaType,
        mediaUrl,
        mediaWidth
      } = attributes2;
      const mediaTypeRenders = {
        image: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("img", { src: mediaUrl, alt: mediaAlt }),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("video", { controls: true, src: mediaUrl })
      };
      const backgroundClass = (0, import_block_editor128.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const className = clsx_default({
        "has-media-on-the-right": "right" === mediaPosition3,
        [backgroundClass]: backgroundClass,
        "is-stacked-on-mobile": isStackedOnMobile
      });
      let gridTemplateColumns;
      if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
        gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
      }
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
        gridTemplateColumns
      };
      return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className, style: style2, children: [
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop2)() }),
        /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(import_block_editor128.InnerBlocks.Content, {}) })
      ] });
    }
  };
  var deprecated_default25 = [v74, v65, v55, v45, v38, v212, v123];

  // packages/block-library/build-module/media-text/edit.mjs
  var import_i18n107 = __toESM(require_i18n(), 1);
  var import_data61 = __toESM(require_data(), 1);
  var import_element81 = __toESM(require_element(), 1);
  var import_block_editor130 = __toESM(require_block_editor(), 1);
  var import_components65 = __toESM(require_components(), 1);
  var import_blob15 = __toESM(require_blob(), 1);
  var import_core_data29 = __toESM(require_core_data(), 1);
  var import_notices11 = __toESM(require_notices(), 1);
  var import_url14 = __toESM(require_url(), 1);

  // packages/block-library/build-module/media-text/media-container.mjs
  var import_components64 = __toESM(require_components(), 1);
  var import_block_editor129 = __toESM(require_block_editor(), 1);
  var import_i18n106 = __toESM(require_i18n(), 1);
  var import_compose37 = __toESM(require_compose(), 1);
  var import_data60 = __toESM(require_data(), 1);
  var import_element80 = __toESM(require_element(), 1);
  var import_blob14 = __toESM(require_blob(), 1);
  var import_notices10 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/media-text/image-fill.mjs
  function imageFillStyles(url, focalPoint) {
    return url ? {
      objectPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
        focalPoint.y * 100
      )}%` : `50% 50%`
    } : {};
  }

  // packages/block-library/build-module/media-text/media-container.mjs
  var import_jsx_runtime328 = __toESM(require_jsx_runtime(), 1);
  var noop3 = () => {
  };
  var ResizableBoxContainer = (0, import_element80.forwardRef)(
    ({ isSelected, isStackedOnMobile, ...props }, ref) => {
      const isMobile = (0, import_compose37.useViewportMatch)("small", "<");
      return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
        import_components64.ResizableBox,
        {
          ref,
          showHandle: isSelected && (!isMobile || !isStackedOnMobile),
          ...props
        }
      );
    }
  );
  function ToolbarEditButton({
    mediaId,
    mediaUrl,
    onSelectMedia,
    toggleUseFeaturedImage,
    useFeaturedImage
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(import_block_editor129.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
      import_block_editor129.MediaReplaceFlow,
      {
        mediaId,
        mediaURL: mediaUrl,
        allowedTypes: ALLOWED_MEDIA_TYPES5,
        onSelect: onSelectMedia,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        useFeaturedImage,
        name: mediaUrl ? (0, import_i18n106.__)("Replace") : (0, import_i18n106.__)("Add media"),
        onReset: () => onSelectMedia(void 0)
      }
    ) });
  }
  function PlaceholderContainer({
    className,
    mediaUrl,
    onSelectMedia,
    toggleUseFeaturedImage
  }) {
    const { createErrorNotice } = (0, import_data60.useDispatch)(import_notices10.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
    };
    const onFilesPreUpload = (files) => {
      if (files.length === 1) {
        onSelectMedia({ url: (0, import_blob14.createBlobURL)(files[0]) });
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
      import_block_editor129.MediaPlaceholder,
      {
        icon: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(import_block_editor129.BlockIcon, { icon: media_default }),
        labels: {
          title: (0, import_i18n106.__)("Media area")
        },
        className,
        onSelect: onSelectMedia,
        onToggleFeaturedImage: toggleUseFeaturedImage,
        allowedTypes: ALLOWED_MEDIA_TYPES5,
        onFilesPreUpload,
        onError: onUploadError,
        disableMediaButtons: mediaUrl
      }
    );
  }
  function MediaContainer(props, ref) {
    const {
      className,
      commitWidthChange,
      focalPoint,
      imageFill,
      isSelected,
      isStackedOnMobile,
      mediaAlt,
      mediaId,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      onSelectMedia,
      onWidthChange,
      enableResize,
      toggleUseFeaturedImage,
      useFeaturedImage,
      featuredImageURL,
      featuredImageAlt,
      refMedia
    } = props;
    const isTemporaryMedia2 = !mediaId && (0, import_blob14.isBlobURL)(mediaUrl);
    const { toggleSelection } = (0, import_data60.useDispatch)(import_block_editor129.store);
    const toolbarEditButton = /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
      ToolbarEditButton,
      {
        onSelectMedia,
        mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
        mediaId,
        toggleUseFeaturedImage,
        useFeaturedImage
      }
    );
    if (mediaUrl || featuredImageURL || useFeaturedImage) {
      const onResizeStart = () => {
        toggleSelection(false);
      };
      const onResize = (event, direction, elt) => {
        onWidthChange(parseInt(elt.style.width));
      };
      const onResizeStop = (event, direction, elt) => {
        toggleSelection(true);
        commitWidthChange(parseInt(elt.style.width));
      };
      const enablePositions = {
        right: enableResize && mediaPosition3 === "left",
        left: enableResize && mediaPosition3 === "right"
      };
      const positionStyles = mediaType === "image" && imageFill ? imageFillStyles(mediaUrl || featuredImageURL, focalPoint) : {};
      const mediaTypeRenderers = {
        image: () => useFeaturedImage && featuredImageURL ? /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
          "img",
          {
            ref: refMedia,
            src: featuredImageURL,
            alt: featuredImageAlt,
            style: positionStyles
          }
        ) : mediaUrl && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
          "img",
          {
            ref: refMedia,
            src: mediaUrl,
            alt: mediaAlt,
            style: positionStyles
          }
        ),
        video: () => /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("video", { controls: true, ref: refMedia, src: mediaUrl })
      };
      return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
        ResizableBoxContainer,
        {
          as: "figure",
          className: clsx_default(
            className,
            "editor-media-container__resizer",
            { "is-transient": isTemporaryMedia2 }
          ),
          size: { width: mediaWidth + "%" },
          minWidth: "10%",
          maxWidth: "100%",
          enable: enablePositions,
          onResizeStart,
          onResize,
          onResizeStop,
          axis: "x",
          isSelected,
          isStackedOnMobile,
          ref,
          children: [
            toolbarEditButton,
            (mediaTypeRenderers[mediaType] || noop3)(),
            isTemporaryMedia2 && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(import_components64.Spinner, {}),
            !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(PlaceholderContainer, { ...props }),
            !featuredImageURL && useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
              import_components64.Placeholder,
              {
                className: "wp-block-media-text--placeholder-image",
                style: positionStyles,
                withIllustration: true
              }
            )
          ]
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(import_jsx_runtime328.Fragment, { children: [
      toolbarEditButton,
      /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(PlaceholderContainer, { ...props })
    ] });
  }
  var media_container_default = (0, import_element80.forwardRef)(MediaContainer);

  // packages/block-library/build-module/media-text/edit.mjs
  var import_jsx_runtime329 = __toESM(require_jsx_runtime(), 1);
  var { ResolutionTool: ResolutionTool3 } = unlock(import_block_editor130.privateApis);
  var applyWidthConstraints = (width) => Math.max(
    WIDTH_CONSTRAINT_PERCENTAGE,
    Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE)
  );
  function getImageSourceUrlBySizeSlug(image, slug) {
    return image?.media_details?.sizes?.[slug]?.source_url;
  }
  function attributesFromMedia2({
    attributes: { linkDestination, href },
    setAttributes
  }) {
    return (media) => {
      if (!media || !media.url) {
        setAttributes({
          mediaAlt: void 0,
          mediaId: void 0,
          mediaType: void 0,
          mediaUrl: void 0,
          mediaLink: void 0,
          href: void 0,
          focalPoint: void 0,
          useFeaturedImage: false
        });
        return;
      }
      if ((0, import_blob15.isBlobURL)(media.url)) {
        media.type = (0, import_blob15.getBlobTypeByURL)(media.url);
      }
      let mediaType;
      let src;
      if (media.media_type) {
        if (media.media_type === "image") {
          mediaType = "image";
        } else {
          mediaType = "video";
        }
      } else {
        mediaType = media.type;
      }
      if (mediaType === "image") {
        src = media.sizes?.large?.url || media.media_details?.sizes?.large?.source_url;
      }
      let newLinkDestination = linkDestination;
      let newHref = href;
      if (mediaType === "image") {
        if (!newLinkDestination) {
          switch (window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE3) {
            case "file":
            case LINK_DESTINATION_MEDIA3:
              newLinkDestination = LINK_DESTINATION_MEDIA3;
              break;
            case "post":
            case LINK_DESTINATION_ATTACHMENT3:
              newLinkDestination = LINK_DESTINATION_ATTACHMENT3;
              break;
            case LINK_DESTINATION_NONE3:
            default:
              newLinkDestination = LINK_DESTINATION_NONE3;
              break;
          }
        }
        switch (newLinkDestination) {
          case LINK_DESTINATION_MEDIA3:
            newHref = media.url;
            break;
          case LINK_DESTINATION_ATTACHMENT3:
            newHref = media.link;
            break;
        }
      }
      setAttributes({
        mediaAlt: media.alt,
        mediaId: media.id,
        mediaType,
        mediaUrl: src || media.url,
        mediaLink: media.link || void 0,
        href: newHref,
        linkDestination: newLinkDestination,
        focalPoint: void 0,
        useFeaturedImage: false
      });
    };
  }
  function MediaTextResolutionTool({ image, value, onChange }) {
    const { imageSizes } = (0, import_data61.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor130.store);
      return {
        imageSizes: getSettings2().imageSizes
      };
    }, []);
    if (!imageSizes?.length) {
      return null;
    }
    const imageSizeOptions = imageSizes.filter(({ slug }) => getImageSourceUrlBySizeSlug(image, slug)).map(({ name: name118, slug }) => ({ value: slug, label: name118 }));
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
      ResolutionTool3,
      {
        value,
        defaultValue: DEFAULT_MEDIA_SIZE_SLUG4,
        options: imageSizeOptions,
        onChange
      }
    );
  }
  function MediaTextEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    context: { postId, postType }
  }) {
    const {
      focalPoint,
      href,
      imageFill,
      isStackedOnMobile,
      linkClass,
      linkDestination,
      linkTarget,
      mediaAlt,
      mediaId,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      mediaSizeSlug,
      rel,
      verticalAlignment,
      allowedBlocks,
      useFeaturedImage
    } = attributes2;
    const [featuredImage] = (0, import_core_data29.useEntityProp)(
      "postType",
      postType,
      "featured_media",
      postId
    );
    const { featuredImageMedia } = (0, import_data61.useSelect)(
      (select10) => {
        return {
          featuredImageMedia: featuredImage && useFeaturedImage ? select10(import_core_data29.store).getEntityRecord(
            "postType",
            "attachment",
            featuredImage,
            {
              context: "view"
            }
          ) : void 0
        };
      },
      [featuredImage, useFeaturedImage]
    );
    const { image } = (0, import_data61.useSelect)(
      (select10) => {
        return {
          image: mediaId && isSelected ? select10(import_core_data29.store).getEntityRecord(
            "postType",
            "attachment",
            mediaId,
            {
              context: "view"
            }
          ) : null
        };
      },
      [isSelected, mediaId]
    );
    const featuredImageURL = useFeaturedImage ? featuredImageMedia?.source_url : "";
    const featuredImageAlt = useFeaturedImage ? featuredImageMedia?.alt_text : "";
    const toggleUseFeaturedImage = () => {
      setAttributes({
        imageFill: false,
        mediaType: "image",
        mediaId: void 0,
        mediaUrl: void 0,
        mediaAlt: void 0,
        mediaLink: void 0,
        linkDestination: void 0,
        linkTarget: void 0,
        linkClass: void 0,
        rel: void 0,
        href: void 0,
        useFeaturedImage: !useFeaturedImage
      });
    };
    const refMedia = (0, import_element81.useRef)();
    const imperativeFocalPointPreview = (value) => {
      const { style: style22 } = refMedia.current;
      const { x: x3, y: y2 } = value;
      style22.objectPosition = `${x3 * 100}% ${y2 * 100}%`;
    };
    const [temporaryMediaWidth, setTemporaryMediaWidth] = (0, import_element81.useState)(null);
    const onSelectMedia = attributesFromMedia2({ attributes: attributes2, setAttributes });
    const onSetHref = (props) => {
      setAttributes(props);
    };
    const onWidthChange = (width) => {
      setTemporaryMediaWidth(applyWidthConstraints(width));
    };
    const commitWidthChange = (width) => {
      setAttributes({
        mediaWidth: applyWidthConstraints(width)
      });
      setTemporaryMediaWidth(null);
    };
    const classNames = clsx_default({
      "has-media-on-the-right": "right" === mediaPosition3,
      "is-selected": isSelected,
      "is-stacked-on-mobile": isStackedOnMobile,
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      "is-image-fill-element": imageFill
    });
    const widthString = `${temporaryMediaWidth || mediaWidth}%`;
    const gridTemplateColumns = "right" === mediaPosition3 ? `1fr ${widthString}` : `${widthString} 1fr`;
    const style2 = {
      gridTemplateColumns,
      msGridColumns: gridTemplateColumns
    };
    const onMediaAltChange = (newMediaAlt) => {
      setAttributes({ mediaAlt: newMediaAlt });
    };
    const onVerticalAlignmentChange = (alignment) => {
      setAttributes({ verticalAlignment: alignment });
    };
    const updateImage = (newMediaSizeSlug) => {
      const newUrl = getImageSourceUrlBySizeSlug(image, newMediaSizeSlug);
      if (!newUrl) {
        return null;
      }
      setAttributes({
        mediaUrl: newUrl,
        mediaSizeSlug: newMediaSizeSlug
      });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { createErrorNotice } = (0, import_data61.useDispatch)(import_notices11.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
    };
    const mediaInspectorPanel = isSelected ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_block_editor130.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
      import_components65.__experimentalToolsPanel,
      {
        label: (0, import_i18n107.__)("Media"),
        resetAll: () => onSelectMedia(void 0),
        dropdownMenuProps,
        children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          import_components65.__experimentalToolsPanelItem,
          {
            label: (0, import_i18n107.__)("Media"),
            hasValue: () => !!mediaUrl || !!useFeaturedImage,
            onDeselect: () => onSelectMedia(void 0),
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
              MediaControl,
              {
                mediaId,
                mediaUrl: mediaUrl || featuredImageURL,
                filename: image?.media_details?.sizes?.full?.file || image?.slug || (0, import_url14.getFilename)(mediaUrl),
                allowedTypes: ALLOWED_MEDIA_TYPES5,
                onSelect: onSelectMedia,
                onError: onUploadError,
                onReset: () => onSelectMedia(void 0),
                useFeaturedImage,
                onToggleFeaturedImage: toggleUseFeaturedImage,
                emptyLabel: (0, import_i18n107.__)("Add media")
              }
            )
          }
        )
      }
    ) }) : null;
    const mediaTextGeneralSettings = /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(
      import_components65.__experimentalToolsPanel,
      {
        label: (0, import_i18n107.__)("Settings"),
        resetAll: () => {
          setAttributes({
            isStackedOnMobile: true,
            imageFill: false,
            mediaAlt: "",
            focalPoint: void 0,
            mediaWidth: 50
          });
          updateImage(DEFAULT_MEDIA_SIZE_SLUG4);
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Media width"),
              isShownByDefault: true,
              hasValue: () => mediaWidth !== 50,
              onDeselect: () => setAttributes({ mediaWidth: 50 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components65.RangeControl,
                {
                  label: (0, import_i18n107.__)("Media width"),
                  value: temporaryMediaWidth || mediaWidth,
                  onChange: commitWidthChange,
                  min: WIDTH_CONSTRAINT_PERCENTAGE,
                  max: 100 - WIDTH_CONSTRAINT_PERCENTAGE
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Stack on mobile"),
              isShownByDefault: true,
              hasValue: () => !isStackedOnMobile,
              onDeselect: () => setAttributes({ isStackedOnMobile: true }),
              children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components65.ToggleControl,
                {
                  label: (0, import_i18n107.__)("Stack on mobile"),
                  checked: isStackedOnMobile,
                  onChange: () => setAttributes({
                    isStackedOnMobile: !isStackedOnMobile
                  })
                }
              )
            }
          ),
          mediaType === "image" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Crop image to fill"),
              isShownByDefault: true,
              hasValue: () => !!imageFill,
              onDeselect: () => setAttributes({ imageFill: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components65.ToggleControl,
                {
                  label: (0, import_i18n107.__)("Crop image to fill"),
                  checked: !!imageFill,
                  onChange: () => setAttributes({
                    imageFill: !imageFill
                  })
                }
              )
            }
          ),
          imageFill && (mediaUrl || featuredImageURL) && mediaType === "image" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Focal point"),
              isShownByDefault: true,
              hasValue: () => !!focalPoint,
              onDeselect: () => setAttributes({ focalPoint: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components65.FocalPointPicker,
                {
                  label: (0, import_i18n107.__)("Focal point"),
                  url: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
                  value: focalPoint,
                  onChange: (value) => setAttributes({ focalPoint: value }),
                  onDragStart: imperativeFocalPointPreview,
                  onDrag: imperativeFocalPointPreview
                }
              )
            }
          ),
          mediaType === "image" && mediaUrl && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n107.__)("Alternative text"),
              isShownByDefault: true,
              hasValue: () => !!mediaAlt,
              onDeselect: () => setAttributes({ mediaAlt: "" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                import_components65.TextareaControl,
                {
                  label: (0, import_i18n107.__)("Alternative text"),
                  value: mediaAlt,
                  onChange: onMediaAltChange,
                  help: /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
                      import_components65.ExternalLink,
                      {
                        href: (
                          // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                          (0, import_i18n107.__)(
                            "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                          )
                        ),
                        children: (0, import_i18n107.__)(
                          "Describe the purpose of the image."
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("br", {}),
                    (0, import_i18n107.__)("Leave empty if decorative.")
                  ] })
                }
              )
            }
          ),
          mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            MediaTextResolutionTool,
            {
              image,
              value: mediaSizeSlug,
              onChange: updateImage
            }
          )
        ]
      }
    );
    const blockProps = (0, import_block_editor130.useBlockProps)({
      className: classNames,
      style: style2
    });
    const innerBlocksProps = (0, import_block_editor130.useInnerBlocksProps)(
      { className: "wp-block-media-text__content" },
      { allowedBlocks }
    );
    const blockEditingMode = (0, import_block_editor130.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
      mediaInspectorPanel,
      /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(import_block_editor130.InspectorControls, { children: mediaTextGeneralSettings }),
      /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_block_editor130.BlockControls, { group: "block", children: [
        blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)(import_jsx_runtime329.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_block_editor130.BlockVerticalAlignmentControl,
            {
              onChange: onVerticalAlignmentChange,
              value: verticalAlignment,
              label: (0, import_i18n107.__)("Align media and text vertically")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.ToolbarButton,
            {
              icon: pull_left_default,
              title: (0, import_i18n107.__)("Show media on left"),
              isActive: mediaPosition3 === "left",
              onClick: () => setAttributes({ mediaPosition: "left" })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
            import_components65.ToolbarButton,
            {
              icon: pull_right_default,
              title: (0, import_i18n107.__)("Show media on right"),
              isActive: mediaPosition3 === "right",
              onClick: () => setAttributes({ mediaPosition: "right" })
            }
          )
        ] }),
        mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          import_block_editor130.__experimentalImageURLInputUI,
          {
            url: href || "",
            onChangeUrl: onSetHref,
            linkDestination,
            mediaType,
            mediaUrl: image && image.source_url,
            mediaLink: image && image.link,
            linkTarget,
            linkClass,
            rel
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { ...blockProps, children: [
        mediaPosition3 === "right" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { ...innerBlocksProps }),
        /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
          media_container_default,
          {
            className: "wp-block-media-text__media",
            onSelectMedia,
            onWidthChange,
            commitWidthChange,
            refMedia,
            enableResize: blockEditingMode === "default",
            toggleUseFeaturedImage,
            ...{
              focalPoint,
              imageFill,
              isSelected,
              isStackedOnMobile,
              mediaAlt,
              mediaId,
              mediaPosition: mediaPosition3,
              mediaType,
              mediaUrl,
              mediaWidth,
              useFeaturedImage,
              featuredImageURL,
              featuredImageAlt
            }
          }
        ),
        mediaPosition3 !== "right" && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }
  var edit_default15 = MediaTextEdit;

  // packages/block-library/build-module/media-text/block.json
  var block_default47 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/media-text",
    title: "Media & Text",
    category: "media",
    description: "Set media and words side-by-side for a richer layout.",
    keywords: ["image", "video"],
    textdomain: "default",
    attributes: {
      align: {
        type: "string",
        default: "none"
      },
      mediaAlt: {
        type: "string",
        source: "attribute",
        selector: "figure img",
        attribute: "alt",
        default: "",
        role: "content"
      },
      mediaPosition: {
        type: "string",
        default: "left"
      },
      mediaId: {
        type: "number",
        role: "content"
      },
      mediaUrl: {
        type: "string",
        source: "attribute",
        selector: "figure video,figure img",
        attribute: "src",
        role: "content"
      },
      mediaLink: {
        type: "string"
      },
      linkDestination: {
        type: "string"
      },
      linkTarget: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "target"
      },
      href: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "href",
        role: "content"
      },
      rel: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "rel"
      },
      linkClass: {
        type: "string",
        source: "attribute",
        selector: "figure a",
        attribute: "class"
      },
      mediaType: {
        type: "string",
        role: "content"
      },
      mediaWidth: {
        type: "number",
        default: 50
      },
      mediaSizeSlug: {
        type: "string"
      },
      isStackedOnMobile: {
        type: "boolean",
        default: true
      },
      verticalAlignment: {
        type: "string"
      },
      imageFill: {
        type: "boolean"
      },
      focalPoint: {
        type: "object"
      },
      useFeaturedImage: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        button: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    editorStyle: "wp-block-media-text-editor",
    style: "wp-block-media-text"
  };

  // packages/block-library/build-module/media-text/save.mjs
  var import_block_editor131 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime330 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_MEDIA_WIDTH2 = 50;
  var noop4 = () => {
  };
  function save26({ attributes: attributes2 }) {
    const {
      isStackedOnMobile,
      mediaAlt,
      mediaPosition: mediaPosition3,
      mediaType,
      mediaUrl,
      mediaWidth,
      mediaId,
      verticalAlignment,
      imageFill,
      focalPoint,
      linkClass,
      href,
      linkTarget,
      rel
    } = attributes2;
    const mediaSizeSlug = attributes2.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG4;
    const newRel = !rel ? void 0 : rel;
    const imageClasses = clsx_default({
      [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
      [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
    });
    const positionStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
    let image = mediaUrl ? /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
      "img",
      {
        src: mediaUrl,
        alt: mediaAlt,
        className: imageClasses || null,
        style: positionStyles
      }
    ) : null;
    if (href) {
      image = /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
        "a",
        {
          className: linkClass,
          href,
          target: linkTarget,
          rel: newRel,
          children: image
        }
      );
    }
    const mediaTypeRenders = {
      image: () => image,
      video: () => /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("video", { controls: true, src: mediaUrl })
    };
    const className = clsx_default({
      "has-media-on-the-right": "right" === mediaPosition3,
      "is-stacked-on-mobile": isStackedOnMobile,
      [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
      "is-image-fill-element": imageFill
    });
    let gridTemplateColumns;
    if (mediaWidth !== DEFAULT_MEDIA_WIDTH2) {
      gridTemplateColumns = "right" === mediaPosition3 ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
    }
    const style2 = {
      gridTemplateColumns
    };
    if ("right" === mediaPosition3) {
      return /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)("div", { ...import_block_editor131.useBlockProps.save({ className, style: style2 }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
          "div",
          {
            ...import_block_editor131.useInnerBlocksProps.save({
              className: "wp-block-media-text__content"
            })
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop4)() })
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)("div", { ...import_block_editor131.useBlockProps.save({ className, style: style2 }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop4)() }),
      /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
        "div",
        {
          ...import_block_editor131.useInnerBlocksProps.save({
            className: "wp-block-media-text__content"
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/media-text/transforms.mjs
  var import_blocks43 = __toESM(require_blocks(), 1);
  var transforms16 = {
    from: [
      {
        type: "block",
        blocks: ["core/image"],
        transform: ({ alt, url, id, anchor }) => (0, import_blocks43.createBlock)("core/media-text", {
          mediaAlt: alt,
          mediaId: id,
          mediaUrl: url,
          mediaType: "image",
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/video"],
        transform: ({ src, id, anchor }) => (0, import_blocks43.createBlock)("core/media-text", {
          mediaId: id,
          mediaUrl: src,
          mediaType: "video",
          anchor
        })
      },
      {
        type: "block",
        blocks: ["core/cover"],
        transform: ({
          align,
          alt,
          anchor,
          backgroundType,
          customGradient,
          customOverlayColor,
          gradient,
          id,
          overlayColor,
          style: style2,
          textColor,
          url,
          useFeaturedImage
        }, innerBlocks) => {
          let additionalAttributes = {};
          if (customGradient) {
            additionalAttributes = {
              style: {
                color: {
                  gradient: customGradient
                }
              }
            };
          } else if (customOverlayColor) {
            additionalAttributes = {
              style: {
                color: {
                  background: customOverlayColor
                }
              }
            };
          }
          if (style2?.color?.text) {
            additionalAttributes.style = {
              color: {
                ...additionalAttributes.style?.color,
                text: style2.color.text
              }
            };
          }
          return (0, import_blocks43.createBlock)(
            "core/media-text",
            {
              align,
              anchor,
              backgroundColor: overlayColor,
              gradient,
              mediaAlt: alt,
              mediaId: id,
              mediaType: backgroundType,
              mediaUrl: url,
              textColor,
              useFeaturedImage,
              ...additionalAttributes
            },
            innerBlocks
          );
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/image"],
        isMatch: ({ mediaType, mediaUrl }) => {
          return !mediaUrl || mediaType === "image";
        },
        transform: ({ mediaAlt, mediaId, mediaUrl, anchor }) => {
          return (0, import_blocks43.createBlock)("core/image", {
            alt: mediaAlt,
            id: mediaId,
            url: mediaUrl,
            anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/video"],
        isMatch: ({ mediaType, mediaUrl }) => {
          return !mediaUrl || mediaType === "video";
        },
        transform: ({ mediaId, mediaUrl, anchor }) => {
          return (0, import_blocks43.createBlock)("core/video", {
            id: mediaId,
            src: mediaUrl,
            anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/cover"],
        transform: ({
          align,
          anchor,
          backgroundColor,
          focalPoint,
          gradient,
          mediaAlt,
          mediaId,
          mediaType,
          mediaUrl,
          style: style2,
          textColor,
          useFeaturedImage
        }, innerBlocks) => {
          const additionalAttributes = {};
          if (style2?.color?.gradient) {
            additionalAttributes.customGradient = style2.color.gradient;
          } else if (style2?.color?.background) {
            additionalAttributes.customOverlayColor = style2.color.background;
          }
          if (style2?.color?.text) {
            additionalAttributes.style = {
              color: { text: style2.color.text }
            };
          }
          const coverAttributes = {
            align,
            alt: mediaAlt,
            anchor,
            backgroundType: mediaType,
            dimRatio: !!mediaUrl || useFeaturedImage ? 50 : 100,
            focalPoint,
            gradient,
            id: mediaId,
            overlayColor: backgroundColor,
            textColor,
            url: mediaUrl,
            useFeaturedImage,
            ...additionalAttributes
          };
          return (0, import_blocks43.createBlock)(
            "core/cover",
            coverAttributes,
            innerBlocks
          );
        }
      }
    ]
  };
  var transforms_default17 = transforms16;

  // packages/block-library/build-module/media-text/index.mjs
  var { name: name47 } = block_default47;
  var settings47 = {
    icon: media_and_text_default,
    example: {
      viewportWidth: 601,
      // Columns collapse "@media (max-width: 600px)".
      attributes: {
        mediaType: "image",
        mediaUrl: "https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n108.__)(
              "The wren<br>Earns his living<br>Noiselessly."
            )
          }
        },
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n108.__)("\u2014 Kobayashi Issa (\u4E00\u8336)")
          }
        }
      ]
    },
    transforms: transforms_default17,
    template: TEMPLATE10,
    edit: edit_default15,
    save: save26,
    deprecated: deprecated_default25
  };
  var init47 = () => initBlock({ name: name47, metadata: block_default47, settings: settings47 });

  // packages/block-library/build-module/missing/index.mjs
  var missing_exports = {};
  __export(missing_exports, {
    init: () => init48,
    metadata: () => block_default48,
    name: () => name48,
    settings: () => settings48
  });
  var import_blocks45 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/missing/edit.mjs
  var import_i18n109 = __toESM(require_i18n(), 1);
  var import_element82 = __toESM(require_element(), 1);
  var import_components66 = __toESM(require_components(), 1);
  var import_blocks44 = __toESM(require_blocks(), 1);
  var import_data62 = __toESM(require_data(), 1);
  var import_block_editor132 = __toESM(require_block_editor(), 1);
  var import_dom15 = __toESM(require_dom(), 1);
  var import_jsx_runtime331 = __toESM(require_jsx_runtime(), 1);
  function MissingEdit({ attributes: attributes2, clientId }) {
    const { originalName, originalUndelimitedContent } = attributes2;
    const hasContent = !!originalUndelimitedContent;
    const { hasFreeformBlock, hasHTMLBlock } = (0, import_data62.useSelect)(
      (select10) => {
        const { canInsertBlockType, getBlockRootClientId } = select10(import_block_editor132.store);
        return {
          hasFreeformBlock: canInsertBlockType(
            "core/freeform",
            getBlockRootClientId(clientId)
          ),
          hasHTMLBlock: canInsertBlockType(
            "core/html",
            getBlockRootClientId(clientId)
          )
        };
      },
      [clientId]
    );
    const { replaceBlock } = (0, import_data62.useDispatch)(import_block_editor132.store);
    function convertToHTML() {
      replaceBlock(
        clientId,
        (0, import_blocks44.createBlock)("core/html", {}, [], [originalUndelimitedContent])
      );
    }
    const actions = [];
    let messageHTML;
    const convertToHtmlButton = /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
      import_components66.Button,
      {
        __next40pxDefaultSize: true,
        onClick: convertToHTML,
        variant: "primary",
        children: (0, import_i18n109.__)("Keep as HTML")
      },
      "convert"
    );
    if (hasContent && !hasFreeformBlock && (!originalName || originalName === "core/freeform")) {
      if (hasHTMLBlock) {
        messageHTML = (0, import_i18n109.__)(
          "It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."
        );
        actions.push(convertToHtmlButton);
      } else {
        messageHTML = (0, import_i18n109.__)(
          "It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, if you have unsaved changes, you can save them and refresh to use the Classic block."
        );
      }
    } else if (hasContent && hasHTMLBlock) {
      messageHTML = (0, import_i18n109.sprintf)(
        /* translators: %s: block name */
        (0, import_i18n109.__)(
          'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'
        ),
        originalName
      );
      actions.push(convertToHtmlButton);
    } else {
      messageHTML = (0, import_i18n109.sprintf)(
        /* translators: %s: block name */
        (0, import_i18n109.__)(
          'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is or remove it.'
        ),
        originalName
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("div", { ...(0, import_block_editor132.useBlockProps)({ className: "has-warning" }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(import_block_editor132.Warning, { actions, children: messageHTML }),
      /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(import_element82.RawHTML, { children: (0, import_dom15.safeHTML)(originalUndelimitedContent) })
    ] });
  }

  // packages/block-library/build-module/missing/block.json
  var block_default48 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/missing",
    title: "Unsupported",
    category: "text",
    description: "Your site doesn\u2019t include support for this block.",
    textdomain: "default",
    attributes: {
      originalName: {
        type: "string"
      },
      originalUndelimitedContent: {
        type: "string"
      },
      originalContent: {
        type: "string",
        source: "raw"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      inserter: false,
      html: false,
      lock: false,
      reusable: false,
      renaming: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    }
  };

  // packages/block-library/build-module/missing/save.mjs
  var import_element83 = __toESM(require_element(), 1);
  var import_jsx_runtime332 = __toESM(require_jsx_runtime(), 1);
  function save27({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(import_element83.RawHTML, { children: attributes2.originalContent });
  }

  // packages/block-library/build-module/missing/index.mjs
  var { name: name48 } = block_default48;
  var settings48 = {
    name: name48,
    __experimentalLabel(attributes2, { context }) {
      if (context === "accessibility") {
        const { originalName } = attributes2;
        const originalBlockType = originalName ? (0, import_blocks45.getBlockType)(originalName) : void 0;
        if (originalBlockType) {
          return originalBlockType.settings.title || originalName;
        }
        return "";
      }
    },
    edit: MissingEdit,
    save: save27
  };
  var init48 = () => initBlock({ name: name48, metadata: block_default48, settings: settings48 });

  // packages/block-library/build-module/more/index.mjs
  var more_exports = {};
  __export(more_exports, {
    init: () => init49,
    metadata: () => block_default49,
    name: () => name49,
    settings: () => settings49
  });

  // packages/block-library/build-module/more/edit.mjs
  var import_i18n110 = __toESM(require_i18n(), 1);
  var import_components67 = __toESM(require_components(), 1);
  var import_block_editor133 = __toESM(require_block_editor(), 1);
  var import_blocks46 = __toESM(require_blocks(), 1);
  var import_jsx_runtime333 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_TEXT = (0, import_i18n110.__)("Read more");
  function MoreEdit({
    attributes: { customText, noTeaser },
    insertBlocksAfter,
    setAttributes
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)(import_jsx_runtime333.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(import_block_editor133.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
        import_components67.__experimentalToolsPanel,
        {
          label: (0, import_i18n110.__)("Settings"),
          resetAll: () => {
            setAttributes({
              noTeaser: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
            import_components67.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n110.__)("Hide excerpt"),
              isShownByDefault: true,
              hasValue: () => noTeaser,
              onDeselect: () => setAttributes({ noTeaser: false }),
              children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
                import_components67.ToggleControl,
                {
                  label: (0, import_i18n110.__)(
                    "Hide the excerpt on the full content page"
                  ),
                  checked: !!noTeaser,
                  onChange: () => setAttributes({ noTeaser: !noTeaser }),
                  help: (checked) => checked ? (0, import_i18n110.__)("The excerpt is hidden.") : (0, import_i18n110.__)("The excerpt is visible.")
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime333.jsx)("div", { ...(0, import_block_editor133.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
        import_block_editor133.PlainText,
        {
          __experimentalVersion: 2,
          tagName: "span",
          "aria-label": (0, import_i18n110.__)('"Read more" text'),
          value: customText,
          placeholder: DEFAULT_TEXT,
          onChange: (value) => setAttributes({ customText: value }),
          disableLineBreaks: true,
          __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
            (0, import_blocks46.createBlock)((0, import_blocks46.getDefaultBlockName)())
          ) : void 0
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/more/block.json
  var block_default49 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/more",
    title: "More",
    category: "design",
    description: "Content before this block is shown in the excerpt on blog and archive pages. Where a theme shows the full content instead, visitors get a \u201CRead more\u201D link to the rest of the post.",
    keywords: ["read more"],
    textdomain: "default",
    attributes: {
      customText: {
        type: "string",
        default: "",
        role: "content"
      },
      noTeaser: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      customClassName: false,
      className: false,
      html: false,
      multiple: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    },
    editorStyle: "wp-block-more-editor"
  };

  // packages/block-library/build-module/more/save.mjs
  var import_element84 = __toESM(require_element(), 1);
  var import_jsx_runtime334 = __toESM(require_jsx_runtime(), 1);
  function save28({ attributes: { customText, noTeaser } }) {
    const moreTag = customText ? `<!--more ${customText}-->` : "<!--more-->";
    const noTeaserTag = noTeaser ? "<!--noteaser-->" : "";
    return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(import_element84.RawHTML, { children: [moreTag, noTeaserTag].filter(Boolean).join("\n") });
  }

  // packages/block-library/build-module/more/transforms.mjs
  var import_blocks47 = __toESM(require_blocks(), 1);
  var transforms17 = {
    from: [
      {
        type: "raw",
        schema: {
          "wp-block": { attributes: ["data-block"] }
        },
        isMatch: (node) => node.dataset && node.dataset.block === "core/more",
        transform(node) {
          const { customText, noTeaser } = node.dataset;
          const attrs = {};
          if (customText) {
            attrs.customText = customText;
          }
          if (noTeaser === "") {
            attrs.noTeaser = true;
          }
          return (0, import_blocks47.createBlock)("core/more", attrs);
        }
      }
    ]
  };
  var transforms_default18 = transforms17;

  // packages/block-library/build-module/more/index.mjs
  var { name: name49 } = block_default49;
  var settings49 = {
    icon: more_default,
    example: {},
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        return attributes2.customText;
      }
    },
    transforms: transforms_default18,
    edit: MoreEdit,
    save: save28
  };
  var init49 = () => initBlock({ name: name49, metadata: block_default49, settings: settings49 });

  // packages/block-library/build-module/navigation/index.mjs
  var navigation_exports = {};
  __export(navigation_exports, {
    init: () => init50,
    metadata: () => block_default50,
    name: () => name50,
    settings: () => settings50
  });
  var import_i18n142 = __toESM(require_i18n(), 1);
  var import_data90 = __toESM(require_data(), 1);
  var import_core_data54 = __toESM(require_core_data(), 1);
  var import_html_entities7 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/navigation/block.json
  var block_default50 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation",
    title: "Navigation",
    category: "theme",
    allowedBlocks: [
      "core/navigation-link",
      "core/search",
      "core/social-links",
      "core/page-list",
      "core/spacer",
      "core/home-link",
      "core/icon",
      "core/site-title",
      "core/site-logo",
      "core/navigation-submenu",
      "core/loginout",
      "core/buttons"
    ],
    description: "A collection of blocks that allow visitors to get around your site.",
    keywords: ["menu", "navigation", "links"],
    textdomain: "default",
    attributes: {
      ref: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      submenuVisibility: {
        type: "string",
        enum: ["hover", "click", "always"],
        default: "hover"
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      overlay: {
        type: "string"
      },
      icon: {
        type: "string",
        default: "handle"
      },
      hasIcon: {
        type: "boolean",
        default: true
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      },
      maxNestingLevel: {
        type: "number",
        default: 5
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    providesContext: {
      textColor: "textColor",
      customTextColor: "customTextColor",
      backgroundColor: "backgroundColor",
      customBackgroundColor: "customBackgroundColor",
      overlayTextColor: "overlayTextColor",
      customOverlayTextColor: "customOverlayTextColor",
      overlayBackgroundColor: "overlayBackgroundColor",
      customOverlayBackgroundColor: "customOverlayBackgroundColor",
      fontSize: "fontSize",
      customFontSize: "customFontSize",
      showSubmenuIcon: "showSubmenuIcon",
      submenuVisibility: "submenuVisibility",
      openSubmenusOnClick: "openSubmenusOnClick",
      style: "style",
      maxNestingLevel: "maxNestingLevel"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      ariaLabel: true,
      contentRole: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalSkipSerialization: ["textDecoration"],
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        allowSizingOnChildren: true,
        default: {
          type: "flex"
        }
      },
      interactivity: true,
      renaming: false
    },
    editorStyle: "wp-block-navigation-editor",
    style: "wp-block-navigation"
  };

  // packages/block-library/build-module/navigation/edit/index.mjs
  var import_element106 = __toESM(require_element(), 1);
  var import_block_editor155 = __toESM(require_block_editor(), 1);
  var import_core_data53 = __toESM(require_core_data(), 1);
  var import_data89 = __toESM(require_data(), 1);
  var import_components92 = __toESM(require_components(), 1);
  var import_i18n141 = __toESM(require_i18n(), 1);
  var import_a11y2 = __toESM(require_a11y(), 1);
  var import_blocks53 = __toESM(require_blocks(), 1);
  var import_compose41 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/navigation/use-navigation-menu.mjs
  var import_core_data30 = __toESM(require_core_data(), 1);
  var import_data63 = __toESM(require_data(), 1);

  // packages/block-library/build-module/navigation/constants.mjs
  var DEFAULT_BLOCK5 = {
    name: "core/navigation-link",
    attributes: {
      kind: "post-type",
      type: "page"
    }
  };
  var PRIORITIZED_INSERTER_BLOCKS = [
    "core/navigation-link/page",
    "core/navigation-link/custom-link"
  ];
  var PRELOADED_NAVIGATION_MENUS_QUERY = {
    per_page: 100,
    status: ["publish", "draft"],
    order: "desc",
    orderby: "date"
  };
  var SELECT_NAVIGATION_MENUS_ARGS = [
    "postType",
    "wp_navigation",
    PRELOADED_NAVIGATION_MENUS_QUERY
  ];
  var NAVIGATION_OVERLAY_TEMPLATE_PART_AREA = "navigation-overlay";

  // packages/block-library/build-module/navigation/use-navigation-menu.mjs
  function useNavigationMenu(ref) {
    const permissions = (0, import_core_data30.useResourcePermissions)({
      kind: "postType",
      name: "wp_navigation",
      id: ref
    });
    const {
      navigationMenu,
      isNavigationMenuResolved,
      isNavigationMenuMissing
    } = (0, import_data63.useSelect)(
      (select10) => {
        return selectExistingMenu(select10, ref);
      },
      [ref]
    );
    const {
      // Can the user create navigation menus?
      canCreate: canCreateNavigationMenus,
      // Can the user update the specific navigation menu with the given post ID?
      canUpdate: canUpdateNavigationMenu,
      // Can the user delete the specific navigation menu with the given post ID?
      canDelete: canDeleteNavigationMenu,
      isResolving: isResolvingPermissions,
      hasResolved: hasResolvedPermissions
    } = permissions;
    const {
      records: navigationMenus,
      isResolving: isResolvingNavigationMenus,
      hasResolved: hasResolvedNavigationMenus
    } = (0, import_core_data30.useEntityRecords)(
      "postType",
      `wp_navigation`,
      PRELOADED_NAVIGATION_MENUS_QUERY
    );
    const canSwitchNavigationMenu = ref ? navigationMenus?.length > 1 : navigationMenus?.length > 0;
    return {
      navigationMenu,
      isNavigationMenuResolved,
      isNavigationMenuMissing,
      navigationMenus,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      canSwitchNavigationMenu,
      canUserCreateNavigationMenus: canCreateNavigationMenus,
      isResolvingCanUserCreateNavigationMenus: isResolvingPermissions,
      hasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,
      canUserUpdateNavigationMenu: canUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolvedPermissions : void 0,
      canUserDeleteNavigationMenu: canDeleteNavigationMenu,
      hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolvedPermissions : void 0
    };
  }
  function selectExistingMenu(select10, ref) {
    if (!ref) {
      return {
        isNavigationMenuResolved: false,
        isNavigationMenuMissing: true
      };
    }
    const { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } = select10(import_core_data30.store);
    const args = ["postType", "wp_navigation", ref];
    const navigationMenu = getEntityRecord(...args);
    const editedNavigationMenu = getEditedEntityRecord(...args);
    const hasResolvedNavigationMenu = hasFinishedResolution(
      "getEditedEntityRecord",
      args
    );
    const isNavigationMenuPublishedOrDraft = editedNavigationMenu.status === "publish" || editedNavigationMenu.status === "draft";
    return {
      isNavigationMenuResolved: hasResolvedNavigationMenu,
      isNavigationMenuMissing: hasResolvedNavigationMenu && (!navigationMenu || !isNavigationMenuPublishedOrDraft),
      // getEditedEntityRecord will return the post regardless of status.
      // Therefore if the found post is not published then we should ignore it.
      navigationMenu: isNavigationMenuPublishedOrDraft ? editedNavigationMenu : null
    };
  }

  // packages/block-library/build-module/navigation/edit/placeholder/index.mjs
  var import_components69 = __toESM(require_components(), 1);
  var import_i18n113 = __toESM(require_i18n(), 1);
  var import_a11y = __toESM(require_a11y(), 1);
  var import_element86 = __toESM(require_element(), 1);
  var import_core_data32 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/navigation/edit/placeholder/placeholder-preview.mjs
  var import_i18n111 = __toESM(require_i18n(), 1);
  var import_jsx_runtime335 = __toESM(require_jsx_runtime(), 1);
  var PlaceholderPreview = ({ isVisible = true }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
      "div",
      {
        "aria-hidden": !isVisible ? true : void 0,
        className: "wp-block-navigation-placeholder__preview",
        children: /* @__PURE__ */ (0, import_jsx_runtime335.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
          /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(icon_default, { icon: navigation_default }),
          (0, import_i18n111.__)("Navigation")
        ] })
      }
    );
  };
  var placeholder_preview_default = PlaceholderPreview;

  // packages/block-library/build-module/navigation/edit/navigation-menu-selector.mjs
  var import_components68 = __toESM(require_components(), 1);
  var import_i18n112 = __toESM(require_i18n(), 1);
  var import_html_entities3 = __toESM(require_html_entities(), 1);
  var import_element85 = __toESM(require_element(), 1);
  var import_core_data31 = __toESM(require_core_data(), 1);
  var import_jsx_runtime336 = __toESM(require_jsx_runtime(), 1);
  function buildMenuLabel(title, id, status) {
    if (!title) {
      return (0, import_i18n112.sprintf)((0, import_i18n112.__)("(no title %s)"), id);
    }
    if (status === "publish") {
      return (0, import_html_entities3.decodeEntities)(title);
    }
    return (0, import_i18n112.sprintf)(
      // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
      (0, import_i18n112.__)("%1$s (%2$s)"),
      (0, import_html_entities3.decodeEntities)(title),
      status
    );
  }
  function NavigationMenuSelector({
    currentMenuId,
    onSelectNavigationMenu,
    onSelectClassicMenu,
    onCreateNew,
    actionLabel: actionLabel3,
    createNavigationMenuIsSuccess,
    createNavigationMenuIsError
  }) {
    const createActionLabel = (0, import_i18n112.__)("Create from '%s'");
    const [isUpdatingMenuRef, setIsUpdatingMenuRef] = (0, import_element85.useState)(false);
    actionLabel3 = actionLabel3 || createActionLabel;
    const { records: classicMenus } = (0, import_core_data31.useEntityRecords)("root", "menu", {
      per_page: -1,
      context: "view"
    });
    const {
      navigationMenus,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      canUserCreateNavigationMenus,
      canSwitchNavigationMenu,
      isNavigationMenuMissing
    } = useNavigationMenu(currentMenuId);
    const [currentTitle] = (0, import_core_data31.useEntityProp)(
      "postType",
      "wp_navigation",
      "title",
      currentMenuId
    );
    const menuChoices = (0, import_element85.useMemo)(() => {
      return navigationMenus?.map(({ id, title, status }, index2) => {
        const label = buildMenuLabel(
          title?.rendered,
          index2 + 1,
          status
        );
        return {
          value: id,
          label,
          ariaLabel: (0, import_i18n112.sprintf)(actionLabel3, label),
          disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
        };
      }) || [];
    }, [
      navigationMenus,
      actionLabel3,
      isResolvingNavigationMenus,
      hasResolvedNavigationMenus,
      isUpdatingMenuRef
    ]);
    const hasNavigationMenus = !!navigationMenus?.length;
    const hasClassicMenus = !!classicMenus?.length;
    const showNavigationMenus = !!canSwitchNavigationMenu;
    const showClassicMenus = !!canUserCreateNavigationMenus;
    const noMenuSelected = hasNavigationMenus && !currentMenuId;
    const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus;
    const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null;
    const navMenuHasBeenDeleted = currentMenuId && isNavigationMenuMissing;
    let selectorLabel = "";
    if (isResolvingNavigationMenus) {
      selectorLabel = (0, import_i18n112.__)("Loading\u2026");
    } else if (noMenuSelected || noBlockMenus || menuUnavailable || navMenuHasBeenDeleted) {
      selectorLabel = (0, import_i18n112.__)("Choose or create a Navigation Menu");
    } else {
      selectorLabel = currentTitle;
    }
    (0, import_element85.useEffect)(() => {
      if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) {
        setIsUpdatingMenuRef(false);
      }
    }, [
      hasResolvedNavigationMenus,
      createNavigationMenuIsSuccess,
      canUserCreateNavigationMenus,
      createNavigationMenuIsError,
      isUpdatingMenuRef,
      menuUnavailable,
      noBlockMenus,
      noMenuSelected
    ]);
    const NavigationMenuSelectorDropdown = /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
      import_components68.DropdownMenu,
      {
        label: selectorLabel,
        icon: more_vertical_default,
        toggleProps: { size: "small" },
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(import_jsx_runtime336.Fragment, { children: [
          showNavigationMenus && hasNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_components68.MenuGroup, { label: (0, import_i18n112.__)("Menus"), children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
            import_components68.MenuItemsChoice,
            {
              value: currentMenuId,
              onSelect: (menuId) => {
                onSelectNavigationMenu(menuId);
                onClose();
              },
              choices: menuChoices
            }
          ) }),
          showClassicMenus && hasClassicMenus && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_components68.MenuGroup, { label: (0, import_i18n112.__)("Import Classic Menus"), children: classicMenus?.map((menu) => {
            const label = (0, import_html_entities3.decodeEntities)(menu.name);
            return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
              import_components68.MenuItem,
              {
                onClick: async () => {
                  setIsUpdatingMenuRef(true);
                  await onSelectClassicMenu(menu);
                  setIsUpdatingMenuRef(false);
                  onClose();
                },
                "aria-label": (0, import_i18n112.sprintf)(
                  createActionLabel,
                  label
                ),
                disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
                children: label
              },
              menu.id
            );
          }) }),
          canUserCreateNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(import_components68.MenuGroup, { label: (0, import_i18n112.__)("Tools"), children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
            import_components68.MenuItem,
            {
              onClick: async () => {
                setIsUpdatingMenuRef(true);
                await onCreateNew();
                setIsUpdatingMenuRef(false);
                onClose();
              },
              disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
              children: (0, import_i18n112.__)("Create new Menu")
            }
          ) })
        ] })
      }
    );
    return NavigationMenuSelectorDropdown;
  }
  var navigation_menu_selector_default = NavigationMenuSelector;

  // packages/block-library/build-module/navigation/edit/placeholder/index.mjs
  var import_jsx_runtime337 = __toESM(require_jsx_runtime(), 1);
  function NavigationPlaceholder({
    isSelected,
    currentMenuId,
    clientId,
    canUserCreateNavigationMenus = false,
    isResolvingCanUserCreateNavigationMenus,
    onSelectNavigationMenu,
    onSelectClassicMenu,
    onCreateEmpty
  }) {
    const { isResolving: isResolvingMenus, hasResolved: hasResolvedMenus } = (0, import_core_data32.useEntityRecords)("root", "menu", { per_page: -1, context: "view" });
    (0, import_element86.useEffect)(() => {
      if (!isSelected) {
        return;
      }
      if (isResolvingMenus) {
        (0, import_a11y.speak)((0, import_i18n113.__)("Loading navigation block setup options\u2026"));
      }
      if (hasResolvedMenus) {
        (0, import_a11y.speak)((0, import_i18n113.__)("Navigation block setup options ready."));
      }
    }, [hasResolvedMenus, isResolvingMenus, isSelected]);
    const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenus;
    return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(import_jsx_runtime337.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(import_components69.Placeholder, { className: "wp-block-navigation-placeholder", children: [
      /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(placeholder_preview_default, { isVisible: !isSelected }),
      /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
        "div",
        {
          "aria-hidden": !isSelected ? true : void 0,
          className: "wp-block-navigation-placeholder__controls",
          children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "wp-block-navigation-placeholder__actions", children: [
            /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
              /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(icon_default, { icon: navigation_default }),
              " ",
              (0, import_i18n113.__)("Navigation")
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("hr", {}),
            isResolvingActions && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(import_components69.Spinner, {}),
            /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
              navigation_menu_selector_default,
              {
                currentMenuId,
                clientId,
                onSelectNavigationMenu,
                onSelectClassicMenu
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime337.jsx)("hr", {}),
            canUserCreateNavigationMenus && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
              import_components69.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onCreateEmpty,
                children: (0, import_i18n113.__)("Start empty")
              }
            )
          ] })
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/navigation/edit/responsive-wrapper.mjs
  var import_components70 = __toESM(require_components(), 1);
  var import_i18n114 = __toESM(require_i18n(), 1);
  var import_block_editor134 = __toESM(require_block_editor(), 1);
  var import_data64 = __toESM(require_data(), 1);
  var import_core_data33 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-menu-icon.mjs
  var import_primitives166 = __toESM(require_primitives(), 1);
  var import_jsx_runtime338 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuIcon({ icon: icon2 }) {
    if (icon2 === "menu") {
      return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(icon_default, { icon: menu_default });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime338.jsxs)(
      import_primitives166.SVG,
      {
        xmlns: "http://www.w3.org/2000/svg",
        viewBox: "0 0 24 24",
        width: "24",
        height: "24",
        "aria-hidden": "true",
        focusable: "false",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_primitives166.Rect, { x: "4", y: "7.5", width: "16", height: "1.5" }),
          /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(import_primitives166.Rect, { x: "4", y: "15", width: "16", height: "1.5" })
        ]
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/utils/create-template-part-id.mjs
  function createTemplatePartId(theme, slug) {
    return theme && slug ? theme + "//" + slug : null;
  }

  // packages/block-library/build-module/navigation/edit/responsive-wrapper.mjs
  var import_jsx_runtime339 = __toESM(require_jsx_runtime(), 1);
  function ResponsiveWrapper({
    children,
    id,
    isOpen,
    isResponsive,
    onToggle,
    isHiddenByDefault,
    overlayBackgroundColor,
    overlayTextColor,
    hasIcon,
    icon: icon2,
    overlay,
    onNavigateToEntityRecord
  }) {
    const currentTheme = (0, import_data64.useSelect)(
      (select10) => select10(import_core_data33.store).getCurrentTheme()?.stylesheet,
      []
    );
    if (!isResponsive) {
      return children;
    }
    const hasCustomOverlay = !!overlay;
    const responsiveContainerClasses = clsx_default(
      "wp-block-navigation__responsive-container",
      !hasCustomOverlay && {
        "has-text-color": !!overlayTextColor.color || !!overlayTextColor?.class,
        [(0, import_block_editor134.getColorClassName)("color", overlayTextColor?.slug)]: !!overlayTextColor?.slug,
        "has-background": !!overlayBackgroundColor.color || overlayBackgroundColor?.class,
        [(0, import_block_editor134.getColorClassName)(
          "background-color",
          overlayBackgroundColor?.slug
        )]: !!overlayBackgroundColor?.slug
      },
      {
        "is-menu-open": isOpen,
        "hidden-by-default": isHiddenByDefault
      }
    );
    const styles = !hasCustomOverlay ? {
      color: !overlayTextColor?.slug && overlayTextColor?.color,
      backgroundColor: !overlayBackgroundColor?.slug && overlayBackgroundColor?.color && overlayBackgroundColor.color
    } : {};
    const openButtonClasses = clsx_default(
      "wp-block-navigation__responsive-container-open",
      { "always-shown": isHiddenByDefault }
    );
    const modalId = `${id}-modal`;
    const dialogProps = {
      className: "wp-block-navigation__responsive-dialog",
      ...isOpen && {
        role: "dialog",
        "aria-modal": true,
        "aria-label": (0, import_i18n114.__)("Menu")
      }
    };
    const handleToggleClick = () => {
      if (overlay && onNavigateToEntityRecord) {
        const templatePartId = createTemplatePartId(
          currentTheme,
          overlay
        );
        onNavigateToEntityRecord({
          postId: templatePartId,
          postType: "wp_template_part"
        });
        return;
      }
      onToggle(true);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(import_jsx_runtime339.Fragment, { children: [
      !isOpen && /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
        import_components70.Button,
        {
          __next40pxDefaultSize: true,
          "aria-haspopup": "true",
          "aria-label": hasIcon && (0, import_i18n114.__)("Open menu"),
          className: openButtonClasses,
          onClick: handleToggleClick,
          children: [
            hasIcon && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(OverlayMenuIcon, { icon: icon2 }),
            !hasIcon && (0, import_i18n114.__)("Menu")
          ]
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
        "div",
        {
          className: responsiveContainerClasses,
          style: styles,
          id: modalId,
          children: /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
            "div",
            {
              className: "wp-block-navigation__responsive-close",
              tabIndex: "-1",
              children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("div", { ...dialogProps, children: [
                /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)(
                  import_components70.Button,
                  {
                    __next40pxDefaultSize: true,
                    className: "wp-block-navigation__responsive-container-close",
                    "aria-label": hasIcon && (0, import_i18n114.__)("Close menu"),
                    onClick: () => onToggle(false),
                    children: [
                      hasIcon && /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(icon_default, { icon: close_default }),
                      !hasIcon && (0, import_i18n114.__)("Close")
                    ]
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
                  "div",
                  {
                    className: "wp-block-navigation__responsive-container-content",
                    id: `${modalId}-content`,
                    children
                  }
                )
              ] })
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/inner-blocks.mjs
  var import_core_data34 = __toESM(require_core_data(), 1);
  var import_block_editor135 = __toESM(require_block_editor(), 1);
  var import_data65 = __toESM(require_data(), 1);
  var import_element87 = __toESM(require_element(), 1);
  var import_jsx_runtime340 = __toESM(require_jsx_runtime(), 1);
  function NavigationInnerBlocks({
    clientId,
    hasCustomPlaceholder,
    orientation,
    templateLock
  }) {
    const {
      isImmediateParentOfSelectedBlock,
      selectedBlockHasChildren,
      isSelected,
      hasSelectedDescendant
    } = (0, import_data65.useSelect)(
      (select10) => {
        const {
          getBlockCount,
          hasSelectedInnerBlock,
          getSelectedBlockClientId
        } = select10(import_block_editor135.store);
        const selectedBlockId = getSelectedBlockClientId();
        return {
          isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            false
          ),
          selectedBlockHasChildren: !!getBlockCount(selectedBlockId),
          hasSelectedDescendant: hasSelectedInnerBlock(clientId, true),
          // This prop is already available but computing it here ensures it's
          // fresh compared to isImmediateParentOfSelectedBlock.
          isSelected: selectedBlockId === clientId
        };
      },
      [clientId]
    );
    const [blocks, onInput, onChange] = (0, import_core_data34.useEntityBlockEditor)(
      "postType",
      "wp_navigation"
    );
    const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren;
    const placeholder2 = (0, import_element87.useMemo)(() => /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(placeholder_preview_default, {}), []);
    const hasMenuItems = !!blocks?.length;
    const showPlaceholder = !hasCustomPlaceholder && !hasMenuItems && !isSelected;
    const innerBlocksProps = (0, import_block_editor135.useInnerBlocksProps)(
      {
        className: "wp-block-navigation__container"
      },
      {
        value: blocks,
        onInput,
        onChange,
        prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS,
        defaultBlock: DEFAULT_BLOCK5,
        directInsert: true,
        orientation,
        templateLock,
        // As an exception to other blocks which feature nesting, show
        // the block appender even when a child block is selected.
        // This should be a temporary fix, to be replaced by improvements to
        // the sibling inserter.
        // See https://github.com/WordPress/gutenberg/issues/37572.
        renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || hasSelectedDescendant || // Show the appender while dragging to allow inserting element between item and the appender.
        parentOrChildHasSelection ? import_block_editor135.InnerBlocks.ButtonBlockAppender : false,
        placeholder: showPlaceholder ? placeholder2 : void 0,
        __experimentalCaptureToolbars: true,
        __unstableDisableLayoutClassNames: true
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/navigation/edit/navigation-menu-name-control.mjs
  var import_components71 = __toESM(require_components(), 1);
  var import_core_data35 = __toESM(require_core_data(), 1);
  var import_i18n115 = __toESM(require_i18n(), 1);
  var import_jsx_runtime341 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenuNameControl() {
    const [title, updateTitle] = (0, import_core_data35.useEntityProp)(
      "postType",
      "wp_navigation",
      "title"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
      import_components71.TextControl,
      {
        label: (0, import_i18n115.__)("Menu name"),
        value: title,
        onChange: updateTitle
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/unsaved-inner-blocks.mjs
  var import_block_editor136 = __toESM(require_block_editor(), 1);
  var import_components72 = __toESM(require_components(), 1);
  var import_core_data36 = __toESM(require_core_data(), 1);
  var import_data66 = __toESM(require_data(), 1);
  var import_element88 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/are-blocks-dirty.mjs
  function areBlocksDirty(originalBlocks, blocks) {
    return !isDeepEqual(originalBlocks, blocks, (prop, x3) => {
      if (x3?.name === "core/page-list" && prop === "innerBlocks") {
        return true;
      }
    });
  }
  var isDeepEqual = (x3, y2, shouldSkip) => {
    if (x3 === y2) {
      return true;
    } else if (typeof x3 === "object" && x3 !== null && x3 !== void 0 && typeof y2 === "object" && y2 !== null && y2 !== void 0) {
      if (Object.keys(x3).length !== Object.keys(y2).length) {
        return false;
      }
      for (const prop in x3) {
        if (y2.hasOwnProperty(prop)) {
          if (shouldSkip && shouldSkip(prop, x3)) {
            return true;
          }
          if (!isDeepEqual(x3[prop], y2[prop], shouldSkip)) {
            return false;
          }
        } else {
          return false;
        }
      }
      return true;
    }
    return false;
  };

  // packages/block-library/build-module/navigation/edit/unsaved-inner-blocks.mjs
  var import_jsx_runtime342 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_OBJECT2 = {};
  function UnsavedInnerBlocks({
    blocks,
    createNavigationMenu,
    hasSelection
  }) {
    const originalBlocksRef = (0, import_element88.useRef)();
    (0, import_element88.useEffect)(() => {
      if (!originalBlocksRef?.current) {
        originalBlocksRef.current = blocks;
      }
    }, [blocks]);
    const innerBlocksAreDirty = areBlocksDirty(
      originalBlocksRef?.current,
      blocks
    );
    const isDisabled = (0, import_element88.useContext)(import_components72.Disabled.Context);
    const innerBlocksProps = (0, import_block_editor136.useInnerBlocksProps)(
      {
        className: "wp-block-navigation__container"
      },
      {
        renderAppender: hasSelection ? void 0 : false,
        defaultBlock: DEFAULT_BLOCK5,
        directInsert: true
      }
    );
    const { isSaving, hasResolvedAllNavigationMenus } = (0, import_data66.useSelect)(
      (select10) => {
        if (isDisabled) {
          return EMPTY_OBJECT2;
        }
        const { hasFinishedResolution, isSavingEntityRecord } = select10(import_core_data36.store);
        return {
          isSaving: isSavingEntityRecord("postType", "wp_navigation"),
          hasResolvedAllNavigationMenus: hasFinishedResolution(
            "getEntityRecords",
            SELECT_NAVIGATION_MENUS_ARGS
          )
        };
      },
      [isDisabled]
    );
    (0, import_element88.useEffect)(() => {
      if (isDisabled || isSaving || !hasResolvedAllNavigationMenus || !hasSelection || !innerBlocksAreDirty) {
        return;
      }
      createNavigationMenu(null, blocks);
    }, [
      blocks,
      createNavigationMenu,
      isDisabled,
      isSaving,
      hasResolvedAllNavigationMenus,
      innerBlocksAreDirty,
      hasSelection
    ]);
    const Wrapper = isSaving ? import_components72.Disabled : "div";
    return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(Wrapper, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/navigation/edit/navigation-menu-delete-control.mjs
  var import_components73 = __toESM(require_components(), 1);
  var import_core_data37 = __toESM(require_core_data(), 1);
  var import_data67 = __toESM(require_data(), 1);
  var import_element89 = __toESM(require_element(), 1);
  var import_i18n116 = __toESM(require_i18n(), 1);
  var import_jsx_runtime343 = __toESM(require_jsx_runtime(), 1);
  function NavigationMenuDeleteControl({ onDelete }) {
    const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0, import_element89.useState)(false);
    const id = (0, import_core_data37.useEntityId)("postType", "wp_navigation");
    const { deleteEntityRecord } = (0, import_data67.useDispatch)(import_core_data37.store);
    return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)(import_jsx_runtime343.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
        import_components73.Button,
        {
          __next40pxDefaultSize: true,
          className: "wp-block-navigation-delete-menu-button",
          variant: "secondary",
          isDestructive: true,
          onClick: () => {
            setIsConfirmDialogVisible(true);
          },
          children: (0, import_i18n116.__)("Delete menu")
        }
      ),
      isConfirmDialogVisible && /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
        import_components73.__experimentalConfirmDialog,
        {
          isOpen: true,
          onConfirm: () => {
            deleteEntityRecord("postType", "wp_navigation", id, {
              force: true
            });
            onDelete();
          },
          onCancel: () => {
            setIsConfirmDialogVisible(false);
          },
          confirmButtonText: (0, import_i18n116.__)("Delete"),
          size: "medium",
          children: (0, import_i18n116.__)(
            "Are you sure you want to delete this Navigation Menu?"
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/use-navigation-notice.mjs
  var import_element90 = __toESM(require_element(), 1);
  var import_data68 = __toESM(require_data(), 1);
  var import_notices12 = __toESM(require_notices(), 1);
  function useNavigationNotice({ name: name118, message = "" } = {}) {
    const noticeRef = (0, import_element90.useRef)();
    const { createWarningNotice, removeNotice } = (0, import_data68.useDispatch)(import_notices12.store);
    const showNotice = (0, import_element90.useCallback)(
      (customMsg) => {
        if (noticeRef.current) {
          return;
        }
        noticeRef.current = name118;
        createWarningNotice(customMsg || message, {
          id: noticeRef.current,
          type: "snackbar"
        });
      },
      [noticeRef, createWarningNotice, message, name118]
    );
    const hideNotice = (0, import_element90.useCallback)(() => {
      if (!noticeRef.current) {
        return;
      }
      removeNotice(noticeRef.current);
      noticeRef.current = null;
    }, [noticeRef, removeNotice]);
    return [showNotice, hideNotice];
  }
  var use_navigation_notice_default = useNavigationNotice;

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview.mjs
  var import_components74 = __toESM(require_components(), 1);
  var import_i18n117 = __toESM(require_i18n(), 1);
  var import_jsx_runtime344 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreview({ setAttributes, hasIcon, icon: icon2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(import_jsx_runtime344.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
        import_components74.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n117.__)("Show icon button"),
          isShownByDefault: true,
          hasValue: () => !hasIcon,
          onDeselect: () => setAttributes({ hasIcon: true }),
          children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
            import_components74.ToggleControl,
            {
              label: (0, import_i18n117.__)("Show icon button"),
              help: (0, import_i18n117.__)(
                "Configure the visual appearance of the button that toggles the overlay menu."
              ),
              onChange: (value) => setAttributes({ hasIcon: value }),
              checked: hasIcon
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
        import_components74.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n117.__)("Icon"),
          isShownByDefault: true,
          hasValue: () => icon2 !== "handle",
          onDeselect: () => setAttributes({ icon: "handle" }),
          children: /* @__PURE__ */ (0, import_jsx_runtime344.jsxs)(
            import_components74.__experimentalToggleGroupControl,
            {
              className: "wp-block-navigation__overlay-menu-icon-toggle-group",
              label: (0, import_i18n117.__)("Icon"),
              value: icon2,
              onChange: (value) => setAttributes({ icon: value }),
              isBlock: true,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
                  import_components74.__experimentalToggleGroupControlOption,
                  {
                    value: "handle",
                    "aria-label": (0, import_i18n117.__)("handle"),
                    label: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(OverlayMenuIcon, { icon: "handle" })
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
                  import_components74.__experimentalToggleGroupControlOption,
                  {
                    value: "menu",
                    "aria-label": (0, import_i18n117.__)("menu"),
                    label: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(OverlayMenuIcon, { icon: "menu" })
                  }
                )
              ]
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-panel.mjs
  var import_components81 = __toESM(require_components(), 1);
  var import_i18n125 = __toESM(require_i18n(), 1);
  var import_element95 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-template-part-selector.mjs
  var import_element93 = __toESM(require_element(), 1);
  var import_compose38 = __toESM(require_compose(), 1);
  var import_core_data39 = __toESM(require_core_data(), 1);
  var import_data70 = __toESM(require_data(), 1);
  var import_components76 = __toESM(require_components(), 1);
  var import_i18n120 = __toESM(require_i18n(), 1);
  var import_html_entities4 = __toESM(require_html_entities(), 1);
  var import_notices13 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/navigation/edit/use-create-overlay.mjs
  var import_element91 = __toESM(require_element(), 1);
  var import_data69 = __toESM(require_data(), 1);
  var import_core_data38 = __toESM(require_core_data(), 1);
  var import_block_editor137 = __toESM(require_block_editor(), 1);
  var import_i18n118 = __toESM(require_i18n(), 1);
  var import_blocks48 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/navigation/edit/utils.mjs
  function getComputedStyle3(node) {
    return node.ownerDocument.defaultView.getComputedStyle(node);
  }
  function detectColors(colorsDetectionElement, setColor, setBackground) {
    if (!colorsDetectionElement) {
      return;
    }
    setColor(getComputedStyle3(colorsDetectionElement).color);
    let backgroundColorNode = colorsDetectionElement;
    let backgroundColor = getComputedStyle3(backgroundColorNode).backgroundColor;
    while (backgroundColor === "rgba(0, 0, 0, 0)" && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
      backgroundColorNode = backgroundColorNode.parentNode;
      backgroundColor = getComputedStyle3(backgroundColorNode).backgroundColor;
    }
    setBackground(backgroundColor);
  }
  function getColors(context, isSubMenu) {
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor,
      overlayTextColor,
      customOverlayTextColor,
      overlayBackgroundColor,
      customOverlayBackgroundColor,
      style: style2
    } = context;
    const colors = {};
    if (isSubMenu && !!customOverlayTextColor) {
      colors.customTextColor = customOverlayTextColor;
    } else if (isSubMenu && !!overlayTextColor) {
      colors.textColor = overlayTextColor;
    } else if (!!customTextColor) {
      colors.customTextColor = customTextColor;
    } else if (!!textColor) {
      colors.textColor = textColor;
    } else if (!!style2?.color?.text) {
      colors.customTextColor = style2.color.text;
    }
    if (isSubMenu && !!customOverlayBackgroundColor) {
      colors.customBackgroundColor = customOverlayBackgroundColor;
    } else if (isSubMenu && !!overlayBackgroundColor) {
      colors.backgroundColor = overlayBackgroundColor;
    } else if (!!customBackgroundColor) {
      colors.customBackgroundColor = customBackgroundColor;
    } else if (!!backgroundColor) {
      colors.backgroundColor = backgroundColor;
    } else if (!!style2?.color?.background) {
      colors.customTextColor = style2.color.background;
    }
    return colors;
  }
  function getNavigationChildBlockProps(innerBlocksColors) {
    return {
      className: clsx_default("wp-block-navigation__submenu-container", {
        "has-text-color": !!(innerBlocksColors.textColor || innerBlocksColors.customTextColor),
        [`has-${innerBlocksColors.textColor}-color`]: !!innerBlocksColors.textColor,
        "has-background": !!(innerBlocksColors.backgroundColor || innerBlocksColors.customBackgroundColor),
        [`has-${innerBlocksColors.backgroundColor}-background-color`]: !!innerBlocksColors.backgroundColor
      }),
      style: {
        color: innerBlocksColors.customTextColor,
        backgroundColor: innerBlocksColors.customBackgroundColor
      }
    };
  }
  var getUniqueTemplatePartTitle = (title, templateParts) => {
    const lowercaseTitle = title.toLowerCase();
    const existingTitles = templateParts.map(
      (templatePart) => templatePart.title.rendered.toLowerCase()
    );
    if (!existingTitles.includes(lowercaseTitle)) {
      return title;
    }
    let suffix = 2;
    while (existingTitles.includes(`${lowercaseTitle} ${suffix}`)) {
      suffix++;
    }
    return `${title} ${suffix}`;
  };
  var getCleanTemplatePartSlug = (title) => {
    return paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
  };

  // packages/block-library/build-module/navigation/edit/use-create-overlay.mjs
  function useCreateOverlayTemplatePart(overlayTemplateParts) {
    const { saveEntityRecord } = (0, import_data69.useDispatch)(import_core_data38.store);
    const pattern = (0, import_data69.useSelect)(
      (select10) => unlock(select10(import_block_editor137.store)).getPatternBySlug(
        "core/navigation-overlay"
      ),
      []
    );
    const createOverlayTemplatePart = (0, import_element91.useCallback)(async () => {
      const templatePartsWithTitles = overlayTemplateParts.filter(
        (templatePart2) => templatePart2.title?.rendered
      );
      const uniqueTitle = getUniqueTemplatePartTitle(
        (0, import_i18n118.__)("Navigation Overlay"),
        templatePartsWithTitles
      );
      const cleanSlug = getCleanTemplatePartSlug(uniqueTitle);
      let initialContent = "";
      if (pattern?.content) {
        const blocks = (0, import_blocks48.parse)(pattern.content, {
          __unstableSkipMigrationLogs: true
        });
        initialContent = (0, import_blocks48.serialize)(blocks);
      } else {
        initialContent = (0, import_blocks48.serialize)([(0, import_blocks48.createBlock)("core/paragraph")]);
      }
      const templatePart = await saveEntityRecord(
        "postType",
        "wp_template_part",
        {
          slug: cleanSlug,
          title: uniqueTitle,
          content: initialContent,
          area: NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
        },
        { throwOnError: true }
      );
      return templatePart;
    }, [overlayTemplateParts, saveEntityRecord, pattern]);
    return createOverlayTemplatePart;
  }

  // packages/block-library/build-module/navigation/edit/deleted-overlay-warning.mjs
  var import_components75 = __toESM(require_components(), 1);
  var import_i18n119 = __toESM(require_i18n(), 1);
  var import_element92 = __toESM(require_element(), 1);
  var import_jsx_runtime345 = __toESM(require_jsx_runtime(), 1);
  function DeletedOverlayWarning({ onClear, onCreate, isCreating = false }) {
    const message = (0, import_element92.createInterpolateElement)(
      (0, import_i18n119.__)(
        "The selected overlay template part is missing or has been deleted. <clearButton>Reset to default overlay</clearButton> or <createButton>create a new overlay</createButton>."
      ),
      {
        clearButton: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
          import_components75.Button,
          {
            __next40pxDefaultSize: true,
            onClick: onClear,
            variant: "link",
            disabled: isCreating,
            accessibleWhenDisabled: true
          }
        ),
        createButton: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
          import_components75.Button,
          {
            __next40pxDefaultSize: true,
            onClick: onCreate,
            variant: "link",
            disabled: isCreating,
            accessibleWhenDisabled: true,
            isBusy: isCreating
          }
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
      import_components75.Notice,
      {
        status: "warning",
        isDismissible: false,
        className: "wp-block-navigation__deleted-overlay-warning",
        children: message
      }
    );
  }
  var deleted_overlay_warning_default = DeletedOverlayWarning;

  // packages/block-library/build-module/navigation/edit/overlay-template-part-selector.mjs
  var import_jsx_runtime346 = __toESM(require_jsx_runtime(), 1);
  function OverlayTemplatePartSelector({
    overlay,
    overlayMenu,
    setAttributes,
    onNavigateToEntityRecord,
    isCreatingOverlay,
    setIsCreatingOverlay
  }) {
    const headingId = (0, import_compose38.useInstanceId)(
      OverlayTemplatePartSelector,
      "wp-block-navigation__overlay-selector-heading"
    );
    const {
      records: templateParts,
      isResolving,
      hasResolved
    } = (0, import_core_data39.useEntityRecords)("postType", "wp_template_part", {
      per_page: -1
    });
    const { createErrorNotice } = (0, import_data70.useDispatch)(import_notices13.store);
    const currentTheme = (0, import_data70.useSelect)(
      (select10) => select10(import_core_data39.store).getCurrentTheme()?.stylesheet,
      []
    );
    const [localIsCreating, setLocalIsCreating] = (0, import_element93.useState)(false);
    const isCreating = isCreatingOverlay !== void 0 ? isCreatingOverlay : localIsCreating;
    const setIsCreating = setIsCreatingOverlay !== void 0 ? setIsCreatingOverlay : setLocalIsCreating;
    const overlayTemplateParts = (0, import_element93.useMemo)(() => {
      if (!templateParts) {
        return [];
      }
      return templateParts.filter(
        (templatePart) => templatePart.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
      );
    }, [templateParts]);
    const createOverlayTemplatePart = useCreateOverlayTemplatePart(overlayTemplateParts);
    const selectedTemplatePart = (0, import_element93.useMemo)(() => {
      if (!overlay || !overlayTemplateParts) {
        return null;
      }
      return overlayTemplateParts.find(
        (templatePart) => templatePart.slug === overlay
      );
    }, [overlay, overlayTemplateParts]);
    const options2 = (0, import_element93.useMemo)(() => {
      const baseOptions = [
        {
          label: (0, import_i18n120.__)("Default"),
          value: ""
        }
      ];
      if (!hasResolved || isResolving) {
        return baseOptions;
      }
      const templatePartOptions = overlayTemplateParts.map(
        (templatePart) => {
          const label = templatePart.title?.rendered ? (0, import_html_entities4.decodeEntities)(templatePart.title.rendered) : templatePart.slug;
          return {
            label,
            value: templatePart.slug
          };
        }
      );
      if (overlay && !selectedTemplatePart) {
        templatePartOptions.unshift({
          label: (0, import_i18n120.sprintf)(
            /* translators: %s: Overlay slug. */
            (0, import_i18n120.__)("%s (missing)"),
            overlay
          ),
          value: overlay
        });
      }
      return [...baseOptions, ...templatePartOptions];
    }, [
      overlayTemplateParts,
      hasResolved,
      isResolving,
      overlay,
      selectedTemplatePart
    ]);
    const handleSelectChange = (value) => {
      setAttributes({
        overlay: value || void 0
      });
    };
    const handleEditClick = () => {
      if (!overlay || !selectedTemplatePart || !onNavigateToEntityRecord) {
        return;
      }
      const theme = selectedTemplatePart.theme || currentTheme;
      const templatePartId = createTemplatePartId(theme, overlay);
      const params = {
        postId: templatePartId,
        postType: "wp_template_part"
      };
      if (overlayMenu === "mobile") {
        params.viewport = "mobile";
      }
      onNavigateToEntityRecord(params);
    };
    const handleCreateOverlay = (0, import_element93.useCallback)(async () => {
      try {
        setIsCreating(true);
        const templatePart = await createOverlayTemplatePart();
        setAttributes({
          overlay: templatePart.slug
        });
        if (onNavigateToEntityRecord) {
          const theme = templatePart.theme || currentTheme;
          const templatePartId = createTemplatePartId(
            theme,
            templatePart.slug
          );
          const params = {
            postId: templatePartId,
            postType: "wp_template_part"
          };
          if (overlayMenu === "mobile") {
            params.viewport = "mobile";
          }
          onNavigateToEntityRecord(params);
        } else {
          setIsCreating(false);
        }
      } catch (error2) {
        const errorMessage = error2 instanceof Error && "code" in error2 && error2.message && error2.code !== "unknown_error" ? error2.message : (0, import_i18n120.__)("An error occurred while creating the overlay.");
        createErrorNotice(errorMessage, { type: "snackbar" });
        setIsCreating(false);
      }
    }, [
      createOverlayTemplatePart,
      setAttributes,
      onNavigateToEntityRecord,
      createErrorNotice,
      currentTheme,
      setIsCreating,
      overlayMenu
    ]);
    const handleClearOverlay = (0, import_element93.useCallback)(() => {
      setAttributes({ overlay: void 0 });
    }, [setAttributes]);
    const isCreateButtonDisabled = isResolving || isCreating;
    const isOverlayMissing = (0, import_element93.useMemo)(() => {
      return overlay && hasResolved && !isResolving && !selectedTemplatePart;
    }, [overlay, hasResolved, isResolving, selectedTemplatePart]);
    const helpText = (0, import_element93.useMemo)(() => {
      if (overlayTemplateParts.length === 0 && hasResolved) {
        return (0, import_i18n120.__)("No overlays found.");
      }
      return (0, import_i18n120.__)("Select an overlay for navigation.");
    }, [overlayTemplateParts.length, hasResolved]);
    const editButtonLabel = (0, import_element93.useMemo)(() => {
      return selectedTemplatePart ? (0, import_i18n120.sprintf)(
        /* translators: %s: Overlay title. */
        (0, import_i18n120.__)("Edit overlay: %s"),
        selectedTemplatePart.title?.rendered ? (0, import_html_entities4.decodeEntities)(selectedTemplatePart.title.rendered) : selectedTemplatePart.slug
      ) : (0, import_i18n120.__)("Edit overlay");
    }, [selectedTemplatePart]);
    return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "wp-block-navigation__overlay-selector", children: [
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        "h3",
        {
          id: headingId,
          className: "wp-block-navigation__overlay-selector-header",
          children: (0, import_i18n120.__)("Overlay template")
        }
      ),
      hasResolved && (overlayTemplateParts.length === 0 || isCreating && overlayTemplateParts.length === 1) ? /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(import_jsx_runtime346.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components76.Button,
        {
          __next40pxDefaultSize: true,
          variant: "secondary",
          onClick: handleCreateOverlay,
          disabled: isCreateButtonDisabled,
          accessibleWhenDisabled: true,
          isBusy: isCreating,
          className: "wp-block-navigation__overlay-create-button-prominent",
          children: (0, import_i18n120.__)("Create overlay")
        }
      ) }) : /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(import_jsx_runtime346.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
          import_components76.Button,
          {
            size: "small",
            icon: plus_default,
            onClick: handleCreateOverlay,
            disabled: isCreateButtonDisabled,
            accessibleWhenDisabled: true,
            isBusy: isCreating,
            label: (0, import_i18n120.__)("Create new overlay template"),
            showTooltip: true,
            className: "wp-block-navigation__overlay-create-button"
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)(
          import_components76.__experimentalHStack,
          {
            alignment: "flex-start",
            className: "wp-block-navigation__overlay-selector-controls",
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(import_components76.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
                import_components76.SelectControl,
                {
                  label: (0, import_i18n120.__)("Overlay template"),
                  hideLabelFromVision: true,
                  "aria-labelledby": headingId,
                  value: overlay || "",
                  options: options2,
                  onChange: handleSelectChange,
                  disabled: isResolving,
                  accessibleWhenDisabled: true,
                  help: helpText
                }
              ) }),
              overlay && hasResolved && selectedTemplatePart && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(import_components76.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
                import_components76.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "secondary",
                  onClick: handleEditClick,
                  disabled: !onNavigateToEntityRecord,
                  accessibleWhenDisabled: true,
                  label: editButtonLabel,
                  showTooltip: true,
                  className: "wp-block-navigation__overlay-edit-button",
                  children: (0, import_i18n120.__)("Edit")
                }
              ) })
            ]
          }
        ),
        isOverlayMissing && /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
          deleted_overlay_warning_default,
          {
            onClear: handleClearOverlay,
            onCreate: handleCreateOverlay,
            isCreating
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(
        import_components76.__experimentalHStack,
        {
          alignment: "flex-start",
          className: "wp-block-navigation__overlay-help-text-wrapper",
          children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(Text2, { children: (0, import_i18n120.__)(
            "An overlay template allows you to customize the appearance of the dialog that opens when the menu button is pressed."
          ) })
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-visibility-control.mjs
  var import_components77 = __toESM(require_components(), 1);
  var import_i18n121 = __toESM(require_i18n(), 1);
  var import_jsx_runtime347 = __toESM(require_jsx_runtime(), 1);
  function OverlayVisibilityControl({
    overlayMenu,
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(
      import_components77.__experimentalToggleGroupControl,
      {
        label: (0, import_i18n121.__)("Overlay Visibility"),
        "aria-label": (0, import_i18n121.__)("Configure overlay visibility"),
        value: overlayMenu,
        help: (0, import_i18n121.__)(
          "Collapses the navigation options in a menu icon opening an overlay."
        ),
        onChange: (value) => setAttributes({ overlayMenu: value }),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components77.__experimentalToggleGroupControlOption, { value: "never", label: (0, import_i18n121.__)("Off") }),
          /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components77.__experimentalToggleGroupControlOption, { value: "mobile", label: (0, import_i18n121.__)("Mobile") }),
          /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(import_components77.__experimentalToggleGroupControlOption, { value: "always", label: (0, import_i18n121.__)("Always") })
        ]
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-button.mjs
  var import_components79 = __toESM(require_components(), 1);
  var import_i18n123 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-controls.mjs
  var import_components78 = __toESM(require_components(), 1);
  var import_i18n122 = __toESM(require_i18n(), 1);
  var import_jsx_runtime348 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreviewControls({
    hasIcon,
    icon: icon2,
    setAttributes
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(import_components78.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
        import_components78.ToggleControl,
        {
          label: (0, import_i18n122.__)("Show icon button"),
          help: (0, import_i18n122.__)(
            "Configure the visual appearance of the button that toggles the overlay menu."
          ),
          onChange: (value) => setAttributes({ hasIcon: value }),
          checked: hasIcon
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(
        import_components78.__experimentalToggleGroupControl,
        {
          className: "wp-block-navigation__overlay-menu-icon-toggle-group",
          label: (0, import_i18n122.__)("Icon"),
          value: icon2,
          onChange: (value) => setAttributes({ icon: value }),
          isBlock: true,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
              import_components78.__experimentalToggleGroupControlOption,
              {
                value: "handle",
                "aria-label": (0, import_i18n122.__)("handle"),
                label: /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(OverlayMenuIcon, { icon: "handle" })
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(
              import_components78.__experimentalToggleGroupControlOption,
              {
                value: "menu",
                "aria-label": (0, import_i18n122.__)("menu"),
                label: /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(OverlayMenuIcon, { icon: "menu" })
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-menu-preview-button.mjs
  var import_jsx_runtime349 = __toESM(require_jsx_runtime(), 1);
  function OverlayMenuPreviewButton({
    isResponsive,
    overlayMenuPreview,
    setOverlayMenuPreview,
    hasIcon,
    icon: icon2,
    setAttributes,
    overlayMenuPreviewClasses,
    overlayMenuPreviewId,
    containerStyle
  }) {
    if (!isResponsive) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(import_jsx_runtime349.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(
        import_components79.Button,
        {
          __next40pxDefaultSize: true,
          className: overlayMenuPreviewClasses,
          onClick: () => setOverlayMenuPreview(!overlayMenuPreview),
          "aria-label": (0, import_i18n123.__)("Overlay menu controls"),
          "aria-controls": overlayMenuPreviewId,
          "aria-expanded": overlayMenuPreview,
          children: [
            hasIcon && /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(import_jsx_runtime349.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(OverlayMenuIcon, { icon: icon2 }),
              /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(icon_default, { icon: close_default })
            ] }),
            !hasIcon && /* @__PURE__ */ (0, import_jsx_runtime349.jsxs)(import_jsx_runtime349.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("span", { children: (0, import_i18n123.__)("Menu") }),
              /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("span", { children: (0, import_i18n123.__)("Close") })
            ] })
          ]
        }
      ),
      overlayMenuPreview && /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
        import_components79.__experimentalVStack,
        {
          id: overlayMenuPreviewId,
          spacing: 4,
          style: containerStyle,
          children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
            OverlayMenuPreviewControls,
            {
              hasIcon,
              icon: icon2,
              setAttributes
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/overlay-preview.mjs
  var import_data71 = __toESM(require_data(), 1);
  var import_core_data40 = __toESM(require_core_data(), 1);
  var import_element94 = __toESM(require_element(), 1);
  var import_blocks49 = __toESM(require_blocks(), 1);
  var import_components80 = __toESM(require_components(), 1);
  var import_i18n124 = __toESM(require_i18n(), 1);
  var import_block_editor138 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime350 = __toESM(require_jsx_runtime(), 1);
  function OverlayPreview({ overlay, currentTheme }) {
    const templatePartId = (0, import_element94.useMemo)(() => {
      if (!overlay || !currentTheme) {
        return null;
      }
      return createTemplatePartId(currentTheme, overlay);
    }, [currentTheme, overlay]);
    const { content, editedBlocks, hasResolved } = (0, import_data71.useSelect)(
      (select10) => {
        if (!templatePartId) {
          return {
            content: null,
            editedBlocks: null,
            hasResolved: true
          };
        }
        const { getEditedEntityRecord, hasFinishedResolution } = select10(import_core_data40.store);
        const editedRecord = getEditedEntityRecord(
          "postType",
          "wp_template_part",
          templatePartId,
          { context: "view" }
        );
        return {
          content: editedRecord?.content,
          editedBlocks: editedRecord?.blocks,
          hasResolved: hasFinishedResolution("getEditedEntityRecord", [
            "postType",
            "wp_template_part",
            templatePartId,
            { context: "view" }
          ])
        };
      },
      [templatePartId]
    );
    const blocks = (0, import_element94.useMemo)(() => {
      if (!templatePartId) {
        return null;
      }
      if (editedBlocks && editedBlocks.length > 0) {
        return editedBlocks;
      }
      if (content && typeof content === "string") {
        return (0, import_blocks49.parse)(content);
      }
      return [];
    }, [templatePartId, editedBlocks, content]);
    if (!overlay) {
      return null;
    }
    if (!hasResolved) {
      return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("div", { className: "wp-block-navigation__overlay-preview-loading", children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_components80.Spinner, {}) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
      "div",
      {
        className: "wp-block-navigation__overlay-preview",
        "aria-label": (0, import_i18n124.__)("Navigation Overlay template part preview"),
        role: "region",
        children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
          import_block_editor138.BlockPreview.Async,
          {
            placeholder: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)("div", { className: "wp-block-navigation__overlay-preview-placeholder" }),
            children: /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
              import_block_editor138.BlockPreview,
              {
                blocks,
                viewportWidth: 400,
                minHeight: 200
              }
            )
          }
        )
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/overlay-panel.mjs
  var import_jsx_runtime351 = __toESM(require_jsx_runtime(), 1);
  function OverlayPanel({
    overlayMenu,
    overlay,
    setAttributes,
    onNavigateToEntityRecord,
    overlayMenuPreview,
    setOverlayMenuPreview,
    hasIcon,
    icon: icon2,
    overlayMenuPreviewClasses,
    overlayMenuPreviewId,
    isResponsive,
    currentTheme,
    hasOverlays
  }) {
    const [isCreatingOverlay, setIsCreatingOverlay] = (0, import_element95.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_components81.PanelBody, { title: (0, import_i18n125.__)("Overlay"), initialOpen: true, children: /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(import_components81.__experimentalVStack, { spacing: 4, children: [
      /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        OverlayVisibilityControl,
        {
          overlayMenu,
          setAttributes
        }
      ),
      overlayMenu !== "never" && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        OverlayMenuPreviewButton,
        {
          isResponsive,
          overlayMenuPreview,
          setOverlayMenuPreview,
          hasIcon,
          icon: icon2,
          setAttributes,
          overlayMenuPreviewClasses,
          overlayMenuPreviewId
        }
      ),
      overlayMenu !== "never" && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        OverlayTemplatePartSelector,
        {
          overlay,
          overlayMenu,
          setAttributes,
          onNavigateToEntityRecord,
          isCreatingOverlay,
          setIsCreatingOverlay
        }
      ),
      overlayMenu !== "never" && overlay && hasOverlays && !isCreatingOverlay && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(
        OverlayPreview,
        {
          overlay,
          currentTheme
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.mjs
  var import_data73 = __toESM(require_data(), 1);
  var import_core_data42 = __toESM(require_core_data(), 1);
  var import_element97 = __toESM(require_element(), 1);
  var import_i18n126 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/menu-items-to-blocks.mjs
  var import_blocks50 = __toESM(require_blocks(), 1);
  var import_hooks37 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/navigation-link/shared/use-entity-binding.mjs
  var import_element96 = __toESM(require_element(), 1);
  var import_block_editor139 = __toESM(require_block_editor(), 1);
  var import_data72 = __toESM(require_data(), 1);
  var import_core_data41 = __toESM(require_core_data(), 1);
  function buildNavigationLinkEntityBinding(kind) {
    if (kind === void 0) {
      throw new Error(
        'buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.'
      );
    }
    if (kind !== "post-type" && kind !== "taxonomy") {
      throw new Error(
        `Invalid kind "${kind}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`
      );
    }
    const source = kind === "taxonomy" ? "core/term-data" : "core/post-data";
    return {
      url: {
        source,
        args: {
          field: "link"
        }
      }
    };
  }
  function useEntityBinding({ clientId, attributes: attributes2 }) {
    const { updateBlockBindings } = (0, import_block_editor139.useBlockBindingsUtils)(clientId);
    const { metadata, id, kind, type } = attributes2;
    const blockEditingMode = (0, import_block_editor139.useBlockEditingMode)();
    const hasUrlBinding = !!metadata?.bindings?.url && !!id;
    const expectedSource = kind === "post-type" ? "core/post-data" : "core/term-data";
    const hasCorrectBinding = hasUrlBinding && metadata?.bindings?.url?.source === expectedSource;
    const { isBoundEntityAvailable, entityRecord } = (0, import_data72.useSelect)(
      (select10) => {
        if (!hasCorrectBinding || !id) {
          return { isBoundEntityAvailable: false, entityRecord: null };
        }
        const isPostType = kind === "post-type";
        const isTaxonomy = kind === "taxonomy";
        if (!isPostType && !isTaxonomy) {
          return { isBoundEntityAvailable: false, entityRecord: null };
        }
        if (blockEditingMode === "disabled") {
          return { isBoundEntityAvailable: true, entityRecord: null };
        }
        const { getEntityRecord, hasFinishedResolution } = select10(import_core_data41.store);
        const entityType = isTaxonomy ? "taxonomy" : "postType";
        const typeForAPI = type === "tag" ? "post_tag" : type;
        const record = getEntityRecord(entityType, typeForAPI, id);
        const hasResolved = hasFinishedResolution("getEntityRecord", [
          entityType,
          typeForAPI,
          id
        ]);
        const isAvailable = hasResolved ? record !== void 0 : true;
        return {
          isBoundEntityAvailable: isAvailable,
          entityRecord: record || null
        };
      },
      [kind, type, id, hasCorrectBinding, blockEditingMode]
    );
    const clearBinding = (0, import_element96.useCallback)(() => {
      if (hasUrlBinding) {
        updateBlockBindings({ url: void 0 });
      }
    }, [updateBlockBindings, hasUrlBinding]);
    const createBinding = (0, import_element96.useCallback)(
      (updatedAttributes) => {
        const kindToUse = updatedAttributes?.kind ?? kind;
        if (!kindToUse) {
          return;
        }
        try {
          const binding = buildNavigationLinkEntityBinding(kindToUse);
          updateBlockBindings(binding);
        } catch (error2) {
          console.warn(
            "Failed to create entity binding:",
            error2.message
          );
        }
      },
      [updateBlockBindings, kind]
    );
    return {
      hasUrlBinding: hasCorrectBinding,
      isBoundEntityAvailable,
      entityRecord,
      clearBinding,
      createBinding
    };
  }

  // packages/block-library/build-module/navigation/menu-items-to-blocks.mjs
  function menuItemsToBlocks(menuItems) {
    if (!menuItems) {
      return null;
    }
    const menuTree = createDataTree(menuItems);
    const blocks = mapMenuItemsToBlocks(menuTree);
    return (0, import_hooks37.applyFilters)(
      "blocks.navigation.__unstableMenuItemsToBlocks",
      blocks,
      menuItems
    );
  }
  function mapMenuItemsToBlocks(menuItems, level = 0) {
    let mapping = {};
    const sortedItems = [...menuItems].sort(
      (a, b) => a.menu_order - b.menu_order
    );
    const innerBlocks = sortedItems.map((menuItem) => {
      if (menuItem.type === "block") {
        const [block2] = (0, import_blocks50.parse)(menuItem.content.raw);
        if (!block2) {
          return (0, import_blocks50.createBlock)("core/freeform", {
            content: menuItem.content
          });
        }
        return block2;
      }
      const blockType = menuItem.children?.length ? "core/navigation-submenu" : "core/navigation-link";
      const attributes2 = menuItemToBlockAttributes(
        menuItem,
        blockType,
        level
      );
      const {
        innerBlocks: nestedBlocks = [],
        // alias to avoid shadowing
        mapping: nestedMapping = {}
        // alias to avoid shadowing
      } = menuItem.children?.length ? mapMenuItemsToBlocks(menuItem.children, level + 1) : {};
      mapping = {
        ...mapping,
        ...nestedMapping
      };
      const block = (0, import_blocks50.createBlock)(blockType, attributes2, nestedBlocks);
      mapping[menuItem.id] = block.clientId;
      return block;
    });
    return {
      innerBlocks,
      mapping
    };
  }
  function menuItemToBlockAttributes({
    title: menuItemTitleField,
    xfn,
    classes,
    // eslint-disable-next-line camelcase
    attr_title,
    object,
    // eslint-disable-next-line camelcase
    object_id,
    description,
    url,
    type: menuItemTypeField,
    target
  }, blockType, level) {
    if (object && object === "post_tag") {
      object = "tag";
    }
    const inferredKind = menuItemTypeField?.replace("_", "-") || "custom";
    return {
      label: menuItemTitleField?.rendered || "",
      ...object?.length && {
        type: object
      },
      kind: inferredKind,
      url: url || "",
      ...xfn?.length && xfn.join(" ").trim() && {
        rel: xfn.join(" ").trim()
      },
      ...classes?.length && classes.join(" ").trim() && {
        className: classes.join(" ").trim()
      },
      /* eslint-disable camelcase */
      ...attr_title?.length && {
        title: attr_title
      },
      ...object_id && (inferredKind === "post-type" || inferredKind === "taxonomy") && {
        id: object_id,
        metadata: {
          bindings: buildNavigationLinkEntityBinding(inferredKind)
        }
      },
      /* eslint-enable camelcase */
      ...description?.length && {
        description
      },
      ...target === "_blank" && {
        opensInNewTab: true
      },
      ...blockType === "core/navigation-submenu" && {
        isTopLevelItem: level === 0
      },
      ...blockType === "core/navigation-link" && {
        isTopLevelLink: level === 0
      }
    };
  }
  function createDataTree(dataset, id = "id", relation = "parent") {
    const hashTable = /* @__PURE__ */ Object.create(null);
    const dataTree = [];
    for (const data of dataset) {
      hashTable[data[id]] = {
        ...data,
        children: []
      };
      if (data[relation]) {
        hashTable[data[relation]] = hashTable[data[relation]] || {};
        hashTable[data[relation]].children = hashTable[data[relation]].children || [];
        hashTable[data[relation]].children.push(
          hashTable[data[id]]
        );
      } else {
        dataTree.push(hashTable[data[id]]);
      }
    }
    return dataTree;
  }

  // packages/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.mjs
  var CLASSIC_MENU_CONVERSION_SUCCESS = "success";
  var CLASSIC_MENU_CONVERSION_ERROR = "error";
  var CLASSIC_MENU_CONVERSION_PENDING = "pending";
  var CLASSIC_MENU_CONVERSION_IDLE = "idle";
  var classicMenuBeingConvertedId = null;
  function useConvertClassicToBlockMenu(createNavigationMenu, { throwOnError = false } = {}) {
    const registry = (0, import_data73.useRegistry)();
    const { editEntityRecord } = (0, import_data73.useDispatch)(import_core_data42.store);
    const [status, setStatus] = (0, import_element97.useState)(CLASSIC_MENU_CONVERSION_IDLE);
    const [error2, setError] = (0, import_element97.useState)(null);
    const convertClassicMenuToBlockMenu = (0, import_element97.useCallback)(
      async (menuId, menuName, postStatus = "publish") => {
        let navigationMenu;
        let classicMenuItems;
        try {
          classicMenuItems = await registry.resolveSelect(import_core_data42.store).getMenuItems({
            menus: menuId,
            per_page: -1,
            context: "view"
          });
        } catch (err) {
          throw new Error(
            (0, import_i18n126.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n126.__)(`Unable to fetch classic menu "%s" from API.`),
              menuName
            ),
            {
              cause: err
            }
          );
        }
        if (classicMenuItems === null) {
          throw new Error(
            (0, import_i18n126.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n126.__)(`Unable to fetch classic menu "%s" from API.`),
              menuName
            )
          );
        }
        const { innerBlocks } = menuItemsToBlocks(classicMenuItems);
        try {
          navigationMenu = await createNavigationMenu(
            menuName,
            innerBlocks,
            postStatus
          );
          await editEntityRecord(
            "postType",
            "wp_navigation",
            navigationMenu.id,
            {
              status: "publish"
            },
            { throwOnError: true }
          );
        } catch (err) {
          throw new Error(
            (0, import_i18n126.sprintf)(
              // translators: %s: The name of a menu (e.g. Header menu).
              (0, import_i18n126.__)(`Unable to create Navigation Menu "%s".`),
              menuName
            ),
            {
              cause: err
            }
          );
        }
        return navigationMenu;
      },
      [createNavigationMenu, editEntityRecord, registry]
    );
    const convert = (0, import_element97.useCallback)(
      async (menuId, menuName, postStatus) => {
        if (classicMenuBeingConvertedId === menuId) {
          return;
        }
        classicMenuBeingConvertedId = menuId;
        if (!menuId || !menuName) {
          setError("Unable to convert menu. Missing menu details.");
          setStatus(CLASSIC_MENU_CONVERSION_ERROR);
          return;
        }
        setStatus(CLASSIC_MENU_CONVERSION_PENDING);
        setError(null);
        return await convertClassicMenuToBlockMenu(
          menuId,
          menuName,
          postStatus
        ).then((navigationMenu) => {
          setStatus(CLASSIC_MENU_CONVERSION_SUCCESS);
          classicMenuBeingConvertedId = null;
          return navigationMenu;
        }).catch((err) => {
          setError(err?.message);
          setStatus(CLASSIC_MENU_CONVERSION_ERROR);
          classicMenuBeingConvertedId = null;
          if (throwOnError) {
            throw new Error(
              (0, import_i18n126.sprintf)(
                // translators: %s: The name of a menu (e.g. Header menu).
                (0, import_i18n126.__)(`Unable to create Navigation Menu "%s".`),
                menuName
              ),
              {
                cause: err
              }
            );
          }
        });
      },
      [convertClassicMenuToBlockMenu, throwOnError]
    );
    return {
      convert,
      status,
      error: error2
    };
  }
  var use_convert_classic_menu_to_block_menu_default = useConvertClassicToBlockMenu;

  // packages/block-library/build-module/navigation/edit/use-create-navigation-menu.mjs
  var import_blocks51 = __toESM(require_blocks(), 1);
  var import_core_data45 = __toESM(require_core_data(), 1);
  var import_data76 = __toESM(require_data(), 1);
  var import_element99 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/use-generate-default-navigation-title.mjs
  var import_components82 = __toESM(require_components(), 1);
  var import_core_data44 = __toESM(require_core_data(), 1);
  var import_data75 = __toESM(require_data(), 1);
  var import_element98 = __toESM(require_element(), 1);
  var import_i18n127 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation/use-template-part-area-label.mjs
  var import_block_editor140 = __toESM(require_block_editor(), 1);
  var import_core_data43 = __toESM(require_core_data(), 1);
  var import_data74 = __toESM(require_data(), 1);

  // packages/block-library/build-module/template-part/edit/utils/get-template-part-icon.mjs
  var getTemplatePartIcon = (areaOrIconName) => {
    if ("header" === areaOrIconName) {
      return header_default;
    } else if ("footer" === areaOrIconName) {
      return footer_default;
    } else if ("sidebar" === areaOrIconName) {
      return sidebar_default;
    } else if ("navigation-overlay" === areaOrIconName) {
      return navigation_overlay_default;
    }
    return symbol_filled_default;
  };

  // packages/block-library/build-module/navigation/use-template-part-area-label.mjs
  function useTemplatePartAreaLabel(clientId) {
    return (0, import_data74.useSelect)(
      (select10) => {
        if (!clientId) {
          return;
        }
        const { getBlock, getBlockParentsByBlockName } = select10(import_block_editor140.store);
        const withAscendingResults = true;
        const parentTemplatePartClientIds = getBlockParentsByBlockName(
          clientId,
          "core/template-part",
          withAscendingResults
        );
        if (!parentTemplatePartClientIds?.length) {
          return;
        }
        const { getCurrentTheme, getEditedEntityRecord } = select10(import_core_data43.store);
        const currentTheme = getCurrentTheme();
        const defaultTemplatePartAreas = currentTheme?.default_template_part_areas || [];
        const definedAreas = defaultTemplatePartAreas.map((item) => ({
          ...item,
          icon: getTemplatePartIcon(item.icon)
        }));
        for (const templatePartClientId of parentTemplatePartClientIds) {
          const templatePartBlock = getBlock(templatePartClientId);
          const { theme = currentTheme?.stylesheet, slug } = templatePartBlock.attributes;
          const templatePartEntityId = createTemplatePartId(
            theme,
            slug
          );
          const templatePartEntity = getEditedEntityRecord(
            "postType",
            "wp_template_part",
            templatePartEntityId
          );
          if (templatePartEntity?.area) {
            return definedAreas.find(
              (definedArea) => definedArea.area !== "uncategorized" && definedArea.area === templatePartEntity.area
            )?.label;
          }
        }
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation/edit/use-generate-default-navigation-title.mjs
  var DRAFT_MENU_PARAMS = [
    "postType",
    "wp_navigation",
    { status: "draft", per_page: -1 }
  ];
  var PUBLISHED_MENU_PARAMS = [
    "postType",
    "wp_navigation",
    { per_page: -1, status: "publish" }
  ];
  function useGenerateDefaultNavigationTitle(clientId) {
    const isDisabled = (0, import_element98.useContext)(import_components82.Disabled.Context);
    const area = useTemplatePartAreaLabel(isDisabled ? void 0 : clientId);
    const registry = (0, import_data75.useRegistry)();
    return (0, import_element98.useCallback)(async () => {
      if (isDisabled) {
        return "";
      }
      const { getEntityRecords } = registry.resolveSelect(import_core_data44.store);
      const [draftNavigationMenus, navigationMenus] = await Promise.all([
        getEntityRecords(...DRAFT_MENU_PARAMS),
        getEntityRecords(...PUBLISHED_MENU_PARAMS)
      ]);
      const title = area ? (0, import_i18n127.sprintf)(
        // translators: %s: the name of a menu (e.g. Header menu).
        (0, import_i18n127.__)("%s menu"),
        area
      ) : (
        // translators: 'menu' as in website navigation menu.
        (0, import_i18n127.__)("Menu")
      );
      const matchingMenuTitleCount = [
        ...draftNavigationMenus,
        ...navigationMenus
      ].reduce(
        (count, menu) => menu?.title?.raw?.startsWith(title) ? count + 1 : count,
        0
      );
      const titleWithCount = matchingMenuTitleCount > 0 ? `${title} ${matchingMenuTitleCount + 1}` : title;
      return titleWithCount || "";
    }, [isDisabled, area, registry]);
  }

  // packages/block-library/build-module/navigation/edit/use-create-navigation-menu.mjs
  var CREATE_NAVIGATION_MENU_SUCCESS = "success";
  var CREATE_NAVIGATION_MENU_ERROR = "error";
  var CREATE_NAVIGATION_MENU_PENDING = "pending";
  var CREATE_NAVIGATION_MENU_IDLE = "idle";
  function useCreateNavigationMenu(clientId) {
    const [status, setStatus] = (0, import_element99.useState)(CREATE_NAVIGATION_MENU_IDLE);
    const [value, setValue] = (0, import_element99.useState)(null);
    const [error2, setError] = (0, import_element99.useState)(null);
    const { saveEntityRecord, editEntityRecord } = (0, import_data76.useDispatch)(import_core_data45.store);
    const generateDefaultTitle = useGenerateDefaultNavigationTitle(clientId);
    const create5 = (0, import_element99.useCallback)(
      async (title = null, blocks = [], postStatus) => {
        if (title && typeof title !== "string") {
          setError(
            "Invalid title supplied when creating Navigation Menu."
          );
          setStatus(CREATE_NAVIGATION_MENU_ERROR);
          throw new Error(
            `Value of supplied title argument was not a string.`
          );
        }
        setStatus(CREATE_NAVIGATION_MENU_PENDING);
        setValue(null);
        setError(null);
        if (!title) {
          title = await generateDefaultTitle().catch((err) => {
            setError(err?.message);
            setStatus(CREATE_NAVIGATION_MENU_ERROR);
            throw new Error(
              "Failed to create title when saving new Navigation Menu.",
              {
                cause: err
              }
            );
          });
        }
        const record = {
          title,
          content: (0, import_blocks51.serialize)(blocks),
          status: postStatus
        };
        return saveEntityRecord("postType", "wp_navigation", record).then((response) => {
          setValue(response);
          setStatus(CREATE_NAVIGATION_MENU_SUCCESS);
          if (postStatus !== "publish") {
            editEntityRecord(
              "postType",
              "wp_navigation",
              response.id,
              { status: "publish" }
            );
          }
          return response;
        }).catch((err) => {
          setError(err?.message);
          setStatus(CREATE_NAVIGATION_MENU_ERROR);
          throw new Error("Unable to save new Navigation Menu", {
            cause: err
          });
        });
      },
      [saveEntityRecord, editEntityRecord, generateDefaultTitle]
    );
    return {
      create: create5,
      status,
      value,
      error: error2,
      isIdle: status === CREATE_NAVIGATION_MENU_IDLE,
      isPending: status === CREATE_NAVIGATION_MENU_PENDING,
      isSuccess: status === CREATE_NAVIGATION_MENU_SUCCESS,
      isError: status === CREATE_NAVIGATION_MENU_ERROR
    };
  }

  // packages/block-library/build-module/navigation/edit/use-inner-blocks.mjs
  var import_data77 = __toESM(require_data(), 1);
  var import_block_editor141 = __toESM(require_block_editor(), 1);
  var EMPTY_ARRAY4 = [];
  function useInnerBlocks(clientId) {
    return (0, import_data77.useSelect)(
      (select10) => {
        const { getBlock, getBlocks, hasSelectedInnerBlock } = select10(import_block_editor141.store);
        const _uncontrolledInnerBlocks = getBlock(clientId).innerBlocks;
        const _hasUncontrolledInnerBlocks = !!_uncontrolledInnerBlocks?.length;
        const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? EMPTY_ARRAY4 : getBlocks(clientId);
        return {
          innerBlocks: _hasUncontrolledInnerBlocks ? _uncontrolledInnerBlocks : _controlledInnerBlocks,
          hasUncontrolledInnerBlocks: _hasUncontrolledInnerBlocks,
          uncontrolledInnerBlocks: _uncontrolledInnerBlocks,
          controlledInnerBlocks: _controlledInnerBlocks,
          isInnerBlockSelected: hasSelectedInnerBlock(clientId, true)
        };
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation/edit/manage-menus-button.mjs
  var import_url15 = __toESM(require_url(), 1);
  var import_components83 = __toESM(require_components(), 1);
  var import_i18n128 = __toESM(require_i18n(), 1);
  var import_jsx_runtime352 = __toESM(require_jsx_runtime(), 1);
  var ManageMenusButton = ({
    className = "",
    disabled: disabled2,
    isMenuItem = false
  }) => {
    let ComponentName = import_components83.Button;
    if (isMenuItem) {
      ComponentName = import_components83.MenuItem;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
      ComponentName,
      {
        variant: "link",
        disabled: disabled2,
        className,
        href: (0, import_url15.addQueryArgs)("edit.php", {
          post_type: "wp_navigation"
        }),
        children: (0, import_i18n128.__)("Manage menus")
      }
    );
  };
  var manage_menus_button_default = ManageMenusButton;

  // packages/block-library/build-module/navigation/edit/menu-inspector-controls.mjs
  var import_block_editor153 = __toESM(require_block_editor(), 1);
  var import_components91 = __toESM(require_components(), 1);
  var import_data87 = __toESM(require_data(), 1);
  var import_i18n139 = __toESM(require_i18n(), 1);
  var import_element105 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation/edit/deleted-navigation-warning.mjs
  var import_block_editor142 = __toESM(require_block_editor(), 1);
  var import_components84 = __toESM(require_components(), 1);
  var import_i18n129 = __toESM(require_i18n(), 1);
  var import_element100 = __toESM(require_element(), 1);
  var import_jsx_runtime353 = __toESM(require_jsx_runtime(), 1);
  function DeletedNavigationWarning({ onCreateNew, isNotice = false }) {
    const [isButtonDisabled, setIsButtonDisabled] = (0, import_element100.useState)(false);
    const handleButtonClick = () => {
      setIsButtonDisabled(true);
      onCreateNew();
    };
    const message = (0, import_element100.createInterpolateElement)(
      (0, import_i18n129.__)(
        "Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"
      ),
      {
        button: /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(
          import_components84.Button,
          {
            __next40pxDefaultSize: true,
            onClick: handleButtonClick,
            variant: "link",
            disabled: isButtonDisabled,
            accessibleWhenDisabled: true
          }
        )
      }
    );
    return isNotice ? /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_components84.Notice, { status: "warning", isDismissible: false, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(import_block_editor142.Warning, { children: message });
  }
  var deleted_navigation_warning_default = DeletedNavigationWarning;

  // packages/block-library/build-module/navigation/edit/leaf-more-menu.mjs
  var import_blocks52 = __toESM(require_blocks(), 1);
  var import_components85 = __toESM(require_components(), 1);
  var import_data78 = __toESM(require_data(), 1);
  var import_i18n130 = __toESM(require_i18n(), 1);
  var import_block_editor143 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime354 = __toESM(require_jsx_runtime(), 1);
  var POPOVER_PROPS = {
    className: "block-editor-block-settings-menu__popover",
    placement: "bottom-start"
  };
  var BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  function AddSubmenuItem({
    clientId,
    onClose,
    isDisabled,
    updateExpansion,
    setInsertedBlockClientId
  }) {
    const { insertBlock, replaceBlock, replaceInnerBlocks } = (0, import_data78.useDispatch)(import_block_editor143.store);
    const { getBlock } = (0, import_data78.useSelect)(import_block_editor143.store);
    return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
      import_components85.MenuItem,
      {
        icon: add_submenu_default,
        disabled: isDisabled,
        onClick: () => {
          const updateSelectionOnInsert = false;
          const newLink = (0, import_blocks52.createBlock)(
            DEFAULT_BLOCK5.name,
            DEFAULT_BLOCK5.attributes
          );
          const block = getBlock(clientId);
          if (block.name === "core/navigation-submenu") {
            insertBlock(
              newLink,
              block.innerBlocks.length,
              clientId,
              updateSelectionOnInsert
            );
          } else {
            const newSubmenu = (0, import_blocks52.createBlock)(
              "core/navigation-submenu",
              block.attributes,
              block.innerBlocks
            );
            replaceBlock(clientId, newSubmenu);
            replaceInnerBlocks(
              newSubmenu.clientId,
              [newLink],
              updateSelectionOnInsert
            );
          }
          setInsertedBlockClientId(newLink.clientId);
          updateExpansion({ type: "expand", clientIds: [clientId] });
          onClose();
        },
        children: (0, import_i18n130.__)("Add submenu link")
      }
    );
  }
  function LeafMoreMenu({
    clientId,
    updateExpansion,
    setInsertedBlockClientId,
    ...props
  }) {
    const {
      moveBlocksDown,
      moveBlocksUp,
      removeBlocks,
      duplicateBlocks,
      insertBeforeBlock,
      insertAfterBlock
    } = (0, import_data78.useDispatch)(import_block_editor143.store);
    const removeLabel = (0, import_i18n130.sprintf)(
      /* translators: %s: block name */
      (0, import_i18n130.__)("Remove %s"),
      (0, import_block_editor143.BlockTitle)({ clientId, maximumLength: 25 })
    );
    const {
      blockName,
      rootClientId,
      canDuplicate,
      canInsertBlock,
      isFirst,
      isLast
    } = (0, import_data78.useSelect)(
      (select10) => {
        const {
          getBlockRootClientId,
          getBlockName,
          canInsertBlockType,
          getDirectInsertBlock,
          getBlockIndex,
          getBlockCount
        } = select10(import_block_editor143.store);
        const { getDefaultBlockName: getDefaultBlockName14 } = select10(import_blocks52.store);
        const _rootClientId = getBlockRootClientId(clientId);
        const _blockName = getBlockName(clientId);
        const canInsertDefaultBlock = canInsertBlockType(
          getDefaultBlockName14(),
          _rootClientId
        );
        const directInsertBlock = _rootClientId ? getDirectInsertBlock(_rootClientId) : null;
        return {
          blockName: _blockName,
          rootClientId: _rootClientId,
          canDuplicate: !!_blockName && (0, import_blocks52.hasBlockSupport)(_blockName, "multiple", true) && canInsertBlockType(_blockName, _rootClientId),
          canInsertBlock: (canInsertDefaultBlock || !!directInsertBlock) && !!_blockName && canInsertBlockType(_blockName, _rootClientId),
          isFirst: getBlockIndex(clientId) === 0,
          isLast: getBlockIndex(clientId) === getBlockCount(_rootClientId) - 1
        };
      },
      [clientId]
    );
    const isSubmenuDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(blockName);
    return /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
      import_components85.DropdownMenu,
      {
        icon: more_vertical_default,
        label: (0, import_i18n130.__)("Options"),
        className: "block-editor-block-settings-menu",
        popoverProps: POPOVER_PROPS,
        noIcons: true,
        ...props,
        children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)(import_jsx_runtime354.Fragment, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)(import_components85.MenuGroup, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
              import_components85.MenuItem,
              {
                icon: chevron_up_default,
                disabled: isFirst,
                accessibleWhenDisabled: true,
                onClick: () => {
                  moveBlocksUp([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n130.__)("Move up")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
              import_components85.MenuItem,
              {
                icon: chevron_down_default,
                disabled: isLast,
                accessibleWhenDisabled: true,
                onClick: () => {
                  moveBlocksDown([clientId], rootClientId);
                  onClose();
                },
                children: (0, import_i18n130.__)("Move down")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
              AddSubmenuItem,
              {
                clientId,
                onClose,
                isDisabled: isSubmenuDisabled,
                updateExpansion,
                setInsertedBlockClientId
              }
            ),
            canDuplicate && /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
              import_components85.MenuItem,
              {
                onClick: () => {
                  duplicateBlocks([clientId]);
                  onClose();
                },
                children: (0, import_i18n130.__)("Duplicate")
              }
            ),
            canInsertBlock && /* @__PURE__ */ (0, import_jsx_runtime354.jsxs)(import_jsx_runtime354.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
                import_components85.MenuItem,
                {
                  onClick: () => {
                    insertBeforeBlock(clientId);
                    onClose();
                  },
                  children: (0, import_i18n130.__)("Add before")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
                import_components85.MenuItem,
                {
                  onClick: () => {
                    insertAfterBlock(clientId);
                    onClose();
                  },
                  children: (0, import_i18n130.__)("Add after")
                }
              )
            ] })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(import_components85.MenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime354.jsx)(
            import_components85.MenuItem,
            {
              onClick: () => {
                removeBlocks([clientId], false);
                onClose();
              },
              children: removeLabel
            }
          ) })
        ] })
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/navigation-link-ui.mjs
  var import_block_editor151 = __toESM(require_block_editor(), 1);
  var import_data86 = __toESM(require_data(), 1);

  // packages/block-library/build-module/navigation-link/shared/controls.mjs
  var import_components89 = __toESM(require_components(), 1);
  var import_i18n136 = __toESM(require_i18n(), 1);
  var import_dom18 = __toESM(require_dom(), 1);
  var import_block_editor149 = __toESM(require_block_editor(), 1);
  var import_data84 = __toESM(require_data(), 1);
  var import_core_data50 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/navigation-link/shared/use-handle-link-change.mjs
  var import_element101 = __toESM(require_element(), 1);
  var import_data79 = __toESM(require_data(), 1);
  var import_block_editor144 = __toESM(require_block_editor(), 1);
  var import_dom16 = __toESM(require_dom(), 1);
  var import_escape_html2 = __toESM(require_escape_html(), 1);

  // packages/block-library/build-module/navigation-link/shared/update-attributes.mjs
  var import_escape_html = __toESM(require_escape_html(), 1);
  var import_url16 = __toESM(require_url(), 1);
  var shouldSeverEntityLink = (originalUrl, newUrl) => {
    if (!originalUrl || !newUrl) {
      return false;
    }
    const normalizePath = (path) => {
      if (!path) {
        return "";
      }
      return path.replace(/\/+$/, "");
    };
    const createUrlObject = (url, baseUrl = null) => {
      try {
        const base = baseUrl || (typeof window !== "undefined" ? window.location.origin : "https://wordpress.org");
        return new URL(url, base);
      } catch {
        return null;
      }
    };
    const originalUrlObj = createUrlObject(originalUrl);
    if (!originalUrlObj) {
      return true;
    }
    const newUrlObj = createUrlObject(newUrl, originalUrl);
    if (!newUrlObj) {
      return true;
    }
    const originalHostname = originalUrlObj.hostname;
    const newHostname = newUrlObj.hostname;
    const originalPath = normalizePath((0, import_url16.getPath)(originalUrlObj.toString()));
    const newPath = normalizePath((0, import_url16.getPath)(newUrlObj.toString()));
    if (originalHostname !== newHostname || originalPath !== newPath) {
      return true;
    }
    const originalP = originalUrlObj.searchParams.get("p");
    const newP = newUrlObj.searchParams.get("p");
    if (originalP && newP && originalP !== newP) {
      return true;
    }
    const originalPageId = originalUrlObj.searchParams.get("page_id");
    const newPageId = newUrlObj.searchParams.get("page_id");
    if (originalPageId && newPageId && originalPageId !== newPageId) {
      return true;
    }
    if (originalP && newPageId || originalPageId && newP) {
      return true;
    }
    return false;
  };
  var updateAttributes = (updatedValue = {}, setAttributes, blockAttributes8 = {}) => {
    const {
      label: originalLabel = "",
      kind: originalKind = "",
      type: originalType = ""
    } = blockAttributes8;
    const {
      title: newLabel = "",
      // the title of any provided Post.
      label: newLabelFromLabel = "",
      // alternative to title
      url: newUrl,
      opensInNewTab,
      id: newID,
      kind: newKind = originalKind,
      type: newType = originalType
    } = updatedValue;
    const finalNewLabel = newLabel || newLabelFromLabel;
    const newLabelWithoutHttp = finalNewLabel.replace(/http(s?):\/\//gi, "");
    const newUrlWithoutHttp = newUrl?.replace(/http(s?):\/\//gi, "") ?? "";
    const useNewLabel = finalNewLabel && finalNewLabel !== originalLabel && // LinkControl without the title field relies
    // on the check below. Specifically, it assumes that
    // the URL is the same as a title.
    // This logic a) looks suspicious and b) should really
    // live in the LinkControl and not here. It's a great
    // candidate for future refactoring.
    newLabelWithoutHttp !== newUrlWithoutHttp;
    const label = useNewLabel ? (0, import_escape_html.escapeHTML)(finalNewLabel) : originalLabel || (0, import_escape_html.escapeHTML)(newUrlWithoutHttp);
    const type = newType === "post_tag" ? "tag" : newType.replace("-", "_");
    const isBuiltInType = ["post", "page", "tag", "category"].indexOf(type) > -1;
    const isCustomLink = !newKind && !isBuiltInType || newKind === "custom";
    const kind = isCustomLink ? "custom" : newKind;
    const attributes2 = {
      // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
      ...newUrl !== void 0 ? { url: newUrl ? encodeURI((0, import_url16.safeDecodeURI)(newUrl)) : newUrl } : {},
      ...label && { label },
      ...void 0 !== opensInNewTab && { opensInNewTab },
      ...kind && { kind },
      ...type && type !== "URL" && { type }
    };
    if (newUrl && !newID && blockAttributes8.id) {
      const shouldSever = shouldSeverEntityLink(
        blockAttributes8.url,
        newUrl
      );
      if (shouldSever) {
        attributes2.id = void 0;
        attributes2.kind = "custom";
        attributes2.type = "custom";
      }
    } else if (newID && Number.isInteger(newID)) {
      attributes2.id = newID;
    } else if (blockAttributes8.id) {
      attributes2.kind = kind;
      attributes2.type = type;
    }
    setAttributes(attributes2);
    const finalId = "id" in attributes2 ? attributes2.id : blockAttributes8.id;
    const finalKind = "kind" in attributes2 ? attributes2.kind : blockAttributes8.kind;
    return {
      isEntityLink: !!finalId && finalKind !== "custom",
      attributes: attributes2
      // Return the computed attributes object
    };
  };

  // packages/block-library/build-module/navigation-link/shared/use-handle-link-change.mjs
  function useHandleLinkChange({
    clientId,
    attributes: attributes2,
    setAttributes,
    allowTextUpdate = false
  }) {
    const { updateBlockAttributes } = (0, import_data79.useDispatch)(import_block_editor144.store);
    const { hasUrlBinding, createBinding, clearBinding } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    return (0, import_element101.useCallback)(
      (updatedLink) => {
        if (!updatedLink) {
          return;
        }
        const attrs = {
          url: updatedLink.url,
          kind: updatedLink.kind,
          type: updatedLink.type,
          id: updatedLink.id
        };
        const currentText = attributes2.label ? (0, import_dom16.__unstableStripHTML)(attributes2.label) : "";
        const updatedText = updatedLink.title ?? "";
        const hasTextUpdate = allowTextUpdate && updatedLink.title !== void 0 && updatedText !== currentText;
        const textUpdateAttributes = hasTextUpdate ? { label: (0, import_escape_html2.escapeHTML)(updatedText) } : {};
        if (!attributes2.label || attributes2.label === "" || hasTextUpdate) {
          attrs.title = updatedLink.title;
        }
        const willBeCustomLink = !updatedLink.id && hasUrlBinding;
        if (willBeCustomLink) {
          clearBinding();
          updateBlockAttributes(clientId, {
            url: updatedLink.url,
            kind: "custom",
            type: "custom",
            id: void 0,
            ...textUpdateAttributes
          });
        } else {
          const { isEntityLink, attributes: updatedAttributes } = updateAttributes(attrs, setAttributes, attributes2);
          if (isEntityLink) {
            createBinding(updatedAttributes);
          } else {
            clearBinding();
          }
          if (Object.keys(textUpdateAttributes).length) {
            updateBlockAttributes(clientId, textUpdateAttributes);
          }
        }
      },
      [
        attributes2,
        allowTextUpdate,
        clientId,
        hasUrlBinding,
        createBinding,
        clearBinding,
        setAttributes,
        updateBlockAttributes
      ]
    );
  }

  // packages/block-library/build-module/navigation-link/link-ui/index.mjs
  var import_dom17 = __toESM(require_dom(), 1);
  var import_components88 = __toESM(require_components(), 1);
  var import_i18n134 = __toESM(require_i18n(), 1);
  var import_block_editor146 = __toESM(require_block_editor(), 1);
  var import_element103 = __toESM(require_element(), 1);
  var import_core_data47 = __toESM(require_core_data(), 1);
  var import_compose40 = __toESM(require_compose(), 1);
  var import_url17 = __toESM(require_url(), 1);

  // packages/block-library/build-module/navigation-link/link-ui/page-creator.mjs
  var import_components87 = __toESM(require_components(), 1);
  var import_i18n132 = __toESM(require_i18n(), 1);
  var import_data80 = __toESM(require_data(), 1);
  var import_core_data46 = __toESM(require_core_data(), 1);
  var import_notices14 = __toESM(require_notices(), 1);
  var import_html_entities5 = __toESM(require_html_entities(), 1);
  var import_element102 = __toESM(require_element(), 1);

  // packages/block-library/build-module/navigation-link/link-ui/dialog-wrapper.mjs
  var import_components86 = __toESM(require_components(), 1);
  var import_i18n131 = __toESM(require_i18n(), 1);
  var import_compose39 = __toESM(require_compose(), 1);
  var import_jsx_runtime355 = __toESM(require_jsx_runtime(), 1);
  function BackButton({ className, onBack }) {
    return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
      import_components86.Button,
      {
        className,
        icon: (0, import_i18n131.isRTL)() ? chevron_right_small_default : chevron_left_small_default,
        onClick: (e3) => {
          e3.preventDefault();
          onBack();
        },
        size: "small",
        children: (0, import_i18n131.__)("Back")
      }
    );
  }
  function DialogWrapper({ className, title, description, onBack, children }) {
    const dialogTitleId = (0, import_compose39.useInstanceId)(
      DialogWrapper,
      "link-ui-dialog-title"
    );
    const dialogDescriptionId = (0, import_compose39.useInstanceId)(
      DialogWrapper,
      "link-ui-dialog-description"
    );
    const focusOnMountRef = (0, import_compose39.useFocusOnMount)("firstElement");
    const backButtonClassName = `${className}__back`;
    return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
      "div",
      {
        className,
        role: "dialog",
        "aria-labelledby": dialogTitleId,
        "aria-describedby": dialogDescriptionId,
        ref: focusOnMountRef,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(VisuallyHidden, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("h2", { id: dialogTitleId, children: title }),
            /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("p", { id: dialogDescriptionId, children: description })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(BackButton, { className: backButtonClassName, onBack }),
          children
        ]
      }
    );
  }
  var dialog_wrapper_default = DialogWrapper;

  // packages/block-library/build-module/navigation-link/link-ui/page-creator.mjs
  var import_jsx_runtime356 = __toESM(require_jsx_runtime(), 1);
  function LinkUIPageCreator({
    postType,
    onBack,
    onPageCreated,
    initialTitle = ""
  }) {
    const [title, setTitle] = (0, import_element102.useState)(initialTitle);
    const [shouldPublish, setShouldPublish] = (0, import_element102.useState)(true);
    const isTitleValid = title.trim().length > 0;
    const { lastError, isSaving } = (0, import_data80.useSelect)(
      (select10) => ({
        lastError: select10(import_core_data46.store).getLastEntitySaveError(
          "postType",
          postType
        ),
        isSaving: select10(import_core_data46.store).isSavingEntityRecord(
          "postType",
          postType
        )
      }),
      [postType]
    );
    const { saveEntityRecord } = (0, import_data80.useDispatch)(import_core_data46.store);
    const { createSuccessNotice, createErrorNotice } = (0, import_data80.useDispatch)(import_notices14.store);
    async function createPage(event) {
      event.preventDefault();
      if (isSaving || !isTitleValid) {
        return;
      }
      try {
        const savedRecord = await saveEntityRecord(
          "postType",
          postType,
          {
            title,
            status: shouldPublish ? "publish" : "draft"
          },
          { throwOnError: true }
        );
        if (savedRecord) {
          const pageLink = {
            id: savedRecord.id,
            type: postType,
            title: (0, import_html_entities5.decodeEntities)(savedRecord.title.rendered),
            url: savedRecord.link,
            kind: "post-type"
          };
          createSuccessNotice(
            (0, import_i18n132.sprintf)(
              // translators: %s: the name of the new page being created.
              (0, import_i18n132.__)("%s page created successfully."),
              (0, import_html_entities5.decodeEntities)(savedRecord.title.rendered)
            ),
            {
              type: "snackbar",
              id: "page-created-success"
            }
          );
          onPageCreated(pageLink);
        }
      } catch {
        createErrorNotice(
          (0, import_i18n132.__)("Failed to create page. Please try again."),
          {
            type: "snackbar",
            id: "page-created-error"
          }
        );
      }
    }
    const isSubmitDisabled = isSaving || !isTitleValid;
    return /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
      dialog_wrapper_default,
      {
        className: "link-ui-page-creator",
        title: (0, import_i18n132.__)("Create page"),
        description: (0, import_i18n132.__)("Create a new page to add to your Navigation."),
        onBack,
        children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_components87.__experimentalVStack, { className: "link-ui-page-creator__inner", spacing: 4, children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(import_components87.__experimentalVStack, { spacing: 4, children: [
          /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
            import_components87.TextControl,
            {
              label: (0, import_i18n132.__)("Title"),
              onChange: setTitle,
              placeholder: (0, import_i18n132.__)("No title"),
              value: title
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
            import_components87.CheckboxControl,
            {
              label: (0, import_i18n132.__)("Publish"),
              help: (0, import_i18n132.__)(
                "Turn off to save as a draft. Drafts won't appear on your site until published."
              ),
              checked: shouldPublish,
              onChange: setShouldPublish
            }
          ),
          lastError && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(import_components87.Notice, { status: "error", isDismissible: false, children: lastError.message }),
          /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(import_components87.__experimentalHStack, { spacing: 2, justify: "flex-end", children: [
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components87.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: onBack,
                disabled: isSaving,
                accessibleWhenDisabled: true,
                children: (0, import_i18n132.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
              import_components87.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                type: "submit",
                isBusy: isSaving,
                "aria-disabled": isSubmitDisabled,
                children: (0, import_i18n132.__)("Create page")
              }
            )
          ] })
        ] }) }) })
      }
    );
  }

  // packages/block-library/build-module/navigation-link/link-ui/block-inserter.mjs
  var import_i18n133 = __toESM(require_i18n(), 1);
  var import_data81 = __toESM(require_data(), 1);
  var import_block_editor145 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime357 = __toESM(require_jsx_runtime(), 1);
  var { PrivateQuickInserter: QuickInserter } = unlock(
    import_block_editor145.privateApis
  );
  function LinkUIBlockInserter({ clientId, onBack, onBlockInsert }) {
    const { rootBlockClientId } = (0, import_data81.useSelect)(
      (select10) => {
        const { getBlockRootClientId } = select10(import_block_editor145.store);
        return {
          rootBlockClientId: getBlockRootClientId(clientId)
        };
      },
      [clientId]
    );
    if (!clientId) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
      dialog_wrapper_default,
      {
        className: "link-ui-block-inserter",
        title: (0, import_i18n133.__)("Add block"),
        description: (0, import_i18n133.__)("Choose a block to add to your Navigation."),
        onBack,
        children: /* @__PURE__ */ (0, import_jsx_runtime357.jsx)(
          QuickInserter,
          {
            rootClientId: rootBlockClientId,
            clientId,
            isAppender: false,
            prioritizePatterns: false,
            selectBlockOnInsert: !onBlockInsert,
            onSelect: onBlockInsert ? onBlockInsert : void 0,
            hasSearch: false
          }
        )
      }
    );
  }
  var block_inserter_default = LinkUIBlockInserter;

  // packages/block-library/build-module/navigation-link/link-ui/index.mjs
  var import_jsx_runtime358 = __toESM(require_jsx_runtime(), 1);
  function getSuggestionsQuery(type, kind) {
    const perPage = 20;
    switch (type) {
      case "post":
      case "page":
        return { type: "post", subtype: type, perPage };
      case "category":
        return { type: "term", subtype: "category", perPage };
      case "tag":
        return { type: "term", subtype: "post_tag", perPage };
      case "post_format":
        return { type: "post-format", perPage };
      default:
        if (kind === "taxonomy") {
          return { type: "term", subtype: type, perPage };
        }
        if (kind === "post-type") {
          return { type: "post", subtype: type, perPage };
        }
        return {
          // for custom link which has no type
          // always show pages as initial suggestions
          initialSuggestionsSearchOptions: {
            type: "post",
            subtype: "page",
            perPage
          }
        };
    }
  }
  function UnforwardedLinkUI(props, ref) {
    const { label, url, opensInNewTab, type, kind, id } = props.link;
    const { entityRecord, hasBinding, isEntityAvailable } = props.entity || {};
    const { image, badges } = useLinkPreview({
      url,
      entityRecord,
      type,
      hasBinding,
      isEntityAvailable
    });
    const { clientId } = props;
    const postType = type || "page";
    const [addingBlock, setAddingBlock] = (0, import_element103.useState)(false);
    const [addingPage, setAddingPage] = (0, import_element103.useState)(false);
    const [shouldFocusPane, setShouldFocusPane] = (0, import_element103.useState)(null);
    const [initialSearchValue, setInitialSearchValue] = (0, import_element103.useState)("");
    const searchInputValueRef = (0, import_element103.useRef)("");
    const updateSearchValue = (value) => {
      searchInputValueRef.current = value;
      setInitialSearchValue(value);
    };
    const linkControlWrapperRef = (0, import_element103.useRef)();
    const addPageButtonRef = (0, import_element103.useRef)();
    const addBlockButtonRef = (0, import_element103.useRef)();
    const permissions = (0, import_core_data47.useResourcePermissions)({
      kind: "postType",
      name: postType
    });
    const { isBoundEntityAvailable } = useEntityBinding({
      clientId,
      attributes: props.link
    });
    const link = (0, import_element103.useMemo)(
      () => ({
        url,
        opensInNewTab,
        title: label && (0, import_dom17.__unstableStripHTML)(label),
        entityTitle: entityRecord?.title?.rendered || entityRecord?.name,
        kind,
        type,
        id,
        image,
        badges
      }),
      [
        label,
        opensInNewTab,
        url,
        kind,
        type,
        id,
        image,
        badges,
        entityRecord
      ]
    );
    const handlePageCreated = (pageLink) => {
      props.onChange(pageLink);
      setAddingPage(false);
      setShouldFocusPane(true);
      updateSearchValue("");
    };
    const dialogTitleId = (0, import_compose40.useInstanceId)(
      LinkUI,
      "link-ui-link-control__title"
    );
    const dialogDescriptionId = (0, import_compose40.useInstanceId)(
      LinkUI,
      "link-ui-link-control__description"
    );
    (0, import_element103.useEffect)(() => {
      if (shouldFocusPane && linkControlWrapperRef.current) {
        if (shouldFocusPane?.current) {
          shouldFocusPane.current.focus();
        } else {
          const tabbableElements = import_dom17.focus.tabbable.find(
            linkControlWrapperRef.current
          );
          const nextFocusTarget = tabbableElements[0] || linkControlWrapperRef.current;
          nextFocusTarget.focus();
        }
        setShouldFocusPane(false);
      }
    }, [shouldFocusPane]);
    const blockEditingMode = (0, import_block_editor146.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(
      import_components88.Popover,
      {
        ref,
        placement: "bottom",
        onClose: props.onClose,
        anchor: props.anchor,
        shift: true,
        children: [
          !addingBlock && !addingPage && /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(
            "div",
            {
              ref: linkControlWrapperRef,
              role: "dialog",
              "aria-labelledby": dialogTitleId,
              "aria-describedby": dialogDescriptionId,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(VisuallyHidden, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("h2", { id: dialogTitleId, children: (0, import_i18n134.__)("Add link") }),
                  /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("p", { id: dialogDescriptionId, children: (0, import_i18n134.__)(
                    "Search for and add a link to your Navigation."
                  ) })
                ] }),
                /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
                  import_block_editor146.LinkControl,
                  {
                    hasTextControl: true,
                    hasRichPreviews: true,
                    value: link,
                    showInitialSuggestions: true,
                    withCreateSuggestion: false,
                    noDirectEntry: !!type,
                    noURLSuggestion: !!type,
                    suggestionsQuery: getSuggestionsQuery(type, kind),
                    onChange: props.onChange,
                    onInputChange: (value) => {
                      searchInputValueRef.current = value;
                    },
                    inputValue: initialSearchValue,
                    onRemove: props.onRemove,
                    onCancel: props.onCancel,
                    handleEntities: isBoundEntityAvailable,
                    forceIsEditingLink: link?.url ? false : void 0,
                    renderControlBottom: () => {
                      if (link?.url?.length) {
                        return null;
                      }
                      return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
                        LinkUITools,
                        {
                          addPageButtonRef,
                          addBlockButtonRef,
                          setAddingBlock: () => {
                            setAddingBlock(true);
                          },
                          setAddingPage: () => {
                            setAddingPage(true);
                          },
                          canAddPage: blockEditingMode !== "disabled" && permissions?.canCreate && type === "page",
                          canAddBlock: blockEditingMode !== "disabled"
                        }
                      );
                    }
                  }
                )
              ]
            }
          ),
          addingBlock && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
            block_inserter_default,
            {
              clientId: props.clientId,
              onBack: () => {
                setAddingBlock(false);
                setShouldFocusPane(addBlockButtonRef);
                updateSearchValue(searchInputValueRef.current);
              },
              onBlockInsert: props?.onBlockInsert
            }
          ),
          addingPage && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
            LinkUIPageCreator,
            {
              postType,
              onBack: () => {
                setAddingPage(false);
                setShouldFocusPane(addPageButtonRef);
                updateSearchValue(searchInputValueRef.current);
              },
              onPageCreated: handlePageCreated,
              initialTitle: searchInputValueRef.current && !(0, import_url17.isURL)(searchInputValueRef.current) ? searchInputValueRef.current : ""
            }
          )
        ]
      }
    );
  }
  var LinkUI = (0, import_element103.forwardRef)(UnforwardedLinkUI);
  var LinkUITools = ({
    addPageButtonRef,
    addBlockButtonRef,
    setAddingBlock,
    setAddingPage,
    canAddPage,
    canAddBlock
  }) => {
    const blockInserterAriaRole = "listbox";
    if (!canAddPage && !canAddBlock) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime358.jsxs)(import_components88.__experimentalVStack, { spacing: 0, className: "link-ui-tools", children: [
      canAddPage && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
        import_components88.Button,
        {
          __next40pxDefaultSize: true,
          ref: addPageButtonRef,
          icon: plus_default,
          onClick: (e3) => {
            e3.preventDefault();
            setAddingPage(true);
          },
          "aria-haspopup": blockInserterAriaRole,
          children: (0, import_i18n134.__)("Create page")
        }
      ),
      canAddBlock && /* @__PURE__ */ (0, import_jsx_runtime358.jsx)(
        import_components88.Button,
        {
          __next40pxDefaultSize: true,
          ref: addBlockButtonRef,
          icon: plus_default,
          onClick: (e3) => {
            e3.preventDefault();
            setAddingBlock(true);
          },
          "aria-haspopup": blockInserterAriaRole,
          children: (0, import_i18n134.__)("Add block")
        }
      )
    ] });
  };

  // packages/block-library/build-module/navigation-link/shared/use-link-preview.mjs
  var import_i18n135 = __toESM(require_i18n(), 1);
  var import_url18 = __toESM(require_url(), 1);
  var import_block_editor147 = __toESM(require_block_editor(), 1);
  var import_data82 = __toESM(require_data(), 1);
  var import_core_data48 = __toESM(require_core_data(), 1);
  var { useRemoteUrlData, isHashLink, isRelativePath } = unlock(
    import_block_editor147.privateApis
  );
  function capitalize(str) {
    return str.charAt(0).toUpperCase() + str.slice(1);
  }
  function isHomepage(url, homeUrl) {
    if (url === "/") {
      return true;
    }
    if (!url || !homeUrl) {
      return false;
    }
    try {
      const urlParsed = new URL(url, homeUrl);
      const homeParsed = new URL(homeUrl);
      if (urlParsed.hostname !== homeParsed.hostname) {
        return false;
      }
      const urlPath = urlParsed.pathname.replace(/\/$/, "");
      const homePath = homeParsed.pathname.replace(/\/$/, "");
      return urlPath === homePath;
    } catch {
      return false;
    }
  }
  function computeDisplayUrl({ linkUrl, homeUrl } = {}) {
    if (!linkUrl) {
      return { displayUrl: "", isExternal: false };
    }
    let displayUrl = (0, import_url18.safeDecodeURI)(linkUrl);
    let isExternal = false;
    if (isRelativePath(linkUrl) || isHashLink(linkUrl)) {
      return { displayUrl, isExternal: false };
    }
    try {
      const parsedUrl = new URL(linkUrl);
      const siteHost = new URL(homeUrl).host;
      if (parsedUrl.host === siteHost) {
        let path = parsedUrl.pathname + parsedUrl.search + parsedUrl.hash;
        if (path.endsWith("/") && path.length > 1) {
          path = path.slice(0, -1);
        }
        displayUrl = path;
      } else {
        isExternal = true;
      }
    } catch {
      isExternal = true;
    }
    return { displayUrl, isExternal };
  }
  function computeBadges({
    url,
    homeUrl,
    type,
    isExternal,
    entityStatus,
    hasBinding,
    isEntityAvailable
  }) {
    const badges = [];
    if (url) {
      if (isExternal) {
        badges.push({
          label: (0, import_i18n135.__)("External link"),
          intent: "none"
        });
      } else if (isHashLink(url)) {
        badges.push({
          label: (0, import_i18n135.__)("Internal link"),
          intent: "none"
        });
      } else if (isHomepage(url, homeUrl)) {
        badges.push({
          label: (0, import_i18n135.__)("Homepage"),
          intent: "none"
        });
      } else if (type && type !== "custom") {
        badges.push({ label: capitalize(type), intent: "none" });
      } else {
        badges.push({
          label: (0, import_i18n135.__)("Page"),
          intent: "none"
        });
      }
    }
    if (hasBinding && !isEntityAvailable) {
      badges.push({
        label: (0, import_i18n135.sprintf)(
          /* translators: %s is the entity type (e.g., "page", "post", "category") */
          (0, import_i18n135.__)("Missing %s"),
          type
        ),
        intent: "high"
      });
    } else if (!url) {
      badges.push({ label: (0, import_i18n135.__)("No link selected"), intent: "high" });
    } else if (entityStatus) {
      const statusMap = {
        publish: { label: (0, import_i18n135.__)("Published"), intent: "stable" },
        future: { label: (0, import_i18n135.__)("Scheduled"), intent: "informational" },
        draft: { label: (0, import_i18n135.__)("Draft"), intent: "low" },
        pending: { label: (0, import_i18n135.__)("Pending"), intent: "low" },
        private: { label: (0, import_i18n135.__)("Private"), intent: "informational" },
        trash: { label: (0, import_i18n135.__)("Trashed"), intent: "high" }
      };
      const badge = statusMap[entityStatus];
      if (badge) {
        badges.push(badge);
      }
    }
    return badges;
  }
  function getEntityTitle(entityRecord) {
    const title = entityRecord?.title;
    if (typeof title === "string") {
      return title;
    }
    if (title && "rendered" in title) {
      return title.rendered || (0, import_i18n135.__)("(no title)");
    }
    return entityRecord?.name;
  }
  function useLinkPreview({
    url,
    entityRecord,
    type,
    hasBinding,
    isEntityAvailable
  }) {
    const homeUrl = (0, import_data82.useSelect)((select10) => {
      return select10(import_core_data48.store).getEntityRecord(
        "root",
        "__unstableBase"
      )?.home;
    }, []);
    const title = getEntityTitle(entityRecord);
    const { richData } = useRemoteUrlData(title ? null : url);
    const { displayUrl, isExternal } = computeDisplayUrl({
      linkUrl: url,
      homeUrl
    });
    const image = (0, import_data82.useSelect)(
      (select10) => {
        if (!entityRecord?.featured_media) {
          return null;
        }
        const { getEntityRecord } = select10(import_core_data48.store);
        const media = getEntityRecord(
          "postType",
          "attachment",
          entityRecord.featured_media
        );
        return media?.media_details?.sizes?.thumbnail?.source_url || media?.media_details?.sizes?.medium?.source_url || media?.source_url || null;
      },
      [entityRecord?.featured_media]
    );
    const badges = computeBadges({
      url,
      homeUrl,
      type,
      isExternal,
      entityStatus: entityRecord?.status,
      hasBinding,
      isEntityAvailable
    });
    const displayTitle = url ? title || richData?.title || (0, import_url18.safeDecodeURI)(url) : (0, import_i18n135.__)("Add link");
    return {
      title: displayTitle,
      url: displayUrl,
      image,
      badges
    };
  }

  // packages/block-library/build-module/navigation-link/shared/use-is-invalid-link.mjs
  var import_data83 = __toESM(require_data(), 1);
  var import_core_data49 = __toESM(require_core_data(), 1);
  var import_block_editor148 = __toESM(require_block_editor(), 1);
  var useIsInvalidLink = (kind, type, id, enabled) => {
    const isPostType = kind === "post-type" || type === "post" || type === "page";
    const hasId = Number.isInteger(id);
    const blockEditingMode = (0, import_block_editor148.useBlockEditingMode)();
    const { postStatus, isDeleted } = (0, import_data83.useSelect)(
      (select10) => {
        if (!isPostType) {
          return { postStatus: null, isDeleted: false };
        }
        if (blockEditingMode === "disabled" || !enabled) {
          return { postStatus: null, isDeleted: false };
        }
        const { getEntityRecord, hasFinishedResolution } = select10(import_core_data49.store);
        const entityRecord = getEntityRecord("postType", type, id);
        const hasResolved = hasFinishedResolution("getEntityRecord", [
          "postType",
          type,
          id
        ]);
        const deleted = hasResolved && entityRecord === void 0;
        return {
          postStatus: entityRecord?.status,
          isDeleted: deleted
        };
      },
      [isPostType, blockEditingMode, enabled, type, id]
    );
    const isInvalid = isPostType && hasId && (isDeleted || postStatus && "trash" === postStatus);
    const isDraft = "draft" === postStatus;
    return [isInvalid, isDraft];
  };

  // packages/block-library/build-module/navigation-link/shared/controls.mjs
  var import_jsx_runtime359 = __toESM(require_jsx_runtime(), 1);
  var { LinkPicker, isHashLink: isHashLink2, isRelativePath: isRelativePath2 } = unlock(
    import_block_editor149.privateApis
  );
  function getEntityTypeName(type, kind) {
    if (kind === "post-type") {
      switch (type) {
        case "post":
          return (0, import_i18n136.__)("post");
        case "page":
          return (0, import_i18n136.__)("page");
        default:
          return type || (0, import_i18n136.__)("post");
      }
    }
    if (kind === "taxonomy") {
      switch (type) {
        case "category":
          return (0, import_i18n136.__)("category");
        case "tag":
          return (0, import_i18n136.__)("tag");
        default:
          return type || (0, import_i18n136.__)("term");
      }
    }
    return type || (0, import_i18n136.__)("item");
  }
  function Controls2({
    attributes: attributes2,
    setAttributes,
    clientId,
    isLinkEditable = true
  }) {
    const { label, url, description, rel, opensInNewTab } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const [isInvalid, isDraft] = useIsInvalidLink(
      attributes2.kind,
      attributes2.type,
      entityRecord?.id,
      hasUrlBinding
    );
    let helpText = "";
    if (isInvalid || hasUrlBinding && !isBoundEntityAvailable) {
      helpText = getInvalidLinkHelpText();
    } else if (isDraft) {
      helpText = getDraftHelpText({
        type: attributes2.type,
        kind: attributes2.kind
      });
    }
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes
    });
    const onNavigateToEntityRecord = (0, import_data84.useSelect)(
      (select10) => select10(import_block_editor149.store).getSettings().onNavigateToEntityRecord,
      []
    );
    const homeUrl = (0, import_data84.useSelect)((select10) => {
      return select10(import_core_data50.store).getEntityRecord("root", "__unstableBase")?.home;
    }, []);
    const blockEditingMode = (0, import_data84.useSelect)(
      (select10) => select10(import_block_editor149.store).getBlockEditingMode(clientId),
      [clientId]
    );
    const isContentOnly = blockEditingMode === "contentOnly";
    const preview = useLinkPreview({
      url,
      entityRecord,
      type: attributes2.type,
      hasBinding: hasUrlBinding,
      isEntityAvailable: isBoundEntityAvailable
    });
    const isViewableUrl = !!url && (!isHashLink2(url) || isRelativePath2(url) && !url.startsWith("/"));
    const viewUrl = isViewableUrl && url.startsWith("/") && homeUrl ? homeUrl + url : url;
    return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(
      import_components89.__experimentalToolsPanel,
      {
        label: (0, import_i18n136.__)("Settings"),
        resetAll: () => {
          setAttributes({
            label: "",
            url: "",
            description: "",
            rel: "",
            opensInNewTab: false
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
            import_components89.__experimentalToolsPanelItem,
            {
              hasValue: () => !!label,
              label: (0, import_i18n136.__)("Text"),
              onDeselect: () => setAttributes({ label: "" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
                import_components89.TextControl,
                {
                  label: (0, import_i18n136.__)("Text"),
                  value: label ? (0, import_dom18.__unstableStripHTML)(label) : "",
                  onChange: (labelValue) => {
                    setAttributes({ label: labelValue });
                  },
                  autoComplete: "off"
                }
              )
            }
          ),
          isLinkEditable && /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(import_jsx_runtime359.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components89.__experimentalToolsPanelItem,
              {
                hasValue: () => !!url,
                label: (0, import_i18n136.__)("Link to"),
                onDeselect: () => setAttributes({
                  url: void 0,
                  id: void 0,
                  kind: void 0,
                  type: void 0
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
                  LinkPicker,
                  {
                    preview,
                    onSelect: handleLinkChange,
                    suggestionsQuery: getSuggestionsQuery(
                      attributes2.type,
                      attributes2.kind
                    ),
                    label: (0, import_i18n136.__)("Link to"),
                    help: helpText ? helpText : void 0
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components89.__experimentalToolsPanelItem,
              {
                hasValue: () => !!opensInNewTab,
                label: (0, import_i18n136.__)("Open in new tab"),
                onDeselect: () => setAttributes({ opensInNewTab: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
                  import_components89.CheckboxControl,
                  {
                    label: (0, import_i18n136.__)("Open in new tab"),
                    checked: opensInNewTab,
                    onChange: (value) => setAttributes({ opensInNewTab: value })
                  }
                )
              }
            ),
            !!url && hasUrlBinding && isBoundEntityAvailable && entityRecord?.id && attributes2.kind === "post-type" && onNavigateToEntityRecord && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components89.Button,
              {
                variant: "secondary",
                onClick: () => {
                  onNavigateToEntityRecord({
                    postId: entityRecord.id,
                    postType: attributes2.type
                  });
                },
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n136.__)("Edit")
              }
            ),
            isViewableUrl && /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
              import_components89.Button,
              {
                variant: "secondary",
                href: viewUrl,
                target: "_blank",
                icon: external_default,
                iconPosition: "right",
                __next40pxDefaultSize: true,
                className: "navigation-link-to__action-button",
                children: (0, import_i18n136.__)("View")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
            import_components89.__experimentalToolsPanelItem,
            {
              hasValue: () => !!description,
              label: (0, import_i18n136.__)("Description"),
              onDeselect: () => setAttributes({ description: "" }),
              isShownByDefault: !isContentOnly,
              children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
                import_components89.TextareaControl,
                {
                  label: (0, import_i18n136.__)("Description"),
                  value: description || "",
                  onChange: (descriptionValue) => {
                    setAttributes({ description: descriptionValue });
                  },
                  help: (0, import_i18n136.__)(
                    "The description will be displayed in the menu if the current theme supports it."
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
            import_components89.__experimentalToolsPanelItem,
            {
              hasValue: () => !!rel,
              label: (0, import_i18n136.__)("Rel attribute"),
              onDeselect: () => setAttributes({ rel: "" }),
              isShownByDefault: !isContentOnly,
              children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)(
                import_components89.TextControl,
                {
                  label: (0, import_i18n136.__)("Rel attribute"),
                  value: rel || "",
                  onChange: (relValue) => {
                    setAttributes({ rel: relValue });
                  },
                  autoComplete: "off",
                  help: (0, import_i18n136.__)(
                    "The relationship of the linked URL as space-separated link types."
                  )
                }
              )
            }
          )
        ]
      }
    );
  }
  function getInvalidLinkHelpText() {
    return (0, import_i18n136.__)(
      "This link is invalid and will not appear on your site. Please update the link."
    );
  }
  function getDraftHelpText({ type, kind }) {
    const entityType = getEntityTypeName(type, kind);
    return (0, import_i18n136.sprintf)(
      /* translators: %1$s is the entity type (e.g., "page", "post", "category") */
      (0, import_i18n136.__)(
        "This link is to a draft %1$s and will not appear on your site until the %1$s is published."
      ),
      entityType
    );
  }

  // packages/block-library/build-module/navigation-link/shared/invalid-draft-display.mjs
  var import_i18n137 = __toESM(require_i18n(), 1);
  var import_html_entities6 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime360 = __toESM(require_jsx_runtime(), 1);
  function InvalidDraftDisplay({
    label,
    isInvalid,
    isDraft,
    className = "wp-block-navigation-link__label"
  }) {
    if (!isInvalid && !isDraft) {
      return null;
    }
    const statusText = isInvalid ? (
      /* translators: Indicating that the navigation link is Invalid. */
      (0, import_i18n137.__)("Invalid")
    ) : (
      /* translators: Indicating that the navigation link is a Draft. */
      (0, import_i18n137.__)("Draft")
    );
    return /* @__PURE__ */ (0, import_jsx_runtime360.jsx)(
      "div",
      {
        className: clsx_default(
          "wp-block-navigation-link__placeholder-text",
          className,
          {
            "is-invalid": isInvalid,
            "is-draft": isDraft
          }
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime360.jsx)("span", {
          // Some attributes are stored in an escaped form. It's a legacy issue.
          // Ideally they would be stored in a raw, unescaped form.
          // Unescape is used here to "recover" the escaped characters
          // so they display without encoding.
          // See `updateAttributes` for more details.
          children: `${(0, import_html_entities6.decodeEntities)(label)} (${statusText})`.trim()
        })
      }
    );
  }

  // packages/block-library/build-module/navigation-link/shared/use-enable-link-status-validation.mjs
  var import_data85 = __toESM(require_data(), 1);
  var import_block_editor150 = __toESM(require_block_editor(), 1);
  function useEnableLinkStatusValidation(clientId) {
    return (0, import_data85.useSelect)(
      (select10) => {
        const {
          getSelectedBlockClientId,
          hasSelectedInnerBlock,
          getBlockParentsByBlockName
        } = select10(import_block_editor150.store);
        const selectedBlockId = getSelectedBlockClientId();
        const rootNavigationId = getBlockParentsByBlockName(
          clientId,
          "core/navigation"
        )[0];
        return selectedBlockId === rootNavigationId || hasSelectedInnerBlock(rootNavigationId, true);
      },
      [clientId]
    );
  }

  // packages/block-library/build-module/navigation-link/shared/use-is-dragging-within.mjs
  var import_element104 = __toESM(require_element(), 1);
  var useIsDraggingWithin = (elementRef) => {
    const [isDraggingWithin, setIsDraggingWithin] = (0, import_element104.useState)(false);
    (0, import_element104.useEffect)(() => {
      const { ownerDocument: ownerDocument2 } = elementRef.current;
      function handleDragStart(event) {
        handleDragEnter(event);
      }
      function handleDragEnd() {
        setIsDraggingWithin(false);
      }
      function handleDragEnter(event) {
        if (elementRef.current.contains(event.target)) {
          setIsDraggingWithin(true);
        } else {
          setIsDraggingWithin(false);
        }
      }
      ownerDocument2.addEventListener("dragstart", handleDragStart);
      ownerDocument2.addEventListener("dragend", handleDragEnd);
      ownerDocument2.addEventListener("dragenter", handleDragEnter);
      return () => {
        ownerDocument2.removeEventListener("dragstart", handleDragStart);
        ownerDocument2.removeEventListener("dragend", handleDragEnd);
        ownerDocument2.removeEventListener("dragenter", handleDragEnter);
      };
    }, [elementRef]);
    return isDraggingWithin;
  };

  // packages/block-library/build-module/navigation-link/shared/select-label-text.mjs
  function selectLabelText(ref) {
    ref.current.focus();
    const { ownerDocument: ownerDocument2 } = ref.current;
    const { defaultView } = ownerDocument2;
    const selection = defaultView.getSelection();
    const range = ownerDocument2.createRange();
    range.selectNodeContents(ref.current);
    selection.removeAllRanges();
    selection.addRange(range);
  }

  // packages/block-library/build-module/navigation/edit/navigation-link-ui.mjs
  var import_jsx_runtime361 = __toESM(require_jsx_runtime(), 1);
  var BLOCKS_WITH_LINK_UI_SUPPORT = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  function NavigationLinkUI({
    insertedBlockClientId,
    setInsertedBlockClientId
  }) {
    const { updateBlockAttributes, removeBlock } = (0, import_data86.useDispatch)(import_block_editor151.store);
    const { insertedBlockName, insertedBlockAttributes } = (0, import_data86.useSelect)(
      (select10) => {
        const { getBlockName, getBlockAttributes: getBlockAttributes4 } = select10(import_block_editor151.store);
        return {
          insertedBlockName: getBlockName(insertedBlockClientId),
          insertedBlockAttributes: getBlockAttributes4(
            insertedBlockClientId
          )
        };
      },
      [insertedBlockClientId]
    );
    const showLinkControls = BLOCKS_WITH_LINK_UI_SUPPORT?.includes(insertedBlockName);
    const { createBinding, clearBinding } = useEntityBinding({
      clientId: insertedBlockClientId,
      attributes: insertedBlockAttributes || {}
    });
    if (!showLinkControls) {
      return null;
    }
    const cleanupInsertedBlock = () => {
      const shouldAutoSelectBlock = false;
      if (!insertedBlockAttributes?.url && insertedBlockClientId) {
        removeBlock(insertedBlockClientId, shouldAutoSelectBlock);
      }
      setInsertedBlockClientId(null);
    };
    const setInsertedBlockAttributes = (_insertedBlockClientId) => (_updatedAttributes) => {
      if (!_insertedBlockClientId) {
        return;
      }
      updateBlockAttributes(_insertedBlockClientId, _updatedAttributes);
    };
    const handleSetInsertedBlock = (newBlock) => {
      const shouldAutoSelectBlock = false;
      if (insertedBlockClientId && newBlock) {
        removeBlock(insertedBlockClientId, shouldAutoSelectBlock);
      }
      setInsertedBlockClientId(newBlock?.clientId ?? null);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(
      LinkUI,
      {
        clientId: insertedBlockClientId,
        link: insertedBlockAttributes,
        onBlockInsert: handleSetInsertedBlock,
        onClose: () => {
          cleanupInsertedBlock();
        },
        onChange: (updatedValue) => {
          const { isEntityLink, attributes: updatedAttributes } = updateAttributes(
            updatedValue,
            setInsertedBlockAttributes(insertedBlockClientId),
            insertedBlockAttributes
          );
          if (isEntityLink) {
            createBinding(updatedAttributes);
          } else {
            clearBinding();
          }
          setInsertedBlockClientId(null);
        }
      }
    );
  }

  // packages/block-library/build-module/navigation/edit/navigation-list-view-header.mjs
  var import_components90 = __toESM(require_components(), 1);
  var import_i18n138 = __toESM(require_i18n(), 1);
  var import_block_editor152 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime362 = __toESM(require_jsx_runtime(), 1);
  var { useBlockDisplayTitle } = unlock(import_block_editor152.privateApis);
  var actionLabel = (
    /* translators: %s: The name of a menu. */
    (0, import_i18n138.__)("Switch to '%s'")
  );
  function NavigationListViewHeader({
    clientId,
    blockEditingMode,
    currentMenuId,
    onSelectClassicMenu,
    onSelectNavigationMenu,
    onCreateNew,
    createNavigationMenuIsSuccess,
    createNavigationMenuIsError,
    isManageMenusButtonDisabled
  }) {
    const blockTitle = useBlockDisplayTitle({
      clientId,
      context: "list-view"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime362.jsxs)(import_components90.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header", children: [
      /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
        import_components90.__experimentalHeading,
        {
          className: "wp-block-navigation-off-canvas-editor__title",
          level: 2,
          children: blockTitle
        }
      ),
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
        navigation_menu_selector_default,
        {
          currentMenuId,
          onSelectClassicMenu,
          onSelectNavigationMenu,
          onCreateNew,
          createNavigationMenuIsSuccess,
          createNavigationMenuIsError,
          actionLabel,
          isManageMenusButtonDisabled
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation/edit/menu-inspector-controls.mjs
  var import_jsx_runtime363 = __toESM(require_jsx_runtime(), 1);
  var actionLabel2 = (
    /* translators: %s: The name of a menu. */
    (0, import_i18n139.__)("Switch to '%s'")
  );
  var {
    PrivateListView,
    PrivateBlockContext,
    useListViewPanelState,
    useBlockDisplayTitle: useBlockDisplayTitle2
  } = unlock(import_block_editor153.privateApis);
  var MainContent = ({
    clientId,
    currentMenuId,
    isLoading,
    isNavigationMenuMissing,
    onCreateNew,
    expandRevision
  }) => {
    const hasChildren = (0, import_data87.useSelect)(
      (select10) => {
        return !!select10(import_block_editor153.store).getBlockCount(clientId);
      },
      [clientId]
    );
    const { openListViewContentPanel } = unlock(
      (0, import_data87.useDispatch)(import_block_editor153.store)
    );
    const { navigationMenu } = useNavigationMenu(currentMenuId);
    if (currentMenuId && isNavigationMenuMissing) {
      return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(deleted_navigation_warning_default, { onCreateNew, isNotice: true });
    }
    if (isLoading) {
      return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(import_components91.Spinner, {});
    }
    const description = navigationMenu ? (0, import_i18n139.sprintf)(
      /* translators: %s: The name of a menu. */
      (0, import_i18n139.__)("Structure for Navigation Menu: %s"),
      navigationMenu?.title || (0, import_i18n139.__)("Untitled menu")
    ) : (0, import_i18n139.__)(
      "You have not yet created any menus. Displaying a list of your Pages"
    );
    return /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)("div", { className: "wp-block-navigation__menu-inspector-controls", children: [
      !hasChildren && /* @__PURE__ */ (0, import_jsx_runtime363.jsx)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message", children: (0, import_i18n139.__)("This Navigation Menu is empty.") }),
      /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
        PrivateListView,
        {
          rootClientId: clientId,
          isExpanded: true,
          description,
          showAppender: true,
          blockSettingsMenu: LeafMoreMenu,
          additionalBlockContent: NavigationLinkUI,
          onSelect: openListViewContentPanel
        },
        `${clientId}-${expandRevision}`
      )
    ] });
  };
  var MenuInspectorControls = (props) => {
    const {
      clientId,
      createNavigationMenuIsSuccess,
      createNavigationMenuIsError,
      currentMenuId = null,
      onCreateNew,
      onSelectClassicMenu,
      onSelectNavigationMenu,
      isManageMenusButtonDisabled,
      blockEditingMode
    } = props;
    const { isSelectionWithinCurrentSection } = (0, import_element105.useContext)(PrivateBlockContext);
    const blockTitle = useBlockDisplayTitle2({
      clientId,
      context: "list-view"
    });
    const showBlockTitle = isSelectionWithinCurrentSection;
    const { isOpened, expandRevision, handleToggle } = useListViewPanelState(clientId);
    if (!showBlockTitle) {
      return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(import_block_editor153.InspectorControls, { group: "list", children: /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(import_components91.PanelBody, { title: null, children: [
        /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
          NavigationListViewHeader,
          {
            clientId,
            blockEditingMode,
            currentMenuId,
            onSelectClassicMenu,
            onSelectNavigationMenu,
            onCreateNew,
            createNavigationMenuIsSuccess,
            createNavigationMenuIsError,
            isManageMenusButtonDisabled
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
          MainContent,
          {
            ...props,
            expandRevision
          }
        )
      ] }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(import_block_editor153.InspectorControls, { group: "list", children: /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(
      import_components91.PanelBody,
      {
        title: blockTitle,
        opened: isOpened,
        onToggle: handleToggle,
        children: [
          blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
            navigation_menu_selector_default,
            {
              currentMenuId,
              onSelectClassicMenu,
              onSelectNavigationMenu,
              onCreateNew,
              createNavigationMenuIsSuccess,
              createNavigationMenuIsError,
              actionLabel: actionLabel2,
              isManageMenusButtonDisabled
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(MainContent, { ...props, expandRevision })
        ]
      }
    ) });
  };
  var menu_inspector_controls_default = MenuInspectorControls;

  // packages/block-library/build-module/navigation/edit/accessible-description.mjs
  var import_jsx_runtime364 = __toESM(require_jsx_runtime(), 1);
  function AccessibleDescription({ id, children }) {
    return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime364.jsx)("div", { id, className: "wp-block-navigation__description", children }) });
  }

  // packages/block-library/build-module/navigation/edit/accessible-menu-description.mjs
  var import_core_data51 = __toESM(require_core_data(), 1);
  var import_i18n140 = __toESM(require_i18n(), 1);
  var import_jsx_runtime365 = __toESM(require_jsx_runtime(), 1);
  function AccessibleMenuDescription({ id }) {
    const [menuTitle] = (0, import_core_data51.useEntityProp)("postType", "wp_navigation", "title");
    const description = (0, import_i18n140.sprintf)((0, import_i18n140.__)(`Navigation Menu: "%s"`), menuTitle);
    return /* @__PURE__ */ (0, import_jsx_runtime365.jsx)(AccessibleDescription, { id, children: description });
  }

  // packages/block-library/build-module/utils/is-within-overlay.mjs
  var import_data88 = __toESM(require_data(), 1);
  var import_core_data52 = __toESM(require_core_data(), 1);
  function isWithinNavigationOverlay() {
    const editorStore = (0, import_data88.select)("core/editor");
    if (!editorStore) {
      return false;
    }
    const { getCurrentPostType, getCurrentPostId } = editorStore;
    const { getEditedEntityRecord } = (0, import_data88.select)(import_core_data52.store);
    const postType = getCurrentPostType?.();
    const postId = getCurrentPostId?.();
    if (postType === "wp_template_part" && postId) {
      const templatePart = getEditedEntityRecord(
        "postType",
        "wp_template_part",
        postId
      );
      return templatePart?.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA;
    }
    return false;
  }

  // packages/block-library/build-module/navigation/edit/use-layout-custom-properties.mjs
  var import_block_editor154 = __toESM(require_block_editor(), 1);
  var { getResponsiveMediaQueries: getResponsiveMediaQueries3 } = unlock(privateApis);
  var JUSTIFICATION_VALUES = {
    left: "flex-start",
    center: "center",
    right: "flex-end",
    "space-between": "space-between"
  };
  function useLayoutCustomProperties({
    clientId,
    layout,
    style: style2
  }) {
    const [viewportSettings] = (0, import_block_editor154.useSettings)("viewport");
    const selector = `#block-${clientId}`;
    const css = Object.entries(getResponsiveMediaQueries3(viewportSettings)).map(([viewport, mediaQuery]) => {
      const viewportLayout = style2?.[viewport]?.layout;
      if (!viewportLayout || typeof viewportLayout !== "object" || Array.isArray(viewportLayout) || !Object.keys(viewportLayout).length) {
        return "";
      }
      const effectiveLayout = { ...layout, ...viewportLayout };
      const justifyContent = Object.hasOwn(
        JUSTIFICATION_VALUES,
        effectiveLayout.justifyContent
      ) ? effectiveLayout.justifyContent : "left";
      const justification = JUSTIFICATION_VALUES[justifyContent];
      const isVertical = effectiveLayout.orientation === "vertical";
      let align = "center";
      if (isVertical) {
        align = ["center", "right"].includes(justifyContent) ? justification : "flex-start";
      }
      const justify = isVertical && justifyContent === "left" ? "initial" : justification;
      const declarations = {
        "--navigation-layout-justification-setting": justification,
        "--navigation-layout-direction": isVertical ? "column" : "row",
        "--navigation-layout-wrap": effectiveLayout.flexWrap === "nowrap" ? "nowrap" : "wrap",
        "--navigation-layout-justify": justify,
        "--navigation-layout-align": align
      };
      const cssDeclarations = Object.entries(declarations).map(([property, value]) => `${property}: ${value};`).join("");
      return `${mediaQuery}{${selector} {${cssDeclarations}}}`;
    }).join("");
    (0, import_block_editor154.useStyleOverride)({ css });
  }

  // packages/block-library/build-module/navigation/edit/index.mjs
  var import_jsx_runtime366 = __toESM(require_jsx_runtime(), 1);
  var { isNavigationPostEditorKey } = unlock(import_block_editor155.privateApis);
  function NavigationAddPageButton({ clientId }) {
    const { insertBlock } = (0, import_data89.useDispatch)(import_block_editor155.store);
    const { getBlockCount } = (0, import_data89.useSelect)(import_block_editor155.store);
    const onAddPage = (0, import_element106.useCallback)(() => {
      const blockCount = getBlockCount(clientId);
      const newBlock = (0, import_blocks53.createBlock)(DEFAULT_BLOCK5.name, {
        kind: DEFAULT_BLOCK5.attributes.kind,
        type: DEFAULT_BLOCK5.attributes.type
      });
      insertBlock(newBlock, blockCount, clientId);
    }, [clientId, insertBlock, getBlockCount]);
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor155.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components92.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
      import_components92.ToolbarButton,
      {
        name: "add-page",
        icon: page_default,
        onClick: onAddPage,
        children: (0, import_i18n141.__)("Add page")
      }
    ) }) });
  }
  function ColorTools({
    textColor,
    setTextColor,
    backgroundColor,
    setBackgroundColor,
    overlayTextColor,
    setOverlayTextColor,
    overlayBackgroundColor,
    setOverlayBackgroundColor,
    clientId,
    navRef,
    hasCustomOverlay
  }) {
    const [detectedBackgroundColor, setDetectedBackgroundColor] = (0, import_element106.useState)();
    const [detectedColor, setDetectedColor] = (0, import_element106.useState)();
    const [
      detectedOverlayBackgroundColor,
      setDetectedOverlayBackgroundColor
    ] = (0, import_element106.useState)();
    const [detectedOverlayColor, setDetectedOverlayColor] = (0, import_element106.useState)();
    const isWithinOverlay = (0, import_data89.useSelect)(() => isWithinNavigationOverlay(), []);
    (0, import_element106.useEffect)(() => {
      detectColors(
        navRef.current,
        setDetectedColor,
        setDetectedBackgroundColor
      );
      const subMenuElement = navRef.current?.querySelector(
        '[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]'
      );
      if (!subMenuElement) {
        return;
      }
      if (overlayTextColor.color || overlayBackgroundColor.color) {
        detectColors(
          subMenuElement,
          setDetectedOverlayColor,
          setDetectedOverlayBackgroundColor
        );
      }
    }, [overlayTextColor.color, overlayBackgroundColor.color, navRef]);
    const colorGradientSettings = (0, import_block_editor155.__experimentalUseMultipleOriginColorsAndGradients)();
    if (!colorGradientSettings.hasColorsOrGradients) {
      return null;
    }
    const colorSettings = [
      {
        colorValue: textColor.color,
        label: (0, import_i18n141.__)("Text"),
        onColorChange: setTextColor,
        resetAllFilter: () => setTextColor(),
        clearable: true,
        enableAlpha: true
      },
      {
        colorValue: backgroundColor.color,
        label: (0, import_i18n141.__)("Background"),
        onColorChange: setBackgroundColor,
        resetAllFilter: () => setBackgroundColor(),
        clearable: true,
        enableAlpha: true
      }
    ];
    colorSettings.push(
      {
        colorValue: overlayTextColor.color,
        label: hasCustomOverlay || isWithinOverlay ? (0, import_i18n141.__)("Submenu text") : (0, import_i18n141.__)("Submenu & overlay text"),
        onColorChange: setOverlayTextColor,
        resetAllFilter: () => setOverlayTextColor(),
        clearable: true,
        enableAlpha: true
      },
      {
        colorValue: overlayBackgroundColor.color,
        label: hasCustomOverlay || isWithinOverlay ? (0, import_i18n141.__)("Submenu background") : (0, import_i18n141.__)("Submenu & overlay background"),
        onColorChange: setOverlayBackgroundColor,
        resetAllFilter: () => setOverlayBackgroundColor(),
        clearable: true,
        enableAlpha: true
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        import_block_editor155.__experimentalColorGradientSettingsDropdown,
        {
          __experimentalIsRenderedInSidebar: true,
          settings: colorSettings,
          panelId: clientId,
          ...colorGradientSettings,
          gradients: [],
          disableCustomGradients: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        import_block_editor155.ContrastChecker,
        {
          backgroundColor: detectedBackgroundColor,
          textColor: detectedColor
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        import_block_editor155.ContrastChecker,
        {
          backgroundColor: detectedOverlayBackgroundColor,
          textColor: detectedOverlayColor
        }
      )
    ] });
  }
  function Navigation({
    attributes: attributes2,
    setAttributes,
    clientId,
    isSelected,
    className,
    backgroundColor,
    setBackgroundColor,
    textColor,
    setTextColor,
    overlayBackgroundColor,
    setOverlayBackgroundColor,
    overlayTextColor,
    setOverlayTextColor,
    // These props are used by the navigation editor to override specific
    // navigation block settings.
    customPlaceholder: CustomPlaceholder = null,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const {
      submenuVisibility,
      overlayMenu,
      overlay,
      showSubmenuIcon,
      templateLock,
      layout: {
        justifyContent,
        orientation = "horizontal",
        flexWrap = "wrap"
      } = {},
      hasIcon,
      icon: icon2 = "handle"
    } = attributes2;
    const ref = attributes2.ref;
    useLayoutCustomProperties({
      clientId,
      layout: attributes2.layout,
      style: attributes2.style
    });
    const setRef = (0, import_element106.useCallback)(
      (postId) => {
        setAttributes({ ref: postId });
      },
      [setAttributes]
    );
    const recursionId = `navigationMenu/${ref}`;
    const recursionDetected = (0, import_block_editor155.useHasRecursion)(recursionId);
    const {
      isPreviewMode,
      onNavigateToEntityRecord,
      currentTheme,
      editorDisabledResponsive,
      hasSelectedStyleState
    } = (0, import_data89.useSelect)(
      (select10) => {
        const { getSettings: getSettings2, hasSelectedBlockStyleState } = select10(import_block_editor155.store);
        const settings117 = getSettings2();
        return {
          isPreviewMode: settings117.isPreviewMode,
          onNavigateToEntityRecord: settings117?.onNavigateToEntityRecord,
          // Needed to construct the template part ID for the overlay preview.
          currentTheme: select10(import_core_data53.store).getCurrentTheme()?.stylesheet,
          // When editing a navigation post directly in an isolated editor,
          // always show navigation expanded (no hamburger) so users can see
          // and interact with all menu items.
          editorDisabledResponsive: !!settings117?.[isNavigationPostEditorKey],
          hasSelectedStyleState: hasSelectedBlockStyleState(clientId)
        };
      },
      [clientId]
    );
    const hasAlreadyRendered = isPreviewMode ? false : recursionDetected;
    const blockEditingMode = (0, import_block_editor155.useBlockEditingMode)();
    const { records: classicMenus } = (0, import_core_data53.useEntityRecords)("root", "menu", {
      per_page: -1,
      context: "view"
    });
    const [showNavigationMenuStatusNotice, hideNavigationMenuStatusNotice] = use_navigation_notice_default({
      name: "block-library/core/navigation/status"
    });
    const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice_default({
      name: "block-library/core/navigation/classic-menu-conversion"
    });
    const [
      showNavigationMenuPermissionsNotice,
      hideNavigationMenuPermissionsNotice
    ] = use_navigation_notice_default({
      name: "block-library/core/navigation/permissions/update"
    });
    const {
      create: createNavigationMenu,
      status: createNavigationMenuStatus,
      error: createNavigationMenuError,
      value: createNavigationMenuPost,
      isPending: isCreatingNavigationMenu,
      isSuccess: createNavigationMenuIsSuccess,
      isError: createNavigationMenuIsError
    } = useCreateNavigationMenu(clientId);
    const createUntitledEmptyNavigationMenu = async () => {
      await createNavigationMenu("");
    };
    const {
      hasUncontrolledInnerBlocks,
      uncontrolledInnerBlocks,
      isInnerBlockSelected,
      innerBlocks
    } = useInnerBlocks(clientId);
    const {
      replaceInnerBlocks,
      selectBlock,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data89.useDispatch)(import_block_editor155.store);
    (0, import_element106.useEffect)(() => {
      if (orientation === "horizontal" && submenuVisibility === "always") {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          submenuVisibility: "hover",
          showSubmenuIcon: true
        });
      }
    }, [
      orientation,
      submenuVisibility,
      setAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const hasPageListWithSubmenuRef = (0, import_element106.useRef)(false);
    const hasSubmenus = (0, import_data89.useSelect)(
      (select10) => {
        const hasNavigationSubmenu = innerBlocks.some(
          (block) => block.name === "core/navigation-submenu"
        );
        if (hasNavigationSubmenu) {
          return true;
        }
        const pageList = innerBlocks.find(
          (block) => block.name === "core/page-list"
        );
        if (!pageList) {
          hasPageListWithSubmenuRef.current = false;
          return false;
        }
        if (hasPageListWithSubmenuRef.current) {
          return true;
        }
        const { getBlocks } = select10(import_block_editor155.store);
        const pageListBlocks = getBlocks(pageList.clientId);
        if (pageListBlocks.length > 0) {
          hasPageListWithSubmenuRef.current = true;
          return true;
        }
        return false;
      },
      [innerBlocks]
    );
    const { records: overlayTemplateParts } = (0, import_core_data53.useEntityRecords)(
      "postType",
      "wp_template_part",
      {
        per_page: -1
      }
    );
    const hasOverlays = overlayTemplateParts?.some(
      (templatePart) => templatePart.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
    ) ?? false;
    const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0, import_element106.useState)(false);
    const [overlayMenuPreview, setOverlayMenuPreview] = (0, import_element106.useState)(false);
    const {
      hasResolvedNavigationMenus,
      isNavigationMenuResolved,
      isNavigationMenuMissing,
      canUserUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu,
      canUserDeleteNavigationMenu,
      hasResolvedCanUserDeleteNavigationMenu,
      canUserCreateNavigationMenus,
      isResolvingCanUserCreateNavigationMenus,
      hasResolvedCanUserCreateNavigationMenus
    } = useNavigationMenu(ref);
    const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing;
    const {
      convert: convertClassicMenu,
      status: classicMenuConversionStatus,
      error: classicMenuConversionError
    } = use_convert_classic_menu_to_block_menu_default(createNavigationMenu);
    const isConvertingClassicMenu = classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING;
    const handleUpdateMenu = (0, import_element106.useCallback)(
      (menuId, options2 = { focusNavigationBlock: false }) => {
        const { focusNavigationBlock } = options2;
        setRef(menuId);
        if (focusNavigationBlock) {
          selectBlock(clientId);
        }
      },
      [selectBlock, clientId, setRef]
    );
    const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved;
    const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable;
    const { getNavigationFallbackId } = unlock((0, import_data89.useSelect)(import_core_data53.store));
    const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null;
    (0, import_element106.useEffect)(() => {
      if (ref || hasUnsavedBlocks || !navigationFallbackId) {
        return;
      }
      __unstableMarkNextChangeAsNotPersistent();
      setRef(navigationFallbackId);
    }, [
      ref,
      setRef,
      hasUnsavedBlocks,
      navigationFallbackId,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const navRef = (0, import_element106.useRef)();
    const isWithinOverlay = (0, import_data89.useSelect)(() => isWithinNavigationOverlay(), []);
    const TagName2 = isWithinOverlay ? "div" : "nav";
    const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && classicMenus?.length === 0 && !hasUncontrolledInnerBlocks;
    const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu);
    const textDecoration = attributes2.style?.typography?.textDecoration;
    const hasBlockOverlay = (0, import_data89.useSelect)(
      (select10) => select10(import_block_editor155.store).__unstableHasActiveBlockOverlayActive(
        clientId
      ),
      [clientId]
    );
    const hasSetOverlayDefault = (0, import_element106.useRef)(false);
    (0, import_element106.useEffect)(() => {
      if (!isWithinOverlay) {
        return;
      }
      if (overlayMenu !== "never") {
        setAttributes({ overlayMenu: "never" });
      }
      if (!hasSetOverlayDefault.current && !ref) {
        hasSetOverlayDefault.current = true;
        setAttributes({
          submenuVisibility: "always",
          layout: {
            ...attributes2.layout,
            orientation: "vertical"
          },
          showSubmenuIcon: false
        });
      }
    }, [
      attributes2.layout,
      isWithinOverlay,
      overlayMenu,
      ref,
      setAttributes
    ]);
    const isResponsive = "never" !== overlayMenu && !editorDisabledResponsive;
    const blockProps = (0, import_block_editor155.useBlockProps)({
      ref: navRef,
      className: clsx_default(
        className,
        {
          "items-justified-right": justifyContent === "right",
          "items-justified-space-between": justifyContent === "space-between",
          "items-justified-left": justifyContent === "left",
          "items-justified-center": justifyContent === "center",
          "is-vertical": orientation === "vertical",
          "no-wrap": flexWrap === "nowrap",
          "is-responsive": isResponsive,
          "has-text-color": !!textColor.color || !!textColor?.class,
          [(0, import_block_editor155.getColorClassName)("color", textColor?.slug)]: !!textColor?.slug,
          "has-background": !!backgroundColor.color || backgroundColor.class,
          [(0, import_block_editor155.getColorClassName)(
            "background-color",
            backgroundColor?.slug
          )]: !!backgroundColor?.slug,
          [`has-text-decoration-${textDecoration}`]: textDecoration,
          "block-editor-block-content-overlay": hasBlockOverlay
        },
        layoutClassNames
      ),
      style: {
        color: !textColor?.slug && textColor?.color,
        backgroundColor: !backgroundColor?.slug && backgroundColor?.color
      }
    });
    const onSelectClassicMenu = async (classicMenu) => {
      return convertClassicMenu(classicMenu.id, classicMenu.name, "draft");
    };
    const onSelectNavigationMenu = (menuId) => {
      handleUpdateMenu(menuId);
    };
    (0, import_element106.useEffect)(() => {
      hideNavigationMenuStatusNotice();
      if (isCreatingNavigationMenu) {
        (0, import_a11y2.speak)((0, import_i18n141.__)(`Creating Navigation Menu.`));
      }
      if (createNavigationMenuIsSuccess) {
        handleUpdateMenu(createNavigationMenuPost?.id, {
          focusNavigationBlock: true
        });
        showNavigationMenuStatusNotice(
          (0, import_i18n141.__)(`Navigation Menu successfully created.`)
        );
      }
      if (createNavigationMenuIsError) {
        showNavigationMenuStatusNotice(
          (0, import_i18n141.__)("Failed to create Navigation Menu.")
        );
      }
    }, [
      createNavigationMenuStatus,
      createNavigationMenuError,
      createNavigationMenuPost?.id,
      createNavigationMenuIsError,
      createNavigationMenuIsSuccess,
      isCreatingNavigationMenu,
      handleUpdateMenu,
      hideNavigationMenuStatusNotice,
      showNavigationMenuStatusNotice
    ]);
    (0, import_element106.useEffect)(() => {
      hideClassicMenuConversionNotice();
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING) {
        (0, import_a11y2.speak)((0, import_i18n141.__)("Classic menu importing."));
      }
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) {
        showClassicMenuConversionNotice(
          (0, import_i18n141.__)("Classic menu imported successfully.")
        );
        handleUpdateMenu(createNavigationMenuPost?.id, {
          focusNavigationBlock: true
        });
      }
      if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) {
        showClassicMenuConversionNotice(
          (0, import_i18n141.__)("Classic menu import failed.")
        );
      }
    }, [
      classicMenuConversionStatus,
      classicMenuConversionError,
      hideClassicMenuConversionNotice,
      showClassicMenuConversionNotice,
      createNavigationMenuPost?.id,
      handleUpdateMenu
    ]);
    (0, import_element106.useEffect)(() => {
      if (!isSelected && !isInnerBlockSelected) {
        hideNavigationMenuPermissionsNotice();
      }
      if (isSelected || isInnerBlockSelected) {
        if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) {
          showNavigationMenuPermissionsNotice(
            (0, import_i18n141.__)(
              "You do not have permission to edit this Menu. Any changes made will not be saved."
            )
          );
        }
        if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) {
          showNavigationMenuPermissionsNotice(
            (0, import_i18n141.__)(
              "You do not have permission to create Navigation Menus."
            )
          );
        }
      }
    }, [
      isSelected,
      isInnerBlockSelected,
      canUserUpdateNavigationMenu,
      hasResolvedCanUserUpdateNavigationMenu,
      canUserCreateNavigationMenus,
      hasResolvedCanUserCreateNavigationMenus,
      ref,
      hideNavigationMenuPermissionsNotice,
      showNavigationMenuPermissionsNotice,
      navMenuResolvedButMissing
    ]);
    const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu;
    const overlayMenuPreviewClasses = clsx_default(
      "wp-block-navigation__overlay-menu-preview",
      { open: overlayMenuPreview }
    );
    const submenuAccessibilityNotice = !showSubmenuIcon && submenuVisibility !== "click" && submenuVisibility !== "always" ? (0, import_i18n141.__)(
      'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'
    ) : "";
    const isFirstRender = (0, import_element106.useRef)(true);
    (0, import_element106.useEffect)(() => {
      if (!isFirstRender.current && submenuAccessibilityNotice) {
        (0, import_a11y2.speak)(submenuAccessibilityNotice);
      }
      isFirstRender.current = false;
    }, [submenuAccessibilityNotice]);
    const overlayMenuPreviewId = (0, import_compose41.useInstanceId)(
      OverlayMenuPreview,
      `overlay-menu-preview`
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const stylingInspectorControls = /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor155.InspectorControls, { children: hasSubmenus && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        import_components92.__experimentalToolsPanel,
        {
          label: (0, import_i18n141.__)("Display"),
          resetAll: () => {
            setAttributes({
              showSubmenuIcon: true,
              submenuVisibility: "hover",
              overlayMenu: "mobile",
              hasIcon: true,
              icon: "handle"
            });
          },
          dropdownMenuProps,
          children: hasSubmenus && /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("h3", { className: "wp-block-navigation__submenu-header", children: (0, import_i18n141.__)("Submenus") }),
            /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
              import_components92.__experimentalToolsPanelItem,
              {
                hasValue: () => submenuVisibility !== "hover",
                label: (0, import_i18n141.__)("Submenu Visibility"),
                onDeselect: () => setAttributes({
                  submenuVisibility: "hover"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
                  import_components92.__experimentalToggleGroupControl,
                  {
                    label: (0, import_i18n141.__)("Submenu Visibility"),
                    value: submenuVisibility,
                    onChange: (value) => {
                      const newAttributes = {
                        submenuVisibility: value
                      };
                      const prevSubmenuVisibility = submenuVisibility;
                      if (value === "always") {
                        newAttributes.showSubmenuIcon = false;
                      } else if (value === "click" || prevSubmenuVisibility === "always") {
                        newAttributes.showSubmenuIcon = true;
                      }
                      setAttributes(newAttributes);
                    },
                    isBlock: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                        import_components92.__experimentalToggleGroupControlOption,
                        {
                          value: "hover",
                          label: (0, import_i18n141.__)("Hover")
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                        import_components92.__experimentalToggleGroupControlOption,
                        {
                          value: "click",
                          label: (0, import_i18n141.__)("Click")
                        }
                      ),
                      orientation === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                        import_components92.__experimentalToggleGroupControlOption,
                        {
                          value: "always",
                          label: (0, import_i18n141.__)("Always")
                        }
                      )
                    ]
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
              import_components92.__experimentalToolsPanelItem,
              {
                hasValue: () => !showSubmenuIcon,
                label: (0, import_i18n141.__)("Show arrow"),
                onDeselect: () => setAttributes({
                  showSubmenuIcon: true
                }),
                isDisabled: submenuVisibility === "click" || submenuVisibility === "always",
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  import_components92.ToggleControl,
                  {
                    checked: showSubmenuIcon,
                    onChange: (value) => {
                      setAttributes({
                        showSubmenuIcon: value
                      });
                    },
                    disabled: submenuVisibility === "click" || submenuVisibility === "always",
                    label: (0, import_i18n141.__)("Show arrow")
                  }
                )
              }
            ),
            submenuAccessibilityNotice && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
              import_components92.Notice,
              {
                spokenMessage: null,
                status: "warning",
                isDismissible: false,
                className: "wp-block-navigation__submenu-accessibility-notice",
                children: submenuAccessibilityNotice
              }
            )
          ] })
        }
      ) }),
      !isWithinOverlay && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor155.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        OverlayPanel,
        {
          overlayMenu,
          overlay,
          setAttributes,
          onNavigateToEntityRecord,
          overlayMenuPreview,
          setOverlayMenuPreview,
          hasIcon,
          icon: icon2,
          overlayMenuPreviewClasses,
          overlayMenuPreviewId,
          isResponsive,
          currentTheme,
          hasOverlays
        }
      ) }),
      !hasSelectedStyleState && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor155.InspectorControls, { group: "color", children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        ColorTools,
        {
          textColor,
          setTextColor,
          backgroundColor,
          setBackgroundColor,
          overlayTextColor,
          setOverlayTextColor,
          overlayBackgroundColor,
          setOverlayBackgroundColor,
          clientId,
          navRef,
          hasCustomOverlay: !!overlay
        }
      ) })
    ] });
    const accessibleDescriptionId = `${clientId}-desc`;
    const isHiddenByDefault = "always" === overlayMenu;
    const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus;
    if (hasUnsavedBlocks && !isCreatingNavigationMenu) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          menu_inspector_controls_default,
          {
            clientId,
            createNavigationMenuIsSuccess,
            createNavigationMenuIsError,
            currentMenuId: ref,
            isNavigationMenuMissing,
            isManageMenusButtonDisabled,
            onCreateNew: createUntitledEmptyNavigationMenu,
            onSelectClassicMenu,
            onSelectNavigationMenu,
            isLoading,
            blockEditingMode
          }
        ),
        blockEditingMode === "default" && stylingInspectorControls,
        /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
          TagName2,
          {
            ...blockProps,
            "aria-describedby": !isPlaceholder ? accessibleDescriptionId : void 0,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(AccessibleDescription, { id: accessibleDescriptionId, children: (0, import_i18n141.__)("Unsaved Navigation Menu.") }),
              /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                ResponsiveWrapper,
                {
                  id: clientId,
                  onToggle: setResponsiveMenuVisibility,
                  isOpen: isResponsiveMenuOpen,
                  hasIcon,
                  icon: icon2,
                  isResponsive,
                  isHiddenByDefault,
                  overlayBackgroundColor,
                  overlayTextColor,
                  overlay,
                  onNavigateToEntityRecord,
                  children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                    UnsavedInnerBlocks,
                    {
                      createNavigationMenu,
                      blocks: uncontrolledInnerBlocks,
                      hasSelection: isSelected || isInnerBlockSelected
                    }
                  )
                }
              )
            ]
          }
        )
      ] });
    }
    if (ref && isNavigationMenuMissing) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          menu_inspector_controls_default,
          {
            clientId,
            createNavigationMenuIsSuccess,
            createNavigationMenuIsError,
            currentMenuId: ref,
            isNavigationMenuMissing,
            isManageMenusButtonDisabled,
            onCreateNew: createUntitledEmptyNavigationMenu,
            onSelectClassicMenu,
            onSelectNavigationMenu,
            isLoading,
            blockEditingMode
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
          deleted_navigation_warning_default,
          {
            onCreateNew: createUntitledEmptyNavigationMenu
          }
        ) })
      ] });
    }
    if (isEntityAvailable && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_block_editor155.Warning, { children: (0, import_i18n141.__)("Block cannot be rendered inside itself.") }) });
    }
    const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder;
    if (isPlaceholder && CustomPlaceholder) {
      return /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        PlaceholderComponent,
        {
          isSelected,
          currentMenuId: ref,
          clientId,
          canUserCreateNavigationMenus,
          isResolvingCanUserCreateNavigationMenus,
          onSelectNavigationMenu,
          onSelectClassicMenu,
          onCreateEmpty: createUntitledEmptyNavigationMenu
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
        menu_inspector_controls_default,
        {
          clientId,
          createNavigationMenuIsSuccess,
          createNavigationMenuIsError,
          currentMenuId: ref,
          isNavigationMenuMissing,
          isManageMenusButtonDisabled,
          onCreateNew: createUntitledEmptyNavigationMenu,
          onSelectClassicMenu,
          onSelectNavigationMenu,
          isLoading,
          blockEditingMode
        }
      ),
      blockEditingMode === "default" && stylingInspectorControls,
      /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_core_data53.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref, children: /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_block_editor155.RecursionProvider, { uniqueId: recursionId, children: [
        blockEditingMode === "contentOnly" && isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(NavigationAddPageButton, { clientId }),
        blockEditingMode === "default" && isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_block_editor155.InspectorControls, { group: "advanced", children: [
          hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(NavigationMenuNameControl, {}),
          hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
            NavigationMenuDeleteControl,
            {
              onDelete: () => {
                replaceInnerBlocks(clientId, []);
                showNavigationMenuStatusNotice(
                  (0, import_i18n141.__)(
                    "Navigation Menu successfully deleted."
                  )
                );
              }
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
            manage_menus_button_default,
            {
              disabled: isManageMenusButtonDisabled,
              className: "wp-block-navigation-manage-menus-button"
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(
          TagName2,
          {
            ...blockProps,
            "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : void 0,
            children: [
              isLoading && !isHiddenByDefault && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)("div", { className: "wp-block-navigation__loading-indicator-container", children: /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(import_components92.Spinner, { className: "wp-block-navigation__loading-indicator" }) }),
              (!isLoading || isHiddenByDefault) && /* @__PURE__ */ (0, import_jsx_runtime366.jsxs)(import_jsx_runtime366.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  AccessibleMenuDescription,
                  {
                    id: accessibleDescriptionId
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                  ResponsiveWrapper,
                  {
                    id: clientId,
                    onToggle: setResponsiveMenuVisibility,
                    hasIcon,
                    icon: icon2,
                    isOpen: isResponsiveMenuOpen,
                    isResponsive,
                    isHiddenByDefault,
                    overlayBackgroundColor,
                    overlayTextColor,
                    overlay,
                    onNavigateToEntityRecord,
                    children: isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime366.jsx)(
                      NavigationInnerBlocks,
                      {
                        clientId,
                        hasCustomPlaceholder: !!CustomPlaceholder,
                        templateLock,
                        orientation
                      }
                    )
                  }
                )
              ] })
            ]
          }
        )
      ] }) })
    ] });
  }
  var edit_default16 = (0, import_block_editor155.withColors)(
    { textColor: "color" },
    { backgroundColor: "color" },
    { overlayBackgroundColor: "color" },
    { overlayTextColor: "color" }
  )(Navigation);

  // packages/block-library/build-module/navigation/save.mjs
  var import_block_editor156 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime367 = __toESM(require_jsx_runtime(), 1);
  function save29({ attributes: attributes2 }) {
    if (attributes2.ref) {
      return;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime367.jsx)(import_block_editor156.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation/deprecated.mjs
  var import_block_editor157 = __toESM(require_block_editor(), 1);
  var import_compose42 = __toESM(require_compose(), 1);
  var import_jsx_runtime368 = __toESM(require_jsx_runtime(), 1);
  var TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
    fontStyle: "var:preset|font-style|",
    fontWeight: "var:preset|font-weight|",
    textDecoration: "var:preset|text-decoration|",
    textTransform: "var:preset|text-transform|"
  };
  var migrateIdToRef = ({ navigationMenuId, ...attributes2 }) => {
    return {
      ...attributes2,
      ref: navigationMenuId
    };
  };
  var migrateWithLayout2 = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { itemsJustification, orientation, ...updatedAttributes } = attributes2;
    if (itemsJustification || orientation) {
      Object.assign(updatedAttributes, {
        layout: {
          type: "flex",
          ...itemsJustification && {
            justifyContent: itemsJustification
          },
          ...orientation && { orientation }
        }
      });
    }
    return updatedAttributes;
  };
  var migrateOpenSubmenusOnClick = (attributes2) => {
    const { openSubmenusOnClick, ...restAttributes } = attributes2;
    if (openSubmenusOnClick === null || openSubmenusOnClick === void 0) {
      return attributes2;
    }
    return {
      ...restAttributes,
      submenuVisibility: restAttributes.submenuVisibility ?? (openSubmenusOnClick ? "click" : "hover")
    };
  };
  var v75 = {
    attributes: {
      ref: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      icon: {
        type: "string",
        default: "handle"
      },
      hasIcon: {
        type: "boolean",
        default: true
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      },
      maxNestingLevel: {
        type: "number",
        default: 5
      },
      templateLock: {
        type: ["string", "boolean"],
        enum: ["all", "insert", "contentOnly", false]
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalSkipSerialization: ["textDecoration"],
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        allowSizingOnChildren: true,
        default: {
          type: "flex"
        }
      },
      interactivity: true,
      renaming: false
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
    },
    isEligible: ({ openSubmenusOnClick }) => openSubmenusOnClick !== null && openSubmenusOnClick !== void 0,
    migrate: migrateOpenSubmenusOnClick
  };
  var v66 = {
    attributes: {
      navigationMenuId: {
        type: "number"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      overlayMenu: {
        type: "string",
        default: "mobile"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
    },
    isEligible: ({ navigationMenuId }) => !!navigationMenuId,
    migrate: migrateIdToRef
  };
  var v56 = {
    attributes: {
      navigationMenuId: {
        type: "number"
      },
      orientation: {
        type: "string",
        default: "horizontal"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      itemsJustification: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "never"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
    },
    isEligible: ({ itemsJustification, orientation }) => !!itemsJustification || !!orientation,
    migrate: (0, import_compose42.compose)(
      migrateIdToRef,
      migrateWithLayout2,
      migrateOpenSubmenusOnClick
    )
  };
  var v46 = {
    attributes: {
      orientation: {
        type: "string",
        default: "horizontal"
      },
      textColor: {
        type: "string"
      },
      customTextColor: {
        type: "string"
      },
      rgbTextColor: {
        type: "string"
      },
      backgroundColor: {
        type: "string"
      },
      customBackgroundColor: {
        type: "string"
      },
      rgbBackgroundColor: {
        type: "string"
      },
      itemsJustification: {
        type: "string"
      },
      showSubmenuIcon: {
        type: "boolean",
        default: true
      },
      openSubmenusOnClick: {
        type: "boolean",
        default: false
      },
      overlayMenu: {
        type: "string",
        default: "never"
      },
      __unstableLocation: {
        type: "string"
      },
      overlayBackgroundColor: {
        type: "string"
      },
      customOverlayBackgroundColor: {
        type: "string"
      },
      overlayTextColor: {
        type: "string"
      },
      customOverlayTextColor: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      inserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true
      },
      spacing: {
        blockGap: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true
        }
      }
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
    },
    migrate: (0, import_compose42.compose)(
      migrateIdToRef,
      migrateWithLayout2,
      migrate_font_family_default,
      migrateOpenSubmenusOnClick
    ),
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var migrateIsResponsive = function(attributes2) {
    delete attributes2.isResponsive;
    return {
      ...attributes2,
      overlayMenu: "mobile"
    };
  };
  var migrateTypographyPresets = function(attributes2) {
    return {
      ...attributes2,
      style: {
        ...attributes2.style,
        typography: Object.fromEntries(
          Object.entries(attributes2.style.typography ?? {}).map(
            ([key, value]) => {
              const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[key];
              if (prefix && value.startsWith(prefix)) {
                const newValue = value.slice(prefix.length);
                if ("textDecoration" === key && "strikethrough" === newValue) {
                  return [key, "line-through"];
                }
                return [key, newValue];
              }
              return [key, value];
            }
          )
        )
      }
    };
  };
  var deprecated11 = [
    v75,
    v66,
    v56,
    v46,
    // Remove `isResponsive` attribute.
    {
      attributes: {
        orientation: {
          type: "string",
          default: "horizontal"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean",
          default: true
        },
        openSubmenusOnClick: {
          type: "boolean",
          default: false
        },
        isResponsive: {
          type: "boolean",
          default: "false"
        },
        __unstableLocation: {
          type: "string"
        },
        overlayBackgroundColor: {
          type: "string"
        },
        customOverlayBackgroundColor: {
          type: "string"
        },
        overlayTextColor: {
          type: "string"
        },
        customOverlayTextColor: {
          type: "string"
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true,
        typography: {
          fontSize: true,
          lineHeight: true,
          __experimentalFontStyle: true,
          __experimentalFontWeight: true,
          __experimentalTextTransform: true,
          __experimentalFontFamily: true,
          __experimentalTextDecoration: true
        }
      },
      isEligible(attributes2) {
        return attributes2.isResponsive;
      },
      migrate: (0, import_compose42.compose)(
        migrateIdToRef,
        migrateWithLayout2,
        migrate_font_family_default,
        migrateIsResponsive,
        migrateOpenSubmenusOnClick
      ),
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
      }
    },
    {
      attributes: {
        orientation: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        customTextColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean",
          default: true
        }
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true,
        fontSize: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalTextTransform: true,
        color: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true
      },
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
      },
      isEligible(attributes2) {
        if (!attributes2.style || !attributes2.style.typography) {
          return false;
        }
        for (const styleAttribute in TYPOGRAPHY_PRESET_DEPRECATION_MAP) {
          const attributeValue = attributes2.style.typography[styleAttribute];
          if (attributeValue && attributeValue.startsWith(
            TYPOGRAPHY_PRESET_DEPRECATION_MAP[styleAttribute]
          )) {
            return true;
          }
        }
        return false;
      },
      migrate: (0, import_compose42.compose)(
        migrateIdToRef,
        migrateWithLayout2,
        migrate_font_family_default,
        migrateTypographyPresets
      )
    },
    {
      attributes: {
        className: {
          type: "string"
        },
        textColor: {
          type: "string"
        },
        rgbTextColor: {
          type: "string"
        },
        backgroundColor: {
          type: "string"
        },
        rgbBackgroundColor: {
          type: "string"
        },
        fontSize: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        },
        itemsJustification: {
          type: "string"
        },
        showSubmenuIcon: {
          type: "boolean"
        }
      },
      isEligible(attribute) {
        return attribute.rgbTextColor || attribute.rgbBackgroundColor;
      },
      supports: {
        align: ["wide", "full"],
        anchor: true,
        html: false,
        inserter: true
      },
      migrate: (0, import_compose42.compose)(migrateIdToRef, (attributes2) => {
        const { rgbTextColor, rgbBackgroundColor, ...restAttributes } = attributes2;
        return {
          ...restAttributes,
          customTextColor: attributes2.textColor ? void 0 : attributes2.rgbTextColor,
          customBackgroundColor: attributes2.backgroundColor ? void 0 : attributes2.rgbBackgroundColor
        };
      }),
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(import_block_editor157.InnerBlocks.Content, {});
      }
    }
  ];
  var deprecated_default26 = deprecated11;

  // packages/block-library/build-module/navigation/index.mjs
  var { name: name50 } = block_default50;
  var settings50 = {
    icon: navigation_default,
    example: {
      attributes: {
        overlayMenu: "never"
      },
      innerBlocks: [
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'Home' as in a website's home page.
            label: (0, import_i18n142.__)("Home"),
            url: "https://make.wordpress.org/"
          }
        },
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'About' as in a website's about page.
            label: (0, import_i18n142.__)("About"),
            url: "https://make.wordpress.org/"
          }
        },
        {
          name: "core/navigation-link",
          attributes: {
            // translators: 'Contact' as in a website's contact page.
            label: (0, import_i18n142.__)("Contact"),
            url: "https://make.wordpress.org/"
          }
        }
      ]
    },
    edit: edit_default16,
    save: save29,
    __experimentalLabel: ({ ref }) => {
      if (!ref) {
        return;
      }
      const navigation = (0, import_data90.select)(import_core_data54.store).getEditedEntityRecord(
        "postType",
        "wp_navigation",
        ref
      );
      if (!navigation?.title) {
        return;
      }
      return (0, import_html_entities7.decodeEntities)(navigation.title);
    },
    deprecated: deprecated_default26
  };
  var init50 = () => initBlock({ name: name50, metadata: block_default50, settings: settings50 });

  // packages/block-library/build-module/navigation-link/index.mjs
  var navigation_link_exports = {};
  __export(navigation_link_exports, {
    init: () => init51,
    metadata: () => block_default51,
    name: () => name51,
    settings: () => settings51
  });
  var import_i18n145 = __toESM(require_i18n(), 1);
  var import_hooks40 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/navigation-link/deprecated.mjs
  var import_block_editor158 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime369 = __toESM(require_jsx_runtime(), 1);
  var deprecated12 = [
    {
      isEligible(attributes2) {
        return attributes2.nofollow;
      },
      attributes: {
        label: {
          type: "string"
        },
        type: {
          type: "string"
        },
        nofollow: {
          type: "boolean"
        },
        description: {
          type: "string"
        },
        id: {
          type: "number"
        },
        opensInNewTab: {
          type: "boolean",
          default: false
        },
        url: {
          type: "string"
        }
      },
      migrate({ nofollow, ...rest }) {
        return {
          rel: nofollow ? "nofollow" : "",
          ...rest
        };
      },
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime369.jsx)(import_block_editor158.InnerBlocks.Content, {});
      }
    }
  ];
  var deprecated_default27 = deprecated12;

  // packages/block-library/build-module/navigation-link/block.json
  var block_default51 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-link",
    title: "Navigation Link",
    category: "design",
    parent: ["core/navigation"],
    allowedBlocks: [
      "core/navigation-link",
      "core/navigation-submenu",
      "core/page-list"
    ],
    description: "Add a page, link, or another item to your navigation.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      type: {
        type: "string"
      },
      description: {
        type: "string"
      },
      rel: {
        type: "string"
      },
      id: {
        type: "number"
      },
      opensInNewTab: {
        type: "boolean",
        default: false
      },
      url: {
        type: "string",
        role: "content"
      },
      title: {
        type: "string"
      },
      kind: {
        type: "string"
      },
      isTopLevelLink: {
        type: "boolean"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "maxNestingLevel",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      __experimentalSlashInserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      renaming: false,
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      states: {
        "-current": ".wp-block-navigation .current-menu-item"
      }
    },
    editorStyle: "wp-block-navigation-link-editor",
    style: "wp-block-navigation-link"
  };

  // packages/block-library/build-module/navigation-link/edit.mjs
  var import_blocks54 = __toESM(require_blocks(), 1);
  var import_data91 = __toESM(require_data(), 1);
  var import_components93 = __toESM(require_components(), 1);
  var import_keycodes6 = __toESM(require_keycodes(), 1);
  var import_i18n143 = __toESM(require_i18n(), 1);
  var import_block_editor159 = __toESM(require_block_editor(), 1);
  var import_url19 = __toESM(require_url(), 1);
  var import_element107 = __toESM(require_element(), 1);
  var import_compose43 = __toESM(require_compose(), 1);
  var import_jsx_runtime370 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_BLOCK6 = { name: "core/navigation-link" };
  var NESTING_BLOCK_NAMES = [
    "core/navigation-link",
    "core/navigation-submenu"
  ];
  function getMissingText(type) {
    let missingText = "";
    switch (type) {
      case "post":
        missingText = (0, import_i18n143.__)("Select post");
        break;
      case "page":
        missingText = (0, import_i18n143.__)("Select page");
        break;
      case "category":
        missingText = (0, import_i18n143.__)("Select category");
        break;
      case "tag":
        missingText = (0, import_i18n143.__)("Select tag");
        break;
      default:
        missingText = (0, import_i18n143.__)("Add link");
    }
    return missingText;
  }
  function NavigationLinkEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    insertBlocksAfter,
    mergeBlocks,
    onReplace,
    context,
    clientId
  }) {
    const { id, label, type, url, description, kind, metadata } = attributes2;
    const { maxNestingLevel } = context;
    const {
      replaceBlock,
      __unstableMarkNextChangeAsNotPersistent,
      selectBlock
    } = (0, import_data91.useDispatch)(import_block_editor159.store);
    const [isLinkOpen, setIsLinkOpen] = (0, import_element107.useState)(isSelected && !url);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element107.useState)(null);
    const listItemRef = (0, import_element107.useRef)(null);
    const isDraggingWithin = useIsDraggingWithin(listItemRef);
    const itemLabelPlaceholder = (0, import_i18n143.__)("Add label\u2026");
    const ref = (0, import_element107.useRef)();
    const linkUIref = (0, import_element107.useRef)();
    const isNewLink = (0, import_element107.useRef)(label === void 0);
    const shouldSelectSubmenuAppenderOnClose = (0, import_element107.useRef)(false);
    const {
      isAtMaxNesting,
      isTopLevelLink,
      isParentOfSelectedBlock,
      hasChildren,
      parentBlockClientId,
      isSubmenu
    } = (0, import_data91.useSelect)(
      (select10) => {
        const {
          getBlockCount,
          getBlockName,
          getBlockRootClientId,
          hasSelectedInnerBlock,
          getBlockParentsByBlockName
        } = select10(import_block_editor159.store);
        const rootClientId = getBlockRootClientId(clientId);
        const parentBlockName = getBlockName(rootClientId);
        const isTopLevel = parentBlockName === "core/navigation";
        const rootNavigationClientId = isTopLevel ? rootClientId : getBlockParentsByBlockName(
          clientId,
          "core/navigation"
        )[0];
        const parentBlockId = parentBlockName === "core/navigation-submenu" ? rootClientId : rootNavigationClientId;
        return {
          isAtMaxNesting: getBlockParentsByBlockName(clientId, NESTING_BLOCK_NAMES).length >= maxNestingLevel,
          isTopLevelLink: isTopLevel,
          isParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            true
          ),
          hasChildren: !!getBlockCount(clientId),
          parentBlockClientId: parentBlockId,
          isSubmenu: parentBlockName === "core/navigation-submenu"
        };
      },
      [clientId, maxNestingLevel]
    );
    const validateLinkStatus = useEnableLinkStatusValidation(clientId);
    const { getBlocks } = (0, import_data91.useSelect)(import_block_editor159.store);
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes,
      allowTextUpdate: true
    });
    const [isInvalid, isDraft] = useIsInvalidLink(
      kind,
      type,
      id,
      validateLinkStatus
    );
    const transformToSubmenu = (0, import_element107.useCallback)(() => {
      let innerBlocks = getBlocks(clientId);
      if (innerBlocks.length === 0) {
        innerBlocks = [(0, import_blocks54.createBlock)("core/navigation-link")];
        selectBlock(innerBlocks[0].clientId);
      }
      const newSubmenu = (0, import_blocks54.createBlock)(
        "core/navigation-submenu",
        attributes2,
        innerBlocks
      );
      replaceBlock(clientId, newSubmenu);
    }, [getBlocks, clientId, selectBlock, replaceBlock, attributes2]);
    (0, import_element107.useEffect)(() => {
      if (isNewLink.current && isSelected) {
        selectBlock(parentBlockClientId);
      }
    }, []);
    (0, import_element107.useEffect)(() => {
      if (hasChildren) {
        __unstableMarkNextChangeAsNotPersistent();
        transformToSubmenu();
      }
    }, [
      hasChildren,
      __unstableMarkNextChangeAsNotPersistent,
      transformToSubmenu
    ]);
    (0, import_element107.useEffect)(() => {
      if (!isNewLink.current || !url || !isLinkOpen) {
        return;
      }
      isNewLink.current = false;
      if ((0, import_url19.isURL)((0, import_url19.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
        selectLabelText(ref);
      } else {
        selectBlock(clientId, null);
        if (isSubmenu) {
          const parentBlocks = getBlocks(parentBlockClientId);
          if (parentBlocks.length === 1 && parentBlocks[0].clientId === clientId) {
            shouldSelectSubmenuAppenderOnClose.current = true;
          }
        }
      }
    }, [url, isLinkOpen, isNewLink, label]);
    function removeLink() {
      setAttributes({
        url: void 0,
        label: void 0,
        id: void 0,
        kind: void 0,
        type: void 0,
        opensInNewTab: false
      });
      setIsLinkOpen(false);
    }
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor
    } = getColors(context, !isTopLevelLink);
    function onKeyDown(event) {
      if (import_keycodes6.isKeyboardEvent.primary(event, "k")) {
        event.preventDefault();
        event.stopPropagation();
        setIsLinkOpen(true);
      }
    }
    const instanceId = (0, import_compose43.useInstanceId)(NavigationLinkEdit);
    const hasMissingEntity = hasUrlBinding && !isBoundEntityAvailable;
    const missingEntityDescriptionId = hasMissingEntity ? (0, import_i18n143.sprintf)("navigation-link-edit-%d-desc", instanceId) : void 0;
    const blockProps = (0, import_block_editor159.useBlockProps)({
      ref: (0, import_compose43.useMergeRefs)([setPopoverAnchor, listItemRef]),
      className: clsx_default("wp-block-navigation-item", {
        "is-editing": isSelected || isParentOfSelectedBlock,
        "is-dragging-within": isDraggingWithin,
        "has-link": !!url,
        "has-child": hasChildren,
        "has-text-color": !!textColor || !!customTextColor,
        [(0, import_block_editor159.getColorClassName)("color", textColor)]: !!textColor,
        "has-background": !!backgroundColor || customBackgroundColor,
        [(0, import_block_editor159.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor
      }),
      "aria-describedby": missingEntityDescriptionId,
      "aria-invalid": hasMissingEntity,
      style: {
        color: !textColor && customTextColor,
        backgroundColor: !backgroundColor && customBackgroundColor
      },
      onKeyDown
    });
    const innerBlocksProps = (0, import_block_editor159.useInnerBlocksProps)(
      {
        className: "remove-outline"
        // Remove the outline from the inner blocks container.
      },
      {
        defaultBlock: DEFAULT_BLOCK6,
        directInsert: true,
        renderAppender: false
      }
    );
    const needsValidLink = !url && !(hasUrlBinding && isBoundEntityAvailable) || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable;
    if (needsValidLink) {
      blockProps.onClick = () => {
        setIsLinkOpen(true);
      };
    }
    const classes = clsx_default("wp-block-navigation-item__content", {
      "wp-block-navigation-link__placeholder": needsValidLink
    });
    const missingText = getMissingText(type);
    const invalidLinkHelpText = getInvalidLinkHelpText();
    return /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor159.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_components93.ToolbarGroup, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
          import_components93.ToolbarButton,
          {
            name: "link",
            icon: link_default,
            title: (0, import_i18n143.__)("Link"),
            shortcut: import_keycodes6.displayShortcut.primary("k"),
            onClick: () => {
              setIsLinkOpen(true);
            }
          }
        ),
        !isAtMaxNesting && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
          import_components93.ToolbarButton,
          {
            name: "submenu",
            icon: add_submenu_default,
            title: (0, import_i18n143.__)("Add submenu"),
            onClick: transformToSubmenu
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(import_block_editor159.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
        Controls2,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)("div", { ...blockProps, children: [
        hasMissingEntity && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(VisuallyHidden, { id: missingEntityDescriptionId, children: invalidLinkHelpText }),
        /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)("a", { className: classes, children: [
          !url && !metadata?.bindings?.url ? /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("div", { className: "wp-block-navigation-link__placeholder-text", children: /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("span", { children: missingText }) }) : /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
            !isInvalid && !isDraft && /* @__PURE__ */ (0, import_jsx_runtime370.jsxs)(import_jsx_runtime370.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
                import_block_editor159.RichText,
                {
                  ref,
                  identifier: "label",
                  className: "wp-block-navigation-item__label",
                  value: label,
                  onChange: (labelValue) => setAttributes({
                    label: labelValue
                  }),
                  onMerge: mergeBlocks,
                  onReplace,
                  __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
                    (0, import_blocks54.createBlock)(
                      "core/navigation-link"
                    )
                  ) : void 0,
                  "aria-label": (0, import_i18n143.__)(
                    "Navigation link text"
                  ),
                  placeholder: itemLabelPlaceholder,
                  withoutInteractiveFormatting: true
                }
              ),
              description && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
            ] }),
            (isInvalid || isDraft) && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
              InvalidDraftDisplay,
              {
                label,
                isInvalid,
                isDraft,
                className: "wp-block-navigation-link__label"
              }
            )
          ] }),
          isLinkOpen && /* @__PURE__ */ (0, import_jsx_runtime370.jsx)(
            LinkUI,
            {
              ref: linkUIref,
              clientId,
              link: attributes2,
              entity: {
                entityRecord,
                hasBinding: hasUrlBinding,
                isEntityAvailable: isBoundEntityAvailable
              },
              onClose: () => {
                setIsLinkOpen(false);
                if (!url && !hasUrlBinding && onReplace) {
                  onReplace([]);
                  return;
                }
                if (shouldSelectSubmenuAppenderOnClose.current) {
                  shouldSelectSubmenuAppenderOnClose.current = false;
                  if (listItemRef.current?.nextElementSibling) {
                    const appenderButton = listItemRef.current.nextElementSibling.querySelector(
                      ".block-editor-button-block-appender"
                    );
                    if (appenderButton) {
                      appenderButton.focus();
                    }
                  }
                }
              },
              anchor: popoverAnchor,
              onRemove: removeLink,
              onChange: handleLinkChange
            }
          )
        ] }),
        /* @__PURE__ */ (0, import_jsx_runtime370.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }

  // packages/block-library/build-module/navigation-link/save.mjs
  var import_block_editor160 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime371 = __toESM(require_jsx_runtime(), 1);
  function save30() {
    return /* @__PURE__ */ (0, import_jsx_runtime371.jsx)(import_block_editor160.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation-link/hooks.mjs
  function getIcon(variationName) {
    switch (variationName) {
      case "post":
        return post_list_default;
      case "page":
        return page_default;
      case "tag":
        return tag_default;
      case "category":
        return category_default;
      default:
        return custom_post_type_default;
    }
  }
  function enhanceNavigationLinkVariations(settings117, name118) {
    if (name118 !== "core/navigation-link") {
      return settings117;
    }
    if (settings117.variations) {
      const isActive = (blockAttributes8, variationAttributes) => {
        return blockAttributes8.type === variationAttributes.type;
      };
      const variations19 = settings117.variations.map((variation) => {
        return {
          ...variation,
          ...!variation.icon && {
            icon: getIcon(variation.name)
          },
          ...!variation.isActive && {
            isActive
          }
        };
      });
      return {
        ...settings117,
        variations: variations19
      };
    }
    return settings117;
  }

  // packages/block-library/build-module/navigation-link/transforms.mjs
  var import_blocks55 = __toESM(require_blocks(), 1);
  var transforms18 = {
    from: [
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/page-list"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      },
      {
        type: "block",
        blocks: ["core/buttons"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/navigation-link");
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/navigation-submenu"],
        transform: (attributes2, innerBlocks) => (0, import_blocks55.createBlock)(
          "core/navigation-submenu",
          attributes2,
          innerBlocks
        )
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/spacer");
        }
      },
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/site-logo");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/home-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/social-links");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/search", {
            showLabel: false,
            buttonUseIcon: true,
            buttonPosition: "button-inside"
          });
        }
      },
      {
        type: "block",
        blocks: ["core/page-list"],
        transform: () => {
          return (0, import_blocks55.createBlock)("core/page-list");
        }
      },
      {
        type: "block",
        blocks: ["core/buttons"],
        transform: ({ label, url, rel, title, opensInNewTab }) => {
          return (0, import_blocks55.createBlock)("core/buttons", {}, [
            (0, import_blocks55.createBlock)("core/button", {
              text: label,
              url,
              rel,
              title,
              linkTarget: opensInNewTab ? "_blank" : void 0
            })
          ]);
        }
      }
    ]
  };
  var transforms_default19 = transforms18;

  // packages/block-library/build-module/navigation-link/variations.mjs
  var import_i18n144 = __toESM(require_i18n(), 1);
  var variations10 = [
    {
      name: "custom-link",
      title: (0, import_i18n144.__)("Custom Link"),
      description: (0, import_i18n144.__)("Add a custom link to your navigation."),
      icon: custom_link_default,
      attributes: {
        kind: "custom"
      },
      isActive: (blockAttributes8) => blockAttributes8.kind === "custom",
      isDefault: true,
      scope: ["inserter"]
    }
  ];
  var variations_default10 = variations10;

  // packages/block-library/build-module/navigation-link/index.mjs
  var { name: name51 } = block_default51;
  var settings51 = {
    icon: custom_link_default,
    __experimentalLabel(attributes2, { context }) {
      if (context === "list-view") {
        return attributes2?.label;
      }
      if (context === "appender") {
        const type = attributes2?.type || "link";
        return (0, import_i18n145.sprintf)(
          /* translators: %s: block type (e.g., 'page', 'post', 'category') */
          (0, import_i18n145._x)("Add %s", "add default block type"),
          type
        );
      }
      return attributes2?.label;
    },
    merge(leftAttributes, { label: rightLabel = "" }) {
      return {
        ...leftAttributes,
        label: leftAttributes.label + rightLabel
      };
    },
    edit: NavigationLinkEdit,
    save: save30,
    example: {
      attributes: {
        label: (0, import_i18n145._x)("Example Link", "navigation link preview example"),
        url: "https://example.com"
      }
    },
    deprecated: deprecated_default27,
    transforms: transforms_default19,
    variations: variations_default10
  };
  var init51 = () => {
    (0, import_hooks40.addFilter)(
      "blocks.registerBlockType",
      "core/navigation-link",
      enhanceNavigationLinkVariations
    );
    return initBlock({ name: name51, metadata: block_default51, settings: settings51 });
  };

  // packages/block-library/build-module/navigation-submenu/index.mjs
  var navigation_submenu_exports = {};
  __export(navigation_submenu_exports, {
    init: () => init52,
    metadata: () => block_default52,
    name: () => name52,
    settings: () => settings52
  });
  var import_i18n147 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/navigation-submenu/block.json
  var block_default52 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-submenu",
    title: "Submenu",
    category: "design",
    parent: ["core/navigation"],
    description: "Add a submenu to your navigation.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      type: {
        type: "string"
      },
      description: {
        type: "string"
      },
      rel: {
        type: "string"
      },
      id: {
        type: "number"
      },
      opensInNewTab: {
        type: "boolean",
        default: false
      },
      url: {
        type: "string",
        role: "content"
      },
      title: {
        type: "string"
      },
      kind: {
        type: "string"
      },
      isTopLevelItem: {
        type: "boolean"
      },
      isParentSubmenu: {
        type: "boolean",
        default: true
      }
    },
    providesContext: {
      "core/isInsideSubmenu": "isParentSubmenu"
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "maxNestingLevel",
      "openSubmenusOnClick",
      "submenuVisibility",
      "style"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: {
        __experimentalSkipSerialization: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      shadow: ".wp-block-navigation-submenu > .wp-block-navigation__submenu-container"
    },
    editorStyle: "wp-block-navigation-submenu-editor",
    style: "wp-block-navigation-submenu"
  };

  // packages/block-library/build-module/navigation-submenu/edit.mjs
  var import_data92 = __toESM(require_data(), 1);
  var import_components95 = __toESM(require_components(), 1);
  var import_keycodes7 = __toESM(require_keycodes(), 1);
  var import_i18n146 = __toESM(require_i18n(), 1);
  var import_block_editor161 = __toESM(require_block_editor(), 1);
  var import_url20 = __toESM(require_url(), 1);
  var import_element108 = __toESM(require_element(), 1);
  var import_a11y3 = __toESM(require_a11y(), 1);
  var import_blocks56 = __toESM(require_blocks(), 1);
  var import_compose44 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/navigation-submenu/icons.mjs
  var import_components94 = __toESM(require_components(), 1);
  var import_jsx_runtime372 = __toESM(require_jsx_runtime(), 1);
  var ItemSubmenuIcon = () => /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(
    import_components94.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      width: "12",
      height: "12",
      viewBox: "0 0 12 12",
      fill: "none",
      children: /* @__PURE__ */ (0, import_jsx_runtime372.jsx)(import_components94.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
    }
  );

  // packages/block-library/build-module/navigation-submenu/edit.mjs
  var import_jsx_runtime373 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_BLOCKS = [
    "core/navigation-link",
    "core/navigation-submenu",
    "core/page-list",
    "core/loginout"
  ];
  function NavigationSubmenuEdit({
    attributes: attributes2,
    isSelected,
    setAttributes,
    mergeBlocks,
    onReplace,
    context,
    clientId
  }) {
    const { label, url, description, kind, type, id } = attributes2;
    const { showSubmenuIcon, maxNestingLevel, submenuVisibility } = context;
    const blockEditingMode = (0, import_block_editor161.useBlockEditingMode)();
    const openSubmenusOnClick = blockEditingMode !== "default" ? true : submenuVisibility === "click";
    const { hasUrlBinding, isBoundEntityAvailable, entityRecord } = useEntityBinding({
      clientId,
      attributes: attributes2
    });
    const handleLinkChange = useHandleLinkChange({
      clientId,
      attributes: attributes2,
      setAttributes,
      allowTextUpdate: true
    });
    const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0, import_data92.useDispatch)(import_block_editor161.store);
    const [isLinkOpen, setIsLinkOpen] = (0, import_element108.useState)(false);
    const [popoverAnchor, setPopoverAnchor] = (0, import_element108.useState)(null);
    const listItemRef = (0, import_element108.useRef)(null);
    const isDraggingWithin = useIsDraggingWithin(listItemRef);
    const itemLabelPlaceholder = (0, import_i18n146.__)("Add text\u2026");
    const ref = (0, import_element108.useRef)();
    const {
      parentCount,
      isParentOfSelectedBlock,
      isImmediateParentOfSelectedBlock,
      hasChildren,
      selectedBlockHasChildren,
      onlyDescendantIsEmptyLink
    } = (0, import_data92.useSelect)(
      (select10) => {
        const {
          hasSelectedInnerBlock,
          getSelectedBlockClientId,
          getBlockParentsByBlockName,
          getBlock,
          getBlockCount,
          getBlockOrder
        } = select10(import_block_editor161.store);
        let _onlyDescendantIsEmptyLink;
        const selectedBlockId = getSelectedBlockClientId();
        const selectedBlockChildren = getBlockOrder(selectedBlockId);
        if (selectedBlockChildren?.length === 1) {
          const singleBlock = getBlock(selectedBlockChildren[0]);
          _onlyDescendantIsEmptyLink = singleBlock?.name === "core/navigation-link" && !singleBlock?.attributes?.label;
        }
        return {
          parentCount: getBlockParentsByBlockName(
            clientId,
            "core/navigation-submenu"
          ).length,
          isParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            true
          ),
          isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
            clientId,
            false
          ),
          hasChildren: !!getBlockCount(clientId),
          selectedBlockHasChildren: !!selectedBlockChildren?.length,
          onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink
        };
      },
      [clientId]
    );
    const validateLinkStatus = useEnableLinkStatusValidation(clientId);
    const prevHasChildren = (0, import_compose44.usePrevious)(hasChildren);
    const [isInvalid, isDraft] = useIsInvalidLink(
      kind,
      type,
      id,
      validateLinkStatus
    );
    (0, import_element108.useEffect)(() => {
      if (!openSubmenusOnClick && !url) {
        setIsLinkOpen(true);
      }
    }, []);
    (0, import_element108.useEffect)(() => {
      if (!isSelected) {
        setIsLinkOpen(false);
      }
    }, [isSelected]);
    (0, import_element108.useEffect)(() => {
      if (isLinkOpen && url) {
        if ((0, import_url20.isURL)((0, import_url20.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
          selectLabelText(ref);
        }
      }
    }, [url]);
    const {
      textColor,
      customTextColor,
      backgroundColor,
      customBackgroundColor
    } = getColors(context, parentCount > 0);
    function onKeyDown(event) {
      if (import_keycodes7.isKeyboardEvent.primary(event, "k")) {
        event.preventDefault();
        event.stopPropagation();
        setIsLinkOpen(true);
      }
    }
    const blockProps = (0, import_block_editor161.useBlockProps)({
      ref: (0, import_compose44.useMergeRefs)([setPopoverAnchor, listItemRef]),
      className: clsx_default("wp-block-navigation-item", {
        "is-editing": isSelected || isParentOfSelectedBlock,
        "is-dragging-within": isDraggingWithin,
        "has-link": !!url,
        "has-child": hasChildren,
        "has-text-color": !!textColor || !!customTextColor,
        [(0, import_block_editor161.getColorClassName)("color", textColor)]: !!textColor,
        "has-background": !!backgroundColor || customBackgroundColor,
        [(0, import_block_editor161.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor,
        "open-on-click": openSubmenusOnClick,
        "open-always": submenuVisibility === "always"
      }),
      style: {
        color: !textColor && customTextColor,
        backgroundColor: !backgroundColor && customBackgroundColor
      },
      onKeyDown
    });
    const innerBlocksColors = getColors(context, true);
    const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter(
      (blockName) => blockName !== "core/navigation-submenu"
    ) : ALLOWED_BLOCKS;
    const shadowProps = (0, import_block_editor161.__experimentalGetShadowClassesAndStyles)(attributes2);
    const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
    const submenuBlockProps = {
      ...navigationChildBlockProps,
      style: {
        ...navigationChildBlockProps.style,
        ...shadowProps.style
      }
    };
    const innerBlocksProps = (0, import_block_editor161.useInnerBlocksProps)(submenuBlockProps, {
      allowedBlocks,
      defaultBlock: DEFAULT_BLOCK5,
      directInsert: true,
      // Ensure block toolbar is not too far removed from item
      // being edited.
      // see: https://github.com/WordPress/gutenberg/pull/34615.
      __experimentalCaptureToolbars: true,
      renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
      hasChildren ? import_block_editor161.InnerBlocks.ButtonBlockAppender : false
    });
    const ParentElement = openSubmenusOnClick ? "button" : "a";
    function transformToLink() {
      const newLinkBlock = (0, import_blocks56.createBlock)("core/navigation-link", attributes2);
      replaceBlock(clientId, newLinkBlock);
    }
    (0, import_element108.useEffect)(() => {
      if (!hasChildren && prevHasChildren) {
        __unstableMarkNextChangeAsNotPersistent();
        transformToLink();
      }
    }, [hasChildren, prevHasChildren]);
    const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
    return /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(import_jsx_runtime373.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_block_editor161.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(import_components95.ToolbarGroup, { children: [
        !openSubmenusOnClick && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
          import_components95.ToolbarButton,
          {
            name: "link",
            icon: link_default,
            title: (0, import_i18n146.__)("Link"),
            shortcut: import_keycodes7.displayShortcut.primary("k"),
            onClick: () => {
              setIsLinkOpen(true);
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
          import_components95.ToolbarButton,
          {
            name: "revert",
            icon: remove_submenu_default,
            title: (0, import_i18n146.__)("Convert to Link"),
            onClick: transformToLink,
            className: "wp-block-navigation__submenu__revert",
            disabled: !canConvertToLink
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(import_block_editor161.InspectorControls, { group: "content", children: /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
        Controls2,
        {
          attributes: attributes2,
          setAttributes,
          clientId,
          isLinkEditable: !openSubmenusOnClick
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)("div", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(ParentElement, { className: "wp-block-navigation-item__content", children: [
          !isInvalid && !isDraft && /* @__PURE__ */ (0, import_jsx_runtime373.jsxs)(import_jsx_runtime373.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
              import_block_editor161.RichText,
              {
                ref,
                identifier: "label",
                className: "wp-block-navigation-item__label",
                value: label,
                onChange: (labelValue) => setAttributes({ label: labelValue }),
                onMerge: mergeBlocks,
                onReplace,
                "aria-label": (0, import_i18n146.__)("Navigation link text"),
                placeholder: itemLabelPlaceholder,
                withoutInteractiveFormatting: true,
                onClick: () => {
                  if (!openSubmenusOnClick && !url) {
                    setIsLinkOpen(true);
                  }
                }
              }
            ),
            description && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
          ] }),
          (isInvalid || isDraft) && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
            InvalidDraftDisplay,
            {
              label,
              isInvalid,
              isDraft,
              className: "wp-block-navigation-item__label"
            }
          ),
          !openSubmenusOnClick && isLinkOpen && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(
            LinkUI,
            {
              clientId,
              link: attributes2,
              entity: {
                entityRecord,
                hasBinding: hasUrlBinding,
                isEntityAvailable: isBoundEntityAvailable
              },
              onClose: () => {
                setIsLinkOpen(false);
              },
              anchor: popoverAnchor,
              onRemove: () => {
                setAttributes({ url: "" });
                (0, import_a11y3.speak)((0, import_i18n146.__)("Link removed."), "assertive");
              },
              onChange: handleLinkChange
            }
          )
        ] }),
        (showSubmenuIcon || openSubmenusOnClick) && /* @__PURE__ */ (0, import_jsx_runtime373.jsx)("span", { className: "wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0, import_jsx_runtime373.jsx)(ItemSubmenuIcon, {}) }),
        /* @__PURE__ */ (0, import_jsx_runtime373.jsx)("div", { ...innerBlocksProps })
      ] })
    ] });
  }

  // packages/block-library/build-module/navigation-submenu/save.mjs
  var import_block_editor162 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime374 = __toESM(require_jsx_runtime(), 1);
  function save31() {
    return /* @__PURE__ */ (0, import_jsx_runtime374.jsx)(import_block_editor162.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/navigation-submenu/transforms.mjs
  var import_blocks57 = __toESM(require_blocks(), 1);
  var transforms19 = {
    to: [
      {
        type: "block",
        blocks: ["core/navigation-link"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: (attributes2) => (0, import_blocks57.createBlock)("core/navigation-link", attributes2)
      },
      {
        type: "block",
        blocks: ["core/spacer"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks57.createBlock)("core/spacer");
        }
      },
      {
        type: "block",
        blocks: ["core/site-logo"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks57.createBlock)("core/site-logo");
        }
      },
      {
        type: "block",
        blocks: ["core/home-link"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks57.createBlock)("core/home-link");
        }
      },
      {
        type: "block",
        blocks: ["core/social-links"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks57.createBlock)("core/social-links");
        }
      },
      {
        type: "block",
        blocks: ["core/search"],
        isMatch: (attributes2, block) => block?.innerBlocks?.length === 0,
        transform: () => {
          return (0, import_blocks57.createBlock)("core/search");
        }
      }
    ]
  };
  var transforms_default20 = transforms19;

  // packages/block-library/build-module/navigation-submenu/index.mjs
  var { name: name52 } = block_default52;
  var settings52 = {
    icon: ({ context }) => {
      if (context === "list-view") {
        return page_default;
      }
      return add_submenu_default;
    },
    __experimentalLabel(attributes2, { context }) {
      const { label } = attributes2;
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      return label;
    },
    edit: NavigationSubmenuEdit,
    example: {
      attributes: {
        label: (0, import_i18n147._x)("About", "Example link text for Navigation Submenu"),
        type: "page"
      }
    },
    save: save31,
    transforms: transforms_default20
  };
  var init52 = () => initBlock({ name: name52, metadata: block_default52, settings: settings52 });

  // packages/block-library/build-module/nextpage/index.mjs
  var nextpage_exports = {};
  __export(nextpage_exports, {
    init: () => init53,
    metadata: () => block_default53,
    name: () => name53,
    settings: () => settings53
  });

  // packages/block-library/build-module/nextpage/edit.mjs
  var import_i18n148 = __toESM(require_i18n(), 1);
  var import_block_editor163 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime375 = __toESM(require_jsx_runtime(), 1);
  function NextPageEdit() {
    return /* @__PURE__ */ (0, import_jsx_runtime375.jsx)("div", { ...(0, import_block_editor163.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime375.jsx)("span", { children: (0, import_i18n148.__)("Page break") }) });
  }

  // packages/block-library/build-module/nextpage/block.json
  var block_default53 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/nextpage",
    title: "Page Break",
    category: "design",
    description: "Separate your content into a multi-page experience.",
    keywords: ["next page", "pagination"],
    parent: ["core/post-content"],
    textdomain: "default",
    supports: {
      customClassName: false,
      className: false,
      html: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false
    },
    editorStyle: "wp-block-nextpage-editor"
  };

  // packages/block-library/build-module/nextpage/save.mjs
  var import_element109 = __toESM(require_element(), 1);
  var import_jsx_runtime376 = __toESM(require_jsx_runtime(), 1);
  function save32() {
    return /* @__PURE__ */ (0, import_jsx_runtime376.jsx)(import_element109.RawHTML, { children: "<!--nextpage-->" });
  }

  // packages/block-library/build-module/nextpage/transforms.mjs
  var import_blocks58 = __toESM(require_blocks(), 1);
  var transforms20 = {
    from: [
      {
        type: "raw",
        schema: {
          "wp-block": { attributes: ["data-block"] }
        },
        isMatch: (node) => node.dataset && node.dataset.block === "core/nextpage",
        transform() {
          return (0, import_blocks58.createBlock)("core/nextpage", {});
        }
      }
    ]
  };
  var transforms_default21 = transforms20;

  // packages/block-library/build-module/nextpage/index.mjs
  var { name: name53 } = block_default53;
  var settings53 = {
    icon: page_break_default,
    example: {},
    transforms: transforms_default21,
    edit: NextPageEdit,
    save: save32
  };
  var init53 = () => initBlock({ name: name53, metadata: block_default53, settings: settings53 });

  // packages/block-library/build-module/navigation-overlay-close/index.mjs
  var navigation_overlay_close_exports = {};
  __export(navigation_overlay_close_exports, {
    init: () => init54,
    metadata: () => block_default54,
    name: () => name54,
    settings: () => settings54
  });
  var import_hooks43 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/navigation-overlay-close/edit.mjs
  var import_block_editor164 = __toESM(require_block_editor(), 1);
  var import_components96 = __toESM(require_components(), 1);
  var import_i18n149 = __toESM(require_i18n(), 1);
  var import_jsx_runtime377 = __toESM(require_jsx_runtime(), 1);
  function NavigationOverlayCloseEdit({
    attributes: attributes2,
    setAttributes
  }) {
    const { displayMode, text } = attributes2;
    const showIcon = displayMode === "icon" || displayMode === "both";
    const showText = displayMode === "text" || displayMode === "both";
    const displayText = text || (0, import_i18n149.__)("Close");
    const blockProps = (0, import_block_editor164.useBlockProps)({
      className: "wp-block-navigation-overlay-close"
    });
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime377.jsxs)(import_jsx_runtime377.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(import_block_editor164.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
        import_components96.__experimentalToolsPanel,
        {
          label: (0, import_i18n149.__)("Settings"),
          resetAll: () => setAttributes({ displayMode: "icon" }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
            import_components96.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n149.__)("Display Mode"),
              isShownByDefault: true,
              hasValue: () => displayMode !== "icon",
              onDeselect: () => setAttributes({ displayMode: "icon" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime377.jsxs)(
                import_components96.__experimentalToggleGroupControl,
                {
                  label: (0, import_i18n149.__)("Display Mode"),
                  value: displayMode,
                  onChange: (value) => setAttributes({ displayMode: value }),
                  isBlock: true,
                  children: [
                    /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
                      import_components96.__experimentalToggleGroupControlOption,
                      {
                        value: "icon",
                        label: (0, import_i18n149.__)("Icon")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
                      import_components96.__experimentalToggleGroupControlOption,
                      {
                        value: "text",
                        label: (0, import_i18n149.__)("Text")
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
                      import_components96.__experimentalToggleGroupControlOption,
                      {
                        value: "both",
                        label: (0, import_i18n149.__)("Both")
                      }
                    )
                  ]
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime377.jsxs)(
        "button",
        {
          ...blockProps,
          type: "button",
          "aria-label": !showText ? (0, import_i18n149.__)("Close") : void 0,
          children: [
            showIcon && /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(icon_default, { icon: close_default }),
            showText && /* @__PURE__ */ (0, import_jsx_runtime377.jsx)(
              import_block_editor164.RichText,
              {
                identifier: "text",
                value: displayText,
                onChange: (value) => setAttributes({ text: value }),
                tagName: "span",
                className: "wp-block-navigation-overlay-close__text",
                allowedFormats: ["core/bold", "core/italic"]
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/navigation-overlay-close/block.json
  var block_default54 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/navigation-overlay-close",
    title: "Navigation Overlay Close",
    category: "design",
    description: "A customizable button to close overlays.",
    keywords: ["close", "overlay", "navigation", "menu"],
    textdomain: "default",
    attributes: {
      displayMode: {
        type: "string",
        enum: ["icon", "text", "both"],
        default: "icon"
      },
      text: {
        type: "string"
      }
    },
    supports: {
      color: {
        gradients: false,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      spacing: {
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      }
    },
    style: "wp-block-navigation-overlay-close"
  };

  // packages/block-library/build-module/navigation-overlay-close/icon.mjs
  var import_primitives167 = __toESM(require_primitives(), 1);
  var import_jsx_runtime378 = __toESM(require_jsx_runtime(), 1);
  var icon_default3 = /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_primitives167.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime378.jsx)(import_primitives167.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12ZM15 8l-3 3-3-3-1.1 1.1 3 3-3 3L9 16.2l3-3 3 3 1.1-1.1-3-3 3-3L15 8Z" }) });

  // packages/block-library/build-module/navigation-overlay-close/index.mjs
  var { name: name54 } = block_default54;
  var settings54 = {
    icon: icon_default3,
    edit: NavigationOverlayCloseEdit
  };
  var init54 = () => {
    (0, import_hooks43.addFilter)(
      "blockEditor.__unstableCanInsertBlockType",
      "core/navigation-overlay-close/restrict-to-overlay-template-parts",
      (canInsert, blockType) => {
        if (blockType.name !== "core/navigation-overlay-close") {
          return canInsert;
        }
        if (!canInsert) {
          return canInsert;
        }
        return isWithinNavigationOverlay();
      }
    );
    return initBlock({ name: name54, metadata: block_default54, settings: settings54 });
  };

  // packages/block-library/build-module/pattern/index.mjs
  var pattern_exports = {};
  __export(pattern_exports, {
    init: () => init55,
    metadata: () => block_default55,
    name: () => name55,
    settings: () => settings55
  });

  // packages/block-library/build-module/pattern/block.json
  var block_default55 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/pattern",
    title: "Pattern Placeholder",
    category: "theme",
    description: "Show a block pattern.",
    supports: {
      html: false,
      inserter: false,
      renaming: false,
      visibility: false,
      interactivity: {
        clientNavigation: true
      }
    },
    textdomain: "default",
    attributes: {
      slug: {
        type: "string"
      }
    }
  };

  // packages/block-library/build-module/pattern/edit.mjs
  var import_blocks59 = __toESM(require_blocks(), 1);
  var import_data94 = __toESM(require_data(), 1);
  var import_element110 = __toESM(require_element(), 1);
  var import_block_editor165 = __toESM(require_block_editor(), 1);
  var import_core_data55 = __toESM(require_core_data(), 1);
  var import_i18n150 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/pattern/recursion-detector.mjs
  var import_data93 = __toESM(require_data(), 1);
  var cachedParsers = /* @__PURE__ */ new WeakMap();
  function useParsePatternDependencies() {
    const registry = (0, import_data93.useRegistry)();
    if (!cachedParsers.has(registry)) {
      const deps = /* @__PURE__ */ new Map();
      cachedParsers.set(
        registry,
        parsePatternDependencies.bind(null, deps)
      );
    }
    return cachedParsers.get(registry);
  }
  function parsePatternDependencies(deps, { name: name118, blocks }) {
    const queue = [...blocks];
    while (queue.length) {
      const block = queue.shift();
      for (const innerBlock of block.innerBlocks ?? []) {
        queue.unshift(innerBlock);
      }
      if (block.name === "core/pattern") {
        registerDependency(deps, name118, block.attributes.slug);
      }
    }
  }
  function registerDependency(deps, a, b) {
    if (!deps.has(a)) {
      deps.set(a, /* @__PURE__ */ new Set());
    }
    deps.get(a).add(b);
    if (hasCycle(deps, a)) {
      throw new TypeError(
        `Pattern ${a} has a circular dependency and cannot be rendered.`
      );
    }
  }
  function hasCycle(deps, slug, visitedNodes = /* @__PURE__ */ new Set(), currentPath = /* @__PURE__ */ new Set()) {
    visitedNodes.add(slug);
    currentPath.add(slug);
    const dependencies = deps.get(slug) ?? /* @__PURE__ */ new Set();
    for (const dependency of dependencies) {
      if (!visitedNodes.has(dependency)) {
        if (hasCycle(deps, dependency, visitedNodes, currentPath)) {
          return true;
        }
      } else if (currentPath.has(dependency)) {
        return true;
      }
    }
    currentPath.delete(slug);
    return false;
  }

  // packages/block-library/build-module/pattern/edit.mjs
  var import_jsx_runtime379 = __toESM(require_jsx_runtime(), 1);
  var PatternEdit = ({ attributes: attributes2, clientId }) => {
    const registry = (0, import_data94.useRegistry)();
    const selectedPattern = (0, import_data94.useSelect)(
      (select10) => select10(import_block_editor165.store).__experimentalGetParsedPattern(
        attributes2.slug
      ),
      [attributes2.slug]
    );
    const currentThemeStylesheet = (0, import_data94.useSelect)(
      (select10) => select10(import_core_data55.store).getCurrentTheme()?.stylesheet,
      []
    );
    const {
      replaceBlocks,
      setBlockEditingMode,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data94.useDispatch)(import_block_editor165.store);
    const { getBlockRootClientId, getBlockEditingMode } = (0, import_data94.useSelect)(import_block_editor165.store);
    const [hasRecursionError, setHasRecursionError] = (0, import_element110.useState)(false);
    const parsePatternDependencies2 = useParsePatternDependencies();
    function injectThemeAttributeInBlockTemplateContent(block) {
      if (block.innerBlocks.find(
        (innerBlock) => innerBlock.name === "core/template-part"
      )) {
        block.innerBlocks = block.innerBlocks.map((innerBlock) => {
          if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
            innerBlock.attributes.theme = currentThemeStylesheet;
          }
          return innerBlock;
        });
      }
      if (block.name === "core/template-part" && block.attributes.theme === void 0) {
        block.attributes.theme = currentThemeStylesheet;
      }
      return block;
    }
    (0, import_element110.useEffect)(() => {
      if (!hasRecursionError && selectedPattern?.blocks) {
        try {
          parsePatternDependencies2(selectedPattern);
        } catch {
          setHasRecursionError(true);
          return;
        }
        window.queueMicrotask(() => {
          const rootClientId = getBlockRootClientId(clientId);
          const clonedBlocks = selectedPattern.blocks.map(
            (block) => (0, import_blocks59.cloneBlock)(
              injectThemeAttributeInBlockTemplateContent(block)
            )
          );
          if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) {
            clonedBlocks[0].attributes = {
              ...clonedBlocks[0].attributes,
              metadata: {
                ...clonedBlocks[0].attributes.metadata,
                categories: selectedPattern.categories,
                patternName: selectedPattern.name,
                name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title
              }
            };
          }
          const rootEditingMode = getBlockEditingMode(rootClientId);
          registry.batch(() => {
            __unstableMarkNextChangeAsNotPersistent();
            setBlockEditingMode(rootClientId, "default");
            __unstableMarkNextChangeAsNotPersistent();
            replaceBlocks(clientId, clonedBlocks);
            __unstableMarkNextChangeAsNotPersistent();
            setBlockEditingMode(rootClientId, rootEditingMode);
          });
        });
      }
    }, [
      clientId,
      hasRecursionError,
      selectedPattern,
      __unstableMarkNextChangeAsNotPersistent,
      replaceBlocks,
      getBlockEditingMode,
      setBlockEditingMode,
      getBlockRootClientId
    ]);
    const props = (0, import_block_editor165.useBlockProps)();
    if (hasRecursionError) {
      return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("div", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime379.jsx)(import_block_editor165.Warning, { children: (0, import_i18n150.sprintf)(
        // translators: A warning in which %s is the name of a pattern.
        (0, import_i18n150.__)('Pattern "%s" cannot be rendered inside itself.'),
        selectedPattern?.name
      ) }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime379.jsx)("div", { ...props });
  };
  var edit_default17 = PatternEdit;

  // packages/block-library/build-module/pattern/index.mjs
  var { name: name55 } = block_default55;
  var settings55 = {
    edit: edit_default17
  };
  var init55 = () => initBlock({ name: name55, metadata: block_default55, settings: settings55 });

  // packages/block-library/build-module/page-list/index.mjs
  var page_list_exports = {};
  __export(page_list_exports, {
    init: () => init56,
    metadata: () => block_default56,
    name: () => name56,
    settings: () => settings56
  });

  // packages/block-library/build-module/page-list/block.json
  var block_default56 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/page-list",
    title: "Page List",
    category: "widgets",
    allowedBlocks: ["core/page-list-item"],
    description: "Display a list of all pages.",
    keywords: ["menu", "navigation"],
    textdomain: "default",
    attributes: {
      parentPageID: {
        type: "integer",
        default: 0
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "style",
      "openSubmenusOnClick",
      "submenuVisibility",
      "core/isInsideSubmenu"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        text: true,
        background: true,
        link: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          padding: false,
          margin: false
        }
      },
      shadow: true,
      contentRole: true
    },
    editorStyle: "wp-block-page-list-editor",
    style: "wp-block-page-list"
  };

  // packages/block-library/build-module/page-list/edit.mjs
  var import_blocks61 = __toESM(require_blocks(), 1);
  var import_block_editor167 = __toESM(require_block_editor(), 1);
  var import_components97 = __toESM(require_components(), 1);
  var import_i18n151 = __toESM(require_i18n(), 1);
  var import_element111 = __toESM(require_element(), 1);
  var import_core_data56 = __toESM(require_core_data(), 1);
  var import_data96 = __toESM(require_data(), 1);

  // packages/block-library/build-module/page-list/use-convert-to-navigation-links.mjs
  var import_blocks60 = __toESM(require_blocks(), 1);
  var import_data95 = __toESM(require_data(), 1);
  var import_block_editor166 = __toESM(require_block_editor(), 1);
  function createNavigationLinks(pages = []) {
    const POST_TYPE_KIND = "post-type";
    const linkMap = {};
    const navigationLinks = [];
    pages.forEach(({ id, title, link: url, type, parent }) => {
      const innerBlocks = linkMap[id]?.innerBlocks ?? [];
      linkMap[id] = (0, import_blocks60.createBlock)(
        "core/navigation-link",
        {
          id,
          label: title.rendered,
          url,
          type,
          kind: POST_TYPE_KIND,
          metadata: {
            bindings: buildNavigationLinkEntityBinding(POST_TYPE_KIND)
          }
        },
        innerBlocks
      );
      if (!parent) {
        navigationLinks.push(linkMap[id]);
      } else {
        if (!linkMap[parent]) {
          linkMap[parent] = { innerBlocks: [] };
        }
        const parentLinkInnerBlocks = linkMap[parent].innerBlocks;
        parentLinkInnerBlocks.push(linkMap[id]);
      }
    });
    return navigationLinks;
  }
  function findNavigationLinkById(navigationLinks, id) {
    for (const navigationLink of navigationLinks) {
      if (navigationLink.attributes.id === id) {
        return navigationLink;
      }
      if (navigationLink.innerBlocks && navigationLink.innerBlocks.length) {
        const foundNavigationLink = findNavigationLinkById(
          navigationLink.innerBlocks,
          id
        );
        if (foundNavigationLink) {
          return foundNavigationLink;
        }
      }
    }
    return null;
  }
  function convertToNavigationLinks(pages = [], parentPageID = null) {
    let navigationLinks = createNavigationLinks(pages);
    if (parentPageID) {
      const parentPage = findNavigationLinkById(
        navigationLinks,
        parentPageID
      );
      if (parentPage && parentPage.innerBlocks) {
        navigationLinks = parentPage.innerBlocks;
      }
    }
    const transformSubmenus = (listOfLinks) => {
      listOfLinks.forEach((block, index2, listOfLinksArray) => {
        const { attributes: attributes2, innerBlocks } = block;
        if (innerBlocks.length !== 0) {
          transformSubmenus(innerBlocks);
          const transformedBlock = (0, import_blocks60.createBlock)(
            "core/navigation-submenu",
            attributes2,
            innerBlocks
          );
          listOfLinksArray[index2] = transformedBlock;
        }
      });
    };
    transformSubmenus(navigationLinks);
    return navigationLinks;
  }
  function useConvertToNavigationLinks({
    clientId,
    pages,
    parentClientId,
    parentPageID
  }) {
    const { replaceBlock, selectBlock } = (0, import_data95.useDispatch)(import_block_editor166.store);
    return () => {
      const navigationLinks = convertToNavigationLinks(pages, parentPageID);
      replaceBlock(clientId, navigationLinks);
      selectBlock(parentClientId);
    };
  }

  // packages/block-library/build-module/page-list/edit.mjs
  var import_jsx_runtime380 = __toESM(require_jsx_runtime(), 1);
  var MAX_PAGE_COUNT = 100;
  var NOOP2 = () => {
  };
  function DetachPageListDialog({ isBusy, onConfirm, onCancel }) {
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
      import_components97.__experimentalConfirmDialog,
      {
        isOpen: true,
        title: (0, import_i18n151.__)("Detach Page List"),
        __experimentalHideHeader: false,
        confirmButtonText: (0, import_i18n151.__)("Detach"),
        onConfirm,
        onCancel,
        isBusy,
        size: "medium",
        children: (0, import_i18n151.__)(
          "This Navigation Menu displays your website's pages. Detaching will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically."
        )
      }
    );
  }
  function BlockContent({
    blockProps,
    innerBlocksProps,
    hasResolvedPages,
    blockList,
    pages,
    parentPageID
  }) {
    if (!hasResolvedPages) {
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { className: "wp-block-page-list__loading-indicator-container", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components97.Spinner, { className: "wp-block-page-list__loading-indicator" }) }) });
    }
    if (pages === null) {
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components97.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (pages.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components97.Notice, { status: "info", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (blockList.length === 0) {
      const parentPageDetails = pages.find(
        (page) => page.id === parentPageID
      );
      if (parentPageDetails?.title?.rendered) {
        return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_block_editor167.Warning, { children: (0, import_i18n151.sprintf)(
          // translators: %s: Page title.
          (0, import_i18n151.__)('Page List: "%s" page has no children.'),
          parentPageDetails.title.rendered
        ) }) });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_components97.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n151.__)("Page List: Cannot retrieve Pages.") }) });
    }
    if (pages.length > 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime380.jsx)("ul", { ...innerBlocksProps });
    }
  }
  function PageListEdit({
    context,
    clientId,
    attributes: attributes2,
    setAttributes
  }) {
    const { parentPageID } = attributes2;
    const [isConfirmingDetach, setIsConfirmingDetach] = (0, import_element111.useState)(false);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { records: pages, hasResolved: hasResolvedPages } = (0, import_core_data56.useEntityRecords)(
      "postType",
      "page",
      {
        per_page: MAX_PAGE_COUNT,
        _fields: ["id", "link", "menu_order", "parent", "title", "type"],
        // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
        // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
        // sort.
        orderby: "menu_order",
        order: "asc"
      }
    );
    const allowConvertToLinks = "showSubmenuIcon" in context && pages?.length > 0 && pages?.length <= MAX_PAGE_COUNT;
    const pagesByParentId = (0, import_element111.useMemo)(() => {
      if (pages === null) {
        return /* @__PURE__ */ new Map();
      }
      const sortedPages = pages.sort((a, b) => {
        if (a.menu_order === b.menu_order) {
          return a.title.rendered.localeCompare(b.title.rendered);
        }
        return a.menu_order - b.menu_order;
      });
      return sortedPages.reduce((accumulator, page) => {
        const { parent } = page;
        if (accumulator.has(parent)) {
          accumulator.get(parent).push(page);
        } else {
          accumulator.set(parent, [page]);
        }
        return accumulator;
      }, /* @__PURE__ */ new Map());
    }, [pages]);
    const blockProps = (0, import_block_editor167.useBlockProps)({
      className: clsx_default("wp-block-page-list", {
        "has-text-color": !!context.textColor,
        [(0, import_block_editor167.getColorClassName)("color", context.textColor)]: !!context.textColor,
        "has-background": !!context.backgroundColor,
        [(0, import_block_editor167.getColorClassName)(
          "background-color",
          context.backgroundColor
        )]: !!context.backgroundColor,
        "open-on-click": context.submenuVisibility === "click",
        "open-always": context.submenuVisibility === "always"
      }),
      style: { ...context.style?.color }
    });
    const pagesTree = (0, import_element111.useMemo)(
      function makePagesTree(parentId = 0, level = 0) {
        const childPages = pagesByParentId.get(parentId);
        if (!childPages?.length) {
          return [];
        }
        return childPages.reduce((tree, page) => {
          const hasChildren = pagesByParentId.has(page.id);
          const item = {
            value: page.id,
            label: "\u2014 ".repeat(level) + page.title.rendered,
            rawName: page.title.rendered
          };
          tree.push(item);
          if (hasChildren) {
            tree.push(...makePagesTree(page.id, level + 1));
          }
          return tree;
        }, []);
      },
      [pagesByParentId]
    );
    const blockList = (0, import_element111.useMemo)(
      function getBlockList(parentId = parentPageID) {
        const childPages = pagesByParentId.get(parentId);
        if (!childPages?.length) {
          return [];
        }
        return childPages.reduce((template, page) => {
          const hasChildren = pagesByParentId.has(page.id);
          const pageProps = {
            id: page.id,
            label: (
              // translators: displayed when a page has an empty title.
              page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0, import_i18n151.__)("(no title)")
            ),
            title: (
              // translators: displayed when a page has an empty title.
              page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0, import_i18n151.__)("(no title)")
            ),
            link: page.url,
            hasChildren
          };
          let item = null;
          const children = getBlockList(page.id);
          item = (0, import_blocks61.createBlock)(
            "core/page-list-item",
            pageProps,
            children
          );
          template.push(item);
          return template;
        }, []);
      },
      [pagesByParentId, parentPageID]
    );
    const {
      hasSelectedChild,
      parentClientId,
      hasDraggedChild,
      isChildOfNavigation
    } = (0, import_data96.useSelect)(
      (select10) => {
        const {
          getBlockParentsByBlockName,
          hasSelectedInnerBlock,
          hasDraggedInnerBlock
        } = select10(import_block_editor167.store);
        const navigationBlockParents = getBlockParentsByBlockName(
          clientId,
          "core/navigation",
          true
        );
        return {
          isChildOfNavigation: navigationBlockParents.length > 0,
          hasSelectedChild: hasSelectedInnerBlock(clientId, true),
          hasDraggedChild: hasDraggedInnerBlock(clientId, true),
          parentClientId: navigationBlockParents[0]
        };
      },
      [clientId]
    );
    const convertToNavigationLinks2 = useConvertToNavigationLinks({
      clientId,
      pages,
      parentClientId,
      parentPageID
    });
    const innerBlocksProps = (0, import_block_editor167.useInnerBlocksProps)(blockProps, {
      renderAppender: false,
      __unstableDisableDropZone: true,
      templateLock: isChildOfNavigation ? false : "all",
      onInput: NOOP2,
      onChange: NOOP2,
      value: blockList
    });
    const { selectBlock } = (0, import_data96.useDispatch)(import_block_editor167.store);
    (0, import_element111.useEffect)(() => {
      if (hasSelectedChild || hasDraggedChild) {
        setIsConfirmingDetach(true);
        selectBlock(parentClientId);
      }
    }, [hasSelectedChild, hasDraggedChild, parentClientId, selectBlock]);
    return /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(import_jsx_runtime380.Fragment, { children: [
      (pagesTree.length > 0 || allowConvertToLinks) && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_block_editor167.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(
        import_components97.__experimentalToolsPanel,
        {
          label: (0, import_i18n151.__)("Settings"),
          resetAll: () => {
            setAttributes({ parentPageID: 0 });
          },
          dropdownMenuProps,
          children: [
            pagesTree.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
              import_components97.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n151.__)("Parent Page"),
                hasValue: () => parentPageID !== 0,
                onDeselect: () => setAttributes({ parentPageID: 0 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
                  import_components97.ComboboxControl,
                  {
                    className: "editor-page-attributes__parent",
                    label: (0, import_i18n151.__)("Parent"),
                    value: parentPageID,
                    options: pagesTree,
                    onChange: (value) => setAttributes({
                      parentPageID: value ?? 0
                    }),
                    help: (0, import_i18n151.__)(
                      "Choose a page to show only its subpages."
                    )
                  }
                )
              }
            ),
            allowConvertToLinks && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
              import_components97.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                accessibleWhenDisabled: true,
                disabled: !hasResolvedPages,
                onClick: () => setIsConfirmingDetach(true),
                style: {
                  gridColumn: "1 / -1",
                  justifyContent: "center"
                },
                children: (0, import_i18n151.__)("Detach Page List")
              }
            )
          ]
        }
      ) }),
      allowConvertToLinks && /* @__PURE__ */ (0, import_jsx_runtime380.jsxs)(import_jsx_runtime380.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(import_block_editor167.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
          import_components97.ToolbarButton,
          {
            title: (0, import_i18n151.__)("Detach"),
            disabled: !hasResolvedPages,
            onClick: () => setIsConfirmingDetach(true),
            children: (0, import_i18n151.__)("Detach")
          }
        ) }),
        isConfirmingDetach && /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
          DetachPageListDialog,
          {
            isBusy: !hasResolvedPages,
            onConfirm: () => {
              convertToNavigationLinks2();
              setIsConfirmingDetach(false);
            },
            onCancel: () => setIsConfirmingDetach(false)
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime380.jsx)(
        BlockContent,
        {
          blockProps,
          innerBlocksProps,
          hasResolvedPages,
          blockList,
          pages,
          parentPageID
        }
      )
    ] });
  }

  // packages/block-library/build-module/page-list/index.mjs
  var { name: name56 } = block_default56;
  var settings56 = {
    icon: pages_default,
    example: {},
    edit: PageListEdit
  };
  var init56 = () => initBlock({ name: name56, metadata: block_default56, settings: settings56 });

  // packages/block-library/build-module/page-list-item/index.mjs
  var page_list_item_exports = {};
  __export(page_list_item_exports, {
    init: () => init57,
    metadata: () => block_default57,
    name: () => name57,
    settings: () => settings57
  });

  // packages/block-library/build-module/page-list-item/block.json
  var block_default57 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/page-list-item",
    title: "Page List Item",
    category: "widgets",
    parent: ["core/page-list"],
    description: "Displays a page inside a list of all pages.",
    keywords: ["page", "menu", "navigation"],
    textdomain: "default",
    attributes: {
      id: {
        type: "number"
      },
      label: {
        type: "string"
      },
      title: {
        type: "string"
      },
      link: {
        type: "string"
      },
      hasChildren: {
        type: "boolean"
      }
    },
    usesContext: [
      "textColor",
      "customTextColor",
      "backgroundColor",
      "customBackgroundColor",
      "overlayTextColor",
      "customOverlayTextColor",
      "overlayBackgroundColor",
      "customOverlayBackgroundColor",
      "fontSize",
      "customFontSize",
      "showSubmenuIcon",
      "style",
      "openSubmenusOnClick",
      "submenuVisibility"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      lock: false,
      inserter: false,
      __experimentalToolbar: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-page-list-editor",
    style: "wp-block-page-list"
  };

  // packages/block-library/build-module/page-list-item/edit.mjs
  var import_block_editor168 = __toESM(require_block_editor(), 1);
  var import_data97 = __toESM(require_data(), 1);
  var import_core_data57 = __toESM(require_core_data(), 1);
  var import_dom19 = __toESM(require_dom(), 1);

  // packages/block-library/build-module/navigation-link/icons.mjs
  var import_components98 = __toESM(require_components(), 1);
  var import_jsx_runtime381 = __toESM(require_jsx_runtime(), 1);
  var ItemSubmenuIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(
    import_components98.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      width: "12",
      height: "12",
      viewBox: "0 0 12 12",
      fill: "none",
      children: /* @__PURE__ */ (0, import_jsx_runtime381.jsx)(import_components98.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
    }
  );

  // packages/block-library/build-module/page-list-item/edit.mjs
  var import_jsx_runtime382 = __toESM(require_jsx_runtime(), 1);
  function useFrontPageId() {
    return (0, import_data97.useSelect)((select10) => {
      const canReadSettings = select10(import_core_data57.store).canUser("read", {
        kind: "root",
        name: "site"
      });
      if (!canReadSettings) {
        return void 0;
      }
      const site = select10(import_core_data57.store).getEntityRecord("root", "site");
      return site?.show_on_front === "page" && site?.page_on_front;
    }, []);
  }
  function PageListItemEdit({ context, attributes: attributes2 }) {
    const { id, label, link, hasChildren, title } = attributes2;
    const isNavigationChild = "showSubmenuIcon" in context;
    const frontPageId = useFrontPageId();
    const submenuVisibility = context.submenuVisibility;
    const openOnClick = submenuVisibility === "click";
    const innerBlocksColors = getColors(context, true);
    const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
    const blockProps = (0, import_block_editor168.useBlockProps)(navigationChildBlockProps, {
      className: "wp-block-pages-list__item"
    });
    const innerBlocksProps = (0, import_block_editor168.useInnerBlocksProps)(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)(
      "li",
      {
        className: clsx_default("wp-block-pages-list__item", {
          "has-child": hasChildren,
          "wp-block-navigation-item": isNavigationChild,
          // Class assignment logic matches PHP rendering in page-list/index.php
          "open-on-click": openOnClick,
          "open-always": submenuVisibility === "always",
          // Must check hover mode explicitly to match PHP elseif structure (index.php:212)
          "open-on-hover-click": submenuVisibility === "hover" && context.showSubmenuIcon,
          "menu-item-home": id === frontPageId
        }),
        children: [
          hasChildren && openOnClick ? /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)(import_jsx_runtime382.Fragment, { children: [
            /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
              "button",
              {
                type: "button",
                className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle",
                "aria-expanded": "false",
                dangerouslySetInnerHTML: {
                  __html: (0, import_dom19.safeHTML)(label)
                }
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(ItemSubmenuIcon2, {}) })
          ] }) : /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
            "a",
            {
              className: clsx_default("wp-block-pages-list__item__link", {
                "wp-block-navigation-item__content": isNavigationChild
              }),
              href: link,
              dangerouslySetInnerHTML: {
                __html: (0, import_dom19.safeHTML)(title)
              }
            }
          ),
          hasChildren && /* @__PURE__ */ (0, import_jsx_runtime382.jsxs)(import_jsx_runtime382.Fragment, { children: [
            !openOnClick && context.showSubmenuIcon && /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(
              "button",
              {
                className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",
                "aria-expanded": "false",
                type: "button",
                children: /* @__PURE__ */ (0, import_jsx_runtime382.jsx)(ItemSubmenuIcon2, {})
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime382.jsx)("ul", { ...innerBlocksProps })
          ] })
        ]
      },
      id
    );
  }

  // packages/block-library/build-module/page-list-item/index.mjs
  var { name: name57 } = block_default57;
  var settings57 = {
    __experimentalLabel: ({ label }) => label,
    icon: page_default,
    example: {},
    edit: PageListItemEdit
  };
  var init57 = () => initBlock({ name: name57, metadata: block_default57, settings: settings57 });

  // packages/block-library/build-module/paragraph/index.mjs
  var paragraph_exports = {};
  __export(paragraph_exports, {
    init: () => init58,
    metadata: () => block_default58,
    name: () => name59,
    settings: () => settings58
  });
  var import_i18n155 = __toESM(require_i18n(), 1);
  var import_blocks65 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/paragraph/deprecated.mjs
  var import_element112 = __toESM(require_element(), 1);
  var import_block_editor169 = __toESM(require_block_editor(), 1);
  var import_i18n152 = __toESM(require_i18n(), 1);
  var import_jsx_runtime383 = __toESM(require_jsx_runtime(), 1);
  var supports = {
    className: false
  };
  var blockAttributes5 = {
    align: {
      type: "string"
    },
    content: {
      type: "string",
      source: "html",
      selector: "p",
      default: ""
    },
    dropCap: {
      type: "boolean",
      default: false
    },
    placeholder: {
      type: "string"
    },
    textColor: {
      type: "string"
    },
    backgroundColor: {
      type: "string"
    },
    fontSize: {
      type: "string"
    },
    direction: {
      type: "string",
      enum: ["ltr", "rtl"]
    },
    style: {
      type: "object"
    }
  };
  var migrateCustomColorsAndFontSizes = (attributes2) => {
    if (!attributes2.customTextColor && !attributes2.customBackgroundColor && !attributes2.customFontSize) {
      return attributes2;
    }
    const style2 = {};
    if (attributes2.customTextColor || attributes2.customBackgroundColor) {
      style2.color = {};
    }
    if (attributes2.customTextColor) {
      style2.color.text = attributes2.customTextColor;
    }
    if (attributes2.customBackgroundColor) {
      style2.color.background = attributes2.customBackgroundColor;
    }
    if (attributes2.customFontSize) {
      style2.typography = { fontSize: attributes2.customFontSize };
    }
    const {
      customTextColor,
      customBackgroundColor,
      customFontSize,
      ...restAttributes
    } = attributes2;
    return {
      ...restAttributes,
      style: style2
    };
  };
  var migrateTextAlign2 = (attributes2) => {
    const { align, ...restAttributes } = attributes2;
    if (!align) {
      return attributes2;
    }
    return {
      ...restAttributes,
      style: {
        ...attributes2.style,
        typography: {
          ...attributes2.style?.typography,
          textAlign: align
        }
      }
    };
  };
  var { style, ...restBlockAttributes } = blockAttributes5;
  var deprecated13 = [
    // Version with `align` attribute.
    {
      supports: {
        className: false,
        color: true,
        typography: {
          fontSize: true
        }
      },
      attributes: blockAttributes5,
      isEligible(attributes2) {
        return !!attributes2.align || !!attributes2.className?.match(
          /\bhas-text-align-(left|center|right)\b/
        );
      },
      save({ attributes: attributes2 }) {
        const { align, content, dropCap, direction } = attributes2;
        const className = clsx_default({
          "has-drop-cap": align === ((0, import_i18n152.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
          [`has-text-align-${align}`]: align
        });
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)("p", { ...import_block_editor169.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(import_block_editor169.RichText.Content, { value: content }) });
      },
      migrate: migrateTextAlign2
    },
    // Version without drop cap on aligned text.
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate: migrateTextAlign2,
      save({ attributes: attributes2 }) {
        const { align, content, dropCap, direction } = attributes2;
        const className = clsx_default({
          "has-drop-cap": align === ((0, import_i18n152.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
          [`has-text-align-${align}`]: align
        });
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)("p", { ...import_block_editor169.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(import_block_editor169.RichText.Content, { value: content }) });
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize,
          direction
        } = attributes2;
        const textClass = (0, import_block_editor169.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor169.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = (0, import_block_editor169.getFontSizeClass)(fontSize);
        const className = clsx_default({
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [`has-text-align-${align}`]: align,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize
        };
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
          import_block_editor169.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content,
            dir: direction
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize,
          direction
        } = attributes2;
        const textClass = (0, import_block_editor169.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor169.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = (0, import_block_editor169.getFontSizeClass)(fontSize);
        const className = clsx_default({
          "has-text-color": textColor || customTextColor,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
          import_block_editor169.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content,
            dir: direction
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        customTextColor: {
          type: "string"
        },
        customBackgroundColor: {
          type: "string"
        },
        customFontSize: {
          type: "number"
        },
        width: {
          type: "string"
        }
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2(attributes2)
        );
      },
      save({ attributes: attributes2 }) {
        const {
          width,
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          customBackgroundColor,
          customTextColor,
          fontSize,
          customFontSize
        } = attributes2;
        const textClass = (0, import_block_editor169.getColorClassName)("color", textColor);
        const backgroundClass = (0, import_block_editor169.getColorClassName)(
          "background-color",
          backgroundColor
        );
        const fontSizeClass = fontSize && `is-${fontSize}-text`;
        const className = clsx_default({
          [`align${width}`]: width,
          "has-background": backgroundColor || customBackgroundColor,
          "has-drop-cap": dropCap,
          [fontSizeClass]: fontSizeClass,
          [textClass]: textClass,
          [backgroundClass]: backgroundClass
        });
        const styles = {
          backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
          color: textClass ? void 0 : customTextColor,
          fontSize: fontSizeClass ? void 0 : customFontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
          import_block_editor169.RichText.Content,
          {
            tagName: "p",
            style: styles,
            className: className ? className : void 0,
            value: content
          }
        );
      }
    },
    {
      supports,
      attributes: {
        ...restBlockAttributes,
        fontSize: {
          type: "number"
        }
      },
      save({ attributes: attributes2 }) {
        const {
          width,
          align,
          content,
          dropCap,
          backgroundColor,
          textColor,
          fontSize
        } = attributes2;
        const className = clsx_default({
          [`align${width}`]: width,
          "has-background": backgroundColor,
          "has-drop-cap": dropCap
        });
        const styles = {
          backgroundColor,
          color: textColor,
          fontSize,
          textAlign: align
        };
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(
          "p",
          {
            style: styles,
            className: className ? className : void 0,
            children: content
          }
        );
      },
      migrate(attributes2) {
        return migrateCustomColorsAndFontSizes(
          migrateTextAlign2({
            ...attributes2,
            customFontSize: Number.isFinite(attributes2.fontSize) ? attributes2.fontSize : void 0,
            customTextColor: attributes2.textColor && "#" === attributes2.textColor[0] ? attributes2.textColor : void 0,
            customBackgroundColor: attributes2.backgroundColor && "#" === attributes2.backgroundColor[0] ? attributes2.backgroundColor : void 0
          })
        );
      }
    },
    {
      supports,
      attributes: {
        ...blockAttributes5,
        content: {
          type: "string",
          source: "html",
          default: ""
        }
      },
      save({ attributes: attributes2 }) {
        return /* @__PURE__ */ (0, import_jsx_runtime383.jsx)(import_element112.RawHTML, { children: attributes2.content });
      },
      migrate: (attributes2) => attributes2
    }
  ];
  var deprecated_default28 = deprecated13;

  // packages/block-library/build-module/paragraph/edit.mjs
  var import_i18n153 = __toESM(require_i18n(), 1);
  var import_components99 = __toESM(require_components(), 1);
  var import_block_editor172 = __toESM(require_block_editor(), 1);
  var import_data100 = __toESM(require_data(), 1);
  var import_blocks63 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/paragraph/use-enter.mjs
  var import_element113 = __toESM(require_element(), 1);
  var import_compose45 = __toESM(require_compose(), 1);
  var import_rich_text7 = __toESM(require_rich_text(), 1);
  var import_data98 = __toESM(require_data(), 1);
  var import_block_editor170 = __toESM(require_block_editor(), 1);
  var import_blocks62 = __toESM(require_blocks(), 1);
  var { subscribeOwnedListener: subscribeOwnedListener3 } = unlock(import_rich_text7.privateApis);
  function useOnEnter(props) {
    const { batch } = (0, import_data98.useRegistry)();
    const { moveBlocksToPosition, replaceBlocks, selectionChange } = (0, import_data98.useDispatch)(import_block_editor170.store);
    const {
      getBlockRootClientId,
      getBlockIndex,
      getBlockOrder,
      getBlockName,
      getBlock,
      canInsertBlockType
    } = (0, import_data98.useSelect)(import_block_editor170.store);
    const propsRef = (0, import_element113.useRef)(props);
    propsRef.current = props;
    return (0, import_compose45.useRefEffect)((element) => {
      function onBeforeInput(event) {
        if (event.defaultPrevented) {
          return;
        }
        if (event.inputType !== "insertParagraph") {
          return;
        }
        const { content, clientId } = propsRef.current;
        if (content.length) {
          return;
        }
        const wrapperClientId = getBlockRootClientId(clientId);
        if (!(0, import_blocks62.hasBlockSupport)(
          getBlockName(wrapperClientId),
          "__experimentalOnEnter",
          false
        )) {
          return;
        }
        const order = getBlockOrder(wrapperClientId);
        const position = order.indexOf(clientId);
        if (position === order.length - 1) {
          let newWrapperClientId = wrapperClientId;
          while (!canInsertBlockType(
            getBlockName(clientId),
            getBlockRootClientId(newWrapperClientId)
          )) {
            newWrapperClientId = getBlockRootClientId(newWrapperClientId);
          }
          if (typeof newWrapperClientId === "string") {
            event.preventDefault();
            moveBlocksToPosition(
              [clientId],
              wrapperClientId,
              getBlockRootClientId(newWrapperClientId),
              getBlockIndex(newWrapperClientId) + 1
            );
          }
          return;
        }
        const defaultBlockName = (0, import_blocks62.getDefaultBlockName)();
        const wrapperBlockName = getBlockName(wrapperClientId);
        const grandparentClientId = getBlockRootClientId(wrapperClientId);
        if (!canInsertBlockType(defaultBlockName, grandparentClientId) || !canInsertBlockType(wrapperBlockName, grandparentClientId)) {
          return;
        }
        event.preventDefault();
        const wrapperBlock = getBlock(wrapperClientId);
        const head = (0, import_blocks62.cloneBlock)({
          ...wrapperBlock,
          innerBlocks: wrapperBlock.innerBlocks.slice(0, position)
        });
        const middle = (0, import_blocks62.createBlock)(defaultBlockName);
        const tail = (0, import_blocks62.cloneBlock)({
          ...wrapperBlock,
          innerBlocks: wrapperBlock.innerBlocks.slice(position + 1)
        });
        batch(() => {
          replaceBlocks(wrapperClientId, [head, middle, tail]);
          selectionChange(middle.clientId);
        });
      }
      return subscribeOwnedListener3(
        element,
        "beforeinput",
        onBeforeInput,
        true
      );
    }, []);
  }

  // packages/block-library/build-module/paragraph/deprecated-attributes.mjs
  var import_compose46 = __toESM(require_compose(), 1);
  var import_element114 = __toESM(require_element(), 1);
  var import_deprecated31 = __toESM(require_deprecated(), 1);
  var import_data99 = __toESM(require_data(), 1);
  var import_block_editor171 = __toESM(require_block_editor(), 1);
  function useDeprecatedAlign(align, style2, setAttributes) {
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data99.useDispatch)(import_block_editor171.store);
    const updateStyleWithAlign = (0, import_compose46.useEvent)(() => {
      (0, import_deprecated31.default)("align attribute in paragraph block", {
        alternative: "style.typography.textAlign",
        since: "7.0"
      });
      __unstableMarkNextChangeAsNotPersistent();
      setAttributes({
        style: {
          ...style2,
          typography: {
            ...style2?.typography,
            textAlign: align
          }
        }
      });
    });
    const lastUpdatedAlignRef = (0, import_element114.useRef)();
    (0, import_element114.useEffect)(() => {
      if (align === "full" || align === "wide" || align === lastUpdatedAlignRef.current) {
        return;
      }
      lastUpdatedAlignRef.current = align;
      updateStyleWithAlign();
    }, [align, updateStyleWithAlign]);
  }

  // packages/block-library/build-module/paragraph/edit.mjs
  var import_jsx_runtime384 = __toESM(require_jsx_runtime(), 1);
  function ParagraphRTLControl({ direction, setDirection }) {
    return (0, import_i18n153.isRTL)() && /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      import_components99.ToolbarButton,
      {
        icon: format_ltr_default,
        title: (0, import_i18n153._x)("Left to right", "editor button"),
        isActive: direction === "ltr",
        onClick: () => {
          setDirection(direction === "ltr" ? void 0 : "ltr");
        }
      }
    );
  }
  function hasDropCapDisabled(align) {
    return align === ((0, import_i18n153.isRTL)() ? "left" : "right") || align === "center";
  }
  function DropCapControl({ clientId, attributes: attributes2, setAttributes, name: name118 }) {
    const [isDropCapFeatureEnabled] = (0, import_block_editor172.useSettings)("typography.dropCap");
    const hasSelectedStyleState = (0, import_data100.useSelect)(
      (select10) => {
        const { hasSelectedBlockStyleState } = select10(import_block_editor172.store);
        return hasSelectedBlockStyleState(clientId);
      },
      [clientId]
    );
    if (!isDropCapFeatureEnabled || hasSelectedStyleState) {
      return null;
    }
    const { style: style2, dropCap } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    let helpText;
    if (hasDropCapDisabled(textAlign)) {
      helpText = (0, import_i18n153.__)("Not available for aligned text.");
    } else if (dropCap) {
      helpText = (0, import_i18n153.__)("Showing large initial letter.");
    } else {
      helpText = (0, import_i18n153.__)("Show a large initial letter.");
    }
    const isDropCapControlEnabledByDefault = (0, import_blocks63.getBlockSupport)(
      name118,
      "typography.defaultControls.dropCap",
      false
    );
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(import_block_editor172.InspectorControls, { group: "typography", children: /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
      import_components99.__experimentalToolsPanelItem,
      {
        hasValue: () => !!dropCap,
        label: (0, import_i18n153.__)("Drop cap"),
        isShownByDefault: isDropCapControlEnabledByDefault,
        onDeselect: () => setAttributes({ dropCap: false }),
        resetAllFilter: () => ({ dropCap: false }),
        panelId: clientId,
        children: /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
          import_components99.ToggleControl,
          {
            label: (0, import_i18n153.__)("Drop cap"),
            checked: !!dropCap,
            onChange: () => setAttributes({ dropCap: !dropCap }),
            help: helpText,
            disabled: hasDropCapDisabled(textAlign)
          }
        )
      }
    ) });
  }
  function ParagraphBlock({
    attributes: attributes2,
    mergeBlocks,
    onReplace,
    onRemove,
    setAttributes,
    clientId,
    isSelected: isSingleSelected,
    name: name118
  }) {
    const { content, direction, dropCap, placeholder: placeholder2, style: style2 } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    useDeprecatedAlign(attributes2.align, style2, setAttributes);
    const blockProps = (0, import_block_editor172.useBlockProps)({
      ref: useOnEnter({ clientId, content }),
      className: clsx_default({
        "has-drop-cap": hasDropCapDisabled(textAlign) ? false : dropCap
      }),
      style: { direction },
      "aria-label": import_block_editor172.RichText.isEmpty(content) ? (0, import_i18n153.__)(
        "Empty block; start writing or type forward slash to choose a block"
      ) : (0, import_i18n153.__)("Block: Paragraph")
    });
    const blockEditingMode = (0, import_block_editor172.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime384.jsxs)(import_jsx_runtime384.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(import_block_editor172.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
        ParagraphRTLControl,
        {
          direction,
          setDirection: (newDirection) => setAttributes({ direction: newDirection })
        }
      ) }),
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
        DropCapControl,
        {
          name: name118,
          clientId,
          attributes: attributes2,
          setAttributes
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime384.jsx)(
        import_block_editor172.RichText,
        {
          identifier: "content",
          tagName: "p",
          ...blockProps,
          value: content,
          onChange: (newContent) => setAttributes({ content: newContent }),
          onMerge: mergeBlocks,
          onReplace,
          onRemove,
          "data-empty": import_block_editor172.RichText.isEmpty(content),
          placeholder: placeholder2 || (0, import_i18n153.__)("Type / to choose a block"),
          "data-custom-placeholder": placeholder2 ? true : void 0,
          __unstableEmbedURLOnPaste: true,
          __unstableAllowPrefixTransformations: true
        }
      )
    ] });
  }
  var edit_default18 = ParagraphBlock;

  // packages/block-library/build-module/paragraph/block.json
  var block_default58 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/paragraph",
    title: "Paragraph",
    category: "text",
    description: "Start with the basic building block of all narrative.",
    keywords: ["text"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "p",
        role: "content"
      },
      dropCap: {
        type: "boolean",
        default: false
      },
      placeholder: {
        type: "string"
      },
      direction: {
        type: "string",
        enum: ["ltr", "rtl"]
      }
    },
    supports: {
      align: ["wide", "full"],
      splitting: true,
      anchor: true,
      className: false,
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        textColumns: true,
        textIndent: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalWritingMode: true,
        textShadow: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalSelector: "p",
      __unstablePasteTextInline: true,
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: "p",
      typography: {
        textIndent: ".wp-block-paragraph + .wp-block-paragraph"
      }
    },
    editorStyle: "wp-block-paragraph-editor",
    style: "wp-block-paragraph"
  };

  // packages/block-library/build-module/paragraph/save.mjs
  var import_block_editor173 = __toESM(require_block_editor(), 1);
  var import_i18n154 = __toESM(require_i18n(), 1);
  var import_jsx_runtime385 = __toESM(require_jsx_runtime(), 1);
  function save33({ attributes: attributes2 }) {
    const { content, dropCap, direction, style: style2 } = attributes2;
    const textAlign = style2?.typography?.textAlign;
    const className = clsx_default({
      "has-drop-cap": textAlign === ((0, import_i18n154.isRTL)() ? "left" : "right") || textAlign === "center" ? false : dropCap
    });
    return /* @__PURE__ */ (0, import_jsx_runtime385.jsx)("p", { ...import_block_editor173.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0, import_jsx_runtime385.jsx)(import_block_editor173.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/paragraph/transforms.mjs
  var import_blocks64 = __toESM(require_blocks(), 1);
  var { name: name58 } = block_default58;
  var transforms21 = {
    from: [
      {
        type: "raw",
        // Paragraph is a fallback and should be matched last.
        priority: 20,
        selector: "p",
        schema: ({ phrasingContentSchema, isPaste }) => ({
          p: {
            children: phrasingContentSchema,
            attributes: isPaste ? [] : ["style", "id"]
          }
        }),
        transform(node) {
          const attributes2 = (0, import_blocks64.getBlockAttributes)(name58, node.outerHTML);
          const { textAlign } = node.style || {};
          if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
            attributes2.style = {
              ...attributes2.style,
              typography: {
                ...attributes2.style?.typography,
                textAlign
              }
            };
          }
          return (0, import_blocks64.createBlock)(name58, attributes2);
        }
      }
    ]
  };
  var transforms_default22 = transforms21;

  // packages/block-library/build-module/paragraph/index.mjs
  var { editableRootKey } = unlock(import_blocks65.privateApis);
  var { name: name59 } = block_default58;
  var settings58 = {
    icon: paragraph_default,
    // Opt into the editing host behaviour privately. It's a Symbol setting
    // rather than a public `supports` key so it stays an internal detail.
    [editableRootKey]: true,
    example: {
      attributes: {
        content: (0, import_i18n155.__)(
          "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
        )
      }
    },
    __experimentalLabel(attributes2, { context }) {
      const customName = attributes2?.metadata?.name;
      if ((context === "list-view" || context === "breadcrumb") && customName) {
        return customName;
      }
      if (context === "accessibility") {
        if (customName) {
          return customName;
        }
        const { content } = attributes2;
        return !content || content.length === 0 ? (0, import_i18n155.__)("Empty") : content;
      }
    },
    transforms: transforms_default22,
    deprecated: deprecated_default28,
    merge(attributes2, attributesToMerge) {
      return {
        content: (attributes2.content || "") + (attributesToMerge.content || "")
      };
    },
    edit: edit_default18,
    save: save33
  };
  var init58 = () => initBlock({ name: name59, metadata: block_default58, settings: settings58 });

  // packages/block-library/build-module/playlist/index.mjs
  var playlist_exports = {};
  __export(playlist_exports, {
    init: () => init59,
    metadata: () => block_default59,
    name: () => name60,
    settings: () => settings59
  });

  // packages/block-library/build-module/playlist/block.json
  var block_default59 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/playlist",
    title: "Playlist",
    category: "media",
    description: "Embed a simple playlist.",
    keywords: ["music", "sound"],
    textdomain: "default",
    allowedBlocks: ["core/playlist-track"],
    attributes: {
      type: {
        type: "string",
        default: "audio"
      },
      order: {
        type: "string",
        default: "asc"
      },
      showTracklist: {
        type: "boolean",
        default: true
      },
      showImages: {
        type: "boolean",
        default: true
      },
      showPlayButtonArtwork: {
        type: "boolean",
        default: false
      },
      showArtists: {
        type: "boolean",
        default: true
      },
      showNumbers: {
        type: "boolean",
        default: true
      },
      showTrackLength: {
        type: "boolean",
        default: true
      },
      waveformStyle: {
        type: "string",
        enum: ["bars", "mirror", "line", "blocks", "dots", "seekbar"],
        default: "bars"
      },
      waveformColor: {
        type: "string"
      },
      waveformGradient: {
        type: "string"
      },
      waveformBackgroundColor: {
        type: "string"
      },
      waveformBackgroundGradient: {
        type: "string"
      },
      caption: {
        type: "string"
      }
    },
    providesContext: {
      showArtists: "showArtists",
      showImages: "showImages"
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      __experimentalBorder: {
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      interactivity: true,
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      }
    },
    editorStyle: "wp-block-playlist-editor",
    style: "wp-block-playlist"
  };

  // packages/block-library/build-module/playlist/edit.mjs
  var import_element117 = __toESM(require_element(), 1);
  var import_block_editor174 = __toESM(require_block_editor(), 1);
  var import_components100 = __toESM(require_components(), 1);
  var import_data101 = __toESM(require_data(), 1);
  var import_notices15 = __toESM(require_notices(), 1);
  var import_i18n158 = __toESM(require_i18n(), 1);
  var import_blocks66 = __toESM(require_blocks(), 1);
  var import_blob16 = __toESM(require_blob(), 1);

  // packages/block-library/build-module/utils/waveform-player.mjs
  var import_element115 = __toESM(require_element(), 1);
  var import_compose47 = __toESM(require_compose(), 1);
  var import_i18n156 = __toESM(require_i18n(), 1);

  // node_modules/@arraypress/waveform-player/dist/waveform-player.esm.js
  function $2(e3) {
    let t = -1 / 0;
    for (let i = 0; i < e3.length; i++) e3[i] > t && (t = e3[i]);
    return t;
  }
  function S(e3) {
    return String(e3 ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
  }
  function q2(e3) {
    return S(typeof e3 == "number" ? `${e3}px` : e3);
  }
  function st(e3) {
    if (typeof e3 != "string" || e3 === "") return false;
    try {
      let t = new URL(e3, "http://localhost/");
      return t.protocol === "http:" || t.protocol === "https:";
    } catch {
      return false;
    }
  }
  function m2(e3, t = 0, i = 1) {
    return Math.max(t, Math.min(e3, i));
  }
  function _(e3, t = null, i = {}) {
    let { min: s = -1 / 0, max: r2 = 1 / 0, integer: a = false } = i, o = typeof e3 == "number" ? e3 : typeof e3 == "string" && e3.trim() !== "" ? Number(e3) : NaN;
    if (!Number.isFinite(o)) return t;
    let n = m2(o, s, r2);
    return a ? Math.round(n) : n;
  }
  function H2(e3, t = null) {
    if (Array.isArray(e3)) return e3;
    if (typeof e3 == "string" && e3.trim().startsWith("[")) try {
      let i = JSON.parse(e3);
      if (Array.isArray(i)) return i;
    } catch {
    }
    return t;
  }
  function D2(e3, t = {}) {
    let { min: i = -1 / 0, max: s = 1 / 0, fallback: r2 = null } = t, a = H2(e3);
    if (!a && typeof e3 == "string" && e3.trim() !== "" && (a = e3.split(/[,\s]+/)), !a) return r2;
    let o = a.map((n) => _(n)).filter((n) => n !== null && n >= i && n <= s);
    return o.length ? o : r2;
  }
  function rt(e3, t, i = null) {
    return t.includes(e3) ? e3 : i;
  }
  function at(e3) {
    if (typeof e3 == "string") {
      let t = e3.trim().toLowerCase();
      return t !== "" && t !== "false" && t !== "0";
    }
    return !!e3;
  }
  function vt(e3) {
    return e3 === void 0 ? void 0 : e3 === "true";
  }
  function it(e3) {
    if (typeof e3 == "string" && e3.trim().startsWith("[")) try {
      return JSON.parse(e3);
    } catch {
    }
    return e3;
  }
  function O(e3) {
    let t = {}, i = (o, n = o) => {
      let l2 = vt(e3.dataset[n]);
      l2 !== void 0 && (t[o] = l2);
    }, s = (o, n = o, l2 = false) => {
      let h = e3.dataset[n];
      h && (t[o] = l2 ? parseFloat(h) : parseInt(h, 10));
    }, r2 = (o, n = o) => {
      let l2 = e3.dataset[n];
      l2 && (t[o] = /^\d+(\.\d+)?$/.test(l2.trim()) ? parseFloat(l2) : l2);
    }, a = (o, n = o) => {
      let l2 = e3.dataset[n];
      if (!l2) return;
      let h = H2(l2);
      h ? t[o] = h : console.warn(`[WaveformPlayer] Invalid ${n} attribute, expected a JSON array:`, l2);
    };
    if (e3.dataset.src && (t.url = e3.dataset.src), e3.dataset.url && (t.url = e3.dataset.url), s("height"), s("samples"), e3.dataset.preload && (t.preload = e3.dataset.preload), e3.dataset.crossOrigin && (t.crossOrigin = e3.dataset.crossOrigin), e3.dataset.audioMode && (t.audioMode = e3.dataset.audioMode), e3.dataset.style && (t.waveformStyle = e3.dataset.style), e3.dataset.waveformStyle && (t.waveformStyle = e3.dataset.waveformStyle), e3.dataset.waveformGradient && (t.waveformGradient = e3.dataset.waveformGradient), s("barWidth"), s("barSpacing"), s("barRadius"), e3.dataset.buttonAlign && (t.buttonAlign = e3.dataset.buttonAlign), e3.dataset.layout && (t.layout = e3.dataset.layout), e3.dataset.buttonStyle && (t.buttonStyle = e3.dataset.buttonStyle), r2("buttonSize"), r2("buttonRadius"), e3.dataset.colorPreset && (t.colorPreset = e3.dataset.colorPreset), e3.dataset.waveformColor && (t.waveformColor = it(e3.dataset.waveformColor)), e3.dataset.progressColor && (t.progressColor = it(e3.dataset.progressColor)), e3.dataset.color && (t.waveformColor = e3.dataset.color), e3.dataset.theme && (t.colorPreset = e3.dataset.theme), i("autoplay"), i("showControls"), i("showInfo"), i("showTime"), i("showHoverTime"), i("seekHandle"), i("showBPM", "showBpm"), s("bpm"), i("singlePlay"), i("playOnSeek"), e3.dataset.title && (t.title = e3.dataset.title), e3.dataset.artist && (t.artist = e3.dataset.artist), e3.dataset.album && (t.album = e3.dataset.album), e3.dataset.artwork && (t.artwork = e3.dataset.artwork), e3.dataset.artworkPosition && (t.artworkPosition = e3.dataset.artworkPosition), e3.dataset.waveform && (t.waveform = e3.dataset.waveform), a("markers"), s("playbackRate", "playbackRate", true), i("showPlaybackSpeed"), e3.dataset.playbackRates) {
      let o = D2(e3.dataset.playbackRates);
      o ? t.playbackRates = o : console.warn("[WaveformPlayer] Invalid playbackRates attribute:", e3.dataset.playbackRates);
    }
    return i("enableMediaSession"), i("showMarkers"), i("accessibleSeek"), e3.dataset.seekLabel && (t.seekLabel = e3.dataset.seekLabel), e3.dataset.seekValueText && (t.seekValueText = e3.dataset.seekValueText), e3.dataset.errorText && (t.errorText = e3.dataset.errorText), e3.dataset.playPauseLabel && (t.playPauseLabel = e3.dataset.playPauseLabel), e3.dataset.speedLabel && (t.speedLabel = e3.dataset.speedLabel), e3.dataset.artworkAlt && (t.artworkAlt = e3.dataset.artworkAlt), e3.dataset.unknownTrackText && (t.unknownTrackText = e3.dataset.unknownTrackText), t;
  }
  function ot(e3, ...t) {
    let i = 0;
    return e3.replace(/%(?:(\d+)\$)?s/g, (s, r2) => {
      let a = r2 ? Number(r2) - 1 : i++;
      return t[a] ?? s;
    });
  }
  function E2(e3) {
    let t = Number(e3);
    if (!t || !Number.isFinite(t) || t < 0) return "0:00";
    let i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60), r2 = Math.floor(t % 60);
    return i > 0 ? `${i}:${s.toString().padStart(2, "0")}:${r2.toString().padStart(2, "0")}` : `${s}:${r2.toString().padStart(2, "0")}`;
  }
  var St = 0;
  function nt(e3) {
    let t = e3 || "audio", i = 5381;
    for (let s = 0; s < t.length; s++) i = (i << 5) + i + t.charCodeAt(s) | 0;
    return `wp_${(i >>> 0).toString(36)}_${(St++).toString(36)}`;
  }
  function I(e3) {
    if (!e3) return "Audio";
    let t = e3.split("/");
    return t[t.length - 1].split(".")[0].replace(/[-_]/g, " ").replace(/\b\w/g, (r2) => r2.toUpperCase());
  }
  function U(e3) {
    if (typeof e3 != "string") return null;
    let t = e3.match(/rgba?\(\s*([\d.]+)\s*[,\s]\s*([\d.]+)\s*[,\s]\s*([\d.]+)\s*(?:[,/]\s*([\d.]+)(%?))?/i);
    if (!t) return null;
    let i = Number(t[1]), s = Number(t[2]), r2 = Number(t[3]);
    if (!Number.isFinite(i) || !Number.isFinite(s) || !Number.isFinite(r2)) return null;
    let a = t[4] === void 0 ? 1 : Number(t[4]);
    return Number.isFinite(a) ? (t[5] === "%" && (a /= 100), { r: i, g: s, b: r2, a: m2(a, 0, 1) }) : null;
  }
  function lt(e3) {
    let t = U(e3);
    return !t || t.a <= 0 ? null : (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
  }
  function j2(...e3) {
    let t = {};
    for (let i of e3) for (let s in i) i[s] !== null && i[s] !== void 0 && (t[s] = i[s]);
    return t;
  }
  function ht(e3, t) {
    let i;
    return function(...r2) {
      let a = () => {
        clearTimeout(i), e3(...r2);
      };
      clearTimeout(i), i = setTimeout(a, t);
    };
  }
  function B(e3, t) {
    if (e3.length === t) return e3;
    if (e3.length === 0 || t === 0) return [];
    let i = [];
    if (t > e3.length) {
      let s = (e3.length - 1) / (t - 1);
      for (let r2 = 0; r2 < t; r2++) {
        let a = r2 * s, o = Math.floor(a), n = Math.ceil(a), l2 = a - o;
        if (n >= e3.length) i.push(e3[e3.length - 1]);
        else if (o === n) i.push(e3[o]);
        else {
          let h = e3[o] * (1 - l2) + e3[n] * l2;
          i.push(h);
        }
      }
    } else {
      let s = e3.length / t;
      for (let r2 = 0; r2 < t; r2++) {
        let a = Math.floor(r2 * s), o = Math.floor((r2 + 1) * s), n = 0, l2 = 0;
        for (let h = a; h <= o && h < e3.length; h++) e3[h] > n && (n = e3[h]), l2++;
        if (l2 === 0) {
          let h = Math.min(Math.round(r2 * s), e3.length - 1);
          n = e3[h];
        }
        i.push(n);
      }
    }
    return i;
  }
  function P(e3, t, i, s) {
    if (!Array.isArray(t)) return t;
    if (t.length < 2) return t[0];
    let r2 = i.width, a = i.height, o = s && s.waveformGradient, [n, l2, h, c2] = o === "horizontal" ? [0, 0, r2, 0] : o === "diagonal" ? [0, 0, r2, a] : [0, 0, 0, a];
    try {
      let d = e3.createLinearGradient(n, l2, h, c2);
      return t.forEach((b, y2) => d.addColorStop(y2 / (t.length - 1), b)), d;
    } catch {
      return t[0];
    }
  }
  function x2(e3, t, i, s, r2, a) {
    if ((Array.isArray(a) ? a.some((n) => n > 0) : a > 0) && typeof e3.roundRect == "function") {
      let n = Math.min(s / 2, Math.abs(r2) / 2), l2 = (h) => m2(h, 0, n);
      e3.beginPath(), e3.roundRect(t, i, s, r2, Array.isArray(a) ? a.map(l2) : l2(a)), e3.fill();
    } else e3.fillRect(t, i, s, r2);
  }
  function pt(e3, t) {
    return (e3.barRadius || 0) * t;
  }
  function Et(e3, t) {
    let i = pt(e3, t);
    return [i, i, 0, 0];
  }
  function ct(e3, t, i, s, r2) {
    let a = r2 / 2;
    e3.beginPath(), e3.moveTo(t, s - a), e3.lineTo(i - a, s - a), e3.arc(i - a, s, a, -Math.PI / 2, Math.PI / 2), e3.lineTo(t, s + a), e3.arc(t, s, a, Math.PI / 2, -Math.PI / 2), e3.closePath();
  }
  function V(e3, t, i, s, r2) {
    let a = window.devicePixelRatio || 1, o = r2.barWidth * a, n = r2.barSpacing * a, l2 = Math.floor(t.width / (o + n)), h = B(i, l2), c2 = t.height, d = s * t.width, b = Et(r2, a), y2 = P(e3, r2.color, t, r2), w2 = P(e3, r2.progressColor, t, r2);
    e3.clearRect(0, 0, t.width, t.height), e3.fillStyle = y2;
    for (let f = 0; f < h.length; f++) {
      let p2 = f * (o + n);
      if (p2 + o > t.width) break;
      let g2 = h[f] * c2 * 0.9, u = c2 - g2;
      x2(e3, p2, u, o, g2, b);
    }
    e3.save(), e3.beginPath(), e3.rect(0, 0, d, c2), e3.clip(), e3.fillStyle = w2;
    for (let f = 0; f < h.length; f++) {
      let p2 = f * (o + n);
      if (p2 > d) break;
      let g2 = h[f] * c2 * 0.9, u = c2 - g2;
      x2(e3, p2, u, o, g2, b);
    }
    e3.restore();
  }
  function Pt(e3, t, i, s, r2) {
    let a = window.devicePixelRatio || 1, o = r2.barWidth * a, n = r2.barSpacing * a, l2 = Math.floor(t.width / (o + n)), h = B(i, l2), c2 = t.height, d = c2 / 2, b = s * t.width, y2 = pt(r2, a), w2 = [y2, y2, 0, 0], f = [0, 0, y2, y2], p2 = P(e3, r2.color, t, r2), g2 = P(e3, r2.progressColor, t, r2);
    e3.clearRect(0, 0, t.width, t.height), e3.fillStyle = p2;
    for (let u = 0; u < h.length; u++) {
      let k2 = u * (o + n);
      if (k2 + o > t.width) break;
      let v20 = h[u] * c2 * 0.45;
      x2(e3, k2, d - v20, o, v20, w2), x2(e3, k2, d, o, v20, f);
    }
    e3.save(), e3.beginPath(), e3.rect(0, 0, b, c2), e3.clip(), e3.fillStyle = g2;
    for (let u = 0; u < h.length; u++) {
      let k2 = u * (o + n);
      if (k2 > b) break;
      let v20 = h[u] * c2 * 0.45;
      x2(e3, k2, d - v20, o, v20, w2), x2(e3, k2, d, o, v20, f);
    }
    e3.restore();
  }
  function Tt(e3, t, i, s, r2) {
    let a = t.width, o = t.height, n = o / 2, l2 = o * 0.35;
    e3.clearRect(0, 0, a, o);
    let h = (c2, d, b = 1, y2 = false) => {
      let w2 = P(e3, c2, t, r2), f = Array.isArray(c2) ? c2[c2.length - 1] : c2;
      y2 && (e3.shadowBlur = 12, e3.shadowColor = f), e3.strokeStyle = w2, e3.lineWidth = d, e3.lineCap = "round", e3.lineJoin = "round", e3.beginPath(), e3.moveTo(0, n);
      let p2 = [], g2 = Math.floor(i.length * b);
      for (let u = 0; u < g2; u++) {
        let k2 = u / (i.length - 1) * a, v20 = i[u], A2 = Math.sin(u * 0.1) * v20, L = n + A2 * l2;
        p2.push({ x: k2, y: L });
      }
      for (let u = 0; u < p2.length - 1; u++) {
        let k2 = p2[u].x + (p2[u + 1].x - p2[u].x) * 0.5, v20 = p2[u].y, A2 = p2[u + 1].x - (p2[u + 1].x - p2[u].x) * 0.5, L = p2[u + 1].y;
        e3.bezierCurveTo(k2, v20, A2, L, p2[u + 1].x, p2[u + 1].y);
      }
      e3.stroke(), y2 && (e3.shadowBlur = 0);
    };
    e3.strokeStyle = "rgba(255, 255, 255, 0.03)", e3.lineWidth = 0.5, e3.beginPath(), e3.moveTo(0, n), e3.lineTo(a, n), e3.stroke();
    for (let c2 = 0; c2 <= 10; c2++) {
      let d = a / 10 * c2;
      e3.beginPath(), e3.moveTo(d, 0), e3.lineTo(d, o), e3.stroke();
    }
    h(r2.color, 2, 1, false), s > 0 && h(r2.progressColor, 3, s, true);
  }
  function ut(e3, t, i, s, r2) {
    let a = window.devicePixelRatio || 1, o = (r2.barWidth || 3) * a, n = (r2.barSpacing || 1) * a, l2 = Math.floor(t.width / (o + n)), h = B(i, l2), c2 = t.height, d = 4 * a, b = 2 * a, y2 = s * t.width, w2 = c2 / 2, f = P(e3, r2.color, t, r2), p2 = P(e3, r2.progressColor, t, r2);
    e3.clearRect(0, 0, t.width, t.height);
    for (let g2 = 0; g2 < h.length; g2++) {
      let u = g2 * (o + n);
      if (u + o > t.width) break;
      let k2 = h[g2] * c2 * 0.9, v20 = Math.floor(k2 / (d + b));
      e3.fillStyle = u < y2 ? p2 : f;
      for (let A2 = 0; A2 < v20; A2++) {
        let L = A2 * (d + b);
        e3.fillRect(u, w2 - L - d, o, d), A2 > 0 && e3.fillRect(u, w2 + L, o, d);
      }
    }
  }
  function dt(e3, t, i, s, r2) {
    let a = window.devicePixelRatio || 1, o = (r2.barWidth || 2) * a, n = (r2.barSpacing || 3) * a, l2 = Math.floor(t.width / (o + n)), h = B(i, l2), c2 = t.height, d = Math.max(1.5 * a, o / 2), b = s * t.width, y2 = c2 / 2, w2 = P(e3, r2.color, t, r2), f = P(e3, r2.progressColor, t, r2);
    e3.clearRect(0, 0, t.width, t.height);
    for (let p2 = 0; p2 < h.length; p2++) {
      let g2 = p2 * (o + n) + o / 2;
      if (g2 > t.width) break;
      let u = h[p2] * c2 * 0.9;
      e3.fillStyle = g2 < b ? f : w2, e3.beginPath(), e3.arc(g2, y2 - u / 2, d, 0, Math.PI * 2), e3.fill(), e3.beginPath(), e3.arc(g2, y2 + u / 2, d, 0, Math.PI * 2), e3.fill();
    }
  }
  function At(e3, t, i, s, r2) {
    let a = t.width, o = t.height, n = o / 2, l2 = 4, h = l2 / 2, c2 = !!r2.seekActive;
    if (e3.clearRect(0, 0, a, o), e3.fillStyle = P(e3, r2.color, t, r2) || "rgba(255, 255, 255, 0.2)", ct(e3, h, a, n, l2), e3.fill(), s > 0) {
      let d = Math.max(h * 2, s * a);
      e3.save(), e3.globalAlpha = r2.seekHandle && !c2 ? 0.7 : 1, e3.fillStyle = P(e3, r2.progressColor, t, r2) || "rgba(255, 255, 255, 0.9)", ct(e3, h, d, n, l2), e3.fill(), e3.restore();
    }
  }
  var Mt = { bars: V, bar: V, mirror: Pt, line: Tt, blocks: ut, block: ut, dots: dt, dot: dt, seekbar: At };
  function ft(e3, t, i, s, r2) {
    (Mt[r2.waveformStyle] || V)(e3, t, i, s, r2);
  }
  function mt(e3) {
    try {
      let t = e3.getChannelData(0), i = e3.sampleRate, s = Ct(t, i);
      if (s.length < 2) return 120;
      let r2 = [];
      for (let l2 = 1; l2 < s.length; l2++) r2.push((s[l2] - s[l2 - 1]) / i);
      let a = {};
      r2.forEach((l2) => {
        let h = 60 / l2, c2 = Math.round(h / 3) * 3;
        c2 > 60 && c2 < 200 && (a[c2] = (a[c2] || 0) + 1);
      });
      let o = 0, n = 120;
      for (let [l2, h] of Object.entries(a)) h > o && (o = h, n = parseInt(l2));
      return n < 70 && a[n * 2] ? n *= 2 : n > 160 && a[Math.round(n / 2)] && (n = Math.round(n / 2)), n - 1;
    } catch (t) {
      return console.warn("[WaveformPlayer] BPM detection failed:", t), null;
    }
  }
  function Ct(e3, t) {
    let r2 = [], a = 0;
    for (let o = 0; o < e3.length - 2048; o += 1024) {
      let n = 0;
      for (let c2 = o; c2 < o + 2048; c2++) n += e3[c2] * e3[c2];
      n = n / 2048;
      let l2 = n - a, h = a * 1.8 + 0.01;
      if (l2 > h && n > 0.01) {
        let c2 = r2[r2.length - 1] || 0, d = t * 0.15;
        o - c2 > d && r2.push(o);
      }
      a = n * 0.8 + a * 0.2;
    }
    return r2;
  }
  function Lt(e3, t = 1800) {
    let i = e3.length / t, s = e3.numberOfChannels, r2 = [];
    for (let o = 0; o < s; o++) {
      let n = e3.getChannelData(o);
      for (let l2 = 0; l2 < t; l2++) {
        let h = ~~(l2 * i), c2 = ~~(h + i), d = 0, b = 0;
        for (let w2 = h; w2 < c2; w2++) {
          let f = n[w2];
          f > b && (b = f), f < d && (d = f);
        }
        let y2 = Math.max(Math.abs(b), Math.abs(d));
        (o === 0 || y2 > r2[l2]) && (r2[l2] = y2);
      }
    }
    let a = $2(r2);
    return a > 0 ? r2.map((o) => o / a) : r2;
  }
  async function G2(e3, t = 1800, i = false) {
    let s;
    try {
      let r2 = window.AudioContext || window.webkitAudioContext;
      s = new r2();
      let o = await (await fetch(e3)).arrayBuffer(), n = await s.decodeAudioData(o), l2 = Lt(n, t);
      l2 = _t(l2);
      let h = null;
      return i && (h = mt(n)), { peaks: l2, bpm: h };
    } finally {
      s && s.close();
    }
  }
  function yt(e3 = 1800) {
    let t = [];
    for (let i = 0; i < e3; i++) {
      let s = Math.random() * 0.5 + 0.3, r2 = Math.sin(i / e3 * Math.PI * 4) * 0.2;
      t.push(m2(s + r2, 0.1, 1));
    }
    return t;
  }
  function _t(e3, t = 0.95) {
    let i = $2(e3);
    if (i === 0 || i > t) return e3;
    let s = t / i;
    return e3.map((r2) => r2 * s);
  }
  var K = 128;
  function gt(e3) {
    let t = document.documentElement, i = document.body;
    return t.classList.contains(e3) || t.classList.contains(`${e3}-mode`) || t.classList.contains(`theme-${e3}`) || t.getAttribute("data-theme") === e3 || t.getAttribute("data-color-scheme") === e3 || i.classList.contains(e3) || i.classList.contains(`${e3}-mode`) || i.getAttribute("data-theme") === e3;
  }
  function xt(e3) {
    let t = 0, i = 0;
    for (let s = e3; s && s.nodeType === 1 && i < 0.995; s = s.parentElement) {
      let r2 = U(getComputedStyle(s).backgroundColor);
      if (!r2 || r2.a <= 0) continue;
      let a = r2.a * (1 - i);
      t += (r2.r * 299 + r2.g * 587 + r2.b * 114) / 1e3 * a, i += a;
    }
    return { sum: t, alpha: i };
  }
  function Rt() {
    let e3 = lt(getComputedStyle(document.body).color);
    if (e3 !== null) return e3 > K ? "dark" : "light";
    if (window.matchMedia) {
      if (window.matchMedia("(prefers-color-scheme: dark)").matches) return "dark";
      if (window.matchMedia("(prefers-color-scheme: light)").matches) return "light";
    }
    return "dark";
  }
  function R2(e3) {
    if (gt("dark")) return "dark";
    if (gt("light")) return "light";
    try {
      let t = e3 && e3.nodeType === 1 ? e3 : document.body, { sum: i, alpha: s } = xt(t), r2 = Rt(), a = i + (r2 === "dark" ? 0 : 255) * (1 - s);
      return a > K ? "light" : a < K ? "dark" : r2;
    } catch {
      return "dark";
    }
  }
  var C2 = { dark: { waveformColor: "rgba(255, 255, 255, 0.3)", progressColor: "rgba(255, 255, 255, 0.9)" }, light: { waveformColor: "rgba(0, 0, 0, 0.2)", progressColor: "rgba(0, 0, 0, 0.8)" } };
  function J(e3, t) {
    if (e3 && C2[e3]) return C2[e3];
    let i = R2(t);
    return C2[i];
  }
  var W = { url: "", height: 64, samples: 1800, preload: "metadata", crossOrigin: null, audioMode: "self", playbackRate: 1, showPlaybackSpeed: false, playbackRates: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], buttonAlign: "auto", layout: "default", buttonStyle: "circle", buttonSize: null, buttonRadius: null, waveformStyle: "mirror", barWidth: 2, barSpacing: 0, barRadius: 1, waveformGradient: "vertical", colorPreset: null, waveformColor: null, progressColor: null, autoplay: false, showControls: true, showInfo: true, showTime: true, showHoverTime: false, seekHandle: false, showBPM: false, bpm: null, singlePlay: true, playOnSeek: true, enableMediaSession: true, markers: [], showMarkers: true, accessibleSeek: true, seekLabel: null, seekValueText: null, title: null, artist: null, artwork: null, artworkPosition: "info", album: "", errorText: "Unable to load audio", playPauseLabel: "Play/Pause", speedLabel: "Playback speed", artworkAlt: "Album artwork", unknownTrackText: "Unknown Track", playIcon: '<svg viewBox="0 0 24 24" width="16" height="16"><path d="M8 5v14l11-7z"/></svg>', pauseIcon: '<svg viewBox="0 0 24 24" width="16" height="16"><path d="M6 4h4v16H6zM14 4h4v16h-4z"/></svg>', onLoad: null, onPlay: null, onPause: null, onEnd: null, onError: null, onTimeUpdate: null, onNextTrack: null, onPreviousTrack: null };
  var X = { bars: { barWidth: 3, barSpacing: 1 }, mirror: { barWidth: 2, barSpacing: 2 }, line: { barWidth: 2, barSpacing: 0 }, blocks: { barWidth: 4, barSpacing: 2 }, dots: { barWidth: 3, barSpacing: 3 }, seekbar: { barWidth: 1, barSpacing: 0 } };
  var Q = ["auto", "top", "center", "bottom"];
  var N2 = 0.25;
  var F = 4;
  var Dt = { buttonAlign: Q, layout: ["default", "preview"], buttonStyle: ["circle", "minimal"], artworkPosition: ["info", "button"], waveformStyle: Object.keys(X), waveformGradient: ["vertical", "horizontal", "diagonal"], audioMode: ["self", "external"], preload: ["none", "metadata", "auto"], colorPreset: Object.keys(C2), crossOrigin: ["anonymous", "use-credentials"] };
  var Bt = { height: { min: 1, integer: true }, samples: { min: 1, integer: true }, barWidth: { min: 0 }, barSpacing: { min: 0 }, barRadius: { min: 0 }, bpm: { min: 1 }, playbackRate: { min: N2, max: F } };
  var Ht = ["autoplay", "showControls", "showInfo", "showTime", "showHoverTime", "seekHandle", "showBPM", "singlePlay", "playOnSeek", "enableMediaSession", "showMarkers", "accessibleSeek", "showPlaybackSpeed"];
  var Ot = ["onLoad", "onPlay", "onPause", "onEnd", "onError", "onTimeUpdate", "onNextTrack", "onPreviousTrack"];
  function Y(e3, t) {
    console.warn(`[WaveformPlayer] Invalid ${e3} option, using default:`, t);
  }
  function z(e3) {
    let t = H2(e3);
    return t ? t.reduce((i, s) => {
      let r2 = s && typeof s == "object" ? _(s.time, null, { min: 0 }) : null;
      return r2 === null ? (Y("marker", s), i) : (i.push({ ...s, time: r2, label: s.label == null ? "" : s.label }), i);
    }, []) : (e3 != null && Y("markers", e3), []);
  }
  function Z(e3) {
    let t = (s) => e3[s] != null, i = (s) => {
      Y(s, e3[s]), e3[s] = W[s];
    };
    for (let [s, r2] of Object.entries(Bt)) {
      if (!t(s)) continue;
      let a = _(e3[s], null, r2);
      a === null ? i(s) : e3[s] = a;
    }
    for (let [s, r2] of Object.entries(Dt)) t(s) && rt(e3[s], r2) === null && i(s);
    for (let s of Ht) e3[s] = at(e3[s]);
    for (let s of Ot) t(s) && typeof e3[s] != "function" && i(s);
    if (t("playbackRates")) {
      let s = D2(e3.playbackRates, { min: N2, max: F, fallback: null });
      s === null ? i("playbackRates") : e3.playbackRates = s;
    }
    e3.markers = z(e3.markers);
    for (let s of ["buttonSize", "buttonRadius"]) {
      if (!t(s)) continue;
      let r2 = e3[s];
      (typeof r2 == "number" ? Number.isFinite(r2) : typeof r2 == "string" && r2.trim() !== "") || i(s);
    }
    for (let s of ["waveformColor", "progressColor"]) {
      if (!t(s)) continue;
      let r2 = e3[s];
      !(typeof r2 == "string" && r2.trim() !== "") && !Array.isArray(r2) && i(s);
    }
    return e3;
  }
  var It = "data:image/svg+xml," + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="4" fill="#71717a" fill-opacity="0.15"/><g fill="none" stroke="#a1a1aa" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="17" r="2.2"/><circle cx="17" cy="15" r="2.2"/><path d="M10.2 17V7l9-1.6v9"/></g></svg>');
  var bt = 5;
  var wt = 10;
  var Wt = 'button, a[href], input, [role="slider"]';
  var T = class e2 {
    static instances = /* @__PURE__ */ new Map();
    static currentlyPlaying = null;
    constructor(t, i = {}) {
      if (this.container = typeof t == "string" ? document.querySelector(t) : t, !this.container) throw new Error("[WaveformPlayer] Container element not found");
      let s = O(this.container), r2 = { ...i };
      r2.style && !r2.waveformStyle && (r2.waveformStyle = r2.style), r2.src && !r2.url && (r2.url = r2.src), this.options = Z(j2(W, s, r2));
      let a = J(this.options.colorPreset, this.container);
      this._autoTheme = this.options.colorPreset == null || !C2[this.options.colorPreset], this._presetKeys = [], this._scheme = this.options.colorPreset && C2[this.options.colorPreset] ? this.options.colorPreset : R2(this.container);
      for (let [n, l2] of Object.entries(a)) (this.options[n] === null || this.options[n] === void 0) && (this.options[n] = l2, this._presetKeys.push(n));
      let o = X[this.options.waveformStyle];
      o && (s.barWidth === void 0 && i.barWidth === void 0 && (this.options.barWidth = o.barWidth), s.barSpacing === void 0 && i.barSpacing === void 0 && (this.options.barSpacing = o.barSpacing)), this.audio = null, this.canvas = null, this.ctx = null, this.waveformData = [], this.progress = 0, this._activeMarkerIndex = -1, this._markerLabelTimer = null, this.isPlaying = false, this.isLoading = false, this.hasError = false, this.updateTimer = null, this.resizeObserver = null, this._ac = new AbortController(), this.id = this.container.id || nt(this.options.url), e2.instances.set(this.id, this), e2._watchTheme();
      try {
        this.init();
      } catch (n) {
        throw e2.instances.delete(this.id), this._ac.abort(), n;
      }
      setTimeout(() => {
        this._emit("waveformplayer:ready", { player: this, url: this.options.url });
      }, 100);
    }
    _emit(t, i, s = false) {
      let r2 = new CustomEvent(t, { bubbles: true, cancelable: s, detail: i });
      return this.container.dispatchEvent(r2), r2;
    }
    _requestSeek(t) {
      this._emit("waveformplayer:request-seek", { ...this._buildTrackDetail(), percent: t }, true).defaultPrevented || (this.progress = t, this.drawWaveform?.());
    }
    init() {
      this.createDOM(), this.createAudio(), this.initPlaybackSpeed(), this.initKeyboardControls(), this.initSeekControl(), this.bindEvents(), this.setupResizeObserver(), requestAnimationFrame(() => {
        this.resizeCanvas(), this.options.url && this.load(this.options.url).then(() => {
          this.options.autoplay && this.play()?.catch(() => {
          });
        }).catch((t) => {
          console.error("[WaveformPlayer] Failed to load audio:", t);
        });
      });
    }
    createDOM() {
      this.container.innerHTML = "", this.container.className = "waveform-player";
      let t = Q.includes(this.options.buttonAlign) ? this.options.buttonAlign : "auto";
      t === "auto" && (this.options.waveformStyle === "bars" ? t = "bottom" : t = "center"), this.options.layout === "preview" && this.container.classList.add("waveform-layout-preview"), this.container.classList.toggle("waveform-theme-light", this._scheme === "light");
      let s = [];
      this.options.buttonSize != null && s.push(`--wfp-btn-size: ${q2(this.options.buttonSize)}`), this.options.buttonRadius != null && s.push(`--wfp-btn-radius: ${q2(this.options.buttonRadius)}`);
      let r2 = s.length ? ` style="${s.join("; ")};"` : "", a = this.options.artworkPosition === "button" && this.options.artwork, o = a ? `<img class="waveform-btn-artwork" src="${S(this.options.artwork)}" alt="" aria-hidden="true">` : "", n = this.options.showControls ? `
        <button class="waveform-btn${this.options.buttonStyle === "minimal" ? " waveform-btn-minimal" : ""}${a ? " waveform-btn-has-artwork" : ""}" aria-label="${S(this.options.playPauseLabel)}"${r2}>
          ${o}
          <span class="waveform-icon-play">${this.options.playIcon}</span>
          <span class="waveform-icon-pause" style="display:none;">${this.options.pauseIcon}</span>
        </button>
        ` : "", l2 = this.options.showInfo ? `
      <div class="waveform-info">
        ${this.options.artworkPosition !== "button" && this.options.artwork ? `
          <img class="waveform-artwork" src="${S(this.options.artwork)}" alt="${S(this.options.artworkAlt)}" style="
            width: 40px;
            height: 40px;
            border-radius: 4px;
            object-fit: cover;
            flex-shrink: 0;
          ">
        ` : ""}
        <div class="waveform-text">
          <span class="waveform-title"></span>
          ${this.options.artist ? `<span class="waveform-artist">${S(this.options.artist)}</span>` : ""}
        </div>
        <div class="waveform-meta" style="display: flex; align-items: center; gap: 1rem;">
          ${this.options.showBPM ? `
            <span class="waveform-bpm" style="display: none;">
              <span class="bpm-value">--</span> BPM
            </span>
          ` : ""}
          ${this.options.showPlaybackSpeed ? `
            <div class="waveform-speed">
              <button class="speed-btn" aria-label="${S(this.options.speedLabel)}" aria-haspopup="menu" aria-expanded="false">
                <span class="speed-value">1x</span>
              </button>
              <div class="speed-menu" role="menu" aria-label="${S(this.options.speedLabel)}" style="display: none;">
                ${this.options.playbackRates.map((h) => `<button class="speed-option" role="menuitemradio" tabindex="-1" aria-checked="false" data-rate="${h}">${h}x</button>`).join("")}
              </div>
            </div>
          ` : ""}
          ${this.options.showTime ? `
            <span class="waveform-time">
              <span class="time-current">0:00</span> / <span class="time-total">0:00</span>
            </span>
          ` : ""}
        </div>
      </div>
        ` : "";
      this.container.innerHTML = `
  <div class="waveform-player-inner">
    <div class="waveform-body">
      <div class="waveform-track waveform-align-${t}">
        ${n}
        
        <div class="waveform-container">
          <canvas></canvas>
          <div class="waveform-markers"></div>
          <div class="waveform-loading" style="display:none;"></div>
          <div class="waveform-error" style="display:none;" role="alert">
            <span class="waveform-error-text">${S(this.options.errorText)}</span>
          </div>
        </div>
      </div>
      
      ${l2}
    </div>
  </div>
`, this.playBtn = this.container.querySelector(".waveform-btn"), this.canvas = this.container.querySelector("canvas"), this.ctx = this.canvas.getContext("2d"), this.titleEl = this.container.querySelector(".waveform-title"), this.artistEl = this.container.querySelector(".waveform-artist"), this.artworkEl = this.container.querySelector(".waveform-artwork, .waveform-btn-artwork"), this.bindArtworkFallback(this.artworkEl), this.currentTimeEl = this.container.querySelector(".time-current"), this.totalTimeEl = this.container.querySelector(".time-total"), this.bpmEl = this.container.querySelector(".waveform-bpm"), this.bpmValueEl = this.container.querySelector(".bpm-value"), this.loadingEl = this.container.querySelector(".waveform-loading"), this.errorEl = this.container.querySelector(".waveform-error"), this.markersContainer = this.container.querySelector(".waveform-markers"), this.speedBtn = this.container.querySelector(".speed-btn"), this.speedMenu = this.container.querySelector(".speed-menu"), this.resizeCanvas(), this.updateBPMDisplay();
    }
    bindArtworkFallback(t) {
      t && t.addEventListener("error", () => {
        t.src.startsWith("data:") || (t.src = It);
      }, { signal: this._ac.signal });
    }
    createArtworkElement() {
      let t = document.createElement("img");
      return t.className = "waveform-artwork", t.style.width = "40px", t.style.height = "40px", t.style.borderRadius = "4px", t.style.objectFit = "cover", t.style.flexShrink = "0", this.bindArtworkFallback(t), t;
    }
    createButtonArtworkElement() {
      let t = document.createElement("img");
      return t.className = "waveform-btn-artwork", t.alt = "", t.setAttribute("aria-hidden", "true"), this.bindArtworkFallback(t), t;
    }
    createArtistElement() {
      let t = document.createElement("span");
      return t.className = "waveform-artist", t;
    }
    syncArtist(t) {
      if (this.options.artist = t || null, !!this.options.showInfo) {
        if (!t) {
          this.artistEl?.remove(), this.artistEl = null;
          return;
        }
        if (!this.artistEl) {
          let i = this.container.querySelector(".waveform-title");
          if (!i) return;
          this.artistEl = this.createArtistElement(), i.after(this.artistEl);
        }
        this.artistEl.textContent = t, this.artistEl.style.display = "";
      }
    }
    syncButtonArtwork(t) {
      if (this.playBtn) {
        if (!t) {
          this.artworkEl?.remove(), this.artworkEl = null, this.playBtn.classList.remove("waveform-btn-has-artwork");
          return;
        }
        this.artworkEl || (this.artworkEl = this.createButtonArtworkElement(), this.playBtn.prepend(this.artworkEl)), this.artworkEl.src = t, this.playBtn.classList.add("waveform-btn-has-artwork");
      }
    }
    syncArtwork(t, i = "") {
      if (this.options.artwork = t || null, this.options.artworkAlt = i || "", this.options.artworkPosition === "button") {
        this.syncButtonArtwork(this.options.artwork);
        return;
      }
      if (this.options.showInfo) {
        if (!t) {
          this.artworkEl?.remove(), this.artworkEl = null;
          return;
        }
        if (!this.artworkEl) {
          let s = this.container.querySelector(".waveform-text");
          if (!s) return;
          this.artworkEl = this.createArtworkElement(), s.before(this.artworkEl);
        }
        this.artworkEl.src = t, this.artworkEl.alt = i || "";
      }
    }
    createAudio() {
      if (this.options.audioMode === "external") {
        this.audio = null;
        return;
      }
      this.audio = new Audio(), this.audio.preload = this.options.preload || "metadata", this.options.crossOrigin && (this.audio.crossOrigin = this.options.crossOrigin);
    }
    initPlaybackSpeed() {
      this.audio && this.options.playbackRate && this.options.playbackRate !== 1 && (this.audio.playbackRate = this.options.playbackRate), this.options.showPlaybackSpeed && this.initSpeedControls();
    }
    initSpeedControls() {
      let t = this.container.querySelector(".speed-btn"), i = this.container.querySelector(".speed-menu");
      if (!t || !i) return;
      let s = () => Array.from(i.querySelectorAll(".speed-option")), r2 = () => i.style.display !== "none", a = (l2) => {
        if (i.style.display = l2 ? "block" : "none", t.setAttribute("aria-expanded", l2 ? "true" : "false"), l2) {
          let h = s();
          (h.find((c2) => c2.getAttribute("aria-checked") === "true") || h[0])?.focus();
        }
      }, o = (l2) => {
        let h = s();
        h.length && h[(l2 + h.length) % h.length].focus();
      }, n = (l2) => {
        this.setPlaybackRate(parseFloat(l2.dataset.rate)), a(false), t.focus();
      };
      t.addEventListener("click", (l2) => {
        l2.stopPropagation(), a(!r2());
      }, { signal: this._ac.signal }), document.addEventListener("click", () => a(false), { signal: this._ac.signal }), i.addEventListener("click", (l2) => {
        l2.stopPropagation();
        let h = l2.target.closest(".speed-option");
        h && n(h);
      }, { signal: this._ac.signal }), t.closest(".waveform-speed")?.addEventListener("keydown", (l2) => {
        let h = s(), c2 = h.indexOf(document.activeElement);
        if (!r2()) {
          (l2.key === "ArrowDown" || l2.key === "ArrowUp") && document.activeElement === t && (l2.preventDefault(), a(true));
          return;
        }
        switch (l2.key) {
          case "ArrowDown":
            l2.preventDefault(), o(c2 < 0 ? 0 : c2 + 1);
            break;
          case "ArrowUp":
            l2.preventDefault(), o(c2 < 0 ? h.length - 1 : c2 - 1);
            break;
          case "Home":
            l2.preventDefault(), o(0);
            break;
          case "End":
            l2.preventDefault(), o(h.length - 1);
            break;
          case "Escape":
            l2.preventDefault(), a(false), t.focus();
            break;
          case "Tab":
            a(false);
            break;
        }
      }, { signal: this._ac.signal }), this.updateSpeedUI();
    }
    initKeyboardControls() {
      this.container.setAttribute("tabindex", "-1"), this.container.addEventListener("click", (t) => {
        t.target.closest(Wt) || (e2.getAllInstances().forEach((i) => {
          i !== this && i.container.setAttribute("tabindex", "-1");
        }), this.container.setAttribute("tabindex", "0"), this.container.focus());
      }, { signal: this._ac.signal }), this.container.addEventListener("keydown", (t) => {
        if (document.activeElement !== this.container) return;
        let i = t.key, s = !!this.audio, r2 = s ? this.audio.currentTime : 0;
        if (s && i >= "0" && i <= "9") {
          t.preventDefault(), this.seekToPercent(parseInt(i) / 10);
          return;
        }
        let a = { " ": () => this.togglePlay() };
        s && (a.ArrowLeft = () => this.seekTo(m2(r2 - 5, 0, this.audio.duration)), a.ArrowRight = () => this.seekTo(m2(r2 + 5, 0, this.audio.duration)), a.ArrowUp = () => this.setVolume(m2(this.audio.volume + 0.1)), a.ArrowDown = () => this.setVolume(m2(this.audio.volume - 0.1)), a.m = a.M = () => this.audio.muted = !this.audio.muted), a[i] && (t.preventDefault(), a[i]());
      }, { signal: this._ac.signal });
    }
    initSeekControl() {
      this.options.accessibleSeek && (this.seekEl = this.container.querySelector(".waveform-container"), this.seekEl && (this.seekEl.setAttribute("role", "slider"), this.seekEl.setAttribute("tabindex", "0"), this.seekEl.setAttribute("aria-valuemin", "0"), this.applySeekLabel(), this.updateSeekAccessibility(), this.seekEl.addEventListener("keydown", (t) => {
        if (t.key === " " || t.key === "Spacebar") {
          t.preventDefault(), t.stopPropagation(), this.togglePlay();
          return;
        }
        let i = this.getSeekDuration();
        if (!i) return;
        let s = this.getSeekCurrentTime(), r2;
        switch (t.key) {
          case "ArrowLeft":
          case "ArrowDown":
            r2 = s - bt;
            break;
          case "ArrowRight":
          case "ArrowUp":
            r2 = s + bt;
            break;
          case "PageDown":
            r2 = s - wt;
            break;
          case "PageUp":
            r2 = s + wt;
            break;
          case "Home":
            r2 = 0;
            break;
          case "End":
            r2 = i;
            break;
          default:
            return;
        }
        t.preventDefault(), t.stopPropagation(), this.seekToSeconds(r2);
      }, { signal: this._ac.signal })));
    }
    getSeekDuration() {
      return this.options.audioMode === "external" ? this._extDuration || 0 : this.audio && Number.isFinite(this.audio.duration) ? this.audio.duration : 0;
    }
    getSeekCurrentTime() {
      return this.options.audioMode === "external" ? this.progress * (this._extDuration || 0) : this.audio && Number.isFinite(this.audio.currentTime) ? this.audio.currentTime : 0;
    }
    seekToSeconds(t) {
      let i = this.getSeekDuration();
      if (!i) return;
      let s = m2(t, 0, i);
      if (this.options.audioMode === "external") {
        this._requestSeek(s / i), this.updateSeekAccessibility();
        return;
      }
      this.seekTo(s);
    }
    applySeekLabel(t = this.options.title) {
      if (!this.seekEl) return;
      let i = this.options.seekLabel || t || "Seek";
      this.seekEl.setAttribute("aria-label", i);
    }
    updateSeekAccessibility() {
      if (!this.seekEl) return;
      let t = this.getSeekDuration(), i = Math.min(this.getSeekCurrentTime(), t);
      this.seekEl.setAttribute("aria-valuemax", String(Math.round(t))), this.seekEl.setAttribute("aria-valuenow", String(Math.round(i))), this.seekEl.setAttribute("aria-valuetext", ot(this.options.seekValueText || "%1$s of %2$s", E2(i), E2(t)));
    }
    initMediaSession() {
      if (!("mediaSession" in navigator) || !this.options.enableMediaSession || !this.audio) return;
      this._applyMediaMetadata(), navigator.mediaSession.setActionHandler("play", () => this.play()), navigator.mediaSession.setActionHandler("pause", () => this.pause()), navigator.mediaSession.setActionHandler("seekbackward", () => {
        this.seekTo(m2(this.audio.currentTime - 10, 0, this.audio.duration));
      }), navigator.mediaSession.setActionHandler("seekforward", () => {
        this.seekTo(m2(this.audio.currentTime + 10, 0, this.audio.duration));
      }), navigator.mediaSession.setActionHandler("seekto", (s) => {
        s.seekTime !== null && this.seekTo(s.seekTime);
      });
      let t = this.options.onNextTrack, i = this.options.onPreviousTrack;
      try {
        navigator.mediaSession.setActionHandler("nexttrack", typeof t == "function" ? () => t(this) : null);
      } catch {
      }
      try {
        navigator.mediaSession.setActionHandler("previoustrack", typeof i == "function" ? () => i(this) : null);
      } catch {
      }
    }
    _applyMediaMetadata() {
      !("mediaSession" in navigator) || !this.options.enableMediaSession || (navigator.mediaSession.metadata = new MediaMetadata({ title: this.options.title || this.options.unknownTrackText, artist: this.options.artist || "", album: this.options.album || "", artwork: this.options.artwork ? [{ src: this.options.artwork, sizes: "512x512", type: "image/jpeg" }] : [] }));
    }
    _updateMediaSession(t) {
      if (!(!("mediaSession" in navigator) || !this.options.enableMediaSession || !this.audio)) try {
        t === "playing" && this.initMediaSession(), navigator.mediaSession.playbackState = t;
        let i = this.audio.duration;
        navigator.mediaSession.setPositionState && i && isFinite(i) && navigator.mediaSession.setPositionState({ duration: i, playbackRate: this.audio.playbackRate || 1, position: m2(this.audio.currentTime, 0, i) });
      } catch {
      }
    }
    bindEvents() {
      this.playBtn && this.playBtn.addEventListener("click", () => this.togglePlay()), this.audio && (this.audio.addEventListener("loadstart", () => this.setLoading(true)), this.audio.addEventListener("loadedmetadata", () => this.onMetadataLoaded()), this.audio.addEventListener("canplay", () => this.setLoading(false)), this.audio.addEventListener("play", () => this.onPlay()), this.audio.addEventListener("pause", () => this.onPause()), this.audio.addEventListener("ended", () => this.onEnded()), this.audio.addEventListener("error", (i) => this.onError(i))), this.canvas.addEventListener("click", (i) => this.handleCanvasClick(i)), this._dragging = false, this._seekHover = false, this._handleNear = false, this.canvas.addEventListener("pointerenter", () => {
        this._seekHover = true, this.drawWaveform(), this._updateSeekHandle();
      }), this.canvas.addEventListener("pointerleave", () => {
        this._seekHover = false, this._handleNear = false, this._dragging || this._hideHoverTip(), this.drawWaveform(), this._updateSeekHandle();
      }), this.canvas.addEventListener("pointerdown", (i) => {
        if (!(i.pointerType === "mouse" && i.button !== 0)) {
          this._dragging = true;
          try {
            this.canvas.setPointerCapture(i.pointerId);
          } catch {
          }
          this._scrubTo(i.clientX);
        }
      }), this.canvas.addEventListener("pointermove", (i) => {
        if (this._dragging) {
          this._scrubTo(i.clientX);
          return;
        }
        let s = this.canvas.getBoundingClientRect();
        s.width && (this._handleNear = Math.abs(i.clientX - s.left - this.progress * s.width) <= 10, this._updateSeekHandle());
      });
      let t = (i) => {
        if (this._dragging) {
          this._dragging = false, this._suppressClick = true;
          try {
            this.canvas.releasePointerCapture(i.pointerId);
          } catch {
          }
          this._seekFromPointer(i.clientX), !this._seekHover && !this.options.showHoverTime && this._hideHoverTip(), this._updateSeekHandle();
        }
      };
      this.canvas.addEventListener("pointerup", t), this.canvas.addEventListener("pointercancel", t), this.setupHoverTime(), this.setupSeekHandle(), this.resizeHandler = ht(() => this.resizeCanvas(), 100), window.addEventListener("resize", this.resizeHandler);
    }
    setupResizeObserver() {
      "ResizeObserver" in window && (this.resizeObserver = new ResizeObserver(() => {
        this.resizeCanvas();
      }), this.canvas?.parentElement && this.resizeObserver.observe(this.canvas.parentElement));
    }
    async load(t) {
      try {
        this.setLoading(true), this.progress = 0, this.hasError = false, this.container.classList.remove("waveform-is-placeholder");
        let i = !!this.options.waveform;
        i && this.setWaveformData(this.options.waveform);
        let s = this.options.title || I(t);
        if (this.titleEl && (this.titleEl.textContent = s), this.applySeekLabel(s), this.audio && (this.audio.src = t, this.audio.preload !== "none" && await new Promise((r2, a) => {
          let o = () => {
            this.audio.removeEventListener("loadedmetadata", o), this.audio.removeEventListener("error", n), r2();
          }, n = (l2) => {
            this.audio.removeEventListener("loadedmetadata", o), this.audio.removeEventListener("error", n), a(l2);
          };
          this.audio.addEventListener("loadedmetadata", o), this.audio.addEventListener("error", n);
        })), !i) try {
          let r2 = await G2(t, this.options.samples, this.options.showBPM);
          this.waveformData = r2.peaks, r2.bpm && (this.detectedBPM = r2.bpm, this.updateBPMDisplay());
        } catch (r2) {
          console.warn("[WaveformPlayer] Using placeholder waveform:", r2), this.waveformData = yt(this.options.samples), this.container.classList.add("waveform-is-placeholder");
        }
        this.drawWaveform(), this.renderMarkers(), this.options.onLoad && this.options.onLoad(this);
      } catch (i) {
        this.onError(i);
      } finally {
        this.setLoading(false);
      }
    }
    async loadTrack(t, i = null, s = null, r2 = {}) {
      let a = Object.prototype.hasOwnProperty.call(r2, "artwork"), o = Object.prototype.hasOwnProperty.call(r2, "artworkAlt");
      this.isPlaying && this.pause(), this.audio && (this.audio.src = "", this.audio.load()), this.hasError = false, this.errorEl && (this.errorEl.style.display = "none"), this.canvas && (this.canvas.style.opacity = "1"), this.playBtn && (this.playBtn.disabled = false), this.progress = 0, this.waveformData = [], this.options = Z(j2(this.options, { url: t, title: i === null ? this.options.title : i, artist: s === null ? this.options.artist : s, ...r2 })), a && (this.options.artwork = r2.artwork || null), o ? this.options.artworkAlt = r2.artworkAlt || "" : a && (this.options.artworkAlt = this.options.artwork ? W.artworkAlt : ""), r2.preload && this.audio && (this.audio.preload = this.options.preload), r2.crossOrigin && this.audio && (this.audio.crossOrigin = this.options.crossOrigin), s !== null && this.syncArtist(s), (a || o) && this.syncArtwork(a ? r2.artwork : this.options.artwork, o ? r2.artworkAlt : this.options.artworkAlt), this.options.markers = r2.markers ? z(r2.markers) : [], this.options.waveform = r2.waveform || null, await this.load(t), r2.autoplay !== false && this.play()?.catch(() => {
      });
    }
    setWaveformData(t) {
      if (typeof t == "string" && t.trim().endsWith(".json")) {
        fetch(t.trim()).then((i) => i.json()).then((i) => {
          this.waveformData = Array.isArray(i) ? i : i.peaks || [], i.markers && !this.options.markers?.length && (this.options.markers = z(i.markers), this.renderMarkers()), this.drawWaveform();
        }).catch(() => {
        });
        return;
      }
      this.waveformData = D2(t, { fallback: [] }), this.drawWaveform();
    }
    drawWaveform() {
      !this.ctx || this.waveformData.length === 0 || ft(this.ctx, this.canvas, this.waveformData, this.progress, { ...this.options, waveformStyle: this.options.waveformStyle || "bars", color: this.options.waveformColor, progressColor: this.options.progressColor, seekActive: this._seekHover || this._dragging });
    }
    resizeCanvas() {
      if (!this.canvas || this.isDestroying) return;
      let t = window.devicePixelRatio || 1, i = this.canvas.parentElement.getBoundingClientRect();
      this.canvas.width = i.width * t, this.canvas.height = this.options.height * t, this.canvas.parentElement.style.height = this.options.height + "px", this.drawWaveform();
    }
    renderMarkers() {
      if (!this.markersContainer || (this.markersContainer.innerHTML = "", this._activeMarkerIndex = -1, clearTimeout(this._markerLabelTimer), !this.options.showMarkers || !this.options.markers?.length)) return;
      let t = this.getSeekDuration();
      t && this.options.markers.forEach((i, s) => {
        if (i.time > t) {
          console.warn(`[WaveformPlayer] Marker "${i.label}" at ${i.time}s exceeds audio duration of ${t}s`);
          return;
        }
        let r2 = i.time / t * 100, a = document.createElement("button");
        a.className = "waveform-marker", a.style.left = `${r2}%`, a.style.backgroundColor = i.color || "rgba(255, 255, 255, 0.5)", a.setAttribute("aria-label", i.label), a.setAttribute("data-time", i.time);
        let o = document.createElement("span");
        o.className = "waveform-marker-tooltip", o.textContent = i.label, a.appendChild(o), a.addEventListener("click", (n) => {
          n.stopPropagation(), this.seekTo(i.time), this.options.playOnSeek && !this.isPlaying && this.play();
        }), this.markersContainer.appendChild(a);
      });
    }
    setActiveMarker(t) {
      if (!this.markersContainer) return;
      this.markersContainer.querySelectorAll(".waveform-marker").forEach((s, r2) => s.classList.toggle("active", r2 === t));
    }
    updateActiveMarker() {
      if (!this.markersContainer) return;
      let t = this.markersContainer.querySelectorAll(".waveform-marker");
      if (!t.length) return;
      let i = this.getSeekDuration(), s = i ? this.progress * i : 0, r2 = -1, a = -1 / 0;
      t.forEach((o, n) => {
        let l2 = parseFloat(o.getAttribute("data-time"));
        Number.isFinite(l2) && l2 <= s + 0.05 && l2 > a && (a = l2, r2 = n);
      }), r2 !== this._activeMarkerIndex && (this._activeMarkerIndex = r2, this.setActiveMarker(r2), clearTimeout(this._markerLabelTimer), t.forEach((o, n) => o.classList.toggle("show-label", n === r2)), r2 >= 0 && (this._markerLabelTimer = setTimeout(() => {
        this.markersContainer?.querySelectorAll(".waveform-marker").forEach((o) => o.classList.remove("show-label"));
      }, 2500)));
    }
    setupHoverTime() {
      if (!this.seekEl) return;
      let t = document.createElement("div");
      t.className = "waveform-hover-time", t.setAttribute("aria-hidden", "true"), this.seekEl.appendChild(t), this.hoverTimeEl = t, this.options.showHoverTime && (this.seekEl.addEventListener("pointermove", (i) => {
        this._dragging || this._updateHoverTip(i.clientX);
      }), this.seekEl.addEventListener("pointerleave", () => {
        this._dragging || this._hideHoverTip();
      }));
    }
    _updateHoverTip(t) {
      let i = this.hoverTimeEl;
      if (!i) return;
      let s = this.getSeekDuration();
      if (!s) {
        i.style.opacity = "0";
        return;
      }
      let r2 = this.canvas.getBoundingClientRect(), a = m2((t - r2.left) / r2.width);
      i.textContent = E2(a * s), i.style.left = a * 100 + "%", i.style.opacity = "1";
    }
    _hideHoverTip() {
      this.hoverTimeEl && (this.hoverTimeEl.style.opacity = "0");
    }
    _scrubTo(t) {
      let i = this.canvas.getBoundingClientRect();
      if (!i.width) return;
      this.progress = m2((t - i.left) / i.width), this.drawWaveform(), this._updateSeekHandle();
      let s = this.getSeekDuration();
      s && this.currentTimeEl ? (this.currentTimeEl.textContent = E2(this.progress * s), this._hideHoverTip()) : this._updateHoverTip(t);
    }
    setupSeekHandle() {
      if (!this.options.seekHandle || this.options.waveformStyle !== "seekbar" || !this.seekEl) return;
      let t = document.createElement("div");
      t.className = "waveform-seek-handle", t.setAttribute("aria-hidden", "true"), this.seekEl.appendChild(t), this.seekHandleEl = t;
    }
    _updateSeekHandle() {
      let t = this.seekHandleEl;
      t && (t.style.left = this.progress * 100 + "%", t.classList.toggle("is-visible", this._seekHover || this._dragging), t.classList.toggle("is-active", this._dragging || this._handleNear));
    }
    handleCanvasClick(t) {
      if (this._suppressClick) {
        this._suppressClick = false;
        return;
      }
      this._seekFromPointer(t.clientX);
    }
    _seekFromPointer(t) {
      let i = this.canvas.getBoundingClientRect();
      if (!i.width) return;
      let s = m2((t - i.left) / i.width);
      if (this.options.audioMode === "external") {
        this._requestSeek(s);
        return;
      }
      !this.audio || !this.audio.duration || this.seekToPercent(s);
    }
    setLoading(t) {
      if (this.isLoading = t, this.loadingEl) {
        let i = t && this.waveformData.length === 0;
        this.loadingEl.style.display = i ? "block" : "none";
      }
      this.seekEl && this.seekEl.setAttribute("aria-busy", t ? "true" : "false");
    }
    onMetadataLoaded() {
      this.isDestroying || (this.totalTimeEl && (this.totalTimeEl.textContent = E2(this.audio.duration)), this.renderMarkers(), this.updateSeekAccessibility());
    }
    setPlayButtonState(t) {
      if (!this.playBtn) return;
      this.playBtn.classList.toggle("playing", t);
      let i = this.playBtn.querySelector(".waveform-icon-play"), s = this.playBtn.querySelector(".waveform-icon-pause");
      i && (i.style.display = t ? "none" : "flex"), s && (s.style.display = t ? "flex" : "none");
    }
    onPlay() {
      this.isDestroying || (this.isPlaying = true, this.setPlayButtonState(true), this.startSmoothUpdate(), this._updateMediaSession("playing"), this._emit("waveformplayer:play", { player: this, url: this.options.url }), this.options.onPlay && this.options.onPlay(this));
    }
    onPause() {
      this.isDestroying || (this.isPlaying = false, this.setPlayButtonState(false), this.stopSmoothUpdate(), this._updateMediaSession("paused"), this._emit("waveformplayer:pause", { player: this, url: this.options.url }), this.options.onPause && this.options.onPause(this));
    }
    onEnded() {
      if (this.isDestroying) return;
      let t = this.audio.duration;
      this.progress = 0, this.audio.currentTime = 0, this.drawWaveform(), this.currentTimeEl && (this.currentTimeEl.textContent = "0:00"), this._emit("waveformplayer:ended", { player: this, url: this.options.url, currentTime: t, duration: t }), this.onPause(), this.options.onEnd && this.options.onEnd(this);
    }
    onError(t) {
      this.isDestroying || (console.error("[WaveformPlayer] Audio error:", t), this.hasError = true, this.setLoading(false), this.errorEl && (this.errorEl.style.display = "flex"), this.canvas && (this.canvas.style.opacity = "0.2"), this.playBtn && (this.playBtn.disabled = true), this.options.onError && this.options.onError(t, this));
    }
    startSmoothUpdate() {
      this.stopSmoothUpdate();
      let t = () => {
        this.isPlaying && this.audio && this.audio.duration && (this.updateProgress(), this.updateTimer = requestAnimationFrame(t));
      };
      this.updateTimer = requestAnimationFrame(t);
    }
    stopSmoothUpdate() {
      this.updateTimer && (cancelAnimationFrame(this.updateTimer), this.updateTimer = null);
    }
    updateProgress() {
      if (!this.audio || !this.audio.duration || this._dragging) return;
      let t = this.audio.currentTime / this.audio.duration;
      Math.abs(t - this.progress) > 1e-3 && (this.progress = t, this.drawWaveform(), this._updateSeekHandle()), this.currentTimeEl && (this.currentTimeEl.textContent = E2(this.audio.currentTime)), this._emit("waveformplayer:timeupdate", { player: this, currentTime: this.audio.currentTime, duration: this.audio.duration, progress: this.progress, url: this.options.url }), this.options.onTimeUpdate && this.options.onTimeUpdate(this.audio.currentTime, this.audio.duration, this), this.updateActiveMarker(), this.updateSeekAccessibility();
    }
    updateBPMDisplay() {
      let t = this.options.bpm || this.detectedBPM;
      this.bpmEl && this.bpmValueEl && t && (this.bpmValueEl.textContent = Math.round(t), this.bpmEl.style.display = "inline-flex");
    }
    refreshTheme() {
      if (!this._autoTheme) return;
      this._scheme = R2(this.container);
      let t = J(this.options.colorPreset, this.container);
      for (let i of this._presetKeys || []) i in t && (this.options[i] = t[i]);
      this._applyThemeColors();
    }
    _applyThemeColors() {
      this.container.classList.toggle("waveform-theme-light", this._scheme === "light"), this.canvas && this.drawWaveform();
    }
    static _watchTheme() {
      if (e2._themeWatch || typeof document > "u") return;
      let t = () => requestAnimationFrame(() => {
        e2.instances.forEach((a) => {
          try {
            a.refreshTheme();
          } catch {
          }
        });
      }), i = { attributes: true, attributeFilter: ["class", "data-theme", "data-color-scheme", "style"] }, s = new MutationObserver(t);
      s.observe(document.documentElement, i), document.body && s.observe(document.body, i);
      let r2 = null;
      try {
        r2 = window.matchMedia("(prefers-color-scheme: dark)"), r2.addEventListener("change", t);
      } catch {
      }
      e2._themeWatch = { obs: s, mq: r2, refresh: t };
    }
    updateSpeedUI() {
      if (!this.audio) return;
      let t = this.container.querySelector(".speed-value");
      if (t) {
        let i = this.audio.playbackRate;
        t.textContent = i === 1 ? "1x" : `${i}x`;
      }
      this.container.querySelectorAll(".speed-option").forEach((i) => {
        let s = parseFloat(i.dataset.rate) === this.audio.playbackRate;
        i.classList.toggle("active", s), i.setAttribute("aria-checked", s ? "true" : "false");
      });
    }
    play() {
      if (this.options.singlePlay && e2.currentlyPlaying && e2.currentlyPlaying !== this && e2.currentlyPlaying.pause(), this.options.audioMode === "external") {
        this._emit("waveformplayer:request-play", this._buildTrackDetail(), true).defaultPrevented || (e2.currentlyPlaying = this);
        return;
      }
      return e2.currentlyPlaying = this, this.audio.play();
    }
    pause() {
      if (e2.currentlyPlaying === this && (e2.currentlyPlaying = null), this.options.audioMode === "external") {
        this._emit("waveformplayer:request-pause", this._buildTrackDetail(), true);
        return;
      }
      this.audio.pause();
    }
    _buildTrackDetail() {
      return { url: this.options.url, title: this.options.title, artist: this.options.artist, artwork: this.options.artwork, markers: this.options.markers, waveform: this.options.waveform, id: this.id, player: this };
    }
    setPlayingState(t) {
      let i = this.isPlaying;
      this.isPlaying = !!t, this.setPlayButtonState(this.isPlaying), this.isPlaying && !i ? (this.startSmoothUpdate?.(), this._emit("waveformplayer:play", { player: this, url: this.options.url }), this.options.onPlay && this.options.onPlay(this)) : !this.isPlaying && i && (this.stopSmoothUpdate?.(), this._emit("waveformplayer:pause", { player: this, url: this.options.url }), this.options.onPause && this.options.onPause(this));
    }
    setProgress(t, i) {
      !i || i <= 0 || (this.progress = m2(t / i), this.currentTimeEl && (this.currentTimeEl.textContent = E2(t)), this._extDuration = i, this.totalTimeEl && (!this.totalTimeEl.dataset._extSet || this.totalTimeEl.dataset._extDur !== String(i)) && (this.totalTimeEl.textContent = E2(i), this.totalTimeEl.dataset._extSet = "1", this.totalTimeEl.dataset._extDur = String(i)), this.drawWaveform?.(), this.updateActiveMarker(), this._emit("waveformplayer:timeupdate", { player: this, currentTime: t, duration: i, progress: this.progress, url: this.options.url }), this.options.onTimeUpdate && this.options.onTimeUpdate(t, i, this), this.progress >= 1 ? this._extEnded || (this._extEnded = true, this._emit("waveformplayer:ended", { player: this, url: this.options.url, currentTime: i, duration: i }), this.options.onEnd && this.options.onEnd(this)) : this._extEnded = false, this.updateSeekAccessibility());
    }
    togglePlay() {
      this.isPlaying ? this.pause() : this.play();
    }
    seekTo(t) {
      this.audio && this.audio.duration && (this.audio.currentTime = m2(t, 0, this.audio.duration), this.updateProgress());
    }
    seekToPercent(t) {
      this.audio && this.audio.duration && (this.audio.currentTime = this.audio.duration * m2(t), this.updateProgress());
    }
    setVolume(t) {
      let i = Number(t);
      this.audio && Number.isFinite(i) && (this.audio.volume = m2(i));
    }
    setPlaybackRate(t) {
      if (!this.audio) return;
      let i = _(t, null, { min: N2, max: F });
      i !== null && (this.audio.playbackRate = i, this.options.playbackRate = i, this.updateSpeedUI());
    }
    destroy() {
      this.isDestroying = true, this._emit("waveformplayer:destroy", { player: this, url: this.options.url }), this.pause(), this.stopSmoothUpdate(), clearTimeout(this._markerLabelTimer), this._ac?.abort(), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.resizeHandler && (window.removeEventListener("resize", this.resizeHandler), this.resizeHandler = null), e2.instances.delete(this.id), e2.currentlyPlaying === this && (e2.currentlyPlaying = null), this.audio && (this.audio.pause(), this.audio.src = "", this.audio.load(), this.audio = null), this.container.innerHTML = "", delete this.container.dataset.waveformInitialized, this.canvas = null, this.ctx = null, this.playBtn = null, this.waveformData = [];
    }
    static getInstance(t) {
      if (typeof t == "string") {
        let i = this.instances.get(t);
        if (i) return i;
        let s = document.getElementById(t);
        if (s) return Array.from(this.instances.values()).find((r2) => r2.container === s);
      }
      if (t instanceof HTMLElement) return Array.from(this.instances.values()).find((i) => i.container === t);
    }
    static getAllInstances() {
      return Array.from(this.instances.values());
    }
    static destroyAll() {
      this.instances.forEach((t) => t.destroy()), this.instances.clear();
    }
    static async generateWaveformData(t, i = 1800) {
      try {
        return (await G2(t, i)).peaks;
      } catch (s) {
        throw console.error("[WaveformPlayer] Failed to generate waveform:", s), s;
      }
    }
    static getPeaksUrl(t) {
      if (!t) return;
      let i = t.replace(/\.(mp3|wav|ogg|flac|m4a|aac)(\?[^#]*)?(#.*)?$/i, ".json$2$3");
      return i === t ? void 0 : i;
    }
  };
  T.utils = { formatTime: E2, extractTitleFromUrl: I, escapeHtml: S, isSafeHref: st, parseDataAttributes: O, detectColorScheme: R2 };
  var et = () => typeof window < "u" && typeof document < "u";
  var Nt = () => true;
  function kt(e3) {
    if (!(e3.dataset.waveformInitialized === "true" || T.getInstance(e3))) try {
      new T(e3), e3.dataset.waveformInitialized = "true";
    } catch (t) {
      console.error("[WaveformPlayer] Failed to initialize:", t, e3);
    }
  }
  function tt(e3 = document) {
    if (!et()) return;
    let t = e3 || document;
    t.matches?.("[data-waveform-player]") && kt(t), t.querySelectorAll("[data-waveform-player]").forEach(kt);
  }
  et() && !Nt() && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => tt()) : tt());
  T.init = tt;
  et() && (window.WaveformPlayer = T);
  var se = T;

  // packages/block-library/build-module/utils/waveform-utils.mjs
  var DEFAULT_WAVEFORM_HEIGHT = 100;
  var DEFAULT_SEEK_LABEL = "Seek";
  function getComputedStyle4(element) {
    return element.ownerDocument.defaultView.getComputedStyle(element);
  }
  function getTopLevelGradientParts(gradientValue) {
    const match = gradientValue?.trim().match(/^[\w-]+-gradient\((.*)\)$/i);
    if (!match) {
      return [];
    }
    const parts = [];
    let depth = 0;
    let current = "";
    for (const character of match[1]) {
      if (character === "(") {
        ++depth;
      } else if (character === ")") {
        --depth;
      }
      if (character === "," && depth === 0) {
        parts.push(current.trim());
        current = "";
        continue;
      }
      current += character;
    }
    if (current.trim()) {
      parts.push(current.trim());
    }
    return parts;
  }
  function getLeadingColorFunction(value) {
    const match = value.match(/^([\w-]+)\(/);
    if (!match) {
      return;
    }
    const supportedFunctions = [
      "color",
      "color-mix",
      "hsl",
      "hsla",
      "hwb",
      "lab",
      "lch",
      "oklab",
      "oklch",
      "rgb",
      "rgba",
      "var"
    ];
    if (!supportedFunctions.includes(match[1].toLowerCase())) {
      return;
    }
    let depth = 0;
    let foundOpeningParenthesis = false;
    for (let index2 = 0; index2 < value.length; index2++) {
      const character = value[index2];
      if (character === "(") {
        foundOpeningParenthesis = true;
        ++depth;
      } else if (character === ")") {
        --depth;
      }
      if (foundOpeningParenthesis && depth === 0) {
        return value.slice(0, index2 + 1);
      }
    }
  }
  function getColorStopValue(gradientPart) {
    const colorFunction = getLeadingColorFunction(gradientPart);
    if (colorFunction) {
      return colorFunction;
    }
    const [possibleColor] = gradientPart.split(/\s+/);
    if (A(possibleColor).isValid()) {
      return possibleColor;
    }
  }
  function getWaveformGradientDirection(gradientValue) {
    const parts = getTopLevelGradientParts(gradientValue);
    const direction = parts[0];
    const angleMatch = direction?.match(/^(-?\d+(?:\.\d+)?)deg$/i);
    if (angleMatch) {
      const angle = (Number(angleMatch[1]) % 360 + 360) % 360;
      if (angle === 90 || angle === 270) {
        return "horizontal";
      }
      if (angle === 0 || angle === 180) {
        return "vertical";
      }
      return "diagonal";
    }
    if (!direction?.startsWith("to ")) {
      return void 0;
    }
    const sideOrCorner = direction.toLowerCase().replace(/^to\s+/, "");
    const hasHorizontalSide = sideOrCorner.includes("left") || sideOrCorner.includes("right");
    const hasVerticalSide = sideOrCorner.includes("top") || sideOrCorner.includes("bottom");
    if (hasHorizontalSide && hasVerticalSide) {
      return "diagonal";
    }
    if (hasHorizontalSide) {
      return "horizontal";
    }
    if (hasVerticalSide) {
      return "vertical";
    }
  }
  function resolveColorValue(element, colorValue) {
    if (!colorValue || A(colorValue).isValid()) {
      return colorValue;
    }
    const colorResolver = element.ownerDocument.createElement("span");
    colorResolver.style.color = colorValue;
    if (!colorResolver.style.color) {
      return colorValue;
    }
    element.appendChild(colorResolver);
    const resolvedColor = getComputedStyle4(colorResolver).color;
    colorResolver.remove();
    return resolvedColor && A(resolvedColor).isValid() ? resolvedColor : colorValue;
  }
  function getResolvedGradientStops(element, gradientValue) {
    const stops = getWaveformGradientStops(gradientValue)?.map((colorValue) => resolveColorValue(element, colorValue)).filter((colorValue) => A(colorValue).isValid());
    return stops?.length > 1 ? stops : void 0;
  }
  function applyAlpha(colorValue, alpha) {
    if (Array.isArray(colorValue)) {
      return colorValue.map(
        (color) => A(color).alpha(alpha).toRgbString()
      );
    }
    return A(colorValue).alpha(alpha).toRgbString();
  }
  function getRepresentativeColor(colorValue) {
    if (Array.isArray(colorValue)) {
      return colorValue[colorValue.length - 1];
    }
    return colorValue;
  }
  function getWaveformGradientStops(gradientValue) {
    const stops = getTopLevelGradientParts(gradientValue).map(getColorStopValue).filter(Boolean);
    return stops.length > 1 ? stops : void 0;
  }
  function serializeColorValue(colorValue) {
    return Array.isArray(colorValue) ? JSON.stringify(colorValue) : colorValue;
  }
  function getWaveformColors(element, waveformColorValue, textColorValue, waveformGradientValue) {
    const textColor = textColorValue || getComputedStyle4(element).color;
    const waveformGradientStops = getResolvedGradientStops(
      element,
      waveformGradientValue
    );
    const waveformBaseColor = waveformGradientStops || waveformColorValue || textColor;
    const waveformColor = applyAlpha(waveformBaseColor, 0.3);
    const progressColor = applyAlpha(waveformBaseColor, 0.6);
    const waveformGradient = waveformGradientStops ? getWaveformGradientDirection(waveformGradientValue) : void 0;
    return {
      textColor,
      waveformColor,
      progressColor,
      ...waveformGradient && { waveformGradient }
    };
  }
  function createWaveformContainer({
    url,
    title,
    artist,
    artwork,
    waveformColor,
    progressColor,
    waveformGradient,
    buttonColor,
    seekLabel,
    seekValueText,
    height = DEFAULT_WAVEFORM_HEIGHT,
    waveformStyle = "bars"
  }) {
    const container = document.createElement("div");
    container.setAttribute("data-waveform-player", "");
    container.setAttribute("data-url", url);
    container.setAttribute("data-height", String(height));
    container.setAttribute("data-waveform-style", waveformStyle);
    container.setAttribute(
      "data-waveform-color",
      serializeColorValue(waveformColor)
    );
    container.setAttribute(
      "data-progress-color",
      serializeColorValue(progressColor)
    );
    if (waveformGradient) {
      container.setAttribute("data-waveform-gradient", waveformGradient);
    }
    container.setAttribute("data-button-color", buttonColor);
    container.setAttribute(
      "data-seek-label",
      getSeekControlLabel(seekLabel)
    );
    if (seekValueText) {
      container.setAttribute("data-seek-value-text", seekValueText);
    }
    container.setAttribute("data-text-color", buttonColor);
    container.setAttribute("data-text-secondary-color", buttonColor);
    if (title) {
      container.setAttribute("data-title", title);
    }
    if (artist) {
      container.setAttribute("data-artist", artist);
    }
    if (artwork) {
      container.setAttribute("data-artwork", artwork);
    }
    return container;
  }
  function applyWaveformPlayerStyles(container, {
    backgroundColor,
    backgroundGradient,
    textColor,
    playButtonColor,
    playButtonGradient
  } = {}) {
    const waveformContainer = container.querySelector(".waveform-container");
    const playButton = container.querySelector(".waveform-btn");
    const playButtonBaseColor = getRepresentativeColor(
      getResolvedGradientStops(container, playButtonGradient) || playButtonColor
    );
    if (playButtonBaseColor) {
      container.style.setProperty(
        "--wfp-button-color",
        playButtonBaseColor
      );
    } else {
      container.style.removeProperty("--wfp-button-color");
    }
    if (textColor) {
      container.style.setProperty("--wfp-text-color", textColor);
      container.style.setProperty("--wfp-text-secondary-color", textColor);
    } else {
      container.style.removeProperty("--wfp-text-color");
      container.style.removeProperty("--wfp-text-secondary-color");
    }
    if (playButton) {
      if (playButtonGradient) {
        playButton.style.background = playButtonGradient;
      } else {
        playButton.style.removeProperty("background");
      }
    }
    if (waveformContainer) {
      if (backgroundGradient) {
        waveformContainer.style.background = backgroundGradient;
      } else if (backgroundColor) {
        waveformContainer.style.removeProperty("background");
        waveformContainer.style.backgroundColor = backgroundColor;
      } else {
        waveformContainer.style.removeProperty("background");
        waveformContainer.style.removeProperty("background-color");
      }
    }
  }
  function styleSvgIcons(container, buttonColor) {
    const isButtonDark = A(buttonColor).isDark();
    const iconColor = isButtonDark ? "#ffffff" : "#000000";
    const svgPaths = container.querySelectorAll("svg path");
    svgPaths.forEach((path) => {
      path.style.fill = iconColor;
    });
  }
  function setupPlayButtonAccessibility(container, { play: playLabel = "Play", pause: pauseLabel = "Pause" } = {}) {
    const playBtn = container.querySelector(".waveform-btn");
    if (!playBtn) {
      return;
    }
    playBtn.setAttribute("aria-label", playLabel);
    const onPlay = () => playBtn.setAttribute("aria-label", pauseLabel);
    const onPause = () => playBtn.setAttribute("aria-label", playLabel);
    container.addEventListener("waveformplayer:play", onPlay);
    container.addEventListener("waveformplayer:pause", onPause);
    container.addEventListener("waveformplayer:ended", onPause);
    return () => {
      container.removeEventListener("waveformplayer:play", onPlay);
      container.removeEventListener("waveformplayer:pause", onPause);
      container.removeEventListener("waveformplayer:ended", onPause);
    };
  }
  function getSeekControlLabel(label) {
    return label || DEFAULT_SEEK_LABEL;
  }
  function updateSeekControlLabel(instance, label) {
    const seekLabel = getSeekControlLabel(label);
    instance.options.seekLabel = seekLabel;
    instance.applySeekLabel?.(seekLabel);
    const seekControl = instance?.container?.querySelector(
      ".waveform-container"
    );
    if (seekControl) {
      seekControl.setAttribute("aria-label", seekLabel);
    }
  }
  function setupPlayButtonArtwork(container, artworkUrl) {
    if (!artworkUrl) {
      container.classList.remove("has-play-button-artwork");
      container.style.removeProperty("--wp--playlist--play-button-artwork");
      return;
    }
    container.classList.add("has-play-button-artwork");
    container.style.setProperty(
      "--wp--playlist--play-button-artwork",
      `url(${JSON.stringify(artworkUrl)})`
    );
  }
  function logPlayError(error2) {
    if (error2.name === "AbortError") {
      return;
    }
    console.error("Playlist play error:", error2);
  }
  function initWaveformPlayer(element, {
    src,
    title,
    artist,
    image,
    imageAlt,
    waveformColor: waveformColorValue,
    waveformGradient: waveformGradientValue,
    textColor: textColorValue,
    backgroundColor,
    backgroundGradient,
    autoPlay,
    onEnded,
    labels,
    waveformStyle,
    showPlayButtonArtwork = false
  }) {
    const playerArtwork = showPlayButtonArtwork ? void 0 : image;
    const { textColor, waveformColor, progressColor, waveformGradient } = getWaveformColors(
      element,
      waveformColorValue,
      textColorValue,
      waveformGradientValue
    );
    const waveformGradientStops = getResolvedGradientStops(
      element,
      waveformGradientValue
    );
    const waveformButtonColor = getRepresentativeColor(
      waveformGradientStops || waveformColorValue
    );
    const container = createWaveformContainer({
      url: src,
      title,
      artist,
      artwork: playerArtwork,
      waveformColor,
      progressColor,
      waveformGradient,
      buttonColor: textColor,
      seekLabel: title || labels?.seek,
      seekValueText: labels?.seekValueText,
      waveformStyle
    });
    element.appendChild(container);
    const instance = new se(container);
    if (instance.artworkEl) {
      instance.artworkEl.alt = imageAlt || "";
    }
    applyWaveformPlayerStyles(container, {
      backgroundColor,
      backgroundGradient,
      textColor,
      playButtonColor: showPlayButtonArtwork ? void 0 : waveformButtonColor,
      playButtonGradient: showPlayButtonArtwork ? void 0 : waveformGradientValue
    });
    let cleanupPlayButtonAccessibility;
    const handlers = {
      ready: () => {
        styleSvgIcons(container, waveformButtonColor || textColor);
        if (showPlayButtonArtwork) {
          setupPlayButtonArtwork(container, image);
        }
        cleanupPlayButtonAccessibility = setupPlayButtonAccessibility(
          container,
          labels
        );
        if (autoPlay) {
          instance.play()?.catch(logPlayError);
        }
      },
      ended: () => onEnded?.()
    };
    container.addEventListener("waveformplayer:ready", handlers.ready);
    container.addEventListener("waveformplayer:ended", handlers.ended);
    return {
      instance,
      container,
      destroy: () => {
        cleanupPlayButtonAccessibility?.();
        container.removeEventListener(
          "waveformplayer:ready",
          handlers.ready
        );
        container.removeEventListener(
          "waveformplayer:ended",
          handlers.ended
        );
        instance.destroy();
        container.remove();
      }
    };
  }

  // packages/block-library/build-module/utils/waveform-player.mjs
  var import_jsx_runtime386 = __toESM(require_jsx_runtime(), 1);
  function updatePlayerMetadata(player, { title, artist, image, imageAlt }, showPlayButtonArtwork) {
    const { instance, container } = player;
    const playerArtwork = showPlayButtonArtwork ? void 0 : image;
    if (instance.titleEl) {
      instance.titleEl.textContent = title ?? "";
    }
    updateSeekControlLabel(instance, title || (0, import_i18n156.__)("Seek"));
    if (typeof instance.syncArtist === "function") {
      instance.syncArtist(artist || "");
    } else if (instance.artistEl) {
      instance.artistEl.textContent = artist ?? "";
      instance.artistEl.style.display = artist ? "" : "none";
    }
    if (typeof instance.syncArtwork === "function") {
      instance.syncArtwork(
        playerArtwork || null,
        playerArtwork ? imageAlt || "" : ""
      );
    } else if (instance.artworkEl && playerArtwork) {
      instance.artworkEl.src = playerArtwork;
      instance.artworkEl.alt = imageAlt || "";
    }
    if (showPlayButtonArtwork) {
      setupPlayButtonArtwork(container, image);
    }
  }
  function WaveformPlayer({
    src,
    title,
    artist,
    image,
    imageAlt,
    color,
    gradient,
    backgroundColor,
    backgroundGradient,
    textColor,
    waveformStyle,
    onEnded,
    showPlayButtonArtwork = false
  }) {
    const onEndedEvent = (0, import_compose47.useEvent)(onEnded);
    const playerRef = (0, import_element115.useRef)();
    const hasSrc = !!src;
    const metadataRef = (0, import_element115.useRef)({ src, title, artist, image, imageAlt });
    const stylesRef = (0, import_element115.useRef)({
      color,
      gradient,
      backgroundColor,
      backgroundGradient,
      textColor
    });
    (0, import_element115.useEffect)(() => {
      metadataRef.current = { src, title, artist, image, imageAlt };
    }, [src, title, artist, image, imageAlt]);
    (0, import_element115.useEffect)(() => {
      stylesRef.current = {
        color,
        gradient,
        backgroundColor,
        backgroundGradient,
        textColor
      };
    }, [color, gradient, backgroundColor, backgroundGradient, textColor]);
    (0, import_element115.useEffect)(() => {
      if (playerRef.current?.container) {
        applyWaveformPlayerStyles(playerRef.current.container, {
          backgroundColor,
          backgroundGradient,
          textColor,
          playButtonColor: showPlayButtonArtwork ? void 0 : color,
          playButtonGradient: showPlayButtonArtwork ? void 0 : gradient
        });
      }
    }, [
      backgroundColor,
      backgroundGradient,
      color,
      gradient,
      showPlayButtonArtwork,
      textColor
    ]);
    const ref = (0, import_compose47.useRefEffect)(
      (element) => {
        if (!hasSrc) {
          return;
        }
        let cancelled = false;
        let playerDestroy;
        function init117() {
          if (cancelled) {
            return;
          }
          const player = initWaveformPlayer(element, {
            src: metadataRef.current.src,
            title: metadataRef.current.title,
            artist: metadataRef.current.artist,
            image: metadataRef.current.image,
            imageAlt: metadataRef.current.imageAlt,
            waveformColor: stylesRef.current.color,
            waveformGradient: stylesRef.current.gradient,
            backgroundColor: stylesRef.current.backgroundColor,
            backgroundGradient: stylesRef.current.backgroundGradient,
            textColor: stylesRef.current.textColor,
            waveformStyle,
            labels: {
              seek: (0, import_i18n156.__)("Seek"),
              /* translators: %1$s: current audio time, %2$s: total audio duration. */
              seekValueText: (0, import_i18n156._x)(
                "%1$s of %2$s",
                "audio current time of total duration"
              )
            },
            onEnded: () => onEndedEvent?.(),
            showPlayButtonArtwork
          });
          playerRef.current = player;
          const { destroy } = player;
          playerDestroy = destroy;
        }
        const timeoutId = setTimeout(init117, 100);
        return () => {
          cancelled = true;
          clearTimeout(timeoutId);
          playerRef.current = void 0;
          playerDestroy?.();
        };
      },
      [
        onEndedEvent,
        hasSrc,
        waveformStyle,
        color,
        gradient,
        textColor,
        showPlayButtonArtwork
      ]
    );
    (0, import_element115.useEffect)(() => {
      if (playerRef.current?.instance) {
        const player = playerRef.current;
        if (player) {
          updatePlayerMetadata(
            player,
            {
              title,
              artist,
              image,
              imageAlt
            },
            showPlayButtonArtwork
          );
        }
      }
    }, [title, artist, image, imageAlt, showPlayButtonArtwork]);
    (0, import_element115.useEffect)(() => {
      if (src && playerRef.current?.instance) {
        const wasPlaying = playerRef.current.instance.isPlaying;
        const promise = playerRef.current.instance.loadTrack(
          src,
          metadataRef.current.title,
          metadataRef.current.artist,
          {
            artwork: showPlayButtonArtwork ? void 0 : metadataRef.current.image,
            artworkAlt: showPlayButtonArtwork ? "" : metadataRef.current.imageAlt
          }
        );
        promise.then(() => {
          if (showPlayButtonArtwork && playerRef.current?.container) {
            setupPlayButtonArtwork(
              playerRef.current.container,
              metadataRef.current.image
            );
          }
          if (!wasPlaying) {
            playerRef.current?.instance.pause();
          }
        });
      }
    }, [src, showPlayButtonArtwork]);
    return /* @__PURE__ */ (0, import_jsx_runtime386.jsx)("div", { ref, className: "wp-block-playlist__waveform-player" });
  }

  // packages/block-library/build-module/playlist/context.mjs
  var import_element116 = __toESM(require_element(), 1);
  var PlaylistContext = (0, import_element116.createContext)({
    currentTrackClientId: null,
    setCurrentTrackClientId: () => {
    }
  });

  // packages/block-library/build-module/playlist/utils.mjs
  var import_i18n157 = __toESM(require_i18n(), 1);
  var import_html_entities8 = __toESM(require_html_entities(), 1);
  function getMediaUrl(media) {
    return media?.url ?? media?.source_url;
  }
  function getMediaTitle(media) {
    const title = media?.title;
    if (title === void 0) {
      return void 0;
    }
    if (typeof title === "string") {
      return title;
    }
    return (0, import_html_entities8.decodeEntities)(title?.raw || title?.rendered || "");
  }
  function getTrackImageAttributes(image) {
    const imageSrc = image?.src ?? getMediaUrl(image);
    if (imageSrc?.endsWith("/images/media/audio.svg")) {
      return {
        image: "",
        imageAlt: ""
      };
    }
    return {
      // Note: Image is not available when a new track is uploaded.
      image: imageSrc,
      imageAlt: imageSrc ? image?.alt || image?.alt_text || "" : void 0
    };
  }
  function getTrackAttributes(media) {
    const mediaUrl = getMediaUrl(media);
    return {
      id: media.id || mediaUrl,
      // Attachment ID or URL.
      src: mediaUrl,
      title: getMediaTitle(media),
      artist: media.artist || media?.meta?.artist || media?.media_details?.artist || (0, import_i18n157.__)("Unknown artist"),
      album: media.album || media?.meta?.album || media?.media_details?.album || (0, import_i18n157.__)("Unknown album"),
      length: media?.fileLength || media?.media_details?.length_formatted,
      ...getTrackImageAttributes(media?.image)
    };
  }

  // packages/block-library/build-module/playlist/edit.mjs
  var import_jsx_runtime387 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES6 = ["audio"];
  var EMPTY_ARRAY5 = [];
  var AUDIO_FILE_EXTENSION = /\.(aac|aif|aiff|flac|m4a|m4b|mp3|oga|ogg|opus|wav|weba)$/i;
  var DEFAULT_WAVEFORM_STYLE = "bars";
  var FILE_LIST_OBJECT_NAME = "[object FileList]";
  var WAVEFORM_STYLE_OPTIONS = [
    { label: (0, import_i18n158._x)("Bars", "waveform style option"), value: "bars" },
    { label: (0, import_i18n158._x)("Mirror", "waveform style option"), value: "mirror" },
    { label: (0, import_i18n158._x)("Line", "waveform style option"), value: "line" },
    { label: (0, import_i18n158._x)("Blocks", "waveform style option"), value: "blocks" },
    { label: (0, import_i18n158._x)("Dots", "waveform style option"), value: "dots" },
    { label: (0, import_i18n158._x)("Seekbar", "waveform style option"), value: "seekbar" }
  ];
  function isFile(value) {
    return Object.prototype.toString.call(value) === "[object File]" || typeof File !== "undefined" && value instanceof File;
  }
  function isAudioFile(file) {
    return file.type ? file.type.startsWith("audio/") : AUDIO_FILE_EXTENSION.test(file.name);
  }
  function getTrackIdentifier(track) {
    return track.id ?? track.src ?? track.blob;
  }
  var PlaylistEdit = ({
    attributes: attributes2,
    setAttributes,
    isSelected,
    insertBlocksAfter,
    clientId
  }) => {
    const {
      order,
      showTracklist,
      showNumbers,
      showImages,
      showPlayButtonArtwork,
      showArtists,
      showTrackLength,
      waveformStyle = DEFAULT_WAVEFORM_STYLE,
      waveformColor,
      waveformGradient,
      waveformBackgroundColor,
      waveformBackgroundGradient
    } = attributes2;
    const blockProps = (0, import_block_editor174.useBlockProps)();
    const waveformPanelId = `${clientId}-waveform`;
    const {
      replaceInnerBlocks,
      replaceBlocks,
      insertBlocks,
      selectBlock,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data101.useDispatch)(import_block_editor174.store);
    const { createErrorNotice } = (0, import_data101.useDispatch)(import_notices15.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const colorGradientSettings = (0, import_block_editor174.__experimentalUseMultipleOriginColorsAndGradients)();
    const colors = (0, import_element117.useMemo)(
      () => colorGradientSettings.colors.flatMap(
        (origin) => origin?.colors ?? []
      ),
      [colorGradientSettings.colors]
    );
    const gradients = (0, import_element117.useMemo)(
      () => colorGradientSettings.gradients.flatMap(
        (origin) => origin?.gradients ?? []
      ),
      [colorGradientSettings.gradients]
    );
    const hasColors = colors.length > 0 || !colorGradientSettings.disableCustomColors;
    const hasGradients = gradients.length > 0 || !colorGradientSettings.disableCustomGradients;
    const waveformGradientValue = waveformGradient;
    const waveformBackgroundGradientValue = waveformBackgroundGradient;
    let waveformColorGradientChange;
    let waveformBackgroundColorGradientChange;
    const onUploadError = (0, import_element117.useCallback)(
      (message) => {
        createErrorNotice(message, { type: "snackbar" });
      },
      [createErrorNotice]
    );
    const [currentTrackClientId, setCurrentTrackClientId] = (0, import_element117.useState)(null);
    const { innerBlockTracks } = (0, import_data101.useSelect)(
      (select10) => {
        const { getBlock: _getBlock } = select10(import_block_editor174.store);
        return {
          innerBlockTracks: _getBlock(clientId)?.innerBlocks ?? EMPTY_ARRAY5
        };
      },
      [clientId]
    );
    const validTracks = (0, import_element117.useMemo)(
      () => innerBlockTracks.filter(
        (block) => !!block.attributes.src || !!block.attributes.blob
      ),
      [innerBlockTracks]
    );
    const tracks = (0, import_element117.useMemo)(
      () => validTracks.map((block) => ({
        ...block.attributes,
        clientId: block.clientId
      })),
      [validTracks]
    );
    (0, import_element117.useEffect)(() => {
      if (validTracks.length === 0) {
        if (currentTrackClientId !== null) {
          setCurrentTrackClientId(null);
        }
        return;
      }
      const currentTrackExists = validTracks.some(
        (block) => block.clientId === currentTrackClientId
      );
      if (!currentTrackExists) {
        setCurrentTrackClientId(validTracks[0].clientId);
      }
    }, [currentTrackClientId, setCurrentTrackClientId, validTracks]);
    (0, import_element117.useEffect)(() => {
      if (validTracks.length > 0 || innerBlockTracks.length === 0) {
        return;
      }
      __unstableMarkNextChangeAsNotPersistent();
      replaceInnerBlocks(clientId, []);
    }, [
      clientId,
      innerBlockTracks,
      replaceInnerBlocks,
      validTracks,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const createTrackBlocks = (0, import_element117.useCallback)(
      (media) => {
        if (!media) {
          return [];
        }
        let mediaItems = [media];
        if (Object.prototype.toString.call(media) === FILE_LIST_OBJECT_NAME) {
          mediaItems = Array.from(media);
        } else if (Array.isArray(media)) {
          mediaItems = media;
        }
        let hasInvalidFile = false;
        const blocks = mediaItems.map((mediaItem) => {
          if (isFile(mediaItem)) {
            if (!isAudioFile(mediaItem)) {
              hasInvalidFile = true;
              return null;
            }
            return (0, import_blocks66.createBlock)("core/playlist-track", {
              blob: (0, import_blob16.createBlobURL)(mediaItem),
              title: mediaItem.name
            });
          }
          const track = getTrackAttributes(mediaItem);
          return track.src ? (0, import_blocks66.createBlock)("core/playlist-track", track) : null;
        }).filter(Boolean);
        if (hasInvalidFile) {
          onUploadError(
            (0, import_i18n158.__)("Only audio files can be added to a playlist.")
          );
        }
        return blocks;
      },
      [onUploadError]
    );
    const onSelectTracks = (0, import_element117.useCallback)(
      (media) => {
        const newBlocks = createTrackBlocks(media);
        if (newBlocks.length === 0) {
          return;
        }
        setCurrentTrackClientId(newBlocks[0]?.clientId ?? null);
        replaceInnerBlocks(clientId, newBlocks);
      },
      [
        clientId,
        createTrackBlocks,
        replaceInnerBlocks,
        setCurrentTrackClientId
      ]
    );
    const onAddTracks = (0, import_element117.useCallback)(
      (media) => {
        const existingIds = new Set(
          validTracks.map((block) => getTrackIdentifier(block.attributes)).filter(Boolean)
        );
        const newBlocks = createTrackBlocks(media).filter(
          (block) => !existingIds.has(getTrackIdentifier(block.attributes))
        );
        if (newBlocks.length === 0) {
          return;
        }
        setCurrentTrackClientId(newBlocks[0].clientId);
        insertBlocks(newBlocks, void 0, clientId, false);
        selectBlock(newBlocks[0].clientId);
      },
      [
        clientId,
        createTrackBlocks,
        insertBlocks,
        selectBlock,
        setCurrentTrackClientId,
        validTracks
      ]
    );
    const removeTrack = (0, import_element117.useCallback)(
      (trackClientId) => {
        replaceBlocks(trackClientId, []);
      },
      [replaceBlocks]
    );
    const playlistContext = (0, import_element117.useMemo)(
      () => ({
        currentTrackClientId,
        setCurrentTrackClientId,
        removeTrack
      }),
      [currentTrackClientId, setCurrentTrackClientId, removeTrack]
    );
    const currentTrackData = tracks.find((track) => track.clientId === currentTrackClientId) ?? tracks[0];
    const onTrackEnded = (0, import_element117.useCallback)(() => {
      const currentIndex = tracks.findIndex(
        (track) => track.clientId === currentTrackClientId
      );
      const nextTrack = tracks[currentIndex + 1] || tracks[0];
      if (nextTrack?.clientId) {
        setCurrentTrackClientId(nextTrack.clientId);
      }
    }, [currentTrackClientId, setCurrentTrackClientId, tracks]);
    const onChangeOrder = (0, import_element117.useCallback)(
      (trackOrder) => {
        const sortedBlocks = [...innerBlockTracks].sort((a, b) => {
          const titleA = a.attributes.title || "";
          const titleB = b.attributes.title || "";
          if (trackOrder === "asc") {
            return titleA.localeCompare(titleB);
          }
          return titleB.localeCompare(titleA);
        });
        replaceInnerBlocks(clientId, sortedBlocks);
        setCurrentTrackClientId(sortedBlocks[0]?.clientId ?? null);
        setAttributes({
          order: trackOrder
        });
      },
      [
        clientId,
        innerBlockTracks,
        replaceInnerBlocks,
        setAttributes,
        setCurrentTrackClientId
      ]
    );
    function toggleAttribute(attribute) {
      return (newValue) => {
        setAttributes({ [attribute]: newValue });
      };
    }
    const onChangeWaveformStyle = (0, import_element117.useCallback)(
      (newWaveformStyle) => {
        setAttributes({
          waveformStyle: newWaveformStyle === DEFAULT_WAVEFORM_STYLE ? void 0 : newWaveformStyle
        });
      },
      [setAttributes]
    );
    function updateWaveformColor(colorValue) {
      const isSettingColor = colorValue !== void 0;
      if (!isSettingColor && waveformColorGradientChange === "gradient") {
        waveformColorGradientChange = void 0;
        return;
      }
      waveformColorGradientChange = "color";
      setAttributes({
        waveformColor: colorValue,
        waveformGradient: void 0
      });
    }
    function updateWaveformGradient(gradientValue) {
      const isSettingGradient = gradientValue !== void 0;
      if (!isSettingGradient && waveformColorGradientChange === "color") {
        waveformColorGradientChange = void 0;
        return;
      }
      waveformColorGradientChange = "gradient";
      setAttributes({
        waveformGradient: gradientValue,
        waveformColor: void 0
      });
    }
    function updateWaveformBackgroundColor(colorValue) {
      const isSettingColor = colorValue !== void 0;
      if (!isSettingColor && waveformBackgroundColorGradientChange === "gradient") {
        waveformBackgroundColorGradientChange = void 0;
        return;
      }
      waveformBackgroundColorGradientChange = "color";
      setAttributes({
        waveformBackgroundColor: colorValue,
        waveformBackgroundGradient: void 0
      });
    }
    function updateWaveformBackgroundGradient(gradientValue) {
      const isSettingGradient = gradientValue !== void 0;
      if (!isSettingGradient && waveformBackgroundColorGradientChange === "color") {
        waveformBackgroundColorGradientChange = void 0;
        return;
      }
      waveformBackgroundColorGradientChange = "gradient";
      setAttributes({
        waveformBackgroundGradient: gradientValue,
        waveformBackgroundColor: void 0
      });
    }
    const colorSettings = [];
    if (hasColors || hasGradients) {
      colorSettings.push(
        {
          colorValue: hasColors ? waveformColor : void 0,
          gradientValue: hasGradients ? waveformGradientValue : void 0,
          label: (0, import_i18n158.__)("Waveform & Play button"),
          onColorChange: hasColors ? updateWaveformColor : void 0,
          onGradientChange: hasGradients ? updateWaveformGradient : void 0,
          isShownByDefault: true,
          clearable: true,
          enableAlpha: true,
          resetAllFilter: () => ({
            waveformColor: void 0,
            waveformGradient: void 0
          })
        },
        {
          colorValue: hasColors ? waveformBackgroundColor : void 0,
          gradientValue: hasGradients ? waveformBackgroundGradientValue : void 0,
          label: (0, import_i18n158.__)("Waveform background"),
          onColorChange: hasColors ? updateWaveformBackgroundColor : void 0,
          onGradientChange: hasGradients ? updateWaveformBackgroundGradient : void 0,
          isShownByDefault: true,
          clearable: true,
          enableAlpha: true,
          resetAllFilter: () => ({
            waveformBackgroundColor: void 0,
            waveformBackgroundGradient: void 0
          })
        }
      );
    }
    const { children: innerBlocks, ...trackListProps } = (0, import_block_editor174.useInnerBlocksProps)(
      {
        className: clsx_default("wp-block-playlist__tracklist", {
          "wp-block-playlist__tracklist-is-hidden": !showTracklist,
          "wp-block-playlist__tracklist-show-numbers": showNumbers,
          "wp-block-playlist__tracklist-length-is-hidden": !showTrackLength
        })
      },
      {
        __experimentalAppenderTagName: "li",
        renderAppender: false
      }
    );
    if (tracks.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
        "div",
        {
          ...blockProps,
          className: clsx_default("is-placeholder", blockProps.className),
          children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
            import_block_editor174.MediaPlaceholder,
            {
              icon: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_block_editor174.BlockIcon, { icon: playlist_default }),
              labels: {
                title: (0, import_i18n158.__)("Playlist"),
                instructions: (0, import_i18n158.__)(
                  "Upload an audio file or pick one from your media library."
                )
              },
              onSelect: onSelectTracks,
              accept: "audio/*",
              multiple: "add",
              handleUpload: false,
              allowedTypes: ALLOWED_MEDIA_TYPES6,
              onError: onUploadError
            }
          )
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_jsx_runtime387.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_block_editor174.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
        import_block_editor174.MediaReplaceFlow,
        {
          name: (0, import_i18n158.__)("Add track"),
          onSelect: onAddTracks,
          accept: "audio/*",
          multiple: "add",
          handleUpload: false,
          allowedTypes: ALLOWED_MEDIA_TYPES6,
          onError: onUploadError
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_block_editor174.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(
        import_components100.__experimentalToolsPanel,
        {
          label: (0, import_i18n158.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showTracklist: true,
              showArtists: true,
              showNumbers: true,
              showTrackLength: true,
              showImages: true,
              showPlayButtonArtwork: false,
              order: "asc"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_components100.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n158.__)("Show tracklist"),
                isShownByDefault: true,
                hasValue: () => showTracklist !== true,
                onDeselect: () => setAttributes({ showTracklist: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                  import_components100.ToggleControl,
                  {
                    label: (0, import_i18n158.__)("Show tracklist"),
                    onChange: toggleAttribute("showTracklist"),
                    checked: showTracklist
                  }
                )
              }
            ),
            showTracklist && /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(import_jsx_runtime387.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                import_components100.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n158.__)("Show artist name in tracklist"),
                  isShownByDefault: true,
                  hasValue: () => showArtists !== true,
                  onDeselect: () => setAttributes({ showArtists: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                    import_components100.ToggleControl,
                    {
                      label: (0, import_i18n158.__)(
                        "Show artist name in tracklist"
                      ),
                      onChange: toggleAttribute(
                        "showArtists"
                      ),
                      checked: showArtists
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                import_components100.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n158.__)(
                    "Show track numbers in tracklist"
                  ),
                  isShownByDefault: true,
                  hasValue: () => showNumbers !== true,
                  onDeselect: () => setAttributes({ showNumbers: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                    import_components100.ToggleControl,
                    {
                      label: (0, import_i18n158.__)(
                        "Show track numbers in tracklist"
                      ),
                      onChange: toggleAttribute(
                        "showNumbers"
                      ),
                      checked: showNumbers
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                import_components100.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n158.__)(
                    "Show track duration in tracklist"
                  ),
                  isShownByDefault: true,
                  hasValue: () => showTrackLength !== true,
                  onDeselect: () => setAttributes({ showTrackLength: true }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                    import_components100.ToggleControl,
                    {
                      label: (0, import_i18n158.__)(
                        "Show track duration in tracklist"
                      ),
                      onChange: toggleAttribute(
                        "showTrackLength"
                      ),
                      checked: showTrackLength
                    }
                  )
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_components100.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n158.__)("Show tracklist images"),
                isShownByDefault: true,
                hasValue: () => showImages !== true,
                onDeselect: () => setAttributes({ showImages: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                  import_components100.ToggleControl,
                  {
                    label: (0, import_i18n158.__)("Show tracklist images"),
                    onChange: toggleAttribute("showImages"),
                    checked: showImages
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_components100.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n158.__)("Show track image on play button"),
                isShownByDefault: true,
                hasValue: () => showPlayButtonArtwork === true,
                onDeselect: () => setAttributes({ showPlayButtonArtwork: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                  import_components100.ToggleControl,
                  {
                    label: (0, import_i18n158.__)("Show track image on play button"),
                    onChange: toggleAttribute(
                      "showPlayButtonArtwork"
                    ),
                    checked: showPlayButtonArtwork === true
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_components100.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n158.__)("Order"),
                isShownByDefault: true,
                hasValue: () => order !== "asc",
                onDeselect: () => setAttributes({ order: "asc" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                  import_components100.SelectControl,
                  {
                    label: (0, import_i18n158.__)("Order"),
                    value: order,
                    options: [
                      { label: (0, import_i18n158.__)("Descending"), value: "desc" },
                      { label: (0, import_i18n158.__)("Ascending"), value: "asc" }
                    ],
                    onChange: (value) => onChangeOrder(value)
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_block_editor174.InspectorControls, { group: "styles", children: /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)(
        import_components100.__experimentalToolsPanel,
        {
          label: (0, import_i18n158.__)("Waveform"),
          resetAll: () => {
            setAttributes({
              waveformStyle: void 0,
              waveformColor: void 0,
              waveformGradient: void 0,
              waveformBackgroundColor: void 0,
              waveformBackgroundGradient: void 0
            });
          },
          panelId: waveformPanelId,
          dropdownMenuProps,
          children: [
            colorSettings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime387.jsx)("div", { className: "wp-block-playlist__waveform-color-controls", children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_block_editor174.__experimentalColorGradientSettingsDropdown,
              {
                __experimentalIsRenderedInSidebar: true,
                settings: colorSettings,
                panelId: waveformPanelId,
                ...colorGradientSettings
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
              import_components100.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n158.__)("Shape"),
                isShownByDefault: true,
                hasValue: () => waveformStyle !== DEFAULT_WAVEFORM_STYLE,
                onDeselect: () => onChangeWaveformStyle(DEFAULT_WAVEFORM_STYLE),
                panelId: waveformPanelId,
                children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
                  import_components100.SelectControl,
                  {
                    label: (0, import_i18n158.__)("Shape"),
                    value: waveformStyle,
                    options: WAVEFORM_STYLE_OPTIONS,
                    onChange: onChangeWaveformStyle
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime387.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          import_block_editor174.MediaPlaceholder,
          {
            onSelect: onAddTracks,
            accept: "audio/*",
            multiple: "add",
            handleUpload: false,
            disableMediaButtons: true,
            allowedTypes: ALLOWED_MEDIA_TYPES6,
            onError: onUploadError
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(import_components100.Disabled, { isDisabled: !isSelected, children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          WaveformPlayer,
          {
            src: currentTrackData?.src,
            title: currentTrackData?.title,
            artist: currentTrackData?.artist,
            image: currentTrackData?.image,
            imageAlt: currentTrackData?.imageAlt,
            waveformStyle,
            color: waveformColor,
            gradient: waveformGradientValue,
            backgroundColor: waveformBackgroundColor,
            backgroundGradient: waveformBackgroundGradientValue,
            onEnded: onTrackEnded,
            showPlayButtonArtwork: showPlayButtonArtwork === true
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)("ol", { ...trackListProps, children: /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(PlaylistContext.Provider, { value: playlistContext, children: innerBlocks }) }),
        /* @__PURE__ */ (0, import_jsx_runtime387.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected,
            insertBlocksAfter,
            label: (0, import_i18n158.__)("Playlist caption text"),
            showToolbarButton: isSelected,
            style: { marginTop: 16 }
          }
        )
      ] })
    ] });
  };
  var edit_default19 = PlaylistEdit;

  // packages/block-library/build-module/playlist/save.mjs
  var import_block_editor175 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime388 = __toESM(require_jsx_runtime(), 1);
  function saveWithInnerBlocks2({ attributes: attributes2 }) {
    const {
      caption,
      showNumbers,
      showTracklist,
      showArtists,
      showTrackLength
    } = attributes2;
    const blockProps = import_block_editor175.useBlockProps.save();
    const innerBlocksProps = import_block_editor175.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime388.jsxs)("figure", { ...innerBlocksProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
        "ol",
        {
          className: clsx_default("wp-block-playlist__tracklist", {
            "wp-block-playlist__tracklist-is-hidden": !showTracklist,
            "wp-block-playlist__tracklist-artist-is-hidden": !showArtists,
            "wp-block-playlist__tracklist-length-is-hidden": !showTrackLength,
            "wp-block-playlist__tracklist-show-numbers": showNumbers
          }),
          children: innerBlocksProps.children
        }
      ),
      !import_block_editor175.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime388.jsx)(
        import_block_editor175.RichText.Content,
        {
          tagName: "figcaption",
          className: (0, import_block_editor175.__experimentalGetElementClassName)("caption"),
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/playlist/transforms.mjs
  var import_blocks67 = __toESM(require_blocks(), 1);
  var import_url21 = __toESM(require_url(), 1);
  var transforms22 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/audio"],
        transform: (attributes2) => (0, import_blocks67.createBlock)(
          "core/playlist",
          { ...attributes2[0] },
          attributes2.map(
            ({ blob, id, src }) => (0, import_blocks67.createBlock)("core/playlist-track", {
              blob,
              id,
              src,
              title: (0, import_url21.getFilename)(src)
            })
          )
        )
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/audio"],
        isMatch: ({}, block) => block.innerBlocks.length === 1 && block.innerBlocks[0].name === "core/playlist-track",
        transform: ({ style: style2, ...attributes2 }, [track]) => (0, import_blocks67.createBlock)("core/audio", {
          ...attributes2,
          ...style2?.spacing && {
            style: { spacing: style2.spacing }
          },
          blob: track.attributes.blob,
          id: track.attributes.id,
          src: track.attributes.src
        })
      }
    ]
  };
  var transforms_default23 = transforms22;

  // packages/block-library/build-module/playlist/index.mjs
  var { name: name60 } = block_default59;
  var settings59 = {
    icon: playlist_default,
    edit: edit_default19,
    save: saveWithInnerBlocks2,
    transforms: transforms_default23
  };
  var init59 = () => initBlock({ name: name60, metadata: block_default59, settings: settings59 });

  // packages/block-library/build-module/playlist-track/index.mjs
  var playlist_track_exports = {};
  __export(playlist_track_exports, {
    init: () => init60,
    metadata: () => block_default60,
    name: () => name61,
    settings: () => settings60
  });

  // packages/block-library/build-module/playlist-track/block.json
  var block_default60 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/playlist-track",
    title: "Playlist track",
    category: "media",
    parent: ["core/playlist"],
    description: "Playlist track.",
    keywords: ["music", "sound"],
    textdomain: "default",
    usesContext: ["showArtists", "showImages"],
    attributes: {
      blob: {
        type: "string",
        role: "local"
      },
      id: {
        type: "number",
        role: "content"
      },
      src: {
        type: "string",
        role: "content"
      },
      type: {
        type: "string",
        default: "audio"
      },
      album: {
        type: "string",
        role: "content"
      },
      artist: {
        type: "string",
        role: "content"
      },
      image: {
        type: "string",
        role: "content"
      },
      imageAlt: {
        type: "string",
        role: "content"
      },
      length: {
        type: "string",
        role: "content"
      },
      title: {
        type: "string",
        role: "content"
      }
    },
    supports: {
      html: false,
      interactivity: {
        clientNavigation: true
      },
      reusable: false
    },
    style: "wp-block-playlist-track"
  };

  // packages/block-library/build-module/playlist-track/edit.mjs
  var import_blob17 = __toESM(require_blob(), 1);
  var import_element118 = __toESM(require_element(), 1);
  var import_block_editor176 = __toESM(require_block_editor(), 1);
  var import_components101 = __toESM(require_components(), 1);
  var import_data102 = __toESM(require_data(), 1);
  var import_notices16 = __toESM(require_notices(), 1);
  var import_i18n159 = __toESM(require_i18n(), 1);
  var import_dom20 = __toESM(require_dom(), 1);
  var import_jsx_runtime389 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES7 = ["audio"];
  var TRACK_IMAGE_ALLOWED_MEDIA_TYPES = ["image"];
  var PlaylistTrackEdit = ({
    attributes: attributes2,
    setAttributes,
    context,
    clientId,
    isSelected
  }) => {
    const { id, src, album, artist, image, imageAlt, length, title } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element118.useState)(attributes2.blob);
    const showArtists = context?.showArtists;
    const showImages = context?.showImages ?? true;
    const imageButton = (0, import_element118.useRef)();
    const blockProps = (0, import_block_editor176.useBlockProps)();
    const { currentTrackClientId, setCurrentTrackClientId, removeTrack } = (0, import_element118.useContext)(PlaylistContext);
    const { createErrorNotice } = (0, import_data102.useDispatch)(import_notices16.store);
    function onUploadError(message, { removeTrackOnError = false } = {}) {
      createErrorNotice(message, { type: "snackbar" });
      if (removeTrackOnError) {
        removeTrack(clientId);
        return;
      }
      setTemporaryURL();
    }
    const hasTrackSource = !!src || !!temporaryURL;
    (0, import_element118.useEffect)(() => {
      if (isSelected && hasTrackSource && currentTrackClientId !== clientId) {
        setCurrentTrackClientId(clientId);
      }
    }, [
      isSelected,
      hasTrackSource,
      clientId,
      currentTrackClientId,
      setCurrentTrackClientId
    ]);
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES7,
      onChange: onSelectTrack,
      onError: (message) => {
        onUploadError(message, { removeTrackOnError: true });
      }
    });
    function onSelectTrack(media) {
      const mediaUrl = media?.url ?? media?.source_url;
      if (!media || !mediaUrl) {
        setAttributes({
          blob: void 0,
          id: void 0,
          artist: void 0,
          album: void 0,
          image: void 0,
          imageAlt: void 0,
          length: void 0,
          title: void 0,
          url: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob17.isBlobURL)(mediaUrl)) {
        setTemporaryURL(mediaUrl);
        return;
      }
      setAttributes({
        blob: void 0,
        ...getTrackAttributes(media)
      });
      setTemporaryURL();
    }
    function onSelectTrackImage(trackImage) {
      setAttributes(getTrackImageAttributes(trackImage));
    }
    function onRemoveTrackImage() {
      setAttributes({ image: void 0, imageAlt: void 0 });
      imageButton.current.focus();
    }
    if (!hasTrackSource) {
      return /* @__PURE__ */ (0, import_jsx_runtime389.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
        import_block_editor176.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_block_editor176.BlockIcon, { icon: audio_default }),
          labels: {
            title: (0, import_i18n159.__)("Track"),
            instructions: (0, import_i18n159.__)(
              "Upload an audio file or pick one from your media library."
            )
          },
          onSelect: onSelectTrack,
          accept: "audio/*",
          allowedTypes: ALLOWED_MEDIA_TYPES7,
          value: attributes2,
          onError: onUploadError
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)(import_jsx_runtime389.Fragment, { children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_block_editor176.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
        import_block_editor176.MediaReplaceFlow,
        {
          name: (0, import_i18n159.__)("Replace"),
          onSelect: onSelectTrack,
          accept: "audio/*",
          mediaId: id,
          mediaURL: src,
          allowedTypes: ALLOWED_MEDIA_TYPES7,
          onError: onUploadError,
          variant: "toolbar"
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_block_editor176.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)(import_components101.PanelBody, { title: (0, import_i18n159.__)("Settings"), children: [
        isSelected && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
          import_components101.TextControl,
          {
            label: (0, import_i18n159.__)("Title"),
            value: title ? (0, import_dom20.__unstableStripHTML)(title) : "",
            onChange: (titleValue) => {
              setAttributes({ title: titleValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
          import_components101.TextControl,
          {
            label: (0, import_i18n159.__)("Artist"),
            value: artist ? (0, import_dom20.__unstableStripHTML)(artist) : "",
            onChange: (artistValue) => {
              setAttributes({ artist: artistValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
          import_components101.TextControl,
          {
            label: (0, import_i18n159.__)("Album"),
            value: album ? (0, import_dom20.__unstableStripHTML)(album) : "",
            onChange: (albumValue) => {
              setAttributes({ album: albumValue });
            }
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_block_editor176.MediaUploadCheck, { children: /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)(import_components101.BaseControl, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_components101.BaseControl.VisualLabel, { children: (0, import_i18n159.__)("Track image") }),
          /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)("div", { className: "editor-video-poster-control", children: [
            !!image && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              "img",
              {
                src: image,
                alt: (0, import_i18n159.__)(
                  "Preview of the track image"
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              import_block_editor176.MediaUpload,
              {
                title: (0, import_i18n159.__)("Select image"),
                onSelect: onSelectTrackImage,
                allowedTypes: TRACK_IMAGE_ALLOWED_MEDIA_TYPES,
                render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
                  import_components101.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    onClick: open,
                    ref: imageButton,
                    children: !image ? (0, import_i18n159.__)("Select") : (0, import_i18n159.__)("Replace")
                  }
                )
              }
            ),
            !!image && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              import_components101.Button,
              {
                __next40pxDefaultSize: true,
                onClick: onRemoveTrackImage,
                variant: "tertiary",
                children: (0, import_i18n159.__)("Remove")
              }
            )
          ] })
        ] }) }),
        !!image && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
          import_components101.TextareaControl,
          {
            label: (0, import_i18n159.__)("Alternative text"),
            value: imageAlt || "",
            onChange: (value) => setAttributes({ imageAlt: value }),
            help: /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              Link,
              {
                openInNewTab: true,
                href: (
                  // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
                  (0, import_i18n159.__)(
                    "https://www.w3.org/WAI/tutorials/images/decision-tree/"
                  )
                ),
                children: (0, import_i18n159.__)(
                  "Describe the purpose of the image."
                )
              }
            )
          }
        )
      ] }) }),
      /* @__PURE__ */ (0, import_jsx_runtime389.jsx)("li", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)(
        "button",
        {
          className: "wp-block-playlist-track__button",
          onClick: () => setCurrentTrackClientId(clientId),
          "aria-current": currentTrackClientId === clientId ? "true" : "false",
          children: [
            showImages && !!image && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
              "img",
              {
                className: "wp-block-playlist-track__image",
                src: image,
                alt: imageAlt || ""
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)("span", { className: "wp-block-playlist-track__content", children: [
              /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
                import_block_editor176.PlainText,
                {
                  tagName: "span",
                  className: "wp-block-playlist-track__title",
                  value: title,
                  "aria-label": (0, import_i18n159.__)("Track title"),
                  placeholder: (0, import_i18n159.__)("Track title"),
                  onChange: (value) => {
                    setAttributes({ title: value });
                  },
                  __experimentalVersion: 2
                }
              ),
              showArtists && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(
                import_block_editor176.PlainText,
                {
                  tagName: "span",
                  className: "wp-block-playlist-track__artist",
                  value: artist,
                  "aria-label": (0, import_i18n159.__)("Track artist"),
                  placeholder: (0, import_i18n159.__)("Track artist"),
                  onChange: (value) => setAttributes({ artist: value }),
                  __experimentalVersion: 2
                }
              )
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime389.jsxs)("span", { className: "wp-block-playlist-track__length", children: [
              length && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)("span", {
                className: "screen-reader-text",
                /* translators: Visually hidden label for the track duration (screen reader text). */
                children: (0, import_i18n159.__)("Duration:")
              }),
              length,
              !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime389.jsx)(import_components101.Spinner, { className: "wp-block-playlist-track__spinner" })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime389.jsx)("span", { className: "screen-reader-text", children: (0, import_i18n159.__)("Play") })
          ]
        }
      ) })
    ] });
  };
  var edit_default20 = PlaylistTrackEdit;

  // packages/block-library/build-module/playlist-track/index.mjs
  var { name: name61 } = block_default60;
  var settings60 = {
    icon: playlist_track_default,
    edit: edit_default20
  };
  var init60 = () => initBlock({ name: name61, metadata: block_default60, settings: settings60 });

  // packages/block-library/build-module/post-author/index.mjs
  var post_author_exports = {};
  __export(post_author_exports, {
    init: () => init61,
    metadata: () => block_default61,
    name: () => name62,
    settings: () => settings61
  });
  var import_i18n162 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/post-author/block.json
  var block_default61 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author",
    title: "Author (deprecated)",
    category: "theme",
    description: "This block is deprecated. Please use the Avatar block, the Author Name block, and the Author Biography block instead.",
    textdomain: "default",
    attributes: {
      textAlign: {
        type: "string"
      },
      avatarSize: {
        type: "number",
        default: 48
      },
      showAvatar: {
        type: "boolean",
        default: true
      },
      showBio: {
        type: "boolean"
      },
      byline: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    usesContext: ["postType", "postId", "queryId"],
    supports: {
      inserter: false,
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      filter: {
        duotone: true
      }
    },
    selectors: {
      filter: {
        duotone: ".wp-block-post-author .wp-block-post-author__avatar img"
      }
    },
    editorStyle: "wp-block-post-author-editor",
    style: "wp-block-post-author"
  };

  // packages/block-library/build-module/post-author/edit.mjs
  var import_block_editor178 = __toESM(require_block_editor(), 1);
  var import_components102 = __toESM(require_components(), 1);
  var import_compose48 = __toESM(require_compose(), 1);
  var import_core_data58 = __toESM(require_core_data(), 1);
  var import_data103 = __toESM(require_data(), 1);
  var import_element119 = __toESM(require_element(), 1);
  var import_html_entities9 = __toESM(require_html_entities(), 1);
  var import_i18n161 = __toESM(require_i18n(), 1);
  var import_blocks69 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/post-author/utils.mjs
  var import_blocks68 = __toESM(require_blocks(), 1);
  var import_i18n160 = __toESM(require_i18n(), 1);
  var import_block_editor177 = __toESM(require_block_editor(), 1);
  var { cleanEmptyObject: cleanEmptyObject6 } = unlock(import_block_editor177.privateApis);
  function recreateWithRecommendedBlocks(attributes2, blockTypes) {
    const {
      avatarSize,
      byline,
      showAvatar,
      showBio,
      isLink,
      linkTarget,
      textAlign,
      style: style2,
      ...restAttributes
    } = attributes2;
    const shouldInsertAvatarBlock = showAvatar && blockTypes.some((blockType) => blockType.name === "core/avatar");
    const shouldInsertParagraphBlock = byline && blockTypes.some((blockType) => blockType.name === "core/paragraph");
    const shouldInsertPostAuthorNameBlock = blockTypes.some(
      (blockType) => blockType.name === "core/post-author-name"
    );
    const shouldInsertPostAuthorBiographyBlock = showBio && blockTypes.some(
      (blockType) => blockType.name === "core/post-author-biography"
    );
    return (0, import_blocks68.createBlock)(
      "core/group",
      {
        ...restAttributes,
        style: cleanEmptyObject6({
          ...style2,
          spacing: {
            ...style2?.spacing,
            blockGap: "1em"
          },
          color: {
            ...style2?.color,
            // Duotone must be applied to the avatar block.
            duotone: void 0
          }
        }),
        layout: {
          type: "flex",
          flexWrap: "nowrap",
          verticalAlignment: "top"
        }
      },
      [
        shouldInsertAvatarBlock && (0, import_blocks68.createBlock)("core/avatar", {
          size: avatarSize,
          style: cleanEmptyObject6({
            border: {
              radius: "0px"
            },
            color: {
              duotone: style2?.color?.duotone
            }
          })
        }),
        (0, import_blocks68.createBlock)(
          "core/group",
          {
            style: {
              layout: {
                selfStretch: "fill",
                flexSize: null
              },
              spacing: {
                blockGap: "0"
              }
            },
            layout: {
              type: "flex",
              orientation: "vertical",
              justifyContent: "stretch"
            }
          },
          [
            shouldInsertParagraphBlock && (0, import_blocks68.createBlock)("core/paragraph", {
              content: byline,
              placeholder: (0, import_i18n160.__)("Write byline\u2026"),
              style: {
                typography: {
                  fontSize: "0.5em",
                  textAlign
                }
              }
            }),
            shouldInsertPostAuthorNameBlock && (0, import_blocks68.createBlock)("core/post-author-name", {
              isLink,
              linkTarget,
              style: {
                typography: {
                  fontSize: "1em",
                  textAlign
                }
              }
            }),
            shouldInsertPostAuthorBiographyBlock && (0, import_blocks68.createBlock)("core/post-author-biography", {
              style: {
                typography: {
                  fontSize: "0.7em",
                  textAlign
                }
              }
            })
          ].filter(Boolean)
        )
      ].filter(Boolean)
    );
  }

  // packages/block-library/build-module/post-author/edit.mjs
  var import_jsx_runtime390 = __toESM(require_jsx_runtime(), 1);
  var { InspectorControlsLastItem } = unlock(import_block_editor178.privateApis);
  var AUTHORS_QUERY2 = {
    who: "authors",
    per_page: 100,
    _fields: "id,name",
    context: "view"
  };
  function AuthorCombobox({ value, onChange }) {
    const [filterValue, setFilterValue] = (0, import_element119.useState)("");
    const { authors, isLoading } = (0, import_data103.useSelect)(
      (select10) => {
        const { getUsers, isResolving } = select10(import_core_data58.store);
        const query = { ...AUTHORS_QUERY2 };
        if (filterValue) {
          query.search = filterValue;
          query.search_columns = ["name"];
        }
        return {
          authors: getUsers(query),
          isLoading: isResolving("getUsers", [query])
        };
      },
      [filterValue]
    );
    const authorOptions = (0, import_element119.useMemo)(() => {
      const fetchedAuthors = (authors ?? []).map((author) => {
        return {
          value: author.id,
          label: (0, import_html_entities9.decodeEntities)(author.name)
        };
      });
      const foundAuthor = fetchedAuthors.findIndex(
        (fetchedAuthor) => value?.id === fetchedAuthor.value
      );
      let currentAuthor = [];
      if (foundAuthor < 0 && value) {
        currentAuthor = [
          {
            value: value.id,
            label: (0, import_html_entities9.decodeEntities)(value.name)
          }
        ];
      } else if (foundAuthor < 0 && !value) {
        currentAuthor = [
          {
            value: 0,
            label: (0, import_i18n161.__)("(No author)")
          }
        ];
      }
      return [...currentAuthor, ...fetchedAuthors];
    }, [authors, value]);
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
      import_components102.ComboboxControl,
      {
        label: (0, import_i18n161.__)("Author"),
        options: authorOptions,
        value: value?.id,
        onFilterValueChange: (0, import_compose48.debounce)(setFilterValue, 300),
        onChange,
        allowReset: false,
        isLoading
      }
    );
  }
  function PostAuthorEdit({
    isSelected,
    context: { postType, postId, queryId },
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const defaultAvatar = useDefaultAvatar();
    const { authorDetails, canAssignAuthor, supportsAuthor } = (0, import_data103.useSelect)(
      (select10) => {
        const { getEditedEntityRecord, getUser, getPostType } = select10(import_core_data58.store);
        const currentPost = getEditedEntityRecord(
          "postType",
          postType,
          postId
        );
        const authorId = currentPost?.author;
        return {
          authorDetails: authorId ? getUser(authorId, { context: "view" }) : null,
          supportsAuthor: getPostType(postType)?.supports?.author ?? false,
          canAssignAuthor: currentPost?._links?.["wp:action-assign-author"] ? true : false
        };
      },
      [postType, postId]
    );
    const blockTypes = (0, import_data103.useSelect)(
      (select10) => select10(import_blocks69.store).getBlockTypes(),
      []
    );
    const { editEntityRecord } = (0, import_data103.useDispatch)(import_core_data58.store);
    const { replaceBlock } = (0, import_data103.useDispatch)(import_block_editor178.store);
    const {
      textAlign,
      showAvatar,
      showBio,
      byline,
      isLink,
      linkTarget,
      avatarSize
    } = attributes2;
    const avatarSizes = [];
    const authorName = authorDetails?.name || (0, import_i18n161.__)("Post Author");
    if (authorDetails?.avatar_urls) {
      Object.keys(authorDetails.avatar_urls).forEach((size) => {
        avatarSizes.push({
          value: size,
          label: `${size} x ${size}`
        });
      });
    }
    const blockProps = (0, import_block_editor178.useBlockProps)({
      className: clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const handleSelect = (nextAuthorId) => {
      editEntityRecord("postType", postType, postId, {
        author: nextAuthorId
      });
    };
    const showAuthorControl = !!postId && !isDescendentOfQueryLoop && canAssignAuthor;
    if (!supportsAuthor && postType !== void 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime390.jsx)("div", { ...blockProps, children: (0, import_i18n161.sprintf)(
        // translators: %s: Name of the post type e.g: "post".
        (0, import_i18n161.__)("This post type (%s) does not support the author."),
        postType
      ) });
    }
    function transformBlock() {
      replaceBlock(
        clientId,
        recreateWithRecommendedBlocks(attributes2, blockTypes)
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(import_jsx_runtime390.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(import_block_editor178.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(
        import_components102.__experimentalToolsPanel,
        {
          label: (0, import_i18n161.__)("Settings"),
          resetAll: () => {
            setAttributes({
              avatarSize: 48,
              showAvatar: true,
              isLink: false,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            showAuthorControl && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)("div", { style: { gridColumn: "1 / -1" }, children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              AuthorCombobox,
              {
                value: authorDetails,
                onChange: handleSelect
              }
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Show avatar"),
                isShownByDefault: true,
                hasValue: () => !showAvatar,
                onDeselect: () => setAttributes({ showAvatar: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Show avatar"),
                    checked: showAvatar,
                    onChange: () => setAttributes({
                      showAvatar: !showAvatar
                    })
                  }
                )
              }
            ),
            showAvatar && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Avatar size"),
                isShownByDefault: true,
                hasValue: () => avatarSize !== 48,
                onDeselect: () => setAttributes({ avatarSize: 48 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
                  import_components102.SelectControl,
                  {
                    label: (0, import_i18n161.__)("Avatar size"),
                    value: avatarSize,
                    options: avatarSizes,
                    onChange: (size) => {
                      setAttributes({
                        avatarSize: Number(size)
                      });
                    }
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Show bio"),
                isShownByDefault: true,
                hasValue: () => !!showBio,
                onDeselect: () => setAttributes({ showBio: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Show bio"),
                    checked: !!showBio,
                    onChange: () => setAttributes({ showBio: !showBio })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Link author name to author page"),
                isShownByDefault: true,
                hasValue: () => !!isLink,
                onDeselect: () => setAttributes({ isLink: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Link author name to author page"),
                    checked: isLink,
                    onChange: () => setAttributes({ isLink: !isLink })
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n161.__)("Link target"),
                isShownByDefault: true,
                hasValue: () => linkTarget !== "_self",
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
                  import_components102.ToggleControl,
                  {
                    label: (0, import_i18n161.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      blockTypes.some(
        (blockType) => blockType.name === "core/group"
      ) && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(InspectorControlsLastItem, { children: /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)(
        import_components102.__experimentalVStack,
        {
          className: "wp-block-post-author__transform",
          alignment: "left",
          spacing: 4,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(import_components102.__experimentalText, { as: "p", children: (0, import_i18n161.__)(
              "This block is no longer supported. Recreate its design with the Avatar, Author Name and Author Biography blocks."
            ) }),
            /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
              import_components102.Button,
              {
                variant: "primary",
                onClick: transformBlock,
                __next40pxDefaultSize: true,
                children: (0, import_i18n161.__)("Recreate")
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(import_block_editor178.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
        import_block_editor178.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)("div", { ...blockProps, children: [
        showAvatar && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)("div", { className: "wp-block-post-author__avatar", children: /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
          "img",
          {
            width: avatarSize,
            src: authorDetails?.avatar_urls?.[avatarSize] || defaultAvatar,
            alt: authorDetails?.name || (0, import_i18n161.__)("Default Avatar")
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime390.jsxs)("div", { className: "wp-block-post-author__content", children: [
          (!import_block_editor178.RichText.isEmpty(byline) || isSelected) && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
            import_block_editor178.RichText,
            {
              identifier: "byline",
              className: "wp-block-post-author__byline",
              "aria-label": (0, import_i18n161.__)("Post author byline text"),
              placeholder: (0, import_i18n161.__)("Write byline\u2026"),
              value: byline,
              onChange: (value) => setAttributes({ byline: value })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime390.jsx)("p", { className: "wp-block-post-author__name", children: isLink ? /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
            "a",
            {
              href: "#post-author-pseudo-link",
              onClick: (event) => event.preventDefault(),
              children: authorName
            }
          ) : authorName }),
          showBio && /* @__PURE__ */ (0, import_jsx_runtime390.jsx)(
            "p",
            {
              className: "wp-block-post-author__bio",
              dangerouslySetInnerHTML: {
                __html: authorDetails?.description
              }
            }
          )
        ] })
      ] })
    ] });
  }
  var edit_default21 = PostAuthorEdit;

  // packages/block-library/build-module/post-author/index.mjs
  var { name: name62 } = block_default61;
  var settings61 = {
    icon: post_author_default,
    example: {
      viewportWidth: 350,
      attributes: {
        showBio: true,
        byline: (0, import_i18n162.__)("Posted by")
      }
    },
    edit: edit_default21
  };
  var init61 = () => initBlock({ name: name62, metadata: block_default61, settings: settings61 });

  // packages/block-library/build-module/post-author-name/index.mjs
  var post_author_name_exports = {};
  __export(post_author_name_exports, {
    init: () => init62,
    metadata: () => block_default62,
    name: () => name63,
    settings: () => settings62
  });

  // packages/block-library/build-module/post-author-name/block.json
  var block_default62 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author-name",
    title: "Author Name",
    category: "theme",
    description: "The author name.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-author-name"
  };

  // packages/block-library/build-module/post-author-name/edit.mjs
  var import_block_editor179 = __toESM(require_block_editor(), 1);
  var import_data104 = __toESM(require_data(), 1);
  var import_i18n163 = __toESM(require_i18n(), 1);
  var import_core_data59 = __toESM(require_core_data(), 1);
  var import_components103 = __toESM(require_components(), 1);
  var import_jsx_runtime391 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorNameEdit(props) {
    useDeprecatedTextAlign(props);
    const {
      attributes: { isLink, linkTarget },
      setAttributes,
      context: { postType, postId }
    } = props;
    const { authorName, supportsAuthor } = (0, import_data104.useSelect)(
      (select10) => {
        const { getEditedEntityRecord, getUser, getPostType } = select10(import_core_data59.store);
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorName: _authorId ? getUser(_authorId) : null,
          supportsAuthor: getPostType(postType)?.supports?.author ?? false
        };
      },
      [postType, postId]
    );
    const blockProps = (0, import_block_editor179.useBlockProps)();
    const displayName = authorName?.name || (0, import_i18n163.__)("Author Name");
    const displayAuthor = isLink ? /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
      "a",
      {
        href: "#author-pseudo-link",
        onClick: (event) => event.preventDefault(),
        className: "wp-block-post-author-name__link",
        children: displayName
      }
    ) : displayName;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(import_jsx_runtime391.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(import_block_editor179.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime391.jsxs)(
        import_components103.__experimentalToolsPanel,
        {
          label: (0, import_i18n163.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
              import_components103.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n163.__)("Link to author archive"),
                isShownByDefault: true,
                hasValue: () => isLink,
                onDeselect: () => setAttributes({ isLink: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
                  import_components103.ToggleControl,
                  {
                    label: (0, import_i18n163.__)("Link to author archive"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
              import_components103.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n163.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => linkTarget !== "_self",
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime391.jsx)(
                  import_components103.ToggleControl,
                  {
                    label: (0, import_i18n163.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime391.jsx)("div", { ...blockProps, children: !supportsAuthor && postType !== void 0 ? (0, import_i18n163.sprintf)(
        // translators: %s: Name of the post type e.g: "post".
        (0, import_i18n163.__)(
          "This post type (%s) does not support the author."
        ),
        postType
      ) : displayAuthor })
    ] });
  }
  var edit_default22 = PostAuthorNameEdit;

  // packages/block-library/build-module/post-author-name/deprecated.mjs
  var v124 = {
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default29 = [v124];

  // packages/block-library/build-module/post-author-name/transforms.mjs
  var import_blocks70 = __toESM(require_blocks(), 1);
  var transforms23 = {
    from: [
      {
        type: "block",
        blocks: ["core/post-author"],
        transform: ({ textAlign }) => (0, import_blocks70.createBlock)("core/post-author-name", {
          style: { typography: { textAlign } }
        })
      }
    ]
  };
  var transforms_default24 = transforms23;

  // packages/block-library/build-module/post-author-name/index.mjs
  var { name: name63 } = block_default62;
  var settings62 = {
    icon: post_author_default,
    transforms: transforms_default24,
    edit: edit_default22,
    deprecated: deprecated_default29
  };
  var init62 = () => initBlock({ name: name63, metadata: block_default62, settings: settings62 });

  // packages/block-library/build-module/post-author-biography/index.mjs
  var post_author_biography_exports = {};
  __export(post_author_biography_exports, {
    init: () => init63,
    metadata: () => block_default63,
    name: () => name64,
    settings: () => settings63
  });

  // packages/block-library/build-module/post-author-biography/block.json
  var block_default63 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-author-biography",
    title: "Author Biography",
    category: "theme",
    description: "The author biography.",
    textdomain: "default",
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      spacing: {
        margin: true,
        padding: true
      },
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-author-biography"
  };

  // packages/block-library/build-module/post-author-biography/edit.mjs
  var import_block_editor180 = __toESM(require_block_editor(), 1);
  var import_data105 = __toESM(require_data(), 1);
  var import_i18n164 = __toESM(require_i18n(), 1);
  var import_core_data60 = __toESM(require_core_data(), 1);
  var import_jsx_runtime392 = __toESM(require_jsx_runtime(), 1);
  function PostAuthorBiographyEdit(props) {
    useDeprecatedTextAlign(props);
    const {
      context: { postType, postId }
    } = props;
    const { authorDetails } = (0, import_data105.useSelect)(
      (select10) => {
        const { getEditedEntityRecord, getUser } = select10(import_core_data60.store);
        const _authorId = getEditedEntityRecord(
          "postType",
          postType,
          postId
        )?.author;
        return {
          authorDetails: _authorId ? getUser(_authorId) : null
        };
      },
      [postType, postId]
    );
    const blockProps = (0, import_block_editor180.useBlockProps)();
    const displayAuthorBiography = authorDetails?.description || (0, import_i18n164.__)("Author Biography");
    return /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(import_jsx_runtime392.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime392.jsx)(
      "div",
      {
        ...blockProps,
        dangerouslySetInnerHTML: { __html: displayAuthorBiography }
      }
    ) });
  }
  var edit_default23 = PostAuthorBiographyEdit;

  // packages/block-library/build-module/post-author-biography/deprecated.mjs
  var v125 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default30 = [v125];

  // packages/block-library/build-module/post-author-biography/index.mjs
  var { name: name64 } = block_default63;
  var settings63 = {
    icon: post_author_default,
    edit: edit_default23,
    deprecated: deprecated_default30
  };
  var init63 = () => initBlock({ name: name64, metadata: block_default63, settings: settings63 });

  // packages/block-library/build-module/post-comment/index.mjs
  var post_comment_exports = {};
  __export(post_comment_exports, {
    init: () => init64,
    metadata: () => block_default64,
    name: () => name65,
    settings: () => settings64
  });

  // packages/block-library/build-module/post-comment/block.json
  var block_default64 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: "fse",
    name: "core/post-comment",
    title: "Comment (deprecated)",
    category: "theme",
    allowedBlocks: [
      "core/avatar",
      "core/comment-author-name",
      "core/comment-content",
      "core/comment-date",
      "core/comment-edit-link",
      "core/comment-reply-link"
    ],
    description: "This block is deprecated. Please use the Comments block instead.",
    textdomain: "default",
    attributes: {
      commentId: {
        type: "number"
      }
    },
    providesContext: {
      commentId: "commentId"
    },
    supports: {
      html: false,
      inserter: false,
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/post-comment/edit.mjs
  var import_i18n165 = __toESM(require_i18n(), 1);
  var import_components104 = __toESM(require_components(), 1);
  var import_element120 = __toESM(require_element(), 1);
  var import_block_editor181 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime393 = __toESM(require_jsx_runtime(), 1);
  function Edit15({ attributes: { commentId }, setAttributes }) {
    const [commentIdInput, setCommentIdInput] = (0, import_element120.useState)(commentId);
    const blockProps = (0, import_block_editor181.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor181.useInnerBlocksProps)(blockProps);
    if (!commentId) {
      return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime393.jsxs)(
        import_components104.Placeholder,
        {
          icon: block_default_default,
          label: (0, import_i18n165._x)("Post Comment", "block title"),
          instructions: (0, import_i18n165.__)(
            "To show a comment, input the comment ID."
          ),
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
              import_components104.TextControl,
              {
                value: commentId,
                onChange: (val) => setCommentIdInput(parseInt(val))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime393.jsx)(
              import_components104.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: () => {
                  setAttributes({ commentId: commentIdInput });
                },
                children: (0, import_i18n165.__)("Save")
              }
            )
          ]
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime393.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/post-comment/save.mjs
  var import_block_editor182 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime394 = __toESM(require_jsx_runtime(), 1);
  function save34() {
    const blockProps = import_block_editor182.useBlockProps.save();
    const innerBlocksProps = import_block_editor182.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime394.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/post-comment/index.mjs
  var { name: name65 } = block_default64;
  var TEMPLATE11 = [
    ["core/avatar"],
    ["core/comment-author-name"],
    ["core/comment-date"],
    ["core/comment-content"],
    ["core/comment-reply-link"],
    ["core/comment-edit-link"]
  ];
  var settings64 = {
    icon: comment_default,
    template: TEMPLATE11,
    edit: Edit15,
    save: save34
  };
  var init64 = () => initBlock({ name: name65, metadata: block_default64, settings: settings64 });

  // packages/block-library/build-module/post-comments-count/index.mjs
  var post_comments_count_exports = {};
  __export(post_comments_count_exports, {
    init: () => init65,
    metadata: () => block_default65,
    name: () => name66,
    settings: () => settings65
  });

  // packages/block-library/build-module/post-comments-count/block.json
  var block_default65 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-count",
    title: "Comments Count",
    category: "theme",
    description: "Display a post's comments count.",
    textdomain: "default",
    usesContext: ["postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-post-comments-count"
  };

  // packages/block-library/build-module/post-comments-count/edit.mjs
  var import_block_editor183 = __toESM(require_block_editor(), 1);
  var import_element121 = __toESM(require_element(), 1);
  var import_api_fetch3 = __toESM(require_api_fetch(), 1);
  var import_url22 = __toESM(require_url(), 1);
  var import_jsx_runtime395 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsCountEdit({ context }) {
    const { postId } = context;
    const [commentsCount, setCommentsCount] = (0, import_element121.useState)();
    const blockProps = (0, import_block_editor183.useBlockProps)();
    (0, import_element121.useEffect)(() => {
      if (!postId) {
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch3.default)({
        path: (0, import_url22.addQueryArgs)("/wp/v2/comments", {
          post: postId
        }),
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(res.headers.get("X-WP-Total"));
        }
      });
    }, [postId]);
    const hasPostAndComments = postId && commentsCount !== void 0;
    const blockStyles = {
      ...blockProps.style,
      textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime395.jsx)("div", { ...blockProps, style: blockStyles, children: hasPostAndComments ? commentsCount : "0" });
  }

  // packages/block-library/build-module/post-comments-count/transforms.mjs
  var import_blocks71 = __toESM(require_blocks(), 1);
  var transforms24 = {
    to: [
      {
        type: "block",
        blocks: ["core/post-comments-link"],
        transform: ({ style: style2 }) => {
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks71.createBlock)("core/post-comments-link", {
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        }
      }
    ]
  };
  var transforms_default25 = transforms24;

  // packages/block-library/build-module/post-comments-count/deprecated.mjs
  var v126 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default31 = [v126];

  // packages/block-library/build-module/post-comments-count/index.mjs
  var { name: name66 } = block_default65;
  var settings65 = {
    icon: post_comments_count_default,
    edit: PostCommentsCountEdit,
    transforms: transforms_default25,
    deprecated: deprecated_default31
  };
  var init65 = () => initBlock({ name: name66, metadata: block_default65, settings: settings65 });

  // packages/block-library/build-module/post-comments-form/index.mjs
  var post_comments_form_exports = {};
  __export(post_comments_form_exports, {
    init: () => init66,
    metadata: () => block_default66,
    name: () => name67,
    settings: () => settings66
  });

  // packages/block-library/build-module/post-comments-form/block.json
  var block_default66 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-form",
    title: "Comments Form",
    category: "theme",
    description: "Display a post's comments form.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        button: true,
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-post-comments-form-editor",
    style: [
      "wp-block-post-comments-form",
      "wp-block-buttons",
      "wp-block-button"
    ],
    example: {
      attributes: {
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    }
  };

  // packages/block-library/build-module/post-comments-form/edit.mjs
  var import_block_editor184 = __toESM(require_block_editor(), 1);
  var import_compose49 = __toESM(require_compose(), 1);
  var import_i18n166 = __toESM(require_i18n(), 1);
  var import_jsx_runtime396 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsFormEdit({ context }) {
    const { postId, postType } = context;
    const instanceId = (0, import_compose49.useInstanceId)(PostCommentsFormEdit);
    const instanceIdDesc = (0, import_i18n166.sprintf)("comments-form-edit-%d-desc", instanceId);
    const blockProps = (0, import_block_editor184.useBlockProps)({
      "aria-describedby": instanceIdDesc
    });
    return /* @__PURE__ */ (0, import_jsx_runtime396.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(form_default, { postId, postType }),
      /* @__PURE__ */ (0, import_jsx_runtime396.jsx)(VisuallyHidden, { id: instanceIdDesc, children: (0, import_i18n166.__)("Comments form disabled in editor.") })
    ] });
  }

  // packages/block-library/build-module/post-comments-form/deprecated.mjs
  var v127 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default32 = [v127];

  // packages/block-library/build-module/post-comments-form/index.mjs
  var { name: name67 } = block_default66;
  var settings66 = {
    icon: post_comments_form_default,
    edit: PostCommentsFormEdit,
    deprecated: deprecated_default32
  };
  var init66 = () => initBlock({ name: name67, metadata: block_default66, settings: settings66 });

  // packages/block-library/build-module/post-comments-link/index.mjs
  var post_comments_link_exports = {};
  __export(post_comments_link_exports, {
    init: () => init67,
    metadata: () => block_default67,
    name: () => name68,
    settings: () => settings67
  });

  // packages/block-library/build-module/post-comments-link/block.json
  var block_default67 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-comments-link",
    title: "Comments Link",
    category: "theme",
    description: "Displays the link to the current post comments.",
    textdomain: "default",
    usesContext: ["postType", "postId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-comments-link"
  };

  // packages/block-library/build-module/post-comments-link/edit.mjs
  var import_block_editor185 = __toESM(require_block_editor(), 1);
  var import_element122 = __toESM(require_element(), 1);
  var import_data106 = __toESM(require_data(), 1);
  var import_api_fetch4 = __toESM(require_api_fetch(), 1);
  var import_url23 = __toESM(require_url(), 1);
  var import_i18n167 = __toESM(require_i18n(), 1);
  var import_core_data61 = __toESM(require_core_data(), 1);
  var import_jsx_runtime397 = __toESM(require_jsx_runtime(), 1);
  function PostCommentsLinkEdit({ context }) {
    const { postType, postId } = context;
    const [commentsCount, setCommentsCount] = (0, import_element122.useState)();
    const blockProps = (0, import_block_editor185.useBlockProps)();
    (0, import_element122.useEffect)(() => {
      if (!postId) {
        return;
      }
      const currentPostId = postId;
      (0, import_api_fetch4.default)({
        path: (0, import_url23.addQueryArgs)("/wp/v2/comments", {
          post: postId
        }),
        parse: false
      }).then((res) => {
        if (currentPostId === postId) {
          setCommentsCount(res.headers.get("X-WP-Total"));
        }
      });
    }, [postId]);
    const post = (0, import_data106.useSelect)(
      (select10) => select10(import_core_data61.store).getEditedEntityRecord(
        "postType",
        postType,
        postId
      ),
      [postType, postId]
    );
    let commentsText;
    if (commentsCount !== void 0) {
      const commentsNumber = parseInt(commentsCount);
      if (commentsNumber === 0) {
        commentsText = (0, import_i18n167.__)("No comments");
      } else {
        commentsText = (0, import_i18n167.sprintf)(
          /* translators: %s: Number of comments */
          (0, import_i18n167._n)("%s comment", "%s comments", commentsNumber),
          commentsNumber.toLocaleString()
        );
      }
    }
    return /* @__PURE__ */ (0, import_jsx_runtime397.jsx)("div", { ...blockProps, children: post?.link && commentsText !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
      "a",
      {
        href: post?.link + "#comments",
        onClick: (event) => event.preventDefault(),
        children: commentsText
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime397.jsx)(
      "a",
      {
        href: "#post-comments-link-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: (0, import_i18n167.__)("No comments")
      }
    ) });
  }
  var edit_default24 = PostCommentsLinkEdit;

  // packages/block-library/build-module/post-comments-link/transforms.mjs
  var import_blocks72 = __toESM(require_blocks(), 1);
  var transforms25 = {
    to: [
      {
        type: "block",
        blocks: ["core/post-comments-count"],
        transform: ({ style: style2 }) => {
          const textAlign = style2?.typography?.textAlign;
          return (0, import_blocks72.createBlock)("core/post-comments-count", {
            ...textAlign && {
              style: {
                typography: {
                  textAlign
                }
              }
            }
          });
        }
      }
    ]
  };
  var transforms_default26 = transforms25;

  // packages/block-library/build-module/post-comments-link/deprecated.mjs
  var v128 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default33 = [v128];

  // packages/block-library/build-module/post-comments-link/index.mjs
  var { name: name68 } = block_default67;
  var settings67 = {
    edit: edit_default24,
    icon: post_comments_count_default,
    transforms: transforms_default26,
    deprecated: deprecated_default33
  };
  var init67 = () => initBlock({ name: name68, metadata: block_default67, settings: settings67 });

  // packages/block-library/build-module/post-content/index.mjs
  var post_content_exports = {};
  __export(post_content_exports, {
    init: () => init68,
    metadata: () => block_default68,
    name: () => name69,
    settings: () => settings68
  });

  // packages/block-library/build-module/post-content/block.json
  var block_default68 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-content",
    title: "Content",
    category: "theme",
    description: "Displays the contents of a post or page.",
    textdomain: "default",
    usesContext: ["postId", "postType", "queryId"],
    attributes: {
      tagName: {
        type: "string",
        default: "div"
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      dimensions: {
        minHeight: true
      },
      shadow: true,
      spacing: {
        blockGap: true,
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      color: {
        gradients: true,
        button: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: false,
          text: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-content",
    editorStyle: "wp-block-post-content-editor"
  };

  // packages/block-library/build-module/post-content/edit.mjs
  var import_i18n168 = __toESM(require_i18n(), 1);
  var import_block_editor186 = __toESM(require_block_editor(), 1);
  var import_blocks73 = __toESM(require_blocks(), 1);
  var import_core_data62 = __toESM(require_core_data(), 1);
  var import_data107 = __toESM(require_data(), 1);
  var import_element123 = __toESM(require_element(), 1);
  var import_jsx_runtime398 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl5 } = unlock(import_block_editor186.privateApis);
  function ReadOnlyContent({
    parentLayout,
    layoutClassNames,
    userCanEdit,
    postType,
    postId,
    tagName: TagName2 = "div"
  }) {
    const [, , content] = (0, import_core_data62.useEntityProp)(
      "postType",
      postType,
      "content",
      postId
    );
    const blockProps = (0, import_block_editor186.useBlockProps)({ className: layoutClassNames });
    const blocks = (0, import_element123.useMemo)(() => {
      return content?.raw ? (0, import_blocks73.parse)(content.raw) : [];
    }, [content?.raw]);
    const blockPreviewProps = (0, import_block_editor186.__experimentalUseBlockPreview)({
      blocks,
      props: blockProps,
      layout: parentLayout
    });
    if (userCanEdit) {
      return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("div", { ...blockPreviewProps });
    }
    return content?.protected ? /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(import_block_editor186.Warning, { children: (0, import_i18n168.__)("This content is password protected.") }) }) : /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
      TagName2,
      {
        ...blockProps,
        dangerouslySetInnerHTML: { __html: content?.rendered }
      }
    );
  }
  function EditableContentLoaded({
    blockProps,
    blocks,
    onInput,
    onChange,
    tagName: TagName2 = "div"
  }) {
    const props = (0, import_block_editor186.useInnerBlocksProps)(blockProps, {
      value: blocks,
      onInput,
      onChange
    });
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(TagName2, { ...props });
  }
  function EditableContent({ context = {}, tagName: TagName2 = "div" }) {
    const { postType, postId } = context;
    const [blocks, onInput, onChange] = (0, import_core_data62.useEntityBlockEditor)(
      "postType",
      postType,
      { id: postId }
    );
    const hasLoadedRecord = (0, import_data107.useSelect)(
      (select10) => select10(import_core_data62.store).getEntityRecord(
        "postType",
        postType,
        postId
      ) !== void 0 || select10(import_core_data62.store).hasFinishedResolution("getEntityRecord", [
        "postType",
        postType,
        postId
      ]),
      [postType, postId]
    );
    const blockProps = (0, import_block_editor186.useBlockProps)({ className: "entry-content" });
    if (!hasLoadedRecord) {
      return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(TagName2, { ...blockProps });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
      EditableContentLoaded,
      {
        blockProps,
        blocks,
        onInput,
        onChange,
        tagName: TagName2
      }
    );
  }
  function Content(props) {
    const {
      context: { queryId, postType, postId } = {},
      layoutClassNames,
      tagName
    } = props;
    const userCanEdit = useCanEditEntity("postType", postType, postId);
    if (userCanEdit === void 0) {
      return null;
    }
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const isEditable = userCanEdit && !isDescendentOfQueryLoop;
    return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(EditableContent, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
      ReadOnlyContent,
      {
        parentLayout: props.parentLayout,
        layoutClassNames,
        userCanEdit,
        postType,
        postId,
        tagName
      }
    );
  }
  function Placeholder17({ layoutClassNames }) {
    const blockProps = (0, import_block_editor186.useBlockProps)({ className: layoutClassNames });
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsxs)("div", { ...blockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("p", { children: (0, import_i18n168.__)(
        "This is the Content block, it will display all the blocks in any single post or page."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("p", { children: (0, import_i18n168.__)(
        "That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types."
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("p", { children: (0, import_i18n168.__)(
        "If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well."
      ) })
    ] });
  }
  function RecursionError() {
    const blockProps = (0, import_block_editor186.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(import_block_editor186.Warning, { children: (0, import_i18n168.__)("Block cannot be rendered inside itself.") }) });
  }
  function PostContentEditControls({ tagName, onSelectTagName, clientId }) {
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(import_block_editor186.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
      HTMLElementControl5,
      {
        tagName,
        onChange: onSelectTagName,
        clientId,
        options: [
          { label: (0, import_i18n168.__)("Default (<div>)"), value: "div" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<article>", value: "article" }
        ]
      }
    ) });
  }
  function PostContentEdit({
    context,
    attributes: { tagName = "div" },
    setAttributes,
    clientId,
    __unstableLayoutClassNames: layoutClassNames,
    __unstableParentLayout: parentLayout
  }) {
    const { postId: contextPostId, postType: contextPostType } = context;
    const hasAlreadyRendered = (0, import_block_editor186.useHasRecursion)(contextPostId);
    if (contextPostId && contextPostType && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(RecursionError, {});
    }
    const handleSelectTagName = (value) => {
      setAttributes({ tagName: value });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime398.jsxs)(import_jsx_runtime398.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
        PostContentEditControls,
        {
          tagName,
          onSelectTagName: handleSelectTagName,
          clientId
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(import_block_editor186.RecursionProvider, { uniqueId: contextPostId, children: contextPostId && contextPostType ? /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(
        Content,
        {
          context,
          parentLayout,
          layoutClassNames
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime398.jsx)(Placeholder17, { layoutClassNames }) })
    ] });
  }

  // packages/block-library/build-module/post-content/index.mjs
  var { name: name69 } = block_default68;
  var settings68 = {
    icon: post_content_default,
    edit: PostContentEdit
  };
  var init68 = () => initBlock({ name: name69, metadata: block_default68, settings: settings68 });

  // packages/block-library/build-module/post-date/index.mjs
  var post_date_exports = {};
  __export(post_date_exports, {
    init: () => init69,
    metadata: () => block_default69,
    name: () => name70,
    settings: () => settings69
  });

  // packages/block-library/build-module/post-date/block.json
  var block_default69 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-date",
    title: "Date",
    category: "theme",
    description: "Display a custom date.",
    textdomain: "default",
    attributes: {
      datetime: {
        type: "string",
        role: "content"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/post-date/edit.mjs
  var import_core_data63 = __toESM(require_core_data(), 1);
  var import_element124 = __toESM(require_element(), 1);
  var import_date3 = __toESM(require_date(), 1);
  var import_block_editor187 = __toESM(require_block_editor(), 1);
  var import_components105 = __toESM(require_components(), 1);
  var import_i18n169 = __toESM(require_i18n(), 1);
  var import_keycodes8 = __toESM(require_keycodes(), 1);
  var import_data108 = __toESM(require_data(), 1);
  var import_blocks74 = __toESM(require_blocks(), 1);
  var import_jsx_runtime399 = __toESM(require_jsx_runtime(), 1);
  function PostDateEdit(props) {
    const {
      attributes: attributes2,
      context: { postType: postTypeSlug, queryId },
      setAttributes,
      name: name118
    } = props;
    useDeprecatedTextAlign(props);
    const { datetime, format: format3, isLink } = attributes2;
    const blockProps = (0, import_block_editor187.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const [popoverAnchor, setPopoverAnchor] = (0, import_element124.useState)(null);
    const popoverProps = (0, import_element124.useMemo)(
      () => ({ anchor: popoverAnchor }),
      [popoverAnchor]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data108.useDispatch)(import_block_editor187.store);
    (0, import_element124.useEffect)(() => {
      if (datetime === void 0) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ datetime: /* @__PURE__ */ new Date() });
      }
    }, [datetime]);
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const dateSettings = (0, import_date3.getSettings)();
    const {
      postType,
      siteFormat = dateSettings.formats.date,
      siteTimeFormat = dateSettings.formats.time
    } = (0, import_data108.useSelect)(
      (select10) => {
        const { getPostType, getEntityRecord } = select10(import_core_data63.store);
        const siteSettings = getEntityRecord("root", "site");
        return {
          siteFormat: siteSettings?.date_format,
          siteTimeFormat: siteSettings?.time_format,
          postType: postTypeSlug ? getPostType(postTypeSlug) : null
        };
      },
      [postTypeSlug]
    );
    const activeBlockVariationName = (0, import_data108.useSelect)(
      (select10) => select10(import_blocks74.store).getActiveBlockVariation(name118, attributes2)?.name,
      [name118, attributes2]
    );
    const blockEditingMode = (0, import_block_editor187.useBlockEditingMode)();
    const validDatetime = datetime || /* @__PURE__ */ new Date();
    let postDate2 = /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
      "time",
      {
        dateTime: (0, import_date3.dateI18n)("c", validDatetime),
        ref: setPopoverAnchor,
        children: format3 === "human-diff" ? (0, import_date3.humanTimeDiff)(validDatetime) : (0, import_date3.dateI18n)(format3 || siteFormat, validDatetime)
      }
    );
    if (isLink && datetime) {
      postDate2 = /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
        "a",
        {
          href: "#post-date-pseudo-link",
          onClick: (event) => event.preventDefault(),
          children: postDate2
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime399.jsxs)(import_jsx_runtime399.Fragment, { children: [
      (blockEditingMode === "default" || !isDescendentOfQueryLoop) && activeBlockVariationName !== "post-date-modified" && (!isDescendentOfQueryLoop || !activeBlockVariationName) && /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(import_block_editor187.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(import_components105.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
        import_components105.Dropdown,
        {
          popoverProps,
          renderContent: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
            import_block_editor187.__experimentalPublishDateTimePicker,
            {
              title: activeBlockVariationName === "post-date" ? (0, import_i18n169.__)("Publish Date") : (0, import_i18n169.__)("Date"),
              currentDate: datetime,
              onChange: (newDatetime) => setAttributes({
                datetime: newDatetime
              }),
              is12Hour: is12HourFormat(
                siteTimeFormat
              ),
              onClose,
              dateOrder: (
                /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
                (0, import_i18n169._x)("dmy", "date order")
              )
            }
          ),
          renderToggle: ({ isOpen, onToggle }) => {
            const openOnArrowDown = (event) => {
              if (!isOpen && event.keyCode === import_keycodes8.DOWN) {
                event.preventDefault();
                onToggle();
              }
            };
            return /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
              import_components105.ToolbarButton,
              {
                "aria-expanded": isOpen,
                icon: pencil_default,
                title: (0, import_i18n169.__)("Change Date"),
                onClick: onToggle,
                onKeyDown: openOnArrowDown
              }
            );
          }
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(import_block_editor187.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime399.jsxs)(
        import_components105.__experimentalToolsPanel,
        {
          label: (0, import_i18n169.__)("Settings"),
          resetAll: () => {
            setAttributes({
              datetime: void 0,
              format: void 0,
              isLink: false
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
              import_components105.__experimentalToolsPanelItem,
              {
                hasValue: () => !!format3,
                label: (0, import_i18n169.__)("Date Format"),
                onDeselect: () => setAttributes({ format: void 0 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
                  import_block_editor187.__experimentalDateFormatPicker,
                  {
                    format: format3,
                    defaultFormat: siteFormat,
                    onChange: (nextFormat) => setAttributes({ format: nextFormat })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
              import_components105.__experimentalToolsPanelItem,
              {
                hasValue: () => isLink !== false,
                label: postType?.labels?.singular_name ? (0, import_i18n169.sprintf)(
                  // translators: %s: Name of the post type e.g: "post".
                  (0, import_i18n169.__)("Link to %s"),
                  postType.labels.singular_name.toLowerCase()
                ) : (0, import_i18n169.__)("Link to post"),
                onDeselect: () => setAttributes({ isLink: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime399.jsx)(
                  import_components105.ToggleControl,
                  {
                    label: postType?.labels?.singular_name ? (0, import_i18n169.sprintf)(
                      // translators: %s: Name of the post type e.g: "post".
                      (0, import_i18n169.__)("Link to %s"),
                      postType.labels.singular_name.toLowerCase()
                    ) : (0, import_i18n169.__)("Link to post"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime399.jsx)("div", { ...blockProps, children: postDate2 })
    ] });
  }
  function is12HourFormat(format3) {
    return /(?:^|[^\\])[aAgh]/.test(format3);
  }

  // packages/block-library/build-module/post-date/deprecated.mjs
  var v47 = {
    attributes: {
      datetime: {
        type: "string",
        role: "content"
      },
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var v39 = {
    attributes: {
      datetime: {
        type: "string",
        role: "content"
      },
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate({
      metadata: {
        bindings: {
          datetime: {
            source,
            args: { key, ...otherArgs }
          },
          ...otherBindings
        },
        ...otherMetadata
      },
      ...otherAttributes
    }) {
      return migrate_text_align_default({
        metadata: {
          bindings: {
            datetime: {
              source,
              args: { field: key, ...otherArgs }
            },
            ...otherBindings
          },
          ...otherMetadata
        },
        ...otherAttributes
      });
    },
    isEligible(attributes2) {
      return attributes2?.metadata?.bindings?.datetime?.source === "core/post-data" && !!attributes2?.metadata?.bindings?.datetime?.args?.key;
    }
  };
  var v213 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      displayType: {
        type: "string",
        default: "date"
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate({ className, displayType, metadata, ...otherAttributes }) {
      if (displayType === "date" || displayType === "modified") {
        if (displayType === "modified") {
          className = clsx_default(
            className,
            "wp-block-post-date__modified-date"
          );
        }
        return migrate_text_align_default({
          ...otherAttributes,
          className,
          metadata: {
            ...metadata,
            bindings: {
              datetime: {
                source: "core/post-data",
                args: { field: displayType }
              }
            }
          }
        });
      }
    },
    isEligible(attributes2) {
      return !attributes2.datetime && !attributes2?.metadata?.bindings?.datetime;
    }
  };
  var v129 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      format: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      html: false,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate(attributes2) {
      return migrate_text_align_default(migrate_font_family_default(attributes2));
    },
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default34 = [v47, v39, v213, v129];

  // packages/block-library/build-module/post-date/variations.mjs
  var import_i18n170 = __toESM(require_i18n(), 1);
  var variations11 = [
    {
      name: "post-date",
      title: (0, import_i18n170.__)("Post Date"),
      description: (0, import_i18n170.__)("Display a post's publish date."),
      attributes: {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "date" }
            }
          }
        }
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes8?.metadata?.bindings?.datetime?.args?.field === "date"
    },
    {
      name: "post-date-modified",
      title: (0, import_i18n170.__)("Modified Date"),
      description: (0, import_i18n170.__)("Display a post's last updated date."),
      attributes: {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "modified" }
            }
          }
        },
        className: "wp-block-post-date__modified-date"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes8?.metadata?.bindings?.datetime?.args?.field === "modified"
    }
  ];
  var variations_default11 = variations11;

  // packages/block-library/build-module/post-date/index.mjs
  var { name: name70 } = block_default69;
  var settings69 = {
    icon: post_date_default,
    edit: PostDateEdit,
    deprecated: deprecated_default34,
    variations: variations_default11
  };
  var init69 = () => initBlock({ name: name70, metadata: block_default69, settings: settings69 });

  // packages/block-library/build-module/post-excerpt/index.mjs
  var post_excerpt_exports = {};
  __export(post_excerpt_exports, {
    init: () => init70,
    metadata: () => block_default70,
    name: () => name71,
    settings: () => settings70
  });

  // packages/block-library/build-module/post-excerpt/block.json
  var block_default70 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-excerpt",
    title: "Excerpt",
    category: "theme",
    description: "Display the excerpt.",
    textdomain: "default",
    attributes: {
      moreText: {
        type: "string",
        role: "content"
      },
      showMoreOnNewLine: {
        type: "boolean",
        default: true
      },
      excerptLength: {
        type: "number",
        default: 55
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    editorStyle: "wp-block-post-excerpt-editor",
    style: "wp-block-post-excerpt"
  };

  // packages/block-library/build-module/post-excerpt/edit.mjs
  var import_core_data64 = __toESM(require_core_data(), 1);
  var import_element125 = __toESM(require_element(), 1);
  var import_block_editor188 = __toESM(require_block_editor(), 1);
  var import_components106 = __toESM(require_components(), 1);
  var import_i18n171 = __toESM(require_i18n(), 1);
  var import_data109 = __toESM(require_data(), 1);
  var import_jsx_runtime400 = __toESM(require_jsx_runtime(), 1);
  var ELLIPSIS = "\u2026";
  function PostExcerptEditor(props) {
    const {
      attributes: { moreText, showMoreOnNewLine, excerptLength },
      setAttributes,
      isSelected,
      context: { postId, postType, queryId }
    } = props;
    useDeprecatedTextAlign(props);
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const userCanEdit = useCanEditEntity("postType", postType, postId);
    const [
      rawExcerpt,
      setExcerpt,
      { rendered: renderedExcerpt, protected: isProtected } = {}
    ] = (0, import_core_data64.useEntityProp)("postType", postType, "excerpt", postId);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const postTypeSupportsExcerpts = (0, import_data109.useSelect)(
      (select10) => {
        if (postType === "page") {
          return true;
        }
        return !!select10(import_core_data64.store).getPostType(postType)?.supports?.excerpt;
      },
      [postType]
    );
    const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts;
    const blockProps = (0, import_block_editor188.useBlockProps)();
    const wordCountType = (0, import_i18n171._x)("words", "Word count type. Do not translate!");
    const strippedRenderedExcerpt = (0, import_element125.useMemo)(() => {
      if (!renderedExcerpt) {
        return "";
      }
      const document2 = new window.DOMParser().parseFromString(
        renderedExcerpt,
        "text/html"
      );
      return document2.body.textContent || document2.body.innerText || "";
    }, [renderedExcerpt]);
    if (!postType || !postId) {
      return /* @__PURE__ */ (0, import_jsx_runtime400.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)("p", { children: (0, import_i18n171.__)("This block will display the excerpt.") }) });
    }
    if (isProtected && !userCanEdit) {
      return /* @__PURE__ */ (0, import_jsx_runtime400.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_block_editor188.Warning, { children: (0, import_i18n171.__)(
        "The content is currently protected and does not have the available excerpt."
      ) }) });
    }
    const readMoreLink = /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
      import_block_editor188.RichText,
      {
        identifier: "moreText",
        className: "wp-block-post-excerpt__more-link",
        tagName: "a",
        "aria-label": (0, import_i18n171.__)("\u201CRead more\u201D link text"),
        placeholder: (0, import_i18n171.__)('Add "read more" link text'),
        value: moreText,
        onChange: (newMoreText) => setAttributes({ moreText: newMoreText }),
        withoutInteractiveFormatting: true
      }
    );
    const excerptClassName = clsx_default("wp-block-post-excerpt__excerpt", {
      "is-inline": !showMoreOnNewLine
    });
    const rawOrRenderedExcerpt = (rawExcerpt || strippedRenderedExcerpt).trim();
    let trimmedExcerpt = "";
    if (wordCountType === "words") {
      trimmedExcerpt = rawOrRenderedExcerpt.split(/\s+/, excerptLength).join(" ");
    } else if (wordCountType === "characters_excluding_spaces") {
      const excerptWithSpaces = rawOrRenderedExcerpt.split("", excerptLength).join("");
      const numberOfSpaces = excerptWithSpaces.length - excerptWithSpaces.replaceAll(" ", "").length;
      trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength + numberOfSpaces).join("");
    } else if (wordCountType === "characters_including_spaces") {
      trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength).join("");
    }
    const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;
    const excerptContent = isEditable ? /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
      import_block_editor188.RichText,
      {
        className: excerptClassName,
        "aria-label": (0, import_i18n171.__)("Excerpt text"),
        value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0, import_i18n171.__)("No excerpt found"),
        onChange: setExcerpt,
        tagName: "p",
        allowedFormats: [],
        preserveWhiteSpace: true
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime400.jsx)("p", { className: excerptClassName, children: !isTrimmed ? rawOrRenderedExcerpt || (0, import_i18n171.__)("No excerpt found") : trimmedExcerpt + ELLIPSIS });
    return /* @__PURE__ */ (0, import_jsx_runtime400.jsxs)(import_jsx_runtime400.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(import_block_editor188.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime400.jsxs)(
        import_components106.__experimentalToolsPanel,
        {
          label: (0, import_i18n171.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showMoreOnNewLine: true,
              excerptLength: 55
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
              import_components106.__experimentalToolsPanelItem,
              {
                hasValue: () => showMoreOnNewLine !== true,
                label: (0, import_i18n171.__)("Show link on new line"),
                onDeselect: () => setAttributes({ showMoreOnNewLine: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
                  import_components106.ToggleControl,
                  {
                    label: (0, import_i18n171.__)("Show link on new line"),
                    checked: showMoreOnNewLine,
                    onChange: (newShowMoreOnNewLine) => setAttributes({
                      showMoreOnNewLine: newShowMoreOnNewLine
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
              import_components106.__experimentalToolsPanelItem,
              {
                hasValue: () => excerptLength !== 55,
                label: (0, import_i18n171.__)("Max number of words"),
                onDeselect: () => setAttributes({ excerptLength: 55 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime400.jsx)(
                  import_components106.RangeControl,
                  {
                    label: (0, import_i18n171.__)("Max number of words"),
                    value: excerptLength,
                    onChange: (value) => {
                      setAttributes({ excerptLength: value });
                    },
                    min: "10",
                    max: "100"
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime400.jsxs)("div", { ...blockProps, children: [
        excerptContent,
        !showMoreOnNewLine && " ",
        showMoreOnNewLine ? /* @__PURE__ */ (0, import_jsx_runtime400.jsx)("p", { className: "wp-block-post-excerpt__more-text", children: readMoreLink }) : readMoreLink
      ] })
    ] });
  }

  // packages/block-library/build-module/post-excerpt/transforms.mjs
  var import_blocks75 = __toESM(require_blocks(), 1);
  var transforms26 = {
    from: [
      {
        type: "block",
        blocks: ["core/post-content"],
        transform: () => (0, import_blocks75.createBlock)("core/post-excerpt")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/post-content"],
        transform: () => (0, import_blocks75.createBlock)("core/post-content")
      }
    ]
  };
  var transforms_default27 = transforms26;

  // packages/block-library/build-module/post-excerpt/deprecated.mjs
  var v130 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      moreText: {
        type: "string",
        role: "content"
      },
      showMoreOnNewLine: {
        type: "boolean",
        default: true
      },
      excerptLength: {
        type: "number",
        default: 55
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textColumns: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    save() {
      return null;
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default35 = [v130];

  // packages/block-library/build-module/post-excerpt/index.mjs
  var { name: name71 } = block_default70;
  var settings70 = {
    icon: post_excerpt_default,
    transforms: transforms_default27,
    edit: PostExcerptEditor,
    deprecated: deprecated_default35
  };
  var init70 = () => initBlock({ name: name71, metadata: block_default70, settings: settings70 });

  // packages/block-library/build-module/post-featured-image/index.mjs
  var post_featured_image_exports = {};
  __export(post_featured_image_exports, {
    init: () => init71,
    metadata: () => block_default71,
    name: () => name72,
    settings: () => settings71
  });

  // packages/block-library/build-module/post-featured-image/block.json
  var block_default71 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-featured-image",
    title: "Featured Image",
    category: "theme",
    description: "Display a post's featured image.",
    textdomain: "default",
    attributes: {
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      aspectRatio: {
        type: "string"
      },
      width: {
        type: "string"
      },
      height: {
        type: "string"
      },
      scale: {
        type: "string",
        default: "cover"
      },
      sizeSlug: {
        type: "string"
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: "",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      overlayColor: {
        type: "string"
      },
      customOverlayColor: {
        type: "string"
      },
      dimRatio: {
        type: "number",
        default: 0
      },
      gradient: {
        type: "string"
      },
      customGradient: {
        type: "string"
      },
      useFirstImageFromPost: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["postId", "postType", "queryId"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["left", "right", "center", "wide", "full"],
      color: {
        text: false,
        background: false
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      filter: {
        duotone: true
      },
      shadow: {
        __experimentalSkipSerialization: true
      },
      html: false,
      spacing: {
        margin: true,
        padding: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      dimensions: ".wp-block-post-featured-image img",
      border: ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",
      shadow: ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",
      filter: {
        duotone: ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"
      }
    },
    editorStyle: "wp-block-post-featured-image-editor",
    style: "wp-block-post-featured-image"
  };

  // packages/block-library/build-module/post-featured-image/edit.mjs
  var import_blob18 = __toESM(require_blob(), 1);
  var import_core_data65 = __toESM(require_core_data(), 1);
  var import_data110 = __toESM(require_data(), 1);
  var import_components109 = __toESM(require_components(), 1);
  var import_block_editor192 = __toESM(require_block_editor(), 1);
  var import_element126 = __toESM(require_element(), 1);
  var import_i18n174 = __toESM(require_i18n(), 1);
  var import_notices17 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/post-featured-image/dimension-controls.mjs
  var import_i18n172 = __toESM(require_i18n(), 1);
  var import_components107 = __toESM(require_components(), 1);
  var import_block_editor189 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime401 = __toESM(require_jsx_runtime(), 1);
  var { DimensionsTool: DimensionsTool2 } = unlock(import_block_editor189.privateApis);
  var DEFAULT_SCALE = "cover";
  var DIMENSION_KEYS = ["aspectRatio", "width", "height", "scale"];
  var scaleOptions2 = [
    {
      value: "cover",
      label: (0, import_i18n172._x)("Cover", "Scale option for Image dimension control"),
      help: (0, import_i18n172.__)(
        "Image is scaled and cropped to fill the entire space without being distorted."
      )
    },
    {
      value: "contain",
      label: (0, import_i18n172._x)("Contain", "Scale option for Image dimension control"),
      help: (0, import_i18n172.__)(
        "Image is scaled to fill the space without clipping nor distorting."
      )
    },
    {
      value: "fill",
      label: (0, import_i18n172._x)("Fill", "Scale option for Image dimension control"),
      help: (0, import_i18n172.__)(
        "Image will be stretched and distorted to completely fill the space."
      )
    }
  ];
  var DimensionControls = ({
    clientId,
    attributes: attributes2,
    setAttributes,
    selectedStyleState,
    hasSelectedStyleState = false
  }) => {
    const { style: style2 } = attributes2;
    const selectedStyleStateKey = getStyleStateKey(selectedStyleState);
    const activeAspectRatio = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "aspectRatio"
    });
    const activeWidth = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "width"
    });
    const activeHeight = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "height"
    });
    const activeScale = getActiveDimensionValue({
      attributes: attributes2,
      selectedState: selectedStyleState,
      hasSelectedStyleState,
      attributeKey: "scale",
      styleKey: "objectFit"
    });
    const [availableUnits] = (0, import_block_editor189.useSettings)("spacing.units");
    const units = (0, import_components107.__experimentalUseCustomUnits)({
      availableUnits: availableUnits || ["px", "%", "vw", "em", "rem"]
    });
    const setDimensionAttributes = (nextDimensions) => {
      const nextImageDimensions = {
        ...nextDimensions,
        width: !nextDimensions.width && nextDimensions.height ? "auto" : nextDimensions.width
      };
      setAttributes(
        getDimensionUpdateAttributes({
          style: style2,
          selectedState: selectedStyleState,
          hasSelectedStyleState,
          nextDimensions: nextImageDimensions,
          dimensionKeyMap: { scale: "objectFit" },
          dimensionKeys: DIMENSION_KEYS
        })
      );
    };
    return /* @__PURE__ */ (0, import_jsx_runtime401.jsx)(
      DimensionsTool2,
      {
        panelId: clientId,
        value: {
          aspectRatio: activeAspectRatio,
          width: activeWidth,
          height: activeHeight,
          scale: activeScale
        },
        onChange: setDimensionAttributes,
        defaultScale: DEFAULT_SCALE,
        defaultAspectRatio: "auto",
        scaleOptions: scaleOptions2,
        unitsOptions: units
      },
      selectedStyleStateKey
    );
  };
  var dimension_controls_default = DimensionControls;

  // packages/block-library/build-module/post-featured-image/overlay-controls.mjs
  var import_components108 = __toESM(require_components(), 1);
  var import_block_editor190 = __toESM(require_block_editor(), 1);
  var import_compose50 = __toESM(require_compose(), 1);
  var import_i18n173 = __toESM(require_i18n(), 1);
  var import_jsx_runtime402 = __toESM(require_jsx_runtime(), 1);
  var Overlay = ({
    clientId,
    attributes: attributes2,
    setAttributes,
    overlayColor,
    setOverlayColor
  }) => {
    const { dimRatio } = attributes2;
    const { gradientValue, setGradient } = (0, import_block_editor190.__experimentalUseGradient)();
    const colorGradientSettings = (0, import_block_editor190.__experimentalUseMultipleOriginColorsAndGradients)();
    if (!colorGradientSettings.hasColorsOrGradients) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime402.jsxs)(import_jsx_runtime402.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
        import_block_editor190.__experimentalColorGradientSettingsDropdown,
        {
          __experimentalIsRenderedInSidebar: true,
          settings: [
            {
              colorValue: overlayColor.color,
              gradientValue,
              label: (0, import_i18n173.__)("Overlay"),
              onColorChange: setOverlayColor,
              onGradientChange: setGradient,
              isShownByDefault: true,
              resetAllFilter: () => ({
                overlayColor: void 0,
                customOverlayColor: void 0,
                gradient: void 0,
                customGradient: void 0
              }),
              clearable: true
            }
          ],
          panelId: clientId,
          ...colorGradientSettings
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
        import_components108.__experimentalToolsPanelItem,
        {
          hasValue: () => dimRatio !== void 0,
          label: (0, import_i18n173.__)("Overlay opacity"),
          onDeselect: () => setAttributes({ dimRatio: 0 }),
          resetAllFilter: () => ({
            dimRatio: 0
          }),
          isShownByDefault: true,
          panelId: clientId,
          children: /* @__PURE__ */ (0, import_jsx_runtime402.jsx)(
            import_components108.RangeControl,
            {
              label: (0, import_i18n173.__)("Overlay opacity"),
              value: dimRatio,
              onChange: (newDimRatio) => setAttributes({
                dimRatio: newDimRatio
              }),
              min: 0,
              max: 100,
              step: 10,
              required: true
            }
          )
        }
      )
    ] });
  };
  var overlay_controls_default = (0, import_compose50.compose)([
    (0, import_block_editor190.withColors)({ overlayColor: "background-color" })
  ])(Overlay);

  // packages/block-library/build-module/post-featured-image/overlay.mjs
  var import_block_editor191 = __toESM(require_block_editor(), 1);
  var import_compose51 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/post-featured-image/utils.mjs
  function dimRatioToClass2(ratio) {
    return ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
  }

  // packages/block-library/build-module/post-featured-image/overlay.mjs
  var import_jsx_runtime403 = __toESM(require_jsx_runtime(), 1);
  var Overlay2 = ({ attributes: attributes2, overlayColor }) => {
    const { dimRatio } = attributes2;
    const { gradientClass, gradientValue } = (0, import_block_editor191.__experimentalUseGradient)();
    const colorGradientSettings = (0, import_block_editor191.__experimentalUseMultipleOriginColorsAndGradients)();
    const borderProps = (0, import_block_editor191.__experimentalUseBorderProps)(attributes2);
    const overlayStyles = {
      backgroundColor: overlayColor.color,
      backgroundImage: gradientValue,
      ...borderProps.style
    };
    if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime403.jsx)(
      "span",
      {
        "aria-hidden": "true",
        className: clsx_default(
          "wp-block-post-featured-image__overlay",
          dimRatioToClass2(dimRatio),
          {
            [overlayColor.class]: overlayColor.class,
            "has-background-dim": dimRatio !== void 0,
            "has-background-gradient": gradientValue,
            [gradientClass]: gradientClass
          },
          borderProps.className
        ),
        style: overlayStyles
      }
    );
  };
  var overlay_default = (0, import_compose51.compose)([
    (0, import_block_editor191.withColors)({ overlayColor: "background-color" })
  ])(Overlay2);

  // packages/block-library/build-module/post-featured-image/edit.mjs
  var import_jsx_runtime404 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES8 = ["image"];
  var { ResolutionTool: ResolutionTool4 } = unlock(import_block_editor192.privateApis);
  var hasDimensionValue = (value) => value !== void 0 && value !== null && value !== "";
  var DEFAULT_MEDIA_SIZE_SLUG5 = "full";
  function FeaturedImageResolutionTool({ image, value, onChange }) {
    const { imageSizes } = (0, import_data110.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor192.store);
      return {
        imageSizes: getSettings2().imageSizes
      };
    }, []);
    if (!imageSizes?.length) {
      return null;
    }
    const imageSizeOptions = imageSizes.filter(
      ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
    ).map(({ name: name118, slug }) => ({ value: slug, label: name118 }));
    return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
      ResolutionTool4,
      {
        value,
        defaultValue: DEFAULT_MEDIA_SIZE_SLUG5,
        options: imageSizeOptions,
        onChange
      }
    );
  }
  function PostFeaturedImageEdit({
    clientId,
    attributes: attributes2,
    setAttributes,
    context: { postId, postType: postTypeSlug, queryId }
  }) {
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const {
      isLink,
      aspectRatio,
      height,
      width,
      scale,
      sizeSlug,
      rel,
      linkTarget,
      useFirstImageFromPost
    } = attributes2;
    const [temporaryURL, setTemporaryURL] = (0, import_element126.useState)();
    const [storedFeaturedImage, setFeaturedImage] = (0, import_core_data65.useEntityProp)(
      "postType",
      postTypeSlug,
      "featured_media",
      postId
    );
    const [postContent] = (0, import_core_data65.useEntityProp)(
      "postType",
      postTypeSlug,
      "content",
      postId
    );
    const featuredImage = (0, import_element126.useMemo)(() => {
      if (storedFeaturedImage) {
        return storedFeaturedImage;
      }
      if (!useFirstImageFromPost) {
        return;
      }
      const imageOpener = /<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(
        postContent
      );
      const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id;
      return imageId;
    }, [storedFeaturedImage, useFirstImageFromPost, postContent]);
    const {
      media,
      postType,
      postPermalink,
      selectedStyleState,
      hasSelectedStyleState
    } = (0, import_data110.useSelect)(
      (select10) => {
        const { getEntityRecord, getPostType, getEditedEntityRecord } = select10(import_core_data65.store);
        const { getSelectedBlockStyleState, hasSelectedBlockStyleState } = select10(import_block_editor192.store);
        return {
          media: featuredImage && getEntityRecord("postType", "attachment", featuredImage, {
            context: "view"
          }),
          postType: postTypeSlug && getPostType(postTypeSlug),
          postPermalink: getEditedEntityRecord(
            "postType",
            postTypeSlug,
            postId
          )?.link,
          selectedStyleState: getSelectedBlockStyleState(clientId),
          hasSelectedStyleState: hasSelectedBlockStyleState(clientId)
        };
      },
      [clientId, featuredImage, postTypeSlug, postId]
    );
    const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url;
    const blockProps = (0, import_block_editor192.useBlockProps)({
      className: clsx_default({
        "is-transient": temporaryURL
      })
    });
    const borderProps = (0, import_block_editor192.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor192.__experimentalGetShadowClassesAndStyles)(attributes2);
    const blockEditingMode = (0, import_block_editor192.useBlockEditingMode)();
    const aspectRatioStyle = aspectRatio === "auto" ? void 0 : aspectRatio;
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        import_components109.Placeholder,
        {
          className: clsx_default(
            "block-editor-media-placeholder",
            borderProps.className
          ),
          withIllustration: true,
          style: {
            aspectRatio: aspectRatioStyle,
            height: hasDimensionValue(height) ? height : hasDimensionValue(width) && "auto",
            width: hasDimensionValue(width) ? width : !!aspectRatio && "100%",
            ...borderProps.style,
            ...shadowProps.style
          },
          children: content
        }
      );
    };
    const onSelectImage = (value) => {
      if (value?.id) {
        setFeaturedImage(value.id);
      }
      if (value?.url && (0, import_blob18.isBlobURL)(value.url)) {
        setTemporaryURL(value.url);
      }
    };
    const onResetImage = () => {
      setAttributes({
        isLink: false,
        linkTarget: "_self",
        rel: "",
        sizeSlug: void 0
      });
      setFeaturedImage(0);
    };
    (0, import_element126.useEffect)(() => {
      if (mediaUrl && temporaryURL) {
        setTemporaryURL();
      }
    }, [mediaUrl, temporaryURL]);
    const { createErrorNotice } = (0, import_data110.useDispatch)(import_notices17.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
      setTemporaryURL();
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const controls = blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_jsx_runtime404.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_block_editor192.InspectorControls, { group: "color", children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        overlay_controls_default,
        {
          attributes: attributes2,
          setAttributes,
          clientId
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        import_block_editor192.InspectorControls,
        {
          group: "dimensions",
          resetAllFilter: (attrs) => {
            return getDimensionResetAttributes({
              attributes: attrs,
              selectedState: selectedStyleState,
              hasSelectedStyleState,
              keys: ["aspectRatio", "height", "objectFit", "width"],
              defaultAttributes: {
                aspectRatio: void 0,
                height: void 0,
                scale: void 0,
                width: void 0
              }
            });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
            dimension_controls_default,
            {
              clientId,
              attributes: attributes2,
              setAttributes,
              media,
              selectedStyleState,
              hasSelectedStyleState
            }
          )
        }
      ),
      (featuredImage || isDescendentOfQueryLoop || !postId) && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_block_editor192.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(
        import_components109.__experimentalToolsPanel,
        {
          label: (0, import_i18n174.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false,
              linkTarget: "_self",
              rel: "",
              sizeSlug: DEFAULT_MEDIA_SIZE_SLUG5
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
              import_components109.__experimentalToolsPanelItem,
              {
                label: postType?.labels?.singular_name ? (0, import_i18n174.sprintf)(
                  // translators: %s: Name of the post type e.g: "post".
                  (0, import_i18n174.__)("Link to %s"),
                  postType.labels.singular_name
                ) : (0, import_i18n174.__)("Link to post"),
                isShownByDefault: true,
                hasValue: () => !!isLink,
                onDeselect: () => setAttributes({
                  isLink: false
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
                  import_components109.ToggleControl,
                  {
                    label: (0, import_i18n174.__)("Make image a link"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
              import_components109.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n174.__)("Open in new tab"),
                isShownByDefault: true,
                hasValue: () => "_self" !== linkTarget,
                onDeselect: () => setAttributes({
                  linkTarget: "_self"
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
                  import_components109.ToggleControl,
                  {
                    label: (0, import_i18n174.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
              import_components109.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n174.__)("Link relation"),
                isShownByDefault: true,
                hasValue: () => !!rel,
                onDeselect: () => setAttributes({
                  rel: ""
                }),
                children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
                  import_components109.TextControl,
                  {
                    label: (0, import_i18n174.__)("Link relation"),
                    help: (0, import_element126.createInterpolateElement)(
                      (0, import_i18n174.__)(
                        "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
                      ),
                      {
                        a: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_components109.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
                      }
                    ),
                    value: rel,
                    onChange: (newRel) => setAttributes({ rel: newRel })
                  }
                )
              }
            ),
            !!media && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
              FeaturedImageResolutionTool,
              {
                image: media,
                value: sizeSlug,
                onChange: (nextSizeSlug) => setAttributes({ sizeSlug: nextSizeSlug })
              }
            )
          ]
        }
      ) })
    ] });
    let image;
    if (!featuredImage && (isDescendentOfQueryLoop || !postId)) {
      return /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_jsx_runtime404.Fragment, { children: [
        controls,
        /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)("div", { ...blockProps, children: [
          !!isLink ? /* @__PURE__ */ (0, import_jsx_runtime404.jsx)("a", { href: postPermalink, target: linkTarget, children: placeholder2() }) : placeholder2(),
          /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
            overlay_default,
            {
              attributes: attributes2,
              setAttributes,
              clientId
            }
          )
        ] })
      ] });
    }
    const label = (0, import_i18n174.__)("Add a featured image");
    const imageStyles = {
      ...borderProps.style,
      ...shadowProps.style,
      aspectRatio: aspectRatioStyle,
      height: hasDimensionValue(height) ? height : hasDimensionValue(width) && "auto",
      width: hasDimensionValue(width) ? width : !!aspectRatio && "100%",
      objectFit: !!(height || aspectRatio) && scale
    };
    if (!featuredImage && !temporaryURL) {
      image = /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        import_block_editor192.MediaPlaceholder,
        {
          onSelect: onSelectImage,
          accept: "image/*",
          allowedTypes: ALLOWED_MEDIA_TYPES8,
          onError: onUploadError,
          placeholder: placeholder2,
          mediaLibraryButton: ({ open }) => {
            return /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
              import_components109.Button,
              {
                __next40pxDefaultSize: true,
                icon: upload_default,
                variant: "primary",
                label,
                showTooltip: true,
                tooltipPosition: "top center",
                onClick: () => {
                  open();
                }
              }
            );
          }
        }
      );
    } else {
      image = !media && !temporaryURL ? placeholder2() : /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_jsx_runtime404.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
          "img",
          {
            className: borderProps.className,
            src: temporaryURL || mediaUrl,
            alt: media && media?.alt_text ? (0, import_i18n174.sprintf)(
              // translators: %s: The image's alt text.
              (0, import_i18n174.__)("Featured image: %s"),
              media.alt_text
            ) : (0, import_i18n174.__)("Featured image"),
            style: imageStyles
          }
        ),
        temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_components109.Spinner, {})
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)(import_jsx_runtime404.Fragment, { children: [
      !temporaryURL && controls,
      !!media && !isDescendentOfQueryLoop && /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(import_block_editor192.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
        import_block_editor192.MediaReplaceFlow,
        {
          mediaId: featuredImage,
          mediaURL: mediaUrl,
          allowedTypes: ALLOWED_MEDIA_TYPES8,
          accept: "image/*",
          onSelect: onSelectImage,
          onError: onUploadError,
          onReset: onResetImage
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime404.jsxs)("figure", { ...blockProps, children: [
        !!isLink ? /* @__PURE__ */ (0, import_jsx_runtime404.jsx)("a", { href: postPermalink, target: linkTarget, children: image }) : image,
        /* @__PURE__ */ (0, import_jsx_runtime404.jsx)(
          overlay_default,
          {
            attributes: attributes2,
            setAttributes,
            clientId
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-featured-image/index.mjs
  var { name: name72 } = block_default71;
  var settings71 = {
    icon: post_featured_image_default,
    edit: PostFeaturedImageEdit
  };
  var init71 = () => initBlock({ name: name72, metadata: block_default71, settings: settings71 });

  // packages/block-library/build-module/post-navigation-link/index.mjs
  var post_navigation_link_exports = {};
  __export(post_navigation_link_exports, {
    init: () => init72,
    metadata: () => block_default72,
    name: () => name73,
    settings: () => settings72
  });
  var import_i18n177 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/post-navigation-link/block.json
  var block_default72 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-navigation-link",
    title: "Post Navigation Link",
    category: "theme",
    description: "Displays the next or previous post link that is adjacent to the current post.",
    textdomain: "default",
    attributes: {
      type: {
        type: "string",
        default: "next"
      },
      label: {
        type: "string",
        role: "content"
      },
      showTitle: {
        type: "boolean",
        default: false
      },
      linkLabel: {
        type: "boolean",
        default: false
      },
      arrow: {
        type: "string",
        default: "none"
      },
      taxonomy: {
        type: "string",
        default: ""
      }
    },
    usesContext: ["postType"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: {
        __experimentalSkipSerialization: true
      },
      interactivity: {
        clientNavigation: true
      },
      spacing: {
        __experimentalSkipSerialization: true,
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: false,
          radius: false,
          style: false,
          width: false
        }
      }
    },
    selectors: {
      border: ".wp-block-post-navigation-link:not(:empty)",
      shadow: ".wp-block-post-navigation-link:not(:empty)",
      spacing: ".wp-block-post-navigation-link:not(:empty)"
    },
    style: "wp-block-post-navigation-link"
  };

  // packages/block-library/build-module/post-navigation-link/edit.mjs
  var import_components110 = __toESM(require_components(), 1);
  var import_block_editor193 = __toESM(require_block_editor(), 1);
  var import_i18n175 = __toESM(require_i18n(), 1);
  var import_data111 = __toESM(require_data(), 1);
  var import_core_data66 = __toESM(require_core_data(), 1);
  var import_jsx_runtime405 = __toESM(require_jsx_runtime(), 1);
  function PostNavigationLinkEdit({
    context: { postType },
    attributes: attributes2,
    setAttributes
  }) {
    const { type, label, showTitle, linkLabel, arrow, taxonomy } = attributes2;
    const isNext = type === "next";
    let placeholder2 = isNext ? (0, import_i18n175.__)("Next") : (0, import_i18n175.__)("Previous");
    const arrowMap5 = {
      none: "",
      arrow: isNext ? "\u2192" : "\u2190",
      chevron: isNext ? "\xBB" : "\xAB"
    };
    const displayArrow = arrowMap5[arrow];
    if (showTitle) {
      placeholder2 = isNext ? (
        /* translators: Label before for next and previous post. There is a space after the colon. */
        (0, import_i18n175.__)("Next: ")
      ) : (
        /* translators: Label before for next and previous post. There is a space after the colon. */
        (0, import_i18n175.__)("Previous: ")
      );
    }
    const ariaLabel = isNext ? (0, import_i18n175.__)("Next post") : (0, import_i18n175.__)("Previous post");
    const borderProps = (0, import_block_editor193.__experimentalUseBorderProps)(attributes2);
    const shadowProps = (0, import_block_editor193.__experimentalGetShadowClassesAndStyles)(attributes2);
    const spacingProps = (0, import_block_editor193.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const blockProps = (0, import_block_editor193.useBlockProps)({
      className: borderProps.className,
      style: {
        ...borderProps.style,
        ...shadowProps.style,
        ...spacingProps.style
      }
    });
    const taxonomies = (0, import_data111.useSelect)(
      (select10) => {
        const { getTaxonomies } = select10(import_core_data66.store);
        const filteredTaxonomies = getTaxonomies({
          type: postType,
          per_page: -1
        });
        return filteredTaxonomies;
      },
      [postType]
    );
    const getTaxonomyOptions = () => {
      const selectOption = {
        label: (0, import_i18n175.__)("Unfiltered"),
        value: ""
      };
      const taxonomyOptions = (taxonomies ?? []).filter(({ visibility }) => !!visibility?.publicly_queryable).map((item) => {
        return {
          value: item.slug,
          label: item.name
        };
      });
      return [selectOption, ...taxonomyOptions];
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime405.jsxs)(import_jsx_runtime405.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(import_block_editor193.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime405.jsxs)(
        import_components110.__experimentalToolsPanel,
        {
          label: (0, import_i18n175.__)("Settings"),
          resetAll: () => {
            setAttributes({
              showTitle: false,
              linkLabel: false,
              arrow: "none"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
              import_components110.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n175.__)("Display the title as a link"),
                isShownByDefault: true,
                hasValue: () => showTitle,
                onDeselect: () => setAttributes({ showTitle: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
                  import_components110.ToggleControl,
                  {
                    label: (0, import_i18n175.__)("Display the title as a link"),
                    help: (0, import_i18n175.__)(
                      "If you have entered a custom label, it will be prepended before the title."
                    ),
                    checked: !!showTitle,
                    onChange: () => setAttributes({
                      showTitle: !showTitle
                    })
                  }
                )
              }
            ),
            showTitle && /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
              import_components110.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n175.__)(
                  "Include the label as part of the link"
                ),
                isShownByDefault: true,
                hasValue: () => !!linkLabel,
                onDeselect: () => setAttributes({ linkLabel: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
                  import_components110.ToggleControl,
                  {
                    label: (0, import_i18n175.__)(
                      "Include the label as part of the link"
                    ),
                    checked: !!linkLabel,
                    onChange: () => setAttributes({
                      linkLabel: !linkLabel
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
              import_components110.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n175.__)("Arrow"),
                isShownByDefault: true,
                hasValue: () => arrow !== "none",
                onDeselect: () => setAttributes({ arrow: "none" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime405.jsxs)(
                  import_components110.__experimentalToggleGroupControl,
                  {
                    label: (0, import_i18n175.__)("Arrow"),
                    value: arrow,
                    onChange: (value) => {
                      setAttributes({ arrow: value });
                    },
                    help: (0, import_i18n175.__)(
                      "A decorative arrow for the next and previous link."
                    ),
                    isBlock: true,
                    children: [
                      /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
                        import_components110.__experimentalToggleGroupControlOption,
                        {
                          value: "none",
                          label: (0, import_i18n175._x)(
                            "None",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
                        import_components110.__experimentalToggleGroupControlOption,
                        {
                          value: "arrow",
                          label: (0, import_i18n175._x)(
                            "Arrow",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      ),
                      /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
                        import_components110.__experimentalToggleGroupControlOption,
                        {
                          value: "chevron",
                          label: (0, import_i18n175._x)(
                            "Chevron",
                            "Arrow option for Next/Previous link"
                          )
                        }
                      )
                    ]
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(import_block_editor193.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
        import_components110.SelectControl,
        {
          label: (0, import_i18n175.__)("Filter by taxonomy"),
          value: taxonomy,
          options: getTaxonomyOptions(),
          onChange: (value) => setAttributes({
            taxonomy: value
          }),
          help: (0, import_i18n175.__)(
            "Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories."
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime405.jsxs)("div", { ...blockProps, children: [
        !isNext && displayArrow && /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          "span",
          {
            className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`,
            children: displayArrow
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          import_block_editor193.RichText,
          {
            tagName: "a",
            identifier: "label",
            "aria-label": ariaLabel,
            placeholder: placeholder2,
            value: label,
            withoutInteractiveFormatting: true,
            onChange: (newLabel) => setAttributes({ label: newLabel })
          }
        ),
        showTitle && /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          "a",
          {
            href: "#post-navigation-pseudo-link",
            onClick: (event) => event.preventDefault(),
            children: (0, import_i18n175.__)("An example title")
          }
        ),
        isNext && displayArrow && /* @__PURE__ */ (0, import_jsx_runtime405.jsx)(
          "span",
          {
            className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
            "aria-hidden": true,
            children: displayArrow
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-navigation-link/variations.mjs
  var import_i18n176 = __toESM(require_i18n(), 1);
  var variations12 = [
    {
      name: "post-previous",
      title: (0, import_i18n176.__)("Previous Post"),
      description: (0, import_i18n176.__)(
        "Displays the post link that precedes the current post."
      ),
      icon: previous_default,
      attributes: { type: "previous" },
      scope: ["inserter", "transform"],
      example: {
        attributes: {
          label: (0, import_i18n176.__)("Previous post"),
          arrow: "arrow"
        }
      }
    },
    {
      isDefault: true,
      name: "post-next",
      title: (0, import_i18n176.__)("Next Post"),
      description: (0, import_i18n176.__)(
        "Displays the post link that follows the current post."
      ),
      icon: next_default,
      attributes: { type: "next" },
      scope: ["inserter", "transform"],
      example: {
        attributes: {
          label: (0, import_i18n176.__)("Next post"),
          arrow: "arrow"
        }
      }
    }
  ];
  variations12.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.type === variationAttributes.type;
  });
  var variations_default12 = variations12;

  // packages/block-library/build-module/post-navigation-link/deprecated.mjs
  var v131 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      type: {
        type: "string",
        default: "next"
      },
      label: {
        type: "string",
        role: "content"
      },
      showTitle: {
        type: "boolean",
        default: false
      },
      linkLabel: {
        type: "boolean",
        default: false
      },
      arrow: {
        type: "string",
        default: "none"
      },
      taxonomy: {
        type: "string",
        default: ""
      }
    },
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        link: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default36 = [v131];

  // packages/block-library/build-module/post-navigation-link/index.mjs
  var { name: name73 } = block_default72;
  var settings72 = {
    icon: next_default,
    edit: PostNavigationLinkEdit,
    variations: variations_default12,
    deprecated: deprecated_default36,
    example: {
      attributes: {
        label: (0, import_i18n177.__)("Next post"),
        arrow: "arrow"
      }
    }
  };
  var init72 = () => initBlock({ name: name73, metadata: block_default72, settings: settings72 });

  // packages/block-library/build-module/post-template/index.mjs
  var post_template_exports = {};
  __export(post_template_exports, {
    init: () => init73,
    metadata: () => block_default73,
    name: () => name74,
    settings: () => settings73
  });

  // packages/block-library/build-module/post-template/block.json
  var block_default73 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-template",
    title: "Post Template",
    category: "theme",
    ancestor: ["core/query"],
    description: "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",
    textdomain: "default",
    usesContext: [
      "queryId",
      "query",
      "displayLayout",
      "templateSlug",
      "previewPostType",
      "enhancedPagination",
      "postType",
      "postId"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      align: ["wide", "full"],
      layout: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        heading: true,
        button: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          __experimentalDefault: "1.25em"
        },
        __experimentalDefaultControls: {
          blockGap: true,
          padding: false,
          margin: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true
    },
    style: "wp-block-post-template",
    editorStyle: "wp-block-post-template-editor"
  };

  // packages/block-library/build-module/post-template/edit.mjs
  var import_element127 = __toESM(require_element(), 1);
  var import_data112 = __toESM(require_data(), 1);
  var import_i18n178 = __toESM(require_i18n(), 1);
  var import_block_editor194 = __toESM(require_block_editor(), 1);
  var import_components111 = __toESM(require_components(), 1);
  var import_core_data67 = __toESM(require_core_data(), 1);
  var import_jsx_runtime406 = __toESM(require_jsx_runtime(), 1);
  var INNER_BLOCKS_LAYOUT = { type: "default" };
  function PostTemplateInnerBlocks({ classList }) {
    const innerBlocksProps = (0, import_block_editor194.useInnerBlocksProps)(
      { className: clsx_default("wp-block-post", classList) },
      {
        __unstableDisableLayoutClassNames: true,
        layout: INNER_BLOCKS_LAYOUT
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsx)("li", { ...innerBlocksProps });
  }
  function PostTemplateBlockPreview({
    blocks,
    blockContextId,
    classList,
    isHidden,
    setActiveBlockContextId
  }) {
    const blockPreviewProps = (0, import_block_editor194.__experimentalUseBlockPreview)({
      blocks,
      props: {
        className: clsx_default("wp-block-post", classList)
      }
    });
    const handleOnClick = () => {
      setActiveBlockContextId(blockContextId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
      "li",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        onClick: handleOnClick,
        onKeyPress: handleOnClick,
        style: style2
      }
    );
  }
  var MemoizedPostTemplateBlockPreview = (0, import_element127.memo)(PostTemplateBlockPreview);
  function PostTemplateEdit({
    setAttributes,
    clientId,
    context: {
      query: {
        perPage,
        offset = 0,
        // Match `build_query_vars_from_query_block()`, which queries posts when
        // `query` has no post type.
        postType = "post",
        order,
        orderBy,
        author,
        search,
        exclude,
        sticky,
        inherit,
        taxQuery,
        parents,
        pages,
        format: format3,
        excludeCurrent,
        // We gather extra query args to pass to the REST API call.
        // This way extenders of Query Loop can add their own query args,
        // and have accurate previews in the editor.
        // Noting though that these args should either be supported by the
        // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.
        ...restQueryArgs
      } = {},
      templateSlug,
      previewPostType,
      postId
    },
    attributes: { layout },
    __unstableLayoutClassNames
  }) {
    const {
      type: layoutType,
      columnCount = 3,
      minimumColumnWidth
    } = layout || {};
    const [activeBlockContextId, setActiveBlockContextId] = (0, import_element127.useState)();
    const { posts, blocks } = (0, import_data112.useSelect)(
      (select10) => {
        const { getEntityRecords, getTaxonomies } = select10(import_core_data67.store);
        const { getBlocks } = select10(import_block_editor194.store);
        const templateCategory = inherit && templateSlug?.startsWith("category-") && getEntityRecords("taxonomy", "category", {
          context: "view",
          per_page: 1,
          _fields: ["id"],
          slug: templateSlug.replace("category-", "")
        });
        const templateTag = inherit && templateSlug?.startsWith("tag-") && getEntityRecords("taxonomy", "post_tag", {
          context: "view",
          per_page: 1,
          _fields: ["id"],
          slug: templateSlug.replace("tag-", "")
        });
        const query = {
          offset: offset || 0,
          order,
          orderby: orderBy
        };
        if (taxQuery && !inherit) {
          const taxonomies = getTaxonomies({
            type: postType,
            per_page: -1,
            context: "view"
          });
          const buildTaxQuery = (terms, suffix = "") => {
            return Object.entries(terms || {}).reduce(
              (accumulator, [taxonomySlug, termIds]) => {
                const taxonomy = taxonomies?.find(
                  ({ slug }) => slug === taxonomySlug
                );
                if (taxonomy?.rest_base && termIds?.length) {
                  accumulator[taxonomy.rest_base + suffix] = termIds;
                }
                return accumulator;
              },
              {}
            );
          };
          const builtTaxQuery = buildTaxQuery(taxQuery.include);
          if (taxQuery.exclude) {
            Object.assign(
              builtTaxQuery,
              buildTaxQuery(taxQuery.exclude, "_exclude")
            );
          }
          if (!!Object.keys(builtTaxQuery).length) {
            Object.assign(query, builtTaxQuery);
          }
        }
        if (perPage) {
          query.per_page = perPage;
        }
        if (author) {
          query.author = author;
        }
        if (search) {
          query.search = search;
        }
        if (exclude?.length) {
          query.exclude = exclude;
        }
        if (parents?.length) {
          query.parent = parents;
        }
        if (format3?.length) {
          query.format = format3;
        }
        if (excludeCurrent && postId) {
          if (query.exclude) {
            query.exclude = [...query.exclude, postId];
          } else {
            query.exclude = [postId];
          }
        }
        if (["exclude", "only"].includes(sticky)) {
          query.sticky = sticky === "only";
        }
        if (["", "ignore"].includes(sticky)) {
          delete query.sticky;
          query.ignore_sticky = sticky === "ignore";
        }
        let currentPostType = postType;
        if (inherit) {
          if (templateSlug?.startsWith("archive-")) {
            query.postType = templateSlug.replace("archive-", "");
            currentPostType = query.postType;
          } else if (templateCategory) {
            query.categories = templateCategory[0]?.id;
          } else if (templateTag) {
            query.tags = templateTag[0]?.id;
          } else if (templateSlug?.startsWith("taxonomy-post_format")) {
            query.format = templateSlug.replace(
              "taxonomy-post_format-post-format-",
              ""
            );
          }
        }
        const usedPostType = previewPostType || currentPostType;
        return {
          posts: getEntityRecords("postType", usedPostType, {
            ...query,
            ...restQueryArgs
          }),
          blocks: getBlocks(clientId)
        };
      },
      [
        perPage,
        offset,
        order,
        orderBy,
        clientId,
        author,
        search,
        postType,
        exclude,
        sticky,
        inherit,
        templateSlug,
        taxQuery,
        parents,
        format3,
        restQueryArgs,
        previewPostType
      ]
    );
    const blockContexts = (0, import_element127.useMemo)(
      () => posts?.map((post) => ({
        postType: post.type,
        postId: post.id,
        classList: post.class_list ?? ""
      })),
      [posts]
    );
    const blockProps = (0, import_block_editor194.useBlockProps)({
      className: clsx_default(__unstableLayoutClassNames, {
        [`columns-${columnCount}`]: layoutType === "grid" && columnCount,
        // Ensure column count is flagged via classname for backwards compatibility.
        "has-native-responsive-grid": layoutType === "grid" && columnCount && minimumColumnWidth
        // Flag native responsive grid when minimum column width is provided.
      })
    });
    if (!posts) {
      return /* @__PURE__ */ (0, import_jsx_runtime406.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(import_components111.Spinner, {}) });
    }
    if (!posts.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime406.jsxs)("p", { ...blockProps, children: [
        " ",
        (0, import_i18n178.__)("No results found.")
      ] });
    }
    const setDisplayLayout = (newDisplayLayout) => setAttributes({
      layout: { ...layout, ...newDisplayLayout }
    });
    const displayLayoutControls = [
      {
        icon: list_default,
        title: (0, import_i18n178._x)("List view", "Post template block display setting"),
        onClick: () => setDisplayLayout({ type: "default" }),
        isActive: layoutType === "default" || layoutType === "constrained"
      },
      {
        icon: grid_default,
        title: (0, import_i18n178._x)("Grid view", "Post template block display setting"),
        onClick: () => setDisplayLayout({
          type: "grid",
          columnCount
        }),
        isActive: layoutType === "grid"
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime406.jsxs)(import_jsx_runtime406.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(import_block_editor194.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(import_components111.ToolbarGroup, { controls: displayLayoutControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime406.jsx)("ul", { ...blockProps, children: blockContexts && blockContexts.map((blockContext) => /* @__PURE__ */ (0, import_jsx_runtime406.jsxs)(
        import_block_editor194.BlockContextProvider,
        {
          value: blockContext,
          children: [
            blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
              PostTemplateInnerBlocks,
              {
                classList: blockContext.classList
              }
            ) : null,
            /* @__PURE__ */ (0, import_jsx_runtime406.jsx)(
              MemoizedPostTemplateBlockPreview,
              {
                blocks,
                blockContextId: blockContext.postId,
                classList: blockContext.classList,
                setActiveBlockContextId,
                isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
              }
            )
          ]
        },
        blockContext.postId
      )) })
    ] });
  }

  // packages/block-library/build-module/post-template/save.mjs
  var import_block_editor195 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime407 = __toESM(require_jsx_runtime(), 1);
  function PostTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime407.jsx)(import_block_editor195.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/post-template/index.mjs
  var { name: name74 } = block_default73;
  var TEMPLATE12 = [
    ["core/post-title"],
    [
      "core/post-date",
      {
        metadata: {
          bindings: {
            datetime: {
              source: "core/post-data",
              args: { field: "date" }
            }
          }
        }
      }
    ],
    ["core/post-excerpt"]
  ];
  var settings73 = {
    icon: layout_default,
    template: TEMPLATE12,
    edit: PostTemplateEdit,
    save: PostTemplateSave
  };
  var init73 = () => initBlock({ name: name74, metadata: block_default73, settings: settings73 });

  // packages/block-library/build-module/post-terms/index.mjs
  var post_terms_exports = {};
  __export(post_terms_exports, {
    init: () => init74,
    metadata: () => block_default74,
    name: () => name75,
    settings: () => settings74
  });
  var import_hooks54 = __toESM(require_hooks(), 1);

  // packages/block-library/build-module/post-terms/block.json
  var block_default74 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-terms",
    title: "Post Terms",
    category: "theme",
    description: "Post terms.",
    textdomain: "default",
    attributes: {
      term: {
        type: "string"
      },
      separator: {
        type: "string",
        default: ", "
      },
      prefix: {
        type: "string",
        default: "",
        role: "content"
      },
      suffix: {
        type: "string",
        default: "",
        role: "content"
      }
    },
    usesContext: ["postId", "postType"],
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-terms"
  };

  // packages/block-library/build-module/post-terms/edit.mjs
  var import_block_editor196 = __toESM(require_block_editor(), 1);
  var import_blocks76 = __toESM(require_blocks(), 1);
  var import_components112 = __toESM(require_components(), 1);
  var import_data114 = __toESM(require_data(), 1);
  var import_html_entities10 = __toESM(require_html_entities(), 1);
  var import_i18n179 = __toESM(require_i18n(), 1);
  var import_core_data69 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/post-terms/use-post-terms.mjs
  var import_core_data68 = __toESM(require_core_data(), 1);
  var import_data113 = __toESM(require_data(), 1);
  var EMPTY_ARRAY6 = [];
  function usePostTerms({ postId, term }) {
    const { slug } = term;
    return (0, import_data113.useSelect)(
      (select10) => {
        const visible = term?.visibility?.publicly_queryable;
        if (!visible || !postId) {
          return {
            postTerms: EMPTY_ARRAY6,
            isLoading: false,
            hasPostTerms: false
          };
        }
        const { getEntityRecords, isResolving } = select10(import_core_data68.store);
        const taxonomyArgs = [
          "taxonomy",
          slug,
          {
            post: postId,
            per_page: -1,
            context: "view"
          }
        ];
        const terms = getEntityRecords(...taxonomyArgs);
        return {
          postTerms: terms,
          isLoading: isResolving("getEntityRecords", taxonomyArgs),
          hasPostTerms: !!terms?.length
        };
      },
      [postId, term?.visibility?.publicly_queryable, slug]
    );
  }

  // packages/block-library/build-module/post-terms/edit.mjs
  var import_jsx_runtime408 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_FORMATS = [
    "core/bold",
    "core/image",
    "core/italic",
    "core/link",
    "core/strikethrough",
    "core/text-color"
  ];
  function PostTermsEdit({
    attributes: attributes2,
    clientId,
    context,
    isSelected,
    setAttributes,
    insertBlocksAfter
  }) {
    const { term, separator, prefix, suffix } = attributes2;
    const { postId, postType } = context;
    const selectedTerm = (0, import_data114.useSelect)(
      (select10) => {
        if (!term) {
          return {};
        }
        const { getTaxonomy } = select10(import_core_data69.store);
        const taxonomy = getTaxonomy(term);
        return taxonomy?.visibility?.publicly_queryable ? taxonomy : {};
      },
      [term]
    );
    const { postTerms, hasPostTerms, isLoading } = usePostTerms({
      postId,
      term: selectedTerm
    });
    const hasPost = postId && postType;
    const blockInformation = (0, import_block_editor196.useBlockDisplayInformation)(clientId);
    const blockProps = (0, import_block_editor196.useBlockProps)({
      className: term && `taxonomy-${term}`
    });
    return /* @__PURE__ */ (0, import_jsx_runtime408.jsxs)(import_jsx_runtime408.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(import_block_editor196.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
        import_components112.TextControl,
        {
          autoComplete: "off",
          label: (0, import_i18n179.__)("Separator"),
          value: separator || "",
          onChange: (nextValue) => {
            setAttributes({ separator: nextValue });
          },
          help: (0, import_i18n179.__)("Enter character(s) used to separate terms.")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime408.jsxs)("div", { ...blockProps, children: [
        isLoading && hasPost && /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(import_components112.Spinner, {}),
        !isLoading && (isSelected || prefix) && /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
          import_block_editor196.RichText,
          {
            identifier: "prefix",
            allowedFormats: ALLOWED_FORMATS,
            className: "wp-block-post-terms__prefix",
            "aria-label": (0, import_i18n179.__)("Prefix"),
            placeholder: (0, import_i18n179.__)("Prefix") + " ",
            value: prefix,
            onChange: (value) => setAttributes({ prefix: value }),
            tagName: "span"
          }
        ),
        (!hasPost || !term) && /* @__PURE__ */ (0, import_jsx_runtime408.jsx)("span", { children: blockInformation.title }),
        hasPost && !isLoading && hasPostTerms && postTerms.map((postTerm) => /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
          "a",
          {
            href: postTerm.link,
            onClick: (event) => event.preventDefault(),
            rel: "tag",
            children: (0, import_html_entities10.decodeEntities)(postTerm.name)
          },
          postTerm.id
        )).reduce((prev, curr) => /* @__PURE__ */ (0, import_jsx_runtime408.jsxs)(import_jsx_runtime408.Fragment, { children: [
          prev,
          /* @__PURE__ */ (0, import_jsx_runtime408.jsx)("span", { className: "wp-block-post-terms__separator", children: separator || " " }),
          curr
        ] })),
        hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0, import_i18n179.__)("Term items not found.")),
        !isLoading && (isSelected || suffix) && /* @__PURE__ */ (0, import_jsx_runtime408.jsx)(
          import_block_editor196.RichText,
          {
            identifier: "suffix",
            allowedFormats: ALLOWED_FORMATS,
            className: "wp-block-post-terms__suffix",
            "aria-label": (0, import_i18n179.__)("Suffix"),
            placeholder: " " + (0, import_i18n179.__)("Suffix"),
            value: suffix,
            onChange: (value) => setAttributes({ suffix: value }),
            tagName: "span",
            __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
              (0, import_blocks76.createBlock)((0, import_blocks76.getDefaultBlockName)())
            ) : void 0
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/post-terms/hooks.mjs
  var variationIconMap = {
    category: post_categories_default,
    post_tag: post_terms_default
  };
  function enhanceVariations(settings117, name118) {
    if (name118 !== "core/post-terms") {
      return settings117;
    }
    const variations19 = settings117.variations.map((variation) => ({
      ...variation,
      ...{
        icon: variationIconMap[variation.name] ?? post_categories_default
      }
    }));
    return {
      ...settings117,
      variations: variations19
    };
  }

  // packages/block-library/build-module/post-terms/deprecated.mjs
  var v133 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      term: {
        type: "string"
      },
      separator: {
        type: "string",
        default: ", "
      },
      prefix: {
        type: "string",
        default: "",
        role: "content"
      },
      suffix: {
        type: "string",
        default: "",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default37 = [v133];

  // packages/block-library/build-module/post-terms/index.mjs
  var { name: name75 } = block_default74;
  var settings74 = {
    icon: post_categories_default,
    edit: PostTermsEdit,
    deprecated: deprecated_default37
  };
  var init74 = () => {
    (0, import_hooks54.addFilter)(
      "blocks.registerBlockType",
      "core/template-part",
      enhanceVariations
    );
    return initBlock({ name: name75, metadata: block_default74, settings: settings74 });
  };

  // packages/block-library/build-module/post-time-to-read/index.mjs
  var post_time_to_read_exports = {};
  __export(post_time_to_read_exports, {
    init: () => init75,
    metadata: () => block_default75,
    name: () => name76,
    settings: () => settings75
  });

  // packages/block-library/build-module/post-time-to-read/block.json
  var block_default75 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-time-to-read",
    title: "Time to Read",
    category: "theme",
    description: "Show minutes required to finish reading the post. Can also show a word count.",
    textdomain: "default",
    usesContext: ["postId", "postType"],
    attributes: {
      displayAsRange: {
        type: "boolean",
        default: true
      },
      displayMode: {
        type: "string",
        default: "time"
      },
      averageReadingSpeed: {
        type: "number",
        default: 189
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      html: false,
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    }
  };

  // packages/block-library/build-module/post-time-to-read/edit.mjs
  var import_i18n180 = __toESM(require_i18n(), 1);
  var import_element128 = __toESM(require_element(), 1);
  var import_block_editor197 = __toESM(require_block_editor(), 1);
  var import_components113 = __toESM(require_components(), 1);
  var import_blocks77 = __toESM(require_blocks(), 1);
  var import_core_data70 = __toESM(require_core_data(), 1);
  var import_wordcount = __toESM(require_wordcount(), 1);
  var import_jsx_runtime409 = __toESM(require_jsx_runtime(), 1);
  function PostTimeToReadEdit({ attributes: attributes2, setAttributes, context }) {
    const { displayAsRange, displayMode, averageReadingSpeed } = attributes2;
    const { postId, postType } = context;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const [contentStructure] = (0, import_core_data70.useEntityProp)(
      "postType",
      postType,
      "content",
      postId
    );
    const [blocks] = (0, import_core_data70.useEntityBlockEditor)("postType", postType, {
      id: postId
    });
    const displayString = (0, import_element128.useMemo)(() => {
      let content;
      if (contentStructure instanceof Function) {
        content = contentStructure({ blocks });
      } else if (blocks) {
        content = (0, import_blocks77.__unstableSerializeAndClean)(blocks);
      } else {
        content = contentStructure;
      }
      const wordCountType = (0, import_i18n180._x)(
        "words",
        "Word count type. Do not translate!"
      );
      const totalWords = (0, import_wordcount.count)(content || "", wordCountType);
      if (displayMode === "time") {
        if (displayAsRange) {
          let maxMinutes = Math.max(
            1,
            Math.round(totalWords / averageReadingSpeed * 1.2)
          );
          const minMinutes = Math.max(
            1,
            Math.round(totalWords / averageReadingSpeed * 0.8)
          );
          if (minMinutes === maxMinutes) {
            maxMinutes = maxMinutes + 1;
          }
          const rangeLabel = (0, import_i18n180._x)(
            "%1$s\u2013%2$s minutes",
            "Range of minutes to read"
          );
          return (0, import_i18n180.sprintf)(rangeLabel, minMinutes, maxMinutes);
        }
        const minutesToRead = Math.max(
          1,
          Math.round(totalWords / averageReadingSpeed)
        );
        return (0, import_i18n180.sprintf)(
          /* translators: %s: the number of minutes to read the post. */
          (0, import_i18n180._n)("%s minute", "%s minutes", minutesToRead),
          minutesToRead
        );
      }
      if (displayMode === "words") {
        return wordCountType === "words" ? (0, import_i18n180.sprintf)(
          /* translators: %s: the number of words in the post. */
          (0, import_i18n180._n)("%s word", "%s words", totalWords),
          totalWords.toLocaleString()
        ) : (0, import_i18n180.sprintf)(
          /* translators: %s: the number of characters in the post. */
          (0, import_i18n180._n)("%s character", "%s characters", totalWords),
          totalWords.toLocaleString()
        );
      }
    }, [
      contentStructure,
      blocks,
      displayAsRange,
      displayMode,
      averageReadingSpeed
    ]);
    const blockProps = (0, import_block_editor197.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime409.jsxs)(import_jsx_runtime409.Fragment, { children: [
      displayMode === "time" && /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(import_block_editor197.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
        import_components113.__experimentalToolsPanel,
        {
          label: (0, import_i18n180.__)("Settings"),
          resetAll: () => {
            setAttributes({
              displayAsRange: true
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
            import_components113.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n180._x)(
                "Display as range",
                "Turns reading time range display on or off"
              ),
              hasValue: () => !displayAsRange,
              onDeselect: () => {
                setAttributes({
                  displayAsRange: true
                });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime409.jsx)(
                import_components113.ToggleControl,
                {
                  label: (0, import_i18n180.__)("Display as range"),
                  checked: !!displayAsRange,
                  onChange: () => setAttributes({
                    displayAsRange: !displayAsRange
                  })
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime409.jsx)("div", { ...blockProps, children: displayString })
    ] });
  }
  var edit_default25 = PostTimeToReadEdit;

  // packages/block-library/build-module/post-time-to-read/variations.mjs
  var import_i18n181 = __toESM(require_i18n(), 1);
  var variations13 = [
    {
      name: "time-to-read",
      title: (0, import_i18n181.__)("Time to Read"),
      description: (0, import_i18n181.__)("Show minutes required to finish reading the post."),
      attributes: {
        displayMode: "time"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.displayMode === "time",
      icon: time_default,
      isDefault: true
    },
    {
      name: "word-count",
      title: (0, import_i18n181.__)("Word Count"),
      description: (0, import_i18n181.__)("Show the number of words in the post."),
      attributes: {
        displayMode: "words"
      },
      scope: ["inserter", "transform"],
      isActive: (blockAttributes8) => blockAttributes8?.displayMode === "words",
      icon: word_count_default
    }
  ];
  var variations_default13 = variations13;

  // packages/block-library/build-module/post-time-to-read/deprecated.mjs
  var v134 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      displayAsRange: {
        type: "boolean",
        default: true
      },
      displayMode: {
        type: "string",
        default: "time"
      },
      averageReadingSpeed: {
        type: "number",
        default: 189
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      html: false,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default38 = [v134];

  // packages/block-library/build-module/post-time-to-read/index.mjs
  var { name: name76 } = block_default75;
  var settings75 = {
    icon: time_default,
    edit: edit_default25,
    variations: variations_default13,
    example: {},
    deprecated: deprecated_default38
  };
  var init75 = () => initBlock({ name: name76, metadata: block_default75, settings: settings75 });

  // packages/block-library/build-module/post-title/index.mjs
  var post_title_exports = {};
  __export(post_title_exports, {
    init: () => init76,
    metadata: () => block_default76,
    name: () => name77,
    settings: () => settings76
  });

  // packages/block-library/build-module/post-title/block.json
  var block_default76 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/post-title",
    title: "Title",
    category: "theme",
    description: "Displays the title of a post, page, or any other content-type.",
    textdomain: "default",
    usesContext: ["postId", "postType", "queryId"],
    attributes: {
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      isLink: {
        type: "boolean",
        default: false,
        role: "content"
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: "",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      placeholder: {
        type: "string"
      }
    },
    example: {
      viewportWidth: 350
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-post-title"
  };

  // packages/block-library/build-module/post-title/edit.mjs
  var import_block_editor198 = __toESM(require_block_editor(), 1);
  var import_components114 = __toESM(require_components(), 1);
  var import_i18n182 = __toESM(require_i18n(), 1);
  var import_core_data71 = __toESM(require_core_data(), 1);
  var import_data115 = __toESM(require_data(), 1);
  var import_element129 = __toESM(require_element(), 1);
  var import_jsx_runtime410 = __toESM(require_jsx_runtime(), 1);
  function PostTitleEdit({
    attributes: { level, levelOptions, isLink, rel, linkTarget, placeholder: placeholder2 },
    setAttributes,
    context: { postType, postId, queryId }
  }) {
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const isDescendentOfQueryLoop = Number.isFinite(queryId);
    const userCanEdit = (0, import_data115.useSelect)(
      (select10) => {
        if (isDescendentOfQueryLoop) {
          return false;
        }
        return select10(import_core_data71.store).canUser("update", {
          kind: "postType",
          name: postType,
          id: postId
        });
      },
      [isDescendentOfQueryLoop, postType, postId]
    );
    const [rawTitle = "", setTitle, fullTitle] = (0, import_core_data71.useEntityProp)(
      "postType",
      postType,
      "title",
      postId
    );
    const [link] = (0, import_core_data71.useEntityProp)("postType", postType, "link", postId);
    const blockProps = (0, import_block_editor198.useBlockProps)();
    const blockEditingMode = (0, import_block_editor198.useBlockEditingMode)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    let titleElement = /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(TagName2, { ...blockProps, children: placeholder2 || (0, import_i18n182.__)("Title") });
    if (postType && postId) {
      titleElement = userCanEdit ? /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        import_block_editor198.PlainText,
        {
          tagName: TagName2,
          placeholder: (0, import_i18n182.__)("(no title)"),
          value: rawTitle,
          onChange: setTitle,
          __experimentalVersion: 2,
          disableLineBreaks: true,
          ...blockProps
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        TagName2,
        {
          ...blockProps,
          dangerouslySetInnerHTML: {
            __html: fullTitle?.rendered || (0, import_i18n182.__)("(no title)")
          }
        }
      );
    }
    if (isLink && postType && postId) {
      titleElement = userCanEdit ? /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        import_block_editor198.PlainText,
        {
          tagName: "a",
          href: link,
          target: linkTarget,
          rel,
          placeholder: !rawTitle.length ? (0, import_i18n182.__)("(no title)") : null,
          value: rawTitle,
          onChange: setTitle,
          __experimentalVersion: 2,
          disableLineBreaks: true
        }
      ) }) : /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
        "a",
        {
          href: link,
          target: linkTarget,
          rel,
          onClick: (event) => event.preventDefault(),
          dangerouslySetInnerHTML: {
            __html: fullTitle?.rendered || (0, import_i18n182.__)("(no title)")
          }
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(import_jsx_runtime410.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(import_jsx_runtime410.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_block_editor198.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
          import_block_editor198.HeadingLevelDropdown,
          {
            value: level,
            options: levelOptions,
            onChange: (newLevel) => setAttributes({ level: newLevel })
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_block_editor198.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(
          import_components114.__experimentalToolsPanel,
          {
            label: (0, import_i18n182.__)("Settings"),
            resetAll: () => {
              setAttributes({
                rel: "",
                linkTarget: "_self",
                isLink: false
              });
            },
            dropdownMenuProps,
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                import_components114.__experimentalToolsPanelItem,
                {
                  label: (0, import_i18n182.__)("Make title a link"),
                  isShownByDefault: true,
                  hasValue: () => isLink,
                  onDeselect: () => setAttributes({ isLink: false }),
                  children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                    import_components114.ToggleControl,
                    {
                      label: (0, import_i18n182.__)("Make title a link"),
                      onChange: () => setAttributes({ isLink: !isLink }),
                      checked: isLink
                    }
                  )
                }
              ),
              isLink && /* @__PURE__ */ (0, import_jsx_runtime410.jsxs)(import_jsx_runtime410.Fragment, { children: [
                /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                  import_components114.__experimentalToolsPanelItem,
                  {
                    label: (0, import_i18n182.__)("Open in new tab"),
                    isShownByDefault: true,
                    hasValue: () => linkTarget === "_blank",
                    onDeselect: () => setAttributes({
                      linkTarget: "_self"
                    }),
                    children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                      import_components114.ToggleControl,
                      {
                        label: (0, import_i18n182.__)("Open in new tab"),
                        onChange: (value) => setAttributes({
                          linkTarget: value ? "_blank" : "_self"
                        }),
                        checked: linkTarget === "_blank"
                      }
                    )
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                  import_components114.__experimentalToolsPanelItem,
                  {
                    label: (0, import_i18n182.__)("Link relation"),
                    isShownByDefault: true,
                    hasValue: () => !!rel,
                    onDeselect: () => setAttributes({ rel: "" }),
                    children: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(
                      import_components114.TextControl,
                      {
                        label: (0, import_i18n182.__)("Link relation"),
                        help: (0, import_element129.createInterpolateElement)(
                          (0, import_i18n182.__)(
                            "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
                          ),
                          {
                            a: /* @__PURE__ */ (0, import_jsx_runtime410.jsx)(import_components114.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
                          }
                        ),
                        value: rel,
                        onChange: (newRel) => setAttributes({ rel: newRel })
                      }
                    )
                  }
                )
              ] })
            ]
          }
        ) })
      ] }),
      titleElement
    ] });
  }

  // packages/block-library/build-module/post-title/deprecated.mjs
  var v214 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 2
      },
      levelOptions: {
        type: "array"
      },
      isLink: {
        type: "boolean",
        default: false
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: ""
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v135 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 2
      },
      isLink: {
        type: "boolean",
        default: false
      },
      rel: {
        type: "string",
        attribute: "rel",
        default: ""
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      spacing: {
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default39 = [v214, v135];

  // packages/block-library/build-module/post-title/index.mjs
  var { name: name77 } = block_default76;
  var settings76 = {
    icon: title_default,
    edit: PostTitleEdit,
    deprecated: deprecated_default39
  };
  var init76 = () => initBlock({ name: name77, metadata: block_default76, settings: settings76 });

  // packages/block-library/build-module/preformatted/index.mjs
  var preformatted_exports = {};
  __export(preformatted_exports, {
    init: () => init77,
    metadata: () => block_default77,
    name: () => name78,
    settings: () => settings77
  });
  var import_i18n184 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/preformatted/edit.mjs
  var import_i18n183 = __toESM(require_i18n(), 1);
  var import_block_editor199 = __toESM(require_block_editor(), 1);
  var import_blocks78 = __toESM(require_blocks(), 1);
  var import_jsx_runtime411 = __toESM(require_jsx_runtime(), 1);
  function PreformattedEdit({
    attributes: attributes2,
    mergeBlocks,
    setAttributes,
    onRemove,
    insertBlocksAfter,
    style: style2
  }) {
    const { content } = attributes2;
    const blockProps = (0, import_block_editor199.useBlockProps)({ style: style2 });
    return /* @__PURE__ */ (0, import_jsx_runtime411.jsx)(
      import_block_editor199.RichText,
      {
        tagName: "pre",
        identifier: "content",
        preserveWhiteSpace: true,
        value: content,
        onChange: (nextContent) => {
          setAttributes({
            content: nextContent
          });
        },
        onRemove,
        "aria-label": (0, import_i18n183.__)("Preformatted text"),
        placeholder: (0, import_i18n183.__)("Write preformatted text\u2026"),
        onMerge: mergeBlocks,
        ...blockProps,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: insertBlocksAfter ? () => insertBlocksAfter(
          (0, import_blocks78.createBlock)((0, import_blocks78.getDefaultBlockName)())
        ) : void 0
      }
    );
  }

  // packages/block-library/build-module/preformatted/block.json
  var block_default77 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/preformatted",
    title: "Preformatted",
    category: "text",
    description: "Add text that respects your spacing and tabs, and also allows styling.",
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-preformatted"
  };

  // packages/block-library/build-module/preformatted/save.mjs
  var import_block_editor200 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime412 = __toESM(require_jsx_runtime(), 1);
  function save35({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime412.jsx)("pre", { ...import_block_editor200.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime412.jsx)(import_block_editor200.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/preformatted/transforms.mjs
  var import_blocks79 = __toESM(require_blocks(), 1);
  var transforms27 = {
    from: [
      {
        type: "block",
        blocks: ["core/code", "core/paragraph", "core/verse"],
        transform: ({ content, anchor }) => (0, import_blocks79.createBlock)("core/preformatted", {
          content,
          anchor
        })
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "PRE" && !(node.children.length === 1 && node.firstChild.nodeName === "CODE"),
        schema: ({ phrasingContentSchema }) => ({
          pre: {
            children: phrasingContentSchema
          }
        })
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks79.createBlock)("core/paragraph", attributes2)
      },
      {
        type: "block",
        blocks: ["core/code"],
        transform: (attributes2) => (0, import_blocks79.createBlock)("core/code", attributes2)
      },
      {
        type: "block",
        blocks: ["core/verse"],
        transform: (attributes2) => (0, import_blocks79.createBlock)("core/verse", attributes2)
      }
    ]
  };
  var transforms_default28 = transforms27;

  // packages/block-library/build-module/preformatted/index.mjs
  var { name: name78 } = block_default77;
  var settings77 = {
    icon: preformatted_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
        content: (0, import_i18n184.__)(
          "EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;"
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    transforms: transforms_default28,
    edit: PreformattedEdit,
    save: save35,
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    }
  };
  var init77 = () => initBlock({ name: name78, metadata: block_default77, settings: settings77 });

  // packages/block-library/build-module/pullquote/index.mjs
  var pullquote_exports = {};
  __export(pullquote_exports, {
    init: () => init78,
    metadata: () => block_default78,
    name: () => name79,
    settings: () => settings78
  });
  var import_i18n186 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/pullquote/deprecated.mjs
  var import_block_editor201 = __toESM(require_block_editor(), 1);
  var import_data116 = __toESM(require_data(), 1);

  // packages/block-library/build-module/pullquote/shared.mjs
  var SOLID_COLOR_CLASS = `is-style-solid-color`;

  // packages/block-library/build-module/pullquote/deprecated.mjs
  var import_jsx_runtime413 = __toESM(require_jsx_runtime(), 1);
  var blockAttributes6 = {
    value: {
      type: "string",
      source: "html",
      selector: "blockquote",
      multiline: "p"
    },
    citation: {
      type: "string",
      source: "html",
      selector: "cite",
      default: ""
    },
    mainColor: {
      type: "string"
    },
    customMainColor: {
      type: "string"
    },
    textColor: {
      type: "string"
    },
    customTextColor: {
      type: "string"
    }
  };
  function parseBorderColor(styleString) {
    if (!styleString) {
      return;
    }
    const matches = styleString.match(/border-color:([^;]+)[;]?/);
    if (matches && matches[1]) {
      return matches[1];
    }
  }
  function multilineToInline(value) {
    value = value || `<p></p>`;
    const padded = `</p>${value}<p>`;
    const values = padded.split(`</p><p>`);
    values.shift();
    values.pop();
    return values.join("<br>");
  }
  var v67 = {
    attributes: {
      value: {
        type: "rich-text",
        source: "rich-text",
        selector: "p",
        role: "content"
      },
      citation: {
        type: "rich-text",
        source: "rich-text",
        selector: "cite",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      background: {
        backgroundImage: true,
        backgroundSize: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        gradients: true,
        background: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        minHeight: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalStyle: {
        typography: {
          fontSize: "1.5em",
          lineHeight: "1.6"
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, citation, value } = attributes2;
      const shouldShowCitation = !import_block_editor201.RichText.isEmpty(citation);
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
        "figure",
        {
          ...import_block_editor201.useBlockProps.save({
            className: clsx_default({
              [`has-text-align-${textAlign}`]: textAlign
            })
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)("blockquote", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "p", value }),
            shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
          ] })
        }
      );
    },
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    migrate: migrate_text_align_default
  };
  var v57 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      color: {
        gradients: true,
        background: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalStyle: {
        typography: {
          fontSize: "1.5em",
          lineHeight: "1.6"
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, citation, value } = attributes2;
      const shouldShowCitation = !import_block_editor201.RichText.isEmpty(citation);
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
        "figure",
        {
          ...import_block_editor201.useBlockProps.save({
            className: clsx_default({
              [`has-text-align-${textAlign}`]: textAlign
            })
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)("blockquote", { children: [
            /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
            shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
          ] })
        }
      );
    },
    migrate({ value, ...attributes2 }) {
      return migrate_text_align_default({
        value: multilineToInline(value),
        ...attributes2
      });
    }
  };
  var v48 = {
    attributes: {
      ...blockAttributes6
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      color: {
        gradients: true,
        background: true,
        link: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      }
    },
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        customTextColor,
        textColor,
        value,
        citation,
        className
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClasses, figureStyles;
      if (isSolidColorStyle) {
        const backgroundClass = (0, import_block_editor201.getColorClassName)(
          "background-color",
          mainColor
        );
        figureClasses = clsx_default({
          "has-background": backgroundClass || customMainColor,
          [backgroundClass]: backgroundClass
        });
        figureStyles = {
          backgroundColor: backgroundClass ? void 0 : customMainColor
        };
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor201.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = clsx_default({
        "has-text-color": textColor || customTextColor,
        [blockquoteTextColorClass]: blockquoteTextColorClass
      });
      const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(
        "figure",
        {
          ...import_block_editor201.useBlockProps.save({
            className: figureClasses,
            style: figureStyles
          }),
          children: /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)(
            "blockquote",
            {
              className: blockquoteClasses,
              style: blockquoteStyles,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
                !import_block_editor201.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
              ]
            }
          )
        }
      );
    },
    migrate({
      value,
      className,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2;
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      return migrate_text_align_default({
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      });
    }
  };
  var v310 = {
    attributes: {
      ...blockAttributes6,
      // figureStyle is an attribute that never existed.
      // We are using it as a way to access the styles previously applied to the figure.
      figureStyle: {
        source: "attribute",
        selector: "figure",
        attribute: "style"
      }
    },
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        textColor,
        customTextColor,
        value,
        citation,
        className,
        figureStyle
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClasses, figureStyles;
      if (isSolidColorStyle) {
        const backgroundClass = (0, import_block_editor201.getColorClassName)(
          "background-color",
          mainColor
        );
        figureClasses = clsx_default({
          "has-background": backgroundClass || customMainColor,
          [backgroundClass]: backgroundClass
        });
        figureStyles = {
          backgroundColor: backgroundClass ? void 0 : customMainColor
        };
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      } else if (mainColor) {
        const borderColor = parseBorderColor(figureStyle);
        figureStyles = {
          borderColor
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor201.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = (textColor || customTextColor) && clsx_default("has-text-color", {
        [blockquoteTextColorClass]: blockquoteTextColorClass
      });
      const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)("figure", { className: figureClasses, style: figureStyles, children: /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)(
        "blockquote",
        {
          className: blockquoteClasses,
          style: blockquoteStyles,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
            !import_block_editor201.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      ) });
    },
    migrate({
      value,
      className,
      figureStyle,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2;
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      if (!isSolidColorStyle && mainColor && figureStyle) {
        const borderColor = parseBorderColor(figureStyle);
        if (borderColor) {
          return {
            value: multilineToInline(value),
            ...attributes2,
            className,
            // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.
            style: {
              border: {
                color: borderColor
              }
            }
          };
        }
      }
      return migrate_text_align_default({
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      });
    }
  };
  var v215 = {
    attributes: blockAttributes6,
    save({ attributes: attributes2 }) {
      const {
        mainColor,
        customMainColor,
        textColor,
        customTextColor,
        value,
        citation,
        className
      } = attributes2;
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let figureClass, figureStyles;
      if (isSolidColorStyle) {
        figureClass = (0, import_block_editor201.getColorClassName)("background-color", mainColor);
        if (!figureClass) {
          figureStyles = {
            backgroundColor: customMainColor
          };
        }
      } else if (customMainColor) {
        figureStyles = {
          borderColor: customMainColor
        };
      } else if (mainColor) {
        const colors = (0, import_data116.select)(import_block_editor201.store).getSettings().colors ?? [];
        const colorObject = (0, import_block_editor201.getColorObjectByAttributeValues)(
          colors,
          mainColor
        );
        figureStyles = {
          borderColor: colorObject.color
        };
      }
      const blockquoteTextColorClass = (0, import_block_editor201.getColorClassName)(
        "color",
        textColor
      );
      const blockquoteClasses = textColor || customTextColor ? clsx_default("has-text-color", {
        [blockquoteTextColorClass]: blockquoteTextColorClass
      }) : void 0;
      const blockquoteStyle = blockquoteTextColorClass ? void 0 : { color: customTextColor };
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsx)("figure", { className: figureClass, style: figureStyles, children: /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)(
        "blockquote",
        {
          className: blockquoteClasses,
          style: blockquoteStyle,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
            !import_block_editor201.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      ) });
    },
    migrate({
      value,
      className,
      mainColor,
      customMainColor,
      customTextColor,
      ...attributes2
    }) {
      const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
      let style2 = {};
      if (customMainColor) {
        if (!isSolidColorStyle) {
          style2 = {
            border: {
              color: customMainColor
            }
          };
        } else {
          style2 = {
            color: {
              background: customMainColor
            }
          };
        }
      }
      if (customTextColor && style2) {
        style2.color = {
          ...style2.color,
          text: customTextColor
        };
      }
      return migrate_text_align_default({
        value: multilineToInline(value),
        className,
        backgroundColor: isSolidColorStyle ? mainColor : void 0,
        borderColor: isSolidColorStyle ? void 0 : mainColor,
        textAlign: isSolidColorStyle ? "left" : void 0,
        ...attributes2,
        style: style2
      });
    }
  };
  var v136 = {
    attributes: {
      ...blockAttributes6
    },
    save({ attributes: attributes2 }) {
      const { value, citation } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)("blockquote", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
        !import_block_editor201.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate({ value, ...attributes2 }) {
      return {
        value: multilineToInline(value),
        ...attributes2
      };
    }
  };
  var v02 = {
    attributes: {
      ...blockAttributes6,
      citation: {
        type: "string",
        source: "html",
        selector: "footer"
      },
      align: {
        type: "string",
        default: "none"
      }
    },
    save({ attributes: attributes2 }) {
      const { value, citation, align } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime413.jsxs)("blockquote", { className: `align${align}`, children: [
        /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { value, multiline: true }),
        !import_block_editor201.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime413.jsx)(import_block_editor201.RichText.Content, { tagName: "footer", value: citation })
      ] });
    },
    migrate({ value, ...attributes2 }) {
      return {
        value: multilineToInline(value),
        ...attributes2
      };
    }
  };
  var deprecated_default40 = [v67, v57, v48, v310, v215, v136, v02];

  // packages/block-library/build-module/pullquote/edit.mjs
  var import_i18n185 = __toESM(require_i18n(), 1);
  var import_block_editor202 = __toESM(require_block_editor(), 1);
  var import_blocks80 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/pullquote/figure.mjs
  var Figure = "figure";

  // packages/block-library/build-module/pullquote/blockquote.mjs
  var BlockQuote = "blockquote";

  // packages/block-library/build-module/pullquote/edit.mjs
  var import_jsx_runtime414 = __toESM(require_jsx_runtime(), 1);
  function PullQuoteEdit(props) {
    const { attributes: attributes2, setAttributes, isSelected, insertBlocksAfter } = props;
    useDeprecatedTextAlign(props);
    const { citation, value } = attributes2;
    const blockProps = (0, import_block_editor202.useBlockProps)();
    const shouldShowCitation = !import_block_editor202.RichText.isEmpty(citation) || isSelected;
    return /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(import_jsx_runtime414.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(Figure, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime414.jsxs)(BlockQuote, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
        import_block_editor202.RichText,
        {
          identifier: "value",
          tagName: "p",
          value,
          onChange: (nextValue) => setAttributes({
            value: nextValue
          }),
          "aria-label": (0, import_i18n185.__)("Pullquote text"),
          placeholder: (
            // translators: placeholder text used for the quote
            (0, import_i18n185.__)("Add quote")
          )
        }
      ),
      shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime414.jsx)(
        import_block_editor202.RichText,
        {
          identifier: "citation",
          tagName: "cite",
          style: { display: "block" },
          value: citation,
          "aria-label": (0, import_i18n185.__)("Pullquote citation text"),
          placeholder: (
            // translators: placeholder text used for the citation
            (0, import_i18n185.__)("Add citation")
          ),
          onChange: (nextCitation) => setAttributes({
            citation: nextCitation
          }),
          className: "wp-block-pullquote__citation",
          __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
            (0, import_blocks80.createBlock)(
              (0, import_blocks80.getDefaultBlockName)()
            )
          ) : void 0
        }
      )
    ] }) }) });
  }
  var edit_default26 = PullQuoteEdit;

  // packages/block-library/build-module/pullquote/block.json
  var block_default78 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/pullquote",
    title: "Pullquote",
    category: "text",
    description: "Give special visual emphasis to a quote from your text.",
    textdomain: "default",
    attributes: {
      value: {
        type: "rich-text",
        source: "rich-text",
        selector: "p",
        role: "content"
      },
      citation: {
        type: "rich-text",
        source: "rich-text",
        selector: "cite",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        background: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        minHeight: true
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      __experimentalStyle: {
        typography: {
          fontSize: "1.5em",
          lineHeight: "1.6"
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-pullquote-editor",
    style: "wp-block-pullquote"
  };

  // packages/block-library/build-module/pullquote/save.mjs
  var import_block_editor203 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime415 = __toESM(require_jsx_runtime(), 1);
  function save36({ attributes: attributes2 }) {
    const { citation, value } = attributes2;
    const shouldShowCitation = !import_block_editor203.RichText.isEmpty(citation);
    return /* @__PURE__ */ (0, import_jsx_runtime415.jsx)("figure", { ...import_block_editor203.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime415.jsxs)("blockquote", { children: [
      /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor203.RichText.Content, { tagName: "p", value }),
      shouldShowCitation && /* @__PURE__ */ (0, import_jsx_runtime415.jsx)(import_block_editor203.RichText.Content, { tagName: "cite", value: citation })
    ] }) });
  }

  // packages/block-library/build-module/pullquote/transforms.mjs
  var import_blocks81 = __toESM(require_blocks(), 1);
  var import_rich_text8 = __toESM(require_rich_text(), 1);
  var transforms28 = {
    from: [
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["core/paragraph"],
        transform: (attributes2) => {
          return (0, import_blocks81.createBlock)("core/pullquote", {
            value: (0, import_rich_text8.toHTMLString)({
              value: (0, import_rich_text8.join)(
                attributes2.map(
                  ({ content }) => (0, import_rich_text8.create)({ html: content })
                ),
                "\n"
              )
            }),
            anchor: attributes2.anchor
          });
        }
      },
      {
        type: "block",
        blocks: ["core/heading"],
        transform: ({ content, anchor }) => {
          return (0, import_blocks81.createBlock)("core/pullquote", {
            value: content,
            anchor
          });
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: ({ value, citation }) => {
          const paragraphs = [];
          if (value) {
            paragraphs.push(
              (0, import_blocks81.createBlock)("core/paragraph", {
                content: value
              })
            );
          }
          if (citation) {
            paragraphs.push(
              (0, import_blocks81.createBlock)("core/paragraph", {
                content: citation
              })
            );
          }
          if (paragraphs.length === 0) {
            return (0, import_blocks81.createBlock)("core/paragraph", {
              content: ""
            });
          }
          return paragraphs;
        }
      },
      {
        type: "block",
        blocks: ["core/heading"],
        transform: ({ value, citation }) => {
          if (!value) {
            return (0, import_blocks81.createBlock)("core/heading", {
              content: citation
            });
          }
          const headingBlock = (0, import_blocks81.createBlock)("core/heading", {
            content: value
          });
          if (!citation) {
            return headingBlock;
          }
          return [
            headingBlock,
            (0, import_blocks81.createBlock)("core/heading", {
              content: citation
            })
          ];
        }
      }
    ]
  };
  var transforms_default29 = transforms28;

  // packages/block-library/build-module/pullquote/index.mjs
  var { name: name79 } = block_default78;
  var settings78 = {
    icon: pullquote_default,
    example: {
      attributes: {
        value: (
          // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
          (0, import_i18n186.__)(
            "One of the hardest things to do in technology is disrupt yourself."
          )
        ),
        citation: (0, import_i18n186.__)("Matt Mullenweg")
      }
    },
    transforms: transforms_default29,
    edit: edit_default26,
    save: save36,
    deprecated: deprecated_default40
  };
  var init78 = () => initBlock({ name: name79, metadata: block_default78, settings: settings78 });

  // packages/block-library/build-module/query/index.mjs
  var query_exports = {};
  __export(query_exports, {
    init: () => init79,
    metadata: () => block_default79,
    name: () => name80,
    settings: () => settings79
  });

  // packages/block-library/build-module/query/block.json
  var block_default79 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query",
    title: "Query Loop",
    category: "theme",
    description: "An advanced block that allows displaying post types based on different query parameters and visual configurations.",
    keywords: ["posts", "list", "blog", "blogs", "custom post types"],
    textdomain: "default",
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: [],
          format: [],
          excludeCurrent: null
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      namespace: {
        type: "string"
      },
      enhancedPagination: {
        type: "boolean",
        default: false
      }
    },
    usesContext: ["templateSlug", "postType"],
    providesContext: {
      queryId: "queryId",
      query: "query",
      displayLayout: "displayLayout",
      enhancedPagination: "enhancedPagination"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      spacing: {
        blockGap: true
      },
      interactivity: true
    },
    editorStyle: "wp-block-query-editor"
  };

  // packages/block-library/build-module/query/edit/index.mjs
  var import_data127 = __toESM(require_data(), 1);
  var import_element137 = __toESM(require_element(), 1);
  var import_block_editor209 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/query/edit/query-content.mjs
  var import_data125 = __toESM(require_data(), 1);
  var import_compose55 = __toESM(require_compose(), 1);
  var import_element135 = __toESM(require_element(), 1);
  var import_block_editor207 = __toESM(require_block_editor(), 1);
  var import_i18n201 = __toESM(require_i18n(), 1);
  var import_core_data78 = __toESM(require_core_data(), 1);
  var import_notices18 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs
  var import_components115 = __toESM(require_components(), 1);
  var import_i18n188 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query/utils.mjs
  var import_data117 = __toESM(require_data(), 1);
  var import_element130 = __toESM(require_element(), 1);
  var import_core_data72 = __toESM(require_core_data(), 1);
  var import_block_editor204 = __toESM(require_block_editor(), 1);
  var import_html_entities11 = __toESM(require_html_entities(), 1);
  var import_i18n187 = __toESM(require_i18n(), 1);
  var import_blocks82 = __toESM(require_blocks(), 1);
  var getEntitiesInfo = (entities) => {
    const mapping = entities?.reduce(
      (accumulator, entity) => {
        const { mapById, mapByName, names } = accumulator;
        mapById[entity.id] = entity;
        mapByName[entity.name] = entity;
        names.push(entity.name);
        return accumulator;
      },
      { mapById: {}, mapByName: {}, names: [] }
    );
    return {
      entities,
      ...mapping
    };
  };
  var getValueFromObjectPath2 = (object, path) => {
    const normalizedPath = path.split(".");
    let value = object;
    normalizedPath.forEach((fieldName) => {
      value = value?.[fieldName];
    });
    return value;
  };
  var mapToIHasNameAndId = (entities, path) => {
    return (entities || []).map((entity) => ({
      ...entity,
      name: (0, import_html_entities11.decodeEntities)(getValueFromObjectPath2(entity, path))
    }));
  };
  var usePostTypes = () => {
    const postTypes = (0, import_data117.useSelect)((select10) => {
      const { getPostTypes } = select10(import_core_data72.store);
      const excludedPostTypes = ["attachment"];
      const filteredPostTypes = getPostTypes({ per_page: -1 })?.filter(
        ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
      );
      return filteredPostTypes;
    }, []);
    const postTypesTaxonomiesMap = (0, import_element130.useMemo)(() => {
      if (!postTypes?.length) {
        return;
      }
      return postTypes.reduce((accumulator, type) => {
        accumulator[type.slug] = type.taxonomies;
        return accumulator;
      }, {});
    }, [postTypes]);
    const postTypesSelectOptions = (0, import_element130.useMemo)(
      () => (postTypes || []).map(({ labels, slug }) => ({
        label: labels.singular_name,
        value: slug
      })),
      [postTypes]
    );
    const postTypeFormatSupportMap = (0, import_element130.useMemo)(() => {
      if (!postTypes?.length) {
        return {};
      }
      return postTypes.reduce((accumulator, type) => {
        accumulator[type.slug] = type.supports?.["post-formats"] || false;
        return accumulator;
      }, {});
    }, [postTypes]);
    return {
      postTypesTaxonomiesMap,
      postTypesSelectOptions,
      postTypeFormatSupportMap
    };
  };
  var useTaxonomies = (postType) => {
    const taxonomies = (0, import_data117.useSelect)(
      (select10) => {
        const { getTaxonomies, getPostType } = select10(import_core_data72.store);
        if (getPostType(postType)?.taxonomies?.length > 0) {
          return getTaxonomies({
            type: postType,
            per_page: -1
          });
        }
        return [];
      },
      [postType]
    );
    return (0, import_element130.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => !!visibility?.publicly_queryable
      );
    }, [taxonomies]);
  };
  function useIsPostTypeHierarchical(postType) {
    return (0, import_data117.useSelect)(
      (select10) => {
        const type = select10(import_core_data72.store).getPostType(postType);
        return type?.viewable && type?.hierarchical;
      },
      [postType]
    );
  }
  function useOrderByOptions(postType) {
    const supportsCustomOrder = (0, import_data117.useSelect)(
      (select10) => {
        const type = select10(import_core_data72.store).getPostType(postType);
        return !!type?.supports?.["page-attributes"];
      },
      [postType]
    );
    return (0, import_element130.useMemo)(() => {
      const orderByOptions = [
        {
          label: (0, import_i18n187.__)("Newest to oldest"),
          value: "date/desc"
        },
        {
          label: (0, import_i18n187.__)("Oldest to newest"),
          value: "date/asc"
        },
        {
          /* translators: Label for ordering posts by title in ascending order. */
          label: (0, import_i18n187.__)("A \u2192 Z"),
          value: "title/asc"
        },
        {
          /* translators: Label for ordering posts by title in descending order. */
          label: (0, import_i18n187.__)("Z \u2192 A"),
          value: "title/desc"
        }
      ];
      if (supportsCustomOrder) {
        orderByOptions.push(
          {
            /* translators: Label for ordering posts by ascending menu order. */
            label: (0, import_i18n187.__)("Ascending by order"),
            value: "menu_order/asc"
          },
          {
            /* translators: Label for ordering posts by descending menu order. */
            label: (0, import_i18n187.__)("Descending by order"),
            value: "menu_order/desc"
          }
        );
      }
      return orderByOptions;
    }, [supportsCustomOrder]);
  }
  function useAllowedControls(attributes2) {
    return (0, import_data117.useSelect)(
      (select10) => select10(import_blocks82.store).getActiveBlockVariation(
        "core/query",
        attributes2
      )?.allowedControls,
      [attributes2]
    );
  }
  function isControlAllowed(allowedControls, key) {
    if (!allowedControls) {
      return true;
    }
    return allowedControls.includes(key);
  }
  var getTransformedBlocksFromPattern = (blocks, queryBlockAttributes) => {
    const {
      query: { postType, inherit },
      namespace
    } = queryBlockAttributes;
    const clonedBlocks = blocks.map((block) => (0, import_blocks82.cloneBlock)(block));
    const queryClientIds = [];
    const blocksQueue = [...clonedBlocks];
    while (blocksQueue.length > 0) {
      const block = blocksQueue.shift();
      if (block.name === "core/query") {
        block.attributes.query = {
          ...block.attributes.query,
          postType,
          inherit
        };
        if (namespace) {
          block.attributes.namespace = namespace;
        }
        queryClientIds.push(block.clientId);
      }
      block.innerBlocks?.forEach((innerBlock) => {
        blocksQueue.push(innerBlock);
      });
    }
    return { newBlocks: clonedBlocks, queryClientIds };
  };
  function useBlockNameForPatterns(clientId, attributes2) {
    return (0, import_data117.useSelect)(
      (select10) => {
        const activeVariationName = select10(
          import_blocks82.store
        ).getActiveBlockVariation("core/query", attributes2)?.name;
        if (!activeVariationName) {
          return "core/query";
        }
        const { getBlockRootClientId, getPatternsByBlockTypes } = select10(import_block_editor204.store);
        const rootClientId = getBlockRootClientId(clientId);
        const activePatterns = getPatternsByBlockTypes(
          `core/query/${activeVariationName}`,
          rootClientId
        );
        return activePatterns.length > 0 ? `core/query/${activeVariationName}` : "core/query";
      },
      [clientId, attributes2]
    );
  }
  function useScopedBlockVariations(attributes2) {
    const { activeVariationName, blockVariations } = (0, import_data117.useSelect)(
      (select10) => {
        const { getActiveBlockVariation, getBlockVariations: getBlockVariations4 } = select10(import_blocks82.store);
        return {
          activeVariationName: getActiveBlockVariation(
            "core/query",
            attributes2
          )?.name,
          blockVariations: getBlockVariations4("core/query", "block")
        };
      },
      [attributes2]
    );
    const variations19 = (0, import_element130.useMemo)(() => {
      const isNotConnected = (variation) => !variation.attributes?.namespace;
      if (!activeVariationName) {
        return blockVariations.filter(isNotConnected);
      }
      const connectedVariations = blockVariations.filter(
        (variation) => variation.attributes?.namespace?.includes(activeVariationName)
      );
      if (!!connectedVariations.length) {
        return connectedVariations;
      }
      return blockVariations.filter(isNotConnected);
    }, [activeVariationName, blockVariations]);
    return variations19;
  }
  var usePatterns = (clientId, name118) => {
    return (0, import_data117.useSelect)(
      (select10) => {
        const { getBlockRootClientId, getPatternsByBlockTypes } = select10(import_block_editor204.store);
        const rootClientId = getBlockRootClientId(clientId);
        return getPatternsByBlockTypes(name118, rootClientId);
      },
      [name118, clientId]
    );
  };
  var useUnsupportedBlocks = (clientId) => {
    return (0, import_data117.useSelect)(
      (select10) => {
        const { getClientIdsOfDescendants, getBlockName } = select10(import_block_editor204.store);
        const { getBlockSupport: getBlockSupport2, getBlockType: getBlockType6 } = select10(import_blocks82.store);
        const blockTitles = /* @__PURE__ */ new Set();
        getClientIdsOfDescendants(clientId).forEach(
          (descendantClientId) => {
            const blockName = getBlockName(descendantClientId);
            const blockSupportsInteractivity = Object.is(
              getBlockSupport2(blockName, "interactivity"),
              true
            );
            const blockSupportsInteractivityClientNavigation = getBlockSupport2(
              blockName,
              "interactivity.clientNavigation"
            );
            if (!blockSupportsInteractivity && !blockSupportsInteractivityClientNavigation) {
              blockTitles.add(
                getBlockType6(blockName)?.title || blockName
              );
            }
          }
        );
        return [...blockTitles];
      },
      [clientId]
    );
  };
  function getQueryContextFromTemplate(templateSlug) {
    if (!templateSlug) {
      return { isSingular: true };
    }
    let isSingular = false;
    let templateType = templateSlug === "wp" ? "custom" : templateSlug;
    const singularTemplates = ["404", "blank", "single", "page", "custom"];
    const templateTypeFromSlug = templateSlug.includes("-") ? templateSlug.split("-", 1)[0] : templateSlug;
    const queryFromTemplateSlug = templateSlug.includes("-") ? templateSlug.split("-").slice(1).join("-") : "";
    if (queryFromTemplateSlug) {
      templateType = templateTypeFromSlug;
    }
    isSingular = singularTemplates.includes(templateType);
    return { isSingular, templateType };
  }

  // packages/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs
  var import_jsx_runtime416 = __toESM(require_jsx_runtime(), 1);
  function EnhancedPaginationControl({
    enhancedPagination,
    setAttributes,
    clientId
  }) {
    const unsupportedBlocks = useUnsupportedBlocks(clientId);
    let help = (0, import_i18n188.__)(
      "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages."
    );
    if (unsupportedBlocks.length) {
      help = (0, import_i18n188.sprintf)(
        /* translators: %s: A list of block titles. */
        (0, import_i18n188.__)(
          `Some blocks aren't supported: %s. Remove them to change this setting.`
        ),
        unsupportedBlocks.join(
          /* translators: Used between list items, there is a space after the comma. */
          (0, import_i18n188.__)(", ")
          // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
        )
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(import_jsx_runtime416.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime416.jsx)(
      import_components115.ToggleControl,
      {
        label: (0, import_i18n188.__)("Reload full page"),
        help,
        checked: !enhancedPagination,
        disabled: !!unsupportedBlocks.length,
        onChange: (value) => {
          setAttributes({
            enhancedPagination: !value
          });
        }
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/inspector-controls/index.mjs
  var import_components125 = __toESM(require_components(), 1);
  var import_data122 = __toESM(require_data(), 1);
  var import_core_data77 = __toESM(require_core_data(), 1);
  var import_i18n198 = __toESM(require_i18n(), 1);
  var import_compose54 = __toESM(require_compose(), 1);
  var import_element133 = __toESM(require_element(), 1);

  // packages/block-library/build-module/query/edit/inspector-controls/order-control.mjs
  var import_components116 = __toESM(require_components(), 1);
  var import_i18n189 = __toESM(require_i18n(), 1);
  var import_jsx_runtime417 = __toESM(require_jsx_runtime(), 1);
  var defaultOrderByOptions = [
    {
      label: (0, import_i18n189.__)("Newest to oldest"),
      value: "date/desc"
    },
    {
      label: (0, import_i18n189.__)("Oldest to newest"),
      value: "date/asc"
    },
    {
      /* translators: Label for ordering posts by title in ascending order. */
      label: (0, import_i18n189.__)("A \u2192 Z"),
      value: "title/asc"
    },
    {
      /* translators: Label for ordering posts by title in descending order. */
      label: (0, import_i18n189.__)("Z \u2192 A"),
      value: "title/desc"
    }
  ];
  function OrderControl2({
    order,
    orderBy,
    orderByOptions = defaultOrderByOptions,
    onChange
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime417.jsx)(
      import_components116.SelectControl,
      {
        label: (0, import_i18n189.__)("Order by"),
        value: `${orderBy}/${order}`,
        options: orderByOptions,
        onChange: (value) => {
          const [newOrderBy, newOrder] = value.split("/");
          onChange({ order: newOrder, orderBy: newOrderBy });
        }
      }
    );
  }
  var order_control_default = OrderControl2;

  // packages/block-library/build-module/query/edit/inspector-controls/author-control.mjs
  var import_i18n190 = __toESM(require_i18n(), 1);
  var import_components117 = __toESM(require_components(), 1);
  var import_data118 = __toESM(require_data(), 1);
  var import_core_data73 = __toESM(require_core_data(), 1);
  var import_jsx_runtime418 = __toESM(require_jsx_runtime(), 1);
  var AUTHORS_QUERY3 = {
    who: "authors",
    per_page: -1,
    _fields: "id,name",
    context: "view"
  };
  function AuthorControl({ value, onChange }) {
    const authorsList = (0, import_data118.useSelect)((select10) => {
      const { getUsers } = select10(import_core_data73.store);
      return getUsers(AUTHORS_QUERY3);
    }, []);
    if (!authorsList) {
      return null;
    }
    const authorsInfo = getEntitiesInfo(authorsList);
    const normalizedValue = !value ? [] : value.toString().split(",");
    const sanitizedValue = normalizedValue.reduce(
      (accumulator, authorId) => {
        const author = authorsInfo.mapById[authorId];
        if (author) {
          accumulator.push({
            id: authorId,
            value: author.name
          });
        }
        return accumulator;
      },
      []
    );
    const getIdByValue = (entitiesMappedByName, authorValue) => {
      const id = authorValue?.id || entitiesMappedByName[authorValue]?.id;
      if (id) {
        return id;
      }
    };
    const onAuthorChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, author) => {
          const id = getIdByValue(authorsInfo.mapByName, author);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      onChange({ author: ids.join(",") });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime418.jsx)(
      import_components117.FormTokenField,
      {
        label: (0, import_i18n190.__)("Authors"),
        value: sanitizedValue,
        suggestions: authorsInfo.names,
        onChange: onAuthorChange,
        help: ""
      }
    );
  }
  var author_control_default = AuthorControl;

  // packages/block-library/build-module/query/edit/inspector-controls/parent-control.mjs
  var import_i18n191 = __toESM(require_i18n(), 1);
  var import_components118 = __toESM(require_components(), 1);
  var import_data119 = __toESM(require_data(), 1);
  var import_core_data74 = __toESM(require_core_data(), 1);
  var import_element131 = __toESM(require_element(), 1);
  var import_compose52 = __toESM(require_compose(), 1);
  var import_jsx_runtime419 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY7 = [];
  var BASE_QUERY = {
    order: "asc",
    _fields: "id,title",
    context: "view"
  };
  function ParentControl({ parents, postType, onChange }) {
    const [search, setSearch] = (0, import_element131.useState)("");
    const [value, setValue] = (0, import_element131.useState)(EMPTY_ARRAY7);
    const [suggestions, setSuggestions] = (0, import_element131.useState)(EMPTY_ARRAY7);
    const debouncedSearch = (0, import_compose52.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data119.useSelect)(
      (select10) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY7, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select10(import_core_data74.store);
        const selectorArgs = [
          "postType",
          postType,
          {
            ...BASE_QUERY,
            search,
            orderby: "relevance",
            exclude: parents,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, postType, parents]
    );
    const currentParents = (0, import_data119.useSelect)(
      (select10) => {
        if (!parents?.length) {
          return EMPTY_ARRAY7;
        }
        const { getEntityRecords } = select10(import_core_data74.store);
        return getEntityRecords("postType", postType, {
          ...BASE_QUERY,
          include: parents,
          per_page: parents.length
        });
      },
      [parents, postType]
    );
    (0, import_element131.useEffect)(() => {
      if (!parents?.length) {
        setValue(EMPTY_ARRAY7);
      }
      if (!currentParents?.length) {
        return;
      }
      const currentParentsInfo = getEntitiesInfo(
        mapToIHasNameAndId(currentParents, "title.rendered")
      );
      const sanitizedValue = parents.reduce((accumulator, id) => {
        const entity = currentParentsInfo.mapById[id];
        if (entity) {
          accumulator.push({
            id,
            value: entity.name
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [parents, currentParents]);
    const entitiesInfo = (0, import_element131.useMemo)(() => {
      if (!searchResults?.length) {
        return EMPTY_ARRAY7;
      }
      return getEntitiesInfo(
        mapToIHasNameAndId(searchResults, "title.rendered")
      );
    }, [searchResults]);
    (0, import_element131.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(entitiesInfo.names);
    }, [entitiesInfo.names, searchHasResolved]);
    const getIdByValue = (entitiesMappedByName, entity) => {
      const id = entity?.id || entitiesMappedByName?.[entity]?.id;
      if (id) {
        return id;
      }
    };
    const onParentChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, entity) => {
          const id = getIdByValue(entitiesInfo.mapByName, entity);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      setSuggestions(EMPTY_ARRAY7);
      onChange({ parents: ids });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime419.jsx)(
      import_components118.FormTokenField,
      {
        label: (0, import_i18n191.__)("Parents"),
        value,
        onInputChange: debouncedSearch,
        suggestions,
        onChange: onParentChange,
        help: ""
      }
    );
  }
  var parent_control_default = ParentControl;

  // packages/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.mjs
  var import_components119 = __toESM(require_components(), 1);
  var import_data120 = __toESM(require_data(), 1);
  var import_core_data75 = __toESM(require_core_data(), 1);
  var import_element132 = __toESM(require_element(), 1);
  var import_compose53 = __toESM(require_compose(), 1);
  var import_html_entities12 = __toESM(require_html_entities(), 1);
  var import_i18n192 = __toESM(require_i18n(), 1);
  var import_jsx_runtime420 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY8 = [];
  var BASE_QUERY2 = {
    order: "asc",
    _fields: "id,name",
    context: "view"
  };
  var getTermIdByTermValue = (terms, termValue) => {
    const termId = termValue?.id || terms?.find((term) => term.name === termValue)?.id;
    if (termId) {
      return termId;
    }
    const termValueLower = termValue.toLocaleLowerCase();
    return terms?.find(
      (term) => term.name.toLocaleLowerCase() === termValueLower
    )?.id;
  };
  function TaxonomyControls({ onChange, query }) {
    const { postType, taxQuery } = query;
    const taxonomies = useTaxonomies(postType);
    if (!taxonomies?.length) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(import_components119.__experimentalVStack, { spacing: 4, children: taxonomies.map((taxonomy) => {
      const includeTermIds = taxQuery?.include?.[taxonomy.slug] || [];
      const excludeTermIds = taxQuery?.exclude?.[taxonomy.slug] || [];
      const onChangeTaxQuery = (newTermIds, key) => {
        const newPartialTaxQuery = {
          ...taxQuery?.[key],
          [taxonomy.slug]: newTermIds
        };
        if (!newTermIds.length) {
          delete newPartialTaxQuery[taxonomy.slug];
        }
        const newTaxQuery = {
          ...taxQuery,
          [key]: !!Object.keys(newPartialTaxQuery).length ? newPartialTaxQuery : void 0
        };
        onChange({
          // Clean up `taxQuery` if all filters are removed.
          taxQuery: Object.values(newTaxQuery).every(
            (value) => !value
          ) ? void 0 : newTaxQuery
        });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime420.jsxs)(import_element132.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
          TaxonomyItem,
          {
            taxonomy,
            termIds: includeTermIds,
            oppositeTermIds: excludeTermIds,
            onChange: (value) => onChangeTaxQuery(value, "include"),
            label: taxonomy.name
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
          TaxonomyItem,
          {
            taxonomy,
            termIds: excludeTermIds,
            oppositeTermIds: includeTermIds,
            onChange: (value) => onChangeTaxQuery(value, "exclude"),
            label: (
              /* translators: %s: taxonomy name */
              (0, import_i18n192.sprintf)((0, import_i18n192.__)("Exclude: %s"), taxonomy.name)
            )
          }
        )
      ] }, taxonomy.slug);
    }) });
  }
  function TaxonomyItem({
    taxonomy,
    termIds,
    oppositeTermIds,
    onChange,
    label
  }) {
    const [search, setSearch] = (0, import_element132.useState)("");
    const [value, setValue] = (0, import_element132.useState)(EMPTY_ARRAY8);
    const [suggestions, setSuggestions] = (0, import_element132.useState)(EMPTY_ARRAY8);
    const debouncedSearch = (0, import_compose53.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data120.useSelect)(
      (select10) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY8, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select10(import_core_data75.store);
        const combinedExclude = [...termIds, ...oppositeTermIds];
        const selectorArgs = [
          "taxonomy",
          taxonomy.slug,
          {
            ...BASE_QUERY2,
            search,
            orderby: "name",
            exclude: combinedExclude,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, taxonomy.slug, termIds, oppositeTermIds]
    );
    const existingTerms = (0, import_data120.useSelect)(
      (select10) => {
        if (!termIds?.length) {
          return EMPTY_ARRAY8;
        }
        const { getEntityRecords } = select10(import_core_data75.store);
        return getEntityRecords("taxonomy", taxonomy.slug, {
          ...BASE_QUERY2,
          include: termIds,
          per_page: termIds.length
        });
      },
      [taxonomy.slug, termIds]
    );
    (0, import_element132.useEffect)(() => {
      if (!termIds?.length) {
        setValue(EMPTY_ARRAY8);
      }
      if (!existingTerms?.length) {
        return;
      }
      const sanitizedValue = termIds.reduce((accumulator, id) => {
        const entity = existingTerms.find((term) => term.id === id);
        if (entity) {
          accumulator.push({
            id,
            value: entity.name
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [termIds, existingTerms]);
    (0, import_element132.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(searchResults.map((result) => result.name));
    }, [searchResults, searchHasResolved]);
    const onTermsChange = (newTermValues) => {
      const newTermIds = /* @__PURE__ */ new Set();
      for (const termValue of newTermValues) {
        const termId = getTermIdByTermValue(searchResults, termValue);
        if (termId) {
          newTermIds.add(termId);
        }
      }
      setSuggestions(EMPTY_ARRAY8);
      onChange(Array.from(newTermIds));
    };
    return /* @__PURE__ */ (0, import_jsx_runtime420.jsx)("div", { className: "block-library-query-inspector__taxonomy-control", children: /* @__PURE__ */ (0, import_jsx_runtime420.jsx)(
      import_components119.FormTokenField,
      {
        label,
        value,
        onInputChange: debouncedSearch,
        suggestions,
        displayTransform: import_html_entities12.decodeEntities,
        onChange: onTermsChange,
        help: ""
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/inspector-controls/format-controls.mjs
  var import_components120 = __toESM(require_components(), 1);
  var import_data121 = __toESM(require_data(), 1);
  var import_core_data76 = __toESM(require_core_data(), 1);
  var import_i18n193 = __toESM(require_i18n(), 1);
  var import_jsx_runtime421 = __toESM(require_jsx_runtime(), 1);
  var POST_FORMATS = [
    { value: "aside", label: (0, import_i18n193.__)("Aside") },
    { value: "audio", label: (0, import_i18n193.__)("Audio") },
    { value: "chat", label: (0, import_i18n193.__)("Chat") },
    { value: "gallery", label: (0, import_i18n193.__)("Gallery") },
    { value: "image", label: (0, import_i18n193.__)("Image") },
    { value: "link", label: (0, import_i18n193.__)("Link") },
    { value: "quote", label: (0, import_i18n193.__)("Quote") },
    { value: "standard", label: (0, import_i18n193.__)("Standard") },
    { value: "status", label: (0, import_i18n193.__)("Status") },
    { value: "video", label: (0, import_i18n193.__)("Video") }
  ].sort((a, b) => {
    const normalizedA = a.label.toUpperCase();
    const normalizedB = b.label.toUpperCase();
    if (normalizedA < normalizedB) {
      return -1;
    }
    if (normalizedA > normalizedB) {
      return 1;
    }
    return 0;
  });
  function formatNamesToValues(names, formats) {
    return names.map((name118) => {
      return formats.find(
        (item) => item.label.toLocaleLowerCase() === name118.toLocaleLowerCase()
      )?.value;
    }).filter(Boolean);
  }
  function FormatControls({ onChange, query: { format: format3 } }) {
    const normalizedFormats = Array.isArray(format3) ? format3 : [format3];
    const { supportedFormats } = (0, import_data121.useSelect)((select10) => {
      const themeSupports = select10(import_core_data76.store).getThemeSupports();
      return {
        supportedFormats: themeSupports.formats
      };
    }, []);
    const formats = POST_FORMATS.filter(
      (item) => supportedFormats.includes(item.value)
    );
    const values = normalizedFormats.map(
      (name118) => formats.find((item) => item.value === name118)?.label
    ).filter(Boolean);
    const suggestions = formats.filter((item) => !normalizedFormats.includes(item.value)).map((item) => item.label);
    return /* @__PURE__ */ (0, import_jsx_runtime421.jsx)(
      import_components120.FormTokenField,
      {
        label: (0, import_i18n193.__)("Formats"),
        value: values,
        suggestions,
        onChange: (newValues) => {
          onChange({
            format: formatNamesToValues(newValues, formats)
          });
        },
        help: "",
        __experimentalExpandOnFocus: true
      }
    );
  }

  // packages/block-library/build-module/query/edit/inspector-controls/sticky-control.mjs
  var import_components121 = __toESM(require_components(), 1);
  var import_i18n194 = __toESM(require_i18n(), 1);
  var import_jsx_runtime422 = __toESM(require_jsx_runtime(), 1);
  var stickyOptions = [
    { label: (0, import_i18n194.__)("Include"), value: "" },
    { label: (0, import_i18n194.__)("Ignore"), value: "ignore" },
    { label: (0, import_i18n194.__)("Exclude"), value: "exclude" },
    { label: (0, import_i18n194.__)("Only"), value: "only" }
  ];
  function StickyControl({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime422.jsx)(
      import_components121.SelectControl,
      {
        label: (0, import_i18n194.__)("Sticky posts"),
        options: stickyOptions,
        value,
        onChange,
        help: (0, import_i18n194.__)(
          "Sticky posts always appear first, regardless of their publish date."
        )
      }
    );
  }

  // packages/block-library/build-module/query/edit/inspector-controls/per-page-control.mjs
  var import_components122 = __toESM(require_components(), 1);
  var import_i18n195 = __toESM(require_i18n(), 1);
  var import_jsx_runtime423 = __toESM(require_jsx_runtime(), 1);
  var MIN_POSTS_PER_PAGE = 1;
  var MAX_POSTS_PER_PAGE = 100;
  var PerPageControl = ({ perPage, offset = 0, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime423.jsx)(
      import_components122.RangeControl,
      {
        label: (0, import_i18n195.__)("Items per page"),
        min: MIN_POSTS_PER_PAGE,
        max: MAX_POSTS_PER_PAGE,
        onChange: (newPerPage) => {
          if (isNaN(newPerPage) || newPerPage < MIN_POSTS_PER_PAGE || newPerPage > MAX_POSTS_PER_PAGE) {
            return;
          }
          onChange({ perPage: newPerPage, offset });
        },
        value: parseInt(perPage, 10)
      }
    );
  };
  var per_page_control_default = PerPageControl;

  // packages/block-library/build-module/query/edit/inspector-controls/offset-controls.mjs
  var import_components123 = __toESM(require_components(), 1);
  var import_i18n196 = __toESM(require_i18n(), 1);
  var import_jsx_runtime424 = __toESM(require_jsx_runtime(), 1);
  var MIN_OFFSET = 0;
  var MAX_OFFSET = 100;
  var OffsetControl = ({ offset = 0, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime424.jsx)(
      import_components123.__experimentalNumberControl,
      {
        label: (0, import_i18n196._x)("Offset", "Number of posts to skip in a query"),
        value: offset,
        min: MIN_OFFSET,
        onChange: (newOffset) => {
          if (isNaN(newOffset) || newOffset < MIN_OFFSET || newOffset > MAX_OFFSET) {
            return;
          }
          onChange({ offset: newOffset });
        }
      }
    );
  };
  var offset_controls_default = OffsetControl;

  // packages/block-library/build-module/query/edit/inspector-controls/pages-control.mjs
  var import_components124 = __toESM(require_components(), 1);
  var import_i18n197 = __toESM(require_i18n(), 1);
  var import_jsx_runtime425 = __toESM(require_jsx_runtime(), 1);
  var PagesControl = ({ pages, onChange }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime425.jsx)(
      import_components124.__experimentalNumberControl,
      {
        label: (0, import_i18n197.__)("Max pages to show"),
        value: pages,
        min: 0,
        onChange: (newPages) => {
          if (isNaN(newPages) || newPages < 0) {
            return;
          }
          onChange({ pages: newPages });
        },
        help: (0, import_i18n197.__)(
          "Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero)."
        )
      }
    );
  };
  var pages_control_default = PagesControl;

  // packages/block-library/build-module/query/edit/inspector-controls/index.mjs
  var import_jsx_runtime426 = __toESM(require_jsx_runtime(), 1);
  function QueryInspectorControls(props) {
    const { attributes: attributes2, setQuery, isSingular, shouldExcludeCurrentPost } = props;
    const { query } = attributes2;
    const {
      order,
      orderBy,
      author: authorIds,
      pages,
      // Match `build_query_vars_from_query_block()`, which queries posts when
      // `query` has no post type.
      postType = "post",
      perPage,
      offset,
      sticky,
      inherit,
      taxQuery,
      parents,
      format: format3,
      excludeCurrent
    } = query;
    const allowedControls = useAllowedControls(attributes2);
    const showSticky = postType === "post";
    const {
      postTypesTaxonomiesMap,
      postTypesSelectOptions,
      postTypeFormatSupportMap
    } = usePostTypes();
    const taxonomies = useTaxonomies(postType);
    const isPostTypeHierarchical = useIsPostTypeHierarchical(postType);
    const onPostTypeChange = (newValue) => {
      const updateQuery = { postType: newValue };
      const supportedTaxonomies = postTypesTaxonomiesMap[newValue];
      if (!!supportedTaxonomies?.length && !!taxQuery) {
        const buildTaxQuery = (_taxQuery) => {
          return Object.entries(_taxQuery || {}).reduce(
            (accumulator, [taxonomy, terms]) => {
              if (supportedTaxonomies.includes(taxonomy)) {
                accumulator[taxonomy] = terms;
              }
              return accumulator;
            },
            {}
          );
        };
        const updatedTaxQuery = {};
        const builtIncludeTaxQuery = buildTaxQuery(taxQuery.include);
        if (!!Object.keys(builtIncludeTaxQuery).length) {
          updatedTaxQuery.include = builtIncludeTaxQuery;
        }
        const builtExcludeTaxQuery = buildTaxQuery(taxQuery.exclude);
        if (!!Object.keys(builtExcludeTaxQuery).length) {
          updatedTaxQuery.exclude = builtExcludeTaxQuery;
        }
        updateQuery.taxQuery = !!Object.keys(updatedTaxQuery).length ? updatedTaxQuery : void 0;
      }
      if (newValue !== "post") {
        updateQuery.sticky = "";
      }
      updateQuery.parents = [];
      const hasFormatSupport = postTypeFormatSupportMap[newValue];
      if (!hasFormatSupport) {
        updateQuery.format = [];
      }
      setQuery(updateQuery);
    };
    const [querySearch, setQuerySearch] = (0, import_element133.useState)(query.search);
    const debouncedQuerySearch = (0, import_element133.useMemo)(() => {
      return (0, import_compose54.debounce)((newQuerySearch) => {
        setQuery({ search: newQuerySearch });
      }, 250);
    }, [setQuery]);
    const orderByOptions = useOrderByOptions(postType);
    const showInheritControl = isControlAllowed(allowedControls, "inherit");
    const showPostTypeControl = !inherit && isControlAllowed(allowedControls, "postType");
    const postTypeControlLabel = (0, import_i18n198.__)("Post type");
    const postTypeControlHelp = (0, import_i18n198.__)(
      "Select the type of content to display: posts, pages, or custom post types."
    );
    const showOrderControl = !inherit && isControlAllowed(allowedControls, "order");
    const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, "sticky");
    const showSettingsPanel = showInheritControl || showPostTypeControl || showOrderControl || showStickyControl;
    const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, "taxQuery");
    const showAuthorControl = isControlAllowed(allowedControls, "author");
    const showSearchControl = isControlAllowed(allowedControls, "search");
    const showParentControl = isControlAllowed(allowedControls, "parents") && isPostTypeHierarchical;
    const postTypeHasFormatSupport = postTypeFormatSupportMap[postType];
    const showFormatControl = (0, import_data122.useSelect)(
      (select10) => {
        if (!postTypeHasFormatSupport || !isControlAllowed(allowedControls, "format")) {
          return false;
        }
        const themeSupports = select10(import_core_data77.store).getThemeSupports();
        return themeSupports.formats && themeSupports.formats.length > 0 && themeSupports.formats.some((type) => type !== "standard");
      },
      [allowedControls, postTypeHasFormatSupport]
    );
    const showExcludeCurrentControl = shouldExcludeCurrentPost && isControlAllowed(allowedControls, "excludeCurrent");
    const postTypeSingularName = (0, import_data122.useSelect)(
      (select10) => select10(import_core_data77.store).getPostType(postType)?.labels?.singular_name,
      [postType]
    );
    const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl || showExcludeCurrentControl;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const showPostCountControl = isControlAllowed(
      allowedControls,
      "postCount"
    );
    const showOffSetControl = isControlAllowed(allowedControls, "offset");
    const showPagesControl = isControlAllowed(allowedControls, "pages");
    const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl;
    const hasInheritanceWarning = isSingular && inherit;
    return /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(import_jsx_runtime426.Fragment, { children: [
      showSettingsPanel && /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(
        import_components125.__experimentalToolsPanel,
        {
          label: (0, import_i18n198.__)("Settings"),
          resetAll: () => {
            setQuery({
              postType: "post",
              order: "desc",
              orderBy: "date",
              sticky: "",
              inherit: true
            });
          },
          dropdownMenuProps,
          children: [
            showInheritControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !inherit,
                label: (0, import_i18n198.__)("Query type"),
                onDeselect: () => setQuery({ inherit: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(import_components125.__experimentalVStack, { spacing: 4, children: [
                  /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(
                    import_components125.__experimentalToggleGroupControl,
                    {
                      label: (0, import_i18n198.__)("Query type"),
                      isBlock: true,
                      onChange: (value) => {
                        setQuery({
                          inherit: value === "default"
                        });
                      },
                      help: inherit ? (0, import_i18n198.__)(
                        "Display a list of posts or custom post types based on the current template."
                      ) : (0, import_i18n198.__)(
                        "Display a list of posts or custom post types based on specific criteria."
                      ),
                      value: !!inherit ? "default" : "custom",
                      children: [
                        /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                          import_components125.__experimentalToggleGroupControlOption,
                          {
                            value: "default",
                            label: (0, import_i18n198.__)("Default")
                          }
                        ),
                        /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                          import_components125.__experimentalToggleGroupControlOption,
                          {
                            value: "custom",
                            label: (0, import_i18n198.__)("Custom")
                          }
                        )
                      ]
                    }
                  ),
                  hasInheritanceWarning && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                    import_components125.Notice,
                    {
                      status: "warning",
                      isDismissible: false,
                      children: (0, import_i18n198.__)(
                        "Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank)."
                      )
                    }
                  )
                ] })
              }
            ),
            showPostTypeControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => postType !== "post",
                label: postTypeControlLabel,
                onDeselect: () => onPostTypeChange("post"),
                isShownByDefault: true,
                children: postTypesSelectOptions.length > 2 ? /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  import_components125.SelectControl,
                  {
                    options: postTypesSelectOptions,
                    value: postType,
                    label: postTypeControlLabel,
                    onChange: onPostTypeChange,
                    help: postTypeControlHelp
                  }
                ) : /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  import_components125.__experimentalToggleGroupControl,
                  {
                    isBlock: true,
                    value: postType,
                    label: postTypeControlLabel,
                    onChange: onPostTypeChange,
                    help: postTypeControlHelp,
                    children: postTypesSelectOptions.map(
                      (option) => /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                        import_components125.__experimentalToggleGroupControlOption,
                        {
                          value: option.value,
                          label: option.label
                        },
                        option.value
                      )
                    )
                  }
                )
              }
            ),
            showOrderControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => order !== "desc" || orderBy !== "date",
                label: (0, import_i18n198.__)("Order by"),
                onDeselect: () => setQuery({ order: "desc", orderBy: "date" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  order_control_default,
                  {
                    ...{ order, orderBy, orderByOptions },
                    onChange: setQuery
                  }
                )
              }
            ),
            showStickyControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !!sticky,
                label: (0, import_i18n198.__)("Sticky posts"),
                onDeselect: () => setQuery({ sticky: "" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  StickyControl,
                  {
                    value: sticky,
                    onChange: (value) => setQuery({ sticky: value })
                  }
                )
              }
            )
          ]
        }
      ),
      !inherit && showDisplayPanel && /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(
        import_components125.__experimentalToolsPanel,
        {
          className: "block-library-query-toolspanel__display",
          label: (0, import_i18n198.__)("Display"),
          resetAll: () => {
            setQuery({
              offset: 0,
              pages: 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n198.__)("Items per page"),
                hasValue: () => perPage > 0,
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  per_page_control_default,
                  {
                    perPage,
                    offset,
                    onChange: setQuery
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n198._x)(
                  "Offset",
                  "Number of posts to skip in a query"
                ),
                hasValue: () => offset > 0,
                onDeselect: () => setQuery({ offset: 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  offset_controls_default,
                  {
                    offset,
                    onChange: setQuery
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n198.__)("Max pages to show"),
                hasValue: () => pages > 0,
                onDeselect: () => setQuery({ pages: 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(pages_control_default, { pages, onChange: setQuery })
              }
            )
          ]
        }
      ),
      !inherit && showFiltersPanel && /* @__PURE__ */ (0, import_jsx_runtime426.jsxs)(
        import_components125.__experimentalToolsPanel,
        {
          className: "block-library-query-toolspanel__filters",
          label: (0, import_i18n198.__)("Filters"),
          resetAll: () => {
            setQuery({
              author: "",
              parents: [],
              search: "",
              taxQuery: null,
              format: [],
              excludeCurrent: null
            });
            setQuerySearch("");
          },
          dropdownMenuProps,
          children: [
            showTaxControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n198.__)("Taxonomies"),
                hasValue: () => Object.values(taxQuery || {}).some(
                  (value) => Object.values(value || {}).some(
                    (termIds) => !!termIds?.length
                  )
                ),
                onDeselect: () => setQuery({ taxQuery: null }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  TaxonomyControls,
                  {
                    onChange: setQuery,
                    query
                  }
                )
              }
            ),
            showAuthorControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !!authorIds,
                label: (0, import_i18n198.__)("Authors"),
                onDeselect: () => setQuery({ author: "" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  author_control_default,
                  {
                    value: authorIds,
                    onChange: setQuery
                  }
                )
              }
            ),
            showSearchControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !!querySearch,
                label: (0, import_i18n198.__)("Search terms"),
                onDeselect: () => {
                  setQuery({ search: "" });
                  setQuerySearch("");
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  import_components125.TextControl,
                  {
                    label: (0, import_i18n198.__)("Search terms"),
                    help: (0, import_i18n198.__)(
                      "Filter the query by keywords that appear in the content, title, or excerpt."
                    ),
                    value: querySearch,
                    onChange: (newQuerySearch) => {
                      debouncedQuerySearch(newQuerySearch);
                      setQuerySearch(newQuerySearch);
                    }
                  }
                )
              }
            ),
            showParentControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !!parents?.length,
                label: (0, import_i18n198.__)("Parents"),
                onDeselect: () => setQuery({ parents: [] }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  parent_control_default,
                  {
                    parents,
                    postType,
                    onChange: setQuery
                  }
                )
              }
            ),
            showFormatControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                hasValue: () => !!format3?.length,
                label: (0, import_i18n198.__)("Formats"),
                onDeselect: () => setQuery({ format: [] }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  FormatControls,
                  {
                    onChange: setQuery,
                    query
                  }
                )
              }
            ),
            showExcludeCurrentControl && /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
              import_components125.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n198.__)("Exclude"),
                hasValue: () => excludeCurrent !== void 0 && excludeCurrent !== null,
                onDeselect: () => setQuery({ excludeCurrent: null }),
                children: /* @__PURE__ */ (0, import_jsx_runtime426.jsx)(
                  import_components125.ToggleControl,
                  {
                    label: (0, import_i18n198.__)("Exclude current"),
                    help: (0, import_i18n198.sprintf)(
                      /* translators: %s: the post type singular name */
                      (0, import_i18n198.__)(
                        "Exclude the current %s from the query."
                      ),
                      postTypeSingularName
                    ),
                    checked: !!excludeCurrent,
                    onChange: (value) => {
                      setQuery({
                        excludeCurrent: !!value
                      });
                    }
                  }
                )
              }
            )
          ]
        }
      )
    ] });
  }

  // packages/block-library/build-module/query/edit/query-toolbar.mjs
  var import_components127 = __toESM(require_components(), 1);
  var import_i18n200 = __toESM(require_i18n(), 1);
  var import_data124 = __toESM(require_data(), 1);
  var import_block_editor206 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/query/edit/pattern-selection.mjs
  var import_element134 = __toESM(require_element(), 1);
  var import_data123 = __toESM(require_data(), 1);
  var import_components126 = __toESM(require_components(), 1);
  var import_block_editor205 = __toESM(require_block_editor(), 1);
  var import_i18n199 = __toESM(require_i18n(), 1);
  var import_jsx_runtime427 = __toESM(require_jsx_runtime(), 1);
  function PatternSelectionModal({
    clientId,
    attributes: attributes2,
    setIsPatternSelectionModalOpen
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
      import_components126.Modal,
      {
        overlayClassName: "block-library-query-pattern__selection-modal",
        title: (0, import_i18n199.__)("Choose a pattern"),
        onRequestClose: () => setIsPatternSelectionModalOpen(false),
        isFullScreen: true,
        children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(PatternSelection, { clientId, attributes: attributes2 })
      }
    );
  }
  function useBlockPatterns(clientId, attributes2) {
    const blockNameForPatterns = useBlockNameForPatterns(
      clientId,
      attributes2
    );
    const allPatterns = usePatterns(clientId, blockNameForPatterns);
    const rootBlockPatterns = (0, import_element134.useMemo)(() => {
      return allPatterns.filter((pattern) => {
        return pattern.blocks?.[0]?.name === "core/query";
      });
    }, [allPatterns]);
    return rootBlockPatterns;
  }
  function PatternSelection({
    clientId,
    attributes: attributes2,
    showTitlesAsTooltip = false,
    showSearch = true
  }) {
    const [searchValue, setSearchValue] = (0, import_element134.useState)("");
    const { replaceBlock, selectBlock } = (0, import_data123.useDispatch)(import_block_editor205.store);
    const blockPatterns = useBlockPatterns(clientId, attributes2);
    const blockPreviewContext = (0, import_element134.useMemo)(
      () => ({
        previewPostType: attributes2.query.postType
      }),
      [attributes2.query.postType]
    );
    const filteredBlockPatterns = (0, import_element134.useMemo)(() => {
      return searchPatterns(blockPatterns, searchValue);
    }, [blockPatterns, searchValue]);
    const onBlockPatternSelect = (pattern, blocks) => {
      const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
        blocks,
        attributes2
      );
      replaceBlock(clientId, newBlocks);
      if (queryClientIds[0]) {
        selectBlock(queryClientIds[0]);
      }
    };
    return /* @__PURE__ */ (0, import_jsx_runtime427.jsxs)("div", { className: "block-library-query-pattern__selection-content", children: [
      showSearch && /* @__PURE__ */ (0, import_jsx_runtime427.jsx)("div", { className: "block-library-query-pattern__selection-search", children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_components126.SearchControl,
        {
          onChange: setSearchValue,
          value: searchValue,
          label: (0, import_i18n199.__)("Search"),
          placeholder: (0, import_i18n199.__)("Search")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(import_block_editor205.BlockContextProvider, { value: blockPreviewContext, children: /* @__PURE__ */ (0, import_jsx_runtime427.jsx)(
        import_block_editor205.__experimentalBlockPatternsList,
        {
          blockPatterns: filteredBlockPatterns,
          onClickPattern: onBlockPatternSelect,
          showTitlesAsTooltip
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/query/edit/query-toolbar.mjs
  var import_jsx_runtime428 = __toESM(require_jsx_runtime(), 1);
  function PatternPicker({ clientId, attributes: attributes2, hasInnerBlocks }) {
    const hasPatterns = useBlockPatterns(clientId, attributes2).length;
    if (!hasPatterns) {
      return null;
    }
    const buttonLabel = hasInnerBlocks ? (0, import_i18n200.__)("Change design") : (0, import_i18n200.__)("Choose pattern");
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(import_block_editor206.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(import_components127.__experimentalDropdownContentWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
      import_components127.Dropdown,
      {
        contentClassName: "block-editor-block-settings-menu__popover",
        focusOnMount: "firstElement",
        expandOnMobile: true,
        renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
          import_components127.ToolbarButton,
          {
            "aria-haspopup": "true",
            "aria-expanded": isOpen,
            onClick: onToggle,
            children: buttonLabel
          }
        ),
        renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(
          PatternSelection,
          {
            clientId,
            attributes: attributes2,
            showSearch: false,
            showTitlesAsTooltip: true
          }
        )
      }
    ) }) });
  }
  function QueryToolbar(props) {
    const isLocked = (0, import_data124.useSelect)(
      (select10) => {
        const { isLockedBlock } = unlock(select10(import_block_editor206.store));
        return isLockedBlock(props.clientId);
      },
      [props.clientId]
    );
    if (isLocked) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime428.jsx)(PatternPicker, { ...props });
  }

  // packages/block-library/build-module/query/edit/query-content.mjs
  var import_jsx_runtime429 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl6 } = unlock(import_block_editor207.privateApis);
  var DEFAULTS_POSTS_PER_PAGE = 3;
  function QueryContent({
    attributes: attributes2,
    setAttributes,
    clientId,
    context,
    name: name118,
    isSelected
  }) {
    const {
      queryId,
      query,
      enhancedPagination,
      tagName: TagName2 = "div",
      query: { inherit } = {}
    } = attributes2;
    const { templateSlug, postType } = context;
    const { isSingular, templateType } = getQueryContextFromTemplate(templateSlug);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data125.useDispatch)(import_block_editor207.store);
    const { createNotice } = (0, import_data125.useDispatch)(import_notices18.store);
    const unsupportedBlocks = useUnsupportedBlocks(clientId);
    const instanceId = (0, import_compose55.useInstanceId)(QueryContent);
    const blockProps = (0, import_block_editor207.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor207.useInnerBlocksProps)(blockProps);
    const { postsPerPage } = (0, import_data125.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor207.store);
      const { getEntityRecord, getEntityRecordEdits, canUser } = select10(import_core_data78.store);
      const settingPerPage = canUser("read", {
        kind: "root",
        name: "site"
      }) ? +getEntityRecord("root", "site")?.posts_per_page : +getSettings2().postsPerPage;
      const editedSettingPerPage = +getEntityRecordEdits("root", "site")?.posts_per_page;
      return {
        postsPerPage: editedSettingPerPage || settingPerPage || DEFAULTS_POSTS_PER_PAGE
      };
    }, []);
    const shouldExcludeCurrentPost = isSingular && !inherit && (query.postType === postType || query.postType === templateType);
    const updateQuery = (0, import_element135.useCallback)(
      (newQuery) => setAttributes((prevAttributes) => ({
        query: { ...prevAttributes.query, ...newQuery }
      })),
      [setAttributes]
    );
    (0, import_element135.useEffect)(() => {
      const newQuery = {};
      if (inherit && query.perPage !== postsPerPage) {
        newQuery.perPage = postsPerPage;
      } else if (!query.perPage && postsPerPage) {
        newQuery.perPage = postsPerPage;
      }
      if (!shouldExcludeCurrentPost && query.excludeCurrent !== void 0 && query.excludeCurrent !== null) {
        newQuery.excludeCurrent = null;
      }
      if (!!Object.keys(newQuery).length) {
        __unstableMarkNextChangeAsNotPersistent();
        updateQuery(newQuery);
      }
    }, [
      query.perPage,
      query.excludeCurrent,
      inherit,
      postsPerPage,
      shouldExcludeCurrentPost,
      __unstableMarkNextChangeAsNotPersistent,
      updateQuery
    ]);
    (0, import_element135.useEffect)(() => {
      if (!Number.isFinite(queryId)) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ queryId: instanceId });
      }
    }, [
      queryId,
      instanceId,
      __unstableMarkNextChangeAsNotPersistent,
      setAttributes
    ]);
    (0, import_element135.useEffect)(() => {
      if (enhancedPagination && unsupportedBlocks.length) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ enhancedPagination: false });
        const message = (0, import_i18n201.sprintf)(
          /* translators: %s: A list of block titles. */
          (0, import_i18n201.__)(
            `"Reload full page" was enabled because some blocks inside the Query block aren't supported: %s.`
          ),
          unsupportedBlocks.join(
            /* translators: Used between list items, there is a space after the comma. */
            (0, import_i18n201.__)(", ")
            // eslint-disable-line @wordpress/i18n-no-flanking-whitespace
          )
        );
        createNotice("info", message, {
          type: "snackbar",
          id: "query-enhanced-pagination-disabled"
        });
      }
    }, [
      enhancedPagination,
      unsupportedBlocks,
      __unstableMarkNextChangeAsNotPersistent,
      setAttributes,
      createNotice
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime429.jsxs)(import_jsx_runtime429.Fragment, { children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
        QueryToolbar,
        {
          clientId,
          attributes: attributes2,
          hasInnerBlocks: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(import_block_editor207.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
        QueryInspectorControls,
        {
          name: name118,
          attributes: attributes2,
          setQuery: updateQuery,
          setAttributes,
          clientId,
          isSingular,
          shouldExcludeCurrentPost
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime429.jsxs)(import_block_editor207.InspectorControls, { group: "advanced", children: [
        /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
          HTMLElementControl6,
          {
            tagName: TagName2,
            onChange: (value) => setAttributes({ tagName: value }),
            clientId,
            options: [
              { label: (0, import_i18n201.__)("Default (<div>)"), value: "div" },
              { label: "<main>", value: "main" },
              { label: "<section>", value: "section" },
              { label: "<aside>", value: "aside" }
            ]
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(
          EnhancedPaginationControl,
          {
            enhancedPagination,
            setAttributes,
            clientId
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime429.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/query/edit/query-placeholder.mjs
  var import_data126 = __toESM(require_data(), 1);
  var import_blocks83 = __toESM(require_blocks(), 1);
  var import_element136 = __toESM(require_element(), 1);
  var import_block_editor208 = __toESM(require_block_editor(), 1);
  var import_components128 = __toESM(require_components(), 1);
  var import_i18n202 = __toESM(require_i18n(), 1);
  var import_compose56 = __toESM(require_compose(), 1);
  var import_jsx_runtime430 = __toESM(require_jsx_runtime(), 1);
  function QueryPlaceholder({
    attributes: attributes2,
    clientId,
    name: name118,
    openPatternSelectionModal,
    isSelected
  }) {
    const [isStartingBlank, setIsStartingBlank] = (0, import_element136.useState)(false);
    const [containerWidth, setContainerWidth] = (0, import_element136.useState)(0);
    const resizeObserverRef = (0, import_compose56.useResizeObserver)(([entry]) => {
      setContainerWidth(entry.contentRect.width);
    });
    const SMALL_CONTAINER_BREAKPOINT = 160;
    const isSmallContainer = containerWidth > 0 && containerWidth < SMALL_CONTAINER_BREAKPOINT;
    const { blockType, activeBlockVariation } = (0, import_data126.useSelect)(
      (select10) => {
        const { getActiveBlockVariation, getBlockType: getBlockType6 } = select10(import_blocks83.store);
        return {
          blockType: getBlockType6(name118),
          activeBlockVariation: getActiveBlockVariation(
            name118,
            attributes2
          )
        };
      },
      [name118, attributes2]
    );
    const hasPatterns = !!useBlockPatterns(clientId, attributes2).length;
    const icon2 = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
    const label = activeBlockVariation?.title || blockType?.title;
    const blockProps = (0, import_block_editor208.useBlockProps)({
      ref: resizeObserverRef
    });
    if (isStartingBlank) {
      return /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
        QueryVariationPicker,
        {
          clientId,
          attributes: attributes2,
          icon: icon2,
          label
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime430.jsxs)("div", { ...blockProps, children: [
      isSelected && /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
        QueryToolbar,
        {
          clientId,
          attributes: attributes2,
          hasInnerBlocks: false
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime430.jsxs)(
        import_components128.Placeholder,
        {
          className: "block-editor-media-placeholder",
          icon: !isSmallContainer && icon2,
          label: !isSmallContainer && label,
          instructions: !isSmallContainer && (0, import_i18n202.__)("Choose a pattern for the query loop or start blank."),
          withIllustration: isSmallContainer,
          children: [
            !!hasPatterns && !isSmallContainer && /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
              import_components128.Button,
              {
                __next40pxDefaultSize: true,
                variant: "primary",
                onClick: openPatternSelectionModal,
                children: (0, import_i18n202.__)("Choose")
              }
            ),
            !isSmallContainer && /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
              import_components128.Button,
              {
                __next40pxDefaultSize: true,
                variant: "secondary",
                onClick: () => {
                  setIsStartingBlank(true);
                },
                children: (0, import_i18n202.__)("Start blank")
              }
            )
          ]
        }
      )
    ] });
  }
  function QueryVariationPicker({ clientId, attributes: attributes2, icon: icon2, label }) {
    const scopeVariations = useScopedBlockVariations(attributes2);
    const { replaceInnerBlocks } = (0, import_data126.useDispatch)(import_block_editor208.store);
    const blockProps = (0, import_block_editor208.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime430.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime430.jsx)(
      import_block_editor208.__experimentalBlockVariationPicker,
      {
        icon: icon2,
        label,
        variations: scopeVariations,
        onSelect: (variation) => {
          if (variation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks83.createBlocksFromInnerBlocksTemplate)(
                variation.innerBlocks
              ),
              false
            );
          }
        }
      }
    ) });
  }

  // packages/block-library/build-module/query/edit/index.mjs
  var import_jsx_runtime431 = __toESM(require_jsx_runtime(), 1);
  var QueryEdit = (props) => {
    const { clientId, attributes: attributes2 } = props;
    const [isPatternSelectionModalOpen, setIsPatternSelectionModalOpen] = (0, import_element137.useState)(false);
    const hasInnerBlocks = (0, import_data127.useSelect)(
      (select10) => !!select10(import_block_editor209.store).getBlocks(clientId).length,
      [clientId]
    );
    const Component = hasInnerBlocks ? QueryContent : QueryPlaceholder;
    return /* @__PURE__ */ (0, import_jsx_runtime431.jsxs)(import_jsx_runtime431.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime431.jsx)(
        Component,
        {
          ...props,
          openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
        }
      ),
      isPatternSelectionModalOpen && /* @__PURE__ */ (0, import_jsx_runtime431.jsx)(
        PatternSelectionModal,
        {
          clientId,
          attributes: attributes2,
          setIsPatternSelectionModalOpen
        }
      )
    ] });
  };
  var edit_default27 = QueryEdit;

  // packages/block-library/build-module/query/save.mjs
  var import_block_editor210 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime432 = __toESM(require_jsx_runtime(), 1);
  function save37({ attributes: { tagName: Tag = "div" } }) {
    const blockProps = import_block_editor210.useBlockProps.save();
    const innerBlocksProps = import_block_editor210.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime432.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/query/variations.mjs
  var import_i18n203 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query/icons.mjs
  var import_components129 = __toESM(require_components(), 1);
  var import_jsx_runtime433 = __toESM(require_jsx_runtime(), 1);
  var titleDate = /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z" }) });
  var titleExcerpt = /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.Path, { d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z" }) });
  var titleDateExcerpt = /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z" }) });
  var imageDateTitle = /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime433.jsx)(import_components129.Path, { d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z" }) });

  // packages/block-library/build-module/query/variations.mjs
  var postDate = [
    "core/post-date",
    {
      metadata: {
        bindings: {
          datetime: {
            source: "core/post-data",
            args: { field: "date" }
          }
        }
      }
    }
  ];
  var variations14 = [
    {
      name: "title-date",
      title: (0, import_i18n203.__)("Title & Date"),
      icon: titleDate,
      attributes: {},
      innerBlocks: [
        ["core/post-template", {}, [["core/post-title"], postDate]],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "title-excerpt",
      title: (0, import_i18n203.__)("Title & Excerpt"),
      icon: titleExcerpt,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [["core/post-title"], ["core/post-excerpt"]]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "title-date-excerpt",
      title: (0, import_i18n203.__)("Title, Date, & Excerpt"),
      icon: titleDateExcerpt,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [["core/post-title"], postDate, ["core/post-excerpt"]]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    },
    {
      name: "image-date-title",
      title: (0, import_i18n203.__)("Image, Date, & Title"),
      icon: imageDateTitle,
      attributes: {},
      innerBlocks: [
        [
          "core/post-template",
          {},
          [
            ["core/post-featured-image"],
            postDate,
            ["core/post-title"]
          ]
        ],
        ["core/query-pagination"],
        ["core/query-no-results"]
      ],
      scope: ["block"]
    }
  ];
  var variations_default14 = variations14;

  // packages/block-library/build-module/query/deprecated.mjs
  var import_blocks84 = __toESM(require_blocks(), 1);
  var import_block_editor211 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime434 = __toESM(require_jsx_runtime(), 1);
  var { cleanEmptyObject: cleanEmptyObject7 } = unlock(import_block_editor211.privateApis);
  var migrateToTaxQuery = (attributes2) => {
    const { query } = attributes2;
    const { categoryIds, tagIds, taxQuery, ...newQuery } = query;
    if (!!categoryIds?.length || !!tagIds?.length) {
      newQuery.taxQuery = {
        include: {
          category: !!categoryIds?.length ? categoryIds : void 0,
          post_tag: !!tagIds?.length ? tagIds : void 0
        }
      };
    }
    if (!!Object.keys(taxQuery || {}).length) {
      newQuery.taxQuery = { include: taxQuery };
    }
    return {
      ...attributes2,
      query: newQuery
    };
  };
  var migrateColors = (attributes2, innerBlocks) => {
    const { style: style2, backgroundColor, gradient, textColor, ...newAttributes } = attributes2;
    const hasColorStyles = backgroundColor || gradient || textColor || style2?.color || style2?.elements?.link;
    if (!hasColorStyles) {
      return [attributes2, innerBlocks];
    }
    if (style2) {
      newAttributes.style = cleanEmptyObject7({
        ...style2,
        color: void 0,
        elements: {
          ...style2.elements,
          link: void 0
        }
      });
    }
    if (hasSingleInnerGroupBlock(innerBlocks)) {
      const groupBlock = innerBlocks[0];
      const hasStyles = style2?.color || style2?.elements?.link || groupBlock.attributes.style;
      const newStyles = hasStyles ? cleanEmptyObject7({
        ...groupBlock.attributes.style,
        color: style2?.color,
        elements: style2?.elements?.link ? { link: style2?.elements?.link } : void 0
      }) : void 0;
      const updatedGroupBlock = (0, import_blocks84.createBlock)(
        "core/group",
        {
          ...groupBlock.attributes,
          backgroundColor,
          gradient,
          textColor,
          style: newStyles
        },
        groupBlock.innerBlocks
      );
      return [newAttributes, [updatedGroupBlock]];
    }
    const newGroupBlock = (0, import_blocks84.createBlock)(
      "core/group",
      {
        backgroundColor,
        gradient,
        textColor,
        style: cleanEmptyObject7({
          color: style2?.color,
          elements: style2?.elements?.link ? { link: style2?.elements?.link } : void 0
        })
      },
      innerBlocks
    );
    return [newAttributes, [newGroupBlock]];
  };
  var hasSingleInnerGroupBlock = (innerBlocks = []) => innerBlocks.length === 1 && innerBlocks[0].name === "core/group";
  var migrateToConstrainedLayout = (attributes2) => {
    const { layout = null } = attributes2;
    if (!layout) {
      return attributes2;
    }
    const { inherit = null, contentSize = null, ...newLayout } = layout;
    if (inherit || contentSize) {
      return {
        ...attributes2,
        layout: {
          ...newLayout,
          contentSize,
          type: "constrained"
        }
      };
    }
    return attributes2;
  };
  var findPostTemplateBlock = (innerBlocks = []) => {
    let foundBlock = null;
    for (const block of innerBlocks) {
      if (block.name === "core/post-template") {
        foundBlock = block;
        break;
      } else if (block.innerBlocks.length) {
        foundBlock = findPostTemplateBlock(block.innerBlocks);
      }
    }
    return foundBlock;
  };
  var replacePostTemplateBlock = (innerBlocks = [], replacementBlock) => {
    innerBlocks.forEach((block, index2) => {
      if (block.name === "core/post-template") {
        innerBlocks.splice(index2, 1, replacementBlock);
      } else if (block.innerBlocks.length) {
        block.innerBlocks = replacePostTemplateBlock(
          block.innerBlocks,
          replacementBlock
        );
      }
    });
    return innerBlocks;
  };
  var migrateDisplayLayout = (attributes2, innerBlocks) => {
    const { displayLayout = null, ...newAttributes } = attributes2;
    if (!displayLayout) {
      return [attributes2, innerBlocks];
    }
    const postTemplateBlock = findPostTemplateBlock(innerBlocks);
    if (!postTemplateBlock) {
      return [attributes2, innerBlocks];
    }
    const { type, columns } = displayLayout;
    const updatedLayoutType = type === "flex" ? "grid" : "default";
    const newPostTemplateBlock = (0, import_blocks84.createBlock)(
      "core/post-template",
      {
        ...postTemplateBlock.attributes,
        layout: {
          type: updatedLayoutType,
          ...columns && { columnCount: columns }
        }
      },
      postTemplateBlock.innerBlocks
    );
    return [
      newAttributes,
      replacePostTemplateBlock(innerBlocks, newPostTemplateBlock)
    ];
  };
  var v137 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          categoryIds: [],
          tagIds: [],
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true
        }
      },
      layout: {
        type: "object",
        default: {
          type: "list"
        }
      }
    },
    supports: {
      html: false
    },
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      const { layout, ...restWithTaxQuery } = withTaxQuery;
      const newAttributes = {
        ...restWithTaxQuery,
        displayLayout: withTaxQuery.layout
      };
      return migrateDisplayLayout(newAttributes, innerBlocks);
    },
    save() {
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(import_block_editor211.InnerBlocks.Content, {});
    }
  };
  var v216 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          categoryIds: [],
          tagIds: [],
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      layout: true
    },
    isEligible: ({ query: { categoryIds, tagIds } = {} }) => categoryIds || tagIds,
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      const [withColorAttributes, withColorInnerBlocks] = migrateColors(
        withTaxQuery,
        innerBlocks
      );
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        withColorInnerBlocks
      );
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor211.useBlockProps.save();
      const innerBlocksProps = import_block_editor211.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(Tag, { ...innerBlocksProps });
    }
  };
  var v311 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true
    },
    isEligible(attributes2) {
      const { style: style2, backgroundColor, gradient, textColor } = attributes2;
      return backgroundColor || gradient || textColor || style2?.color || style2?.elements?.link;
    },
    migrate(attributes2, innerBlocks) {
      const [withColorAttributes, withColorInnerBlocks] = migrateColors(
        attributes2,
        innerBlocks
      );
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        withColorInnerBlocks
      );
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor211.useBlockProps.save();
      const innerBlocksProps = import_block_editor211.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(Tag, { ...innerBlocksProps });
    }
  };
  var v49 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor211.useBlockProps.save();
      const innerBlocksProps = import_block_editor211.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
    migrate(attributes2, innerBlocks) {
      const withConstrainedLayoutAttributes = migrateToConstrainedLayout(attributes2);
      return migrateDisplayLayout(
        withConstrainedLayoutAttributes,
        innerBlocks
      );
    }
  };
  var v58 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      displayLayout: {
        type: "object",
        default: {
          type: "list"
        }
      },
      namespace: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      anchor: true,
      html: false,
      layout: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor211.useBlockProps.save();
      const innerBlocksProps = import_block_editor211.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ displayLayout }) => {
      return !!displayLayout;
    },
    migrate: migrateDisplayLayout
  };
  var v68 = {
    attributes: {
      queryId: {
        type: "number"
      },
      query: {
        type: "object",
        default: {
          perPage: null,
          pages: 0,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          exclude: [],
          sticky: "",
          inherit: true,
          taxQuery: null,
          parents: [],
          format: []
        }
      },
      tagName: {
        type: "string",
        default: "div"
      },
      namespace: {
        type: "string"
      },
      enhancedPagination: {
        type: "boolean",
        default: false
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      layout: true,
      interactivity: true,
      contentRole: true
    },
    save({ attributes: { tagName: Tag = "div" } }) {
      const blockProps = import_block_editor211.useBlockProps.save();
      const innerBlocksProps = import_block_editor211.useInnerBlocksProps.save(blockProps);
      return /* @__PURE__ */ (0, import_jsx_runtime434.jsx)(Tag, { ...innerBlocksProps });
    },
    isEligible: ({ query: { taxQuery } = {} }) => !!taxQuery && Object.keys(taxQuery).some(
      (key) => !["include", "exclude"].includes(key)
    ),
    migrate(attributes2, innerBlocks) {
      const withTaxQuery = migrateToTaxQuery(attributes2);
      return migrateDisplayLayout(withTaxQuery, innerBlocks);
    }
  };
  var deprecated15 = [v68, v58, v49, v311, v216, v137];
  var deprecated_default41 = deprecated15;

  // packages/block-library/build-module/query/index.mjs
  var { name: name80 } = block_default79;
  var settings79 = {
    icon: loop_default,
    edit: edit_default27,
    example: {
      viewportWidth: 650,
      attributes: {
        namespace: "core/posts-list",
        query: {
          perPage: 4,
          pages: 1,
          offset: 0,
          postType: "post",
          order: "desc",
          orderBy: "date",
          author: "",
          search: "",
          sticky: "exclude",
          inherit: false,
          excludeCurrent: null
        }
      },
      innerBlocks: [
        {
          name: "core/post-template",
          attributes: {
            layout: {
              type: "grid",
              columnCount: 2
            }
          },
          innerBlocks: [
            {
              name: "core/post-title"
            },
            {
              name: "core/post-date",
              attributes: {
                metadata: {
                  bindings: {
                    datetime: {
                      source: "core/post-data",
                      args: { field: "date" }
                    }
                  }
                }
              }
            },
            {
              name: "core/post-excerpt"
            }
          ]
        }
      ]
    },
    save: save37,
    variations: variations_default14,
    deprecated: deprecated_default41
  };
  var init79 = () => initBlock({ name: name80, metadata: block_default79, settings: settings79 });

  // packages/block-library/build-module/query-no-results/index.mjs
  var query_no_results_exports = {};
  __export(query_no_results_exports, {
    init: () => init80,
    metadata: () => block_default80,
    name: () => name81,
    settings: () => settings80
  });
  var import_i18n204 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-no-results/block.json
  var block_default80 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-no-results",
    title: "No Results",
    category: "theme",
    description: "Contains the block elements used to render content when no query results are found.",
    ancestor: ["core/query"],
    textdomain: "default",
    usesContext: ["queryId", "query"],
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        heading: true,
        button: true
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true
    },
    style: "wp-block-query-no-results"
  };

  // packages/block-library/build-module/query-no-results/edit.mjs
  var import_block_editor212 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime435 = __toESM(require_jsx_runtime(), 1);
  function QueryNoResultsEdit() {
    const blockProps = (0, import_block_editor212.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor212.useInnerBlocksProps)(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime435.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/query-no-results/save.mjs
  var import_block_editor213 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime436 = __toESM(require_jsx_runtime(), 1);
  function save38() {
    return /* @__PURE__ */ (0, import_jsx_runtime436.jsx)(import_block_editor213.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/query-no-results/index.mjs
  var TEMPLATE13 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n204.__)(
          "Add text or blocks that will display when a query returns no results."
        )
      }
    ]
  ];
  var { name: name81 } = block_default80;
  var settings80 = {
    icon: loop_default,
    template: TEMPLATE13,
    edit: QueryNoResultsEdit,
    save: save38,
    example: {
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n204.__)("No posts were found.")
          }
        }
      ]
    }
  };
  var init80 = () => initBlock({ name: name81, metadata: block_default80, settings: settings80 });

  // packages/block-library/build-module/query-pagination/index.mjs
  var query_pagination_exports = {};
  __export(query_pagination_exports, {
    init: () => init81,
    metadata: () => block_default81,
    name: () => name82,
    settings: () => settings81
  });

  // packages/block-library/build-module/query-pagination/block.json
  var block_default81 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination",
    title: "Pagination",
    category: "theme",
    ancestor: ["core/query"],
    allowedBlocks: [
      "core/query-pagination-previous",
      "core/query-pagination-numbers",
      "core/query-pagination-next"
    ],
    description: "Displays a paginated navigation to next/previous set of posts, when applicable.",
    textdomain: "default",
    attributes: {
      paginationArrow: {
        type: "string",
        default: "none"
      },
      showLabel: {
        type: "boolean",
        default: true
      }
    },
    usesContext: ["queryId", "query"],
    providesContext: {
      paginationArrow: "paginationArrow",
      showLabel: "showLabel"
    },
    supports: {
      anchor: true,
      align: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        default: {
          type: "flex"
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-query-pagination-editor",
    style: "wp-block-query-pagination"
  };

  // packages/block-library/build-module/query-pagination/edit.mjs
  var import_i18n207 = __toESM(require_i18n(), 1);
  var import_block_editor214 = __toESM(require_block_editor(), 1);
  var import_data128 = __toESM(require_data(), 1);
  var import_components132 = __toESM(require_components(), 1);
  var import_element138 = __toESM(require_element(), 1);

  // packages/block-library/build-module/query-pagination/query-pagination-arrow-controls.mjs
  var import_i18n205 = __toESM(require_i18n(), 1);
  var import_components130 = __toESM(require_components(), 1);
  var import_jsx_runtime437 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationArrowControls({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime437.jsxs)(
      import_components130.__experimentalToggleGroupControl,
      {
        label: (0, import_i18n205.__)("Arrow"),
        value,
        onChange,
        help: (0, import_i18n205.__)(
          "A decorative arrow appended to the next and previous page link."
        ),
        isBlock: true,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(
            import_components130.__experimentalToggleGroupControlOption,
            {
              value: "none",
              label: (0, import_i18n205._x)(
                "None",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(
            import_components130.__experimentalToggleGroupControlOption,
            {
              value: "arrow",
              label: (0, import_i18n205._x)(
                "Arrow",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime437.jsx)(
            import_components130.__experimentalToggleGroupControlOption,
            {
              value: "chevron",
              label: (0, import_i18n205._x)(
                "Chevron",
                "Arrow option for Query Pagination Next/Previous blocks"
              )
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination/query-pagination-label-control.mjs
  var import_i18n206 = __toESM(require_i18n(), 1);
  var import_components131 = __toESM(require_components(), 1);
  var import_jsx_runtime438 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationLabelControl({ value, onChange }) {
    return /* @__PURE__ */ (0, import_jsx_runtime438.jsx)(
      import_components131.ToggleControl,
      {
        label: (0, import_i18n206.__)("Show label text"),
        help: (0, import_i18n206.__)('Make label text visible, e.g. "Next Page".'),
        onChange,
        checked: value === true
      }
    );
  }

  // packages/block-library/build-module/query-pagination/edit.mjs
  var import_jsx_runtime439 = __toESM(require_jsx_runtime(), 1);
  function QueryPaginationEdit2({
    attributes: { paginationArrow, showLabel },
    setAttributes,
    clientId
  }) {
    const hasNextPreviousBlocks = (0, import_data128.useSelect)(
      (select10) => {
        const { getBlocks } = select10(import_block_editor214.store);
        const innerBlocks = getBlocks(clientId);
        return innerBlocks?.find((innerBlock) => {
          return [
            "core/query-pagination-next",
            "core/query-pagination-previous"
          ].includes(innerBlock.name);
        });
      },
      [clientId]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data128.useDispatch)(import_block_editor214.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockProps = (0, import_block_editor214.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor214.useInnerBlocksProps)(blockProps);
    (0, import_element138.useEffect)(() => {
      if (paginationArrow === "none" && !showLabel) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ showLabel: true });
      }
    }, [
      paginationArrow,
      setAttributes,
      showLabel,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime439.jsxs)(import_jsx_runtime439.Fragment, { children: [
      hasNextPreviousBlocks && /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(import_block_editor214.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime439.jsxs)(
        import_components132.__experimentalToolsPanel,
        {
          label: (0, import_i18n207.__)("Settings"),
          resetAll: () => {
            setAttributes({
              paginationArrow: "none",
              showLabel: true
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
              import_components132.__experimentalToolsPanelItem,
              {
                hasValue: () => paginationArrow !== "none",
                label: (0, import_i18n207.__)("Pagination arrow"),
                onDeselect: () => setAttributes({ paginationArrow: "none" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
                  QueryPaginationArrowControls,
                  {
                    value: paginationArrow,
                    onChange: (value) => {
                      setAttributes({ paginationArrow: value });
                    }
                  }
                )
              }
            ),
            paginationArrow !== "none" && /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
              import_components132.__experimentalToolsPanelItem,
              {
                hasValue: () => !showLabel,
                label: (0, import_i18n207.__)("Show text"),
                onDeselect: () => setAttributes({ showLabel: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime439.jsx)(
                  QueryPaginationLabelControl,
                  {
                    value: showLabel,
                    onChange: (value) => {
                      setAttributes({ showLabel: value });
                    }
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime439.jsx)("nav", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/query-pagination/save.mjs
  var import_block_editor215 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime440 = __toESM(require_jsx_runtime(), 1);
  function save39() {
    return /* @__PURE__ */ (0, import_jsx_runtime440.jsx)(import_block_editor215.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/query-pagination/deprecated.mjs
  var import_block_editor216 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime441 = __toESM(require_jsx_runtime(), 1);
  var deprecated16 = [
    // Version with wrapper `div` element.
    {
      save() {
        return /* @__PURE__ */ (0, import_jsx_runtime441.jsx)("div", { ...import_block_editor216.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime441.jsx)(import_block_editor216.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default42 = deprecated16;

  // packages/block-library/build-module/query-pagination/index.mjs
  var { name: name82 } = block_default81;
  var TEMPLATE14 = [
    ["core/query-pagination-previous"],
    ["core/query-pagination-numbers"],
    ["core/query-pagination-next"]
  ];
  var settings81 = {
    icon: query_pagination_default,
    template: TEMPLATE14,
    edit: QueryPaginationEdit2,
    save: save39,
    deprecated: deprecated_default42
  };
  var init81 = () => initBlock({ name: name82, metadata: block_default81, settings: settings81 });

  // packages/block-library/build-module/query-pagination-next/index.mjs
  var query_pagination_next_exports = {};
  __export(query_pagination_next_exports, {
    init: () => init82,
    metadata: () => block_default82,
    name: () => name83,
    settings: () => settings82
  });

  // packages/block-library/build-module/query-pagination-next/block.json
  var block_default82 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-next",
    title: "Next Page",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays the next posts page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: [
      "queryId",
      "query",
      "paginationArrow",
      "showLabel",
      "enhancedPagination"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/query-pagination-next/edit.mjs
  var import_i18n208 = __toESM(require_i18n(), 1);
  var import_block_editor217 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime442 = __toESM(require_jsx_runtime(), 1);
  var arrowMap3 = {
    none: "",
    arrow: "\u2192",
    chevron: "\xBB"
  };
  function QueryPaginationNextEdit({
    attributes: { label },
    setAttributes,
    context: { paginationArrow, showLabel }
  }) {
    const displayArrow = arrowMap3[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime442.jsxs)(
      "a",
      {
        href: "#pagination-next-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor217.useBlockProps)(),
        children: [
          showLabel && /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
            import_block_editor217.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n208.__)("Next page link"),
              placeholder: (0, import_i18n208.__)("Next Page"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          ),
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime442.jsx)(
            "span",
            {
              className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
              "aria-hidden": true,
              children: displayArrow
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination-next/index.mjs
  var { name: name83 } = block_default82;
  var settings82 = {
    icon: query_pagination_next_default,
    edit: QueryPaginationNextEdit
  };
  var init82 = () => initBlock({ name: name83, metadata: block_default82, settings: settings82 });

  // packages/block-library/build-module/query-pagination-numbers/index.mjs
  var query_pagination_numbers_exports = {};
  __export(query_pagination_numbers_exports, {
    init: () => init83,
    metadata: () => block_default83,
    name: () => name84,
    settings: () => settings83
  });

  // packages/block-library/build-module/query-pagination-numbers/block.json
  var block_default83 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-numbers",
    title: "Page Numbers",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays a list of page numbers for pagination.",
    textdomain: "default",
    attributes: {
      midSize: {
        type: "number",
        default: 2
      }
    },
    usesContext: ["queryId", "query", "enhancedPagination"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-query-pagination-numbers-editor"
  };

  // packages/block-library/build-module/query-pagination-numbers/edit.mjs
  var import_i18n209 = __toESM(require_i18n(), 1);
  var import_block_editor218 = __toESM(require_block_editor(), 1);
  var import_components133 = __toESM(require_components(), 1);
  var import_jsx_runtime443 = __toESM(require_jsx_runtime(), 1);
  var createPaginationItem = (content, Tag = "a", extraClass = "") => /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content }, content);
  var previewPaginationNumbers = (midSize) => {
    const paginationItems = [];
    for (let i = 1; i <= midSize; i++) {
      paginationItems.push(createPaginationItem(i));
    }
    paginationItems.push(
      createPaginationItem(midSize + 1, "span", "current")
    );
    for (let i = 1; i <= midSize; i++) {
      paginationItems.push(createPaginationItem(midSize + 1 + i));
    }
    paginationItems.push(createPaginationItem("...", "span", "dots"));
    paginationItems.push(createPaginationItem(midSize * 2 + 3));
    return /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(import_jsx_runtime443.Fragment, { children: paginationItems });
  };
  function QueryPaginationNumbersEdit({
    attributes: attributes2,
    setAttributes
  }) {
    const { midSize } = attributes2;
    const paginationNumbers = previewPaginationNumbers(
      parseInt(midSize, 10)
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime443.jsxs)(import_jsx_runtime443.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(import_block_editor218.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(
        import_components133.__experimentalToolsPanel,
        {
          label: (0, import_i18n209.__)("Settings"),
          resetAll: () => setAttributes({ midSize: 2 }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(
            import_components133.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n209.__)("Number of links"),
              hasValue: () => midSize !== 2,
              onDeselect: () => setAttributes({ midSize: 2 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime443.jsx)(
                import_components133.RangeControl,
                {
                  label: (0, import_i18n209.__)("Number of links"),
                  help: (0, import_i18n209.__)(
                    "Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."
                  ),
                  value: midSize,
                  onChange: (value) => {
                    setAttributes({
                      midSize: parseInt(value, 10)
                    });
                  },
                  min: 0,
                  max: 5,
                  withInputField: false
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime443.jsx)("div", { ...(0, import_block_editor218.useBlockProps)(), children: paginationNumbers })
    ] });
  }

  // packages/block-library/build-module/query-pagination-numbers/index.mjs
  var { name: name84 } = block_default83;
  var settings83 = {
    icon: query_pagination_numbers_default,
    edit: QueryPaginationNumbersEdit,
    example: {}
  };
  var init83 = () => initBlock({ name: name84, metadata: block_default83, settings: settings83 });

  // packages/block-library/build-module/query-pagination-previous/index.mjs
  var query_pagination_previous_exports = {};
  __export(query_pagination_previous_exports, {
    init: () => init84,
    metadata: () => block_default84,
    name: () => name85,
    settings: () => settings84
  });

  // packages/block-library/build-module/query-pagination-previous/block.json
  var block_default84 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-pagination-previous",
    title: "Previous Page",
    category: "theme",
    parent: ["core/query-pagination"],
    description: "Displays the previous posts page link.",
    textdomain: "default",
    attributes: {
      label: {
        type: "string"
      }
    },
    usesContext: [
      "queryId",
      "query",
      "paginationArrow",
      "showLabel",
      "enhancedPagination"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    }
  };

  // packages/block-library/build-module/query-pagination-previous/edit.mjs
  var import_i18n210 = __toESM(require_i18n(), 1);
  var import_block_editor219 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime444 = __toESM(require_jsx_runtime(), 1);
  var arrowMap4 = {
    none: "",
    arrow: "\u2190",
    chevron: "\xAB"
  };
  function QueryPaginationPreviousEdit({
    attributes: { label },
    setAttributes,
    context: { paginationArrow, showLabel }
  }) {
    const displayArrow = arrowMap4[paginationArrow];
    return /* @__PURE__ */ (0, import_jsx_runtime444.jsxs)(
      "a",
      {
        href: "#pagination-previous-pseudo-link",
        onClick: (event) => event.preventDefault(),
        ...(0, import_block_editor219.useBlockProps)(),
        children: [
          displayArrow && /* @__PURE__ */ (0, import_jsx_runtime444.jsx)(
            "span",
            {
              className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
              "aria-hidden": true,
              children: displayArrow
            }
          ),
          showLabel && /* @__PURE__ */ (0, import_jsx_runtime444.jsx)(
            import_block_editor219.PlainText,
            {
              __experimentalVersion: 2,
              tagName: "span",
              "aria-label": (0, import_i18n210.__)("Previous page link"),
              placeholder: (0, import_i18n210.__)("Previous Page"),
              value: label,
              onChange: (newLabel) => setAttributes({ label: newLabel })
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/query-pagination-previous/index.mjs
  var { name: name85 } = block_default84;
  var settings84 = {
    icon: query_pagination_previous_default,
    edit: QueryPaginationPreviousEdit
  };
  var init84 = () => initBlock({ name: name85, metadata: block_default84, settings: settings84 });

  // packages/block-library/build-module/query-title/index.mjs
  var query_title_exports = {};
  __export(query_title_exports, {
    init: () => init85,
    metadata: () => block_default85,
    name: () => name86,
    settings: () => settings85
  });

  // packages/block-library/build-module/query-title/block.json
  var block_default85 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-title",
    title: "Query Title",
    category: "theme",
    description: "Display the query title.",
    textdomain: "default",
    attributes: {
      type: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array"
      },
      showPrefix: {
        type: "boolean",
        default: true
      },
      showSearchTerm: {
        type: "boolean",
        default: true
      }
    },
    example: {
      attributes: {
        type: "search"
      }
    },
    usesContext: ["query"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        gradient: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-query-title"
  };

  // packages/block-library/build-module/query-title/edit.mjs
  var import_block_editor220 = __toESM(require_block_editor(), 1);
  var import_components134 = __toESM(require_components(), 1);
  var import_i18n211 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-title/use-archive-label.mjs
  var import_core_data79 = __toESM(require_core_data(), 1);
  var import_data129 = __toESM(require_data(), 1);
  function useArchiveLabel() {
    const templateSlug = (0, import_data129.useSelect)((select10) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select10("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select10(import_core_data79.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let term;
    let isAuthor = false;
    let authorSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        term = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    } else {
      const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
      if (authorMatches) {
        isAuthor = true;
        if (authorMatches[2]) {
          authorSlug = authorMatches[2];
        }
      }
    }
    return (0, import_data129.useSelect)(
      (select10) => {
        const { getEntityRecords, getTaxonomy, getAuthors } = select10(import_core_data79.store);
        let archiveTypeLabel;
        let archiveNameLabel;
        if (taxonomy) {
          archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
        }
        if (term) {
          const records = getEntityRecords("taxonomy", taxonomy, {
            slug: term,
            per_page: 1
          });
          if (records && records[0]) {
            archiveNameLabel = records[0].name;
          }
        }
        if (isAuthor) {
          archiveTypeLabel = "Author";
          if (authorSlug) {
            const authorRecords = getAuthors({ slug: authorSlug });
            if (authorRecords && authorRecords[0]) {
              archiveNameLabel = authorRecords[0].name;
            }
          }
        }
        return {
          archiveTypeLabel,
          archiveNameLabel
        };
      },
      [authorSlug, isAuthor, taxonomy, term]
    );
  }

  // packages/block-library/build-module/query-title/use-post-type-label.mjs
  var import_core_data80 = __toESM(require_core_data(), 1);
  var import_data130 = __toESM(require_data(), 1);
  function usePostTypeLabel(contextPostType) {
    const currentPostType = (0, import_data130.useSelect)((select10) => {
      const { getCurrentPostType } = select10("core/editor");
      return getCurrentPostType();
    }, []);
    return (0, import_data130.useSelect)(
      (select10) => {
        const { getPostType } = select10(import_core_data80.store);
        const postTypeSlug = contextPostType || currentPostType;
        const postType = getPostType(postTypeSlug);
        return {
          postTypeLabel: postType ? postType.labels.singular_name : ""
        };
      },
      [contextPostType, currentPostType]
    );
  }

  // packages/block-library/build-module/query-title/edit.mjs
  var import_jsx_runtime445 = __toESM(require_jsx_runtime(), 1);
  var SUPPORTED_TYPES = ["archive", "search", "post-type"];
  function QueryTitleEdit(props) {
    useDeprecatedTextAlign(props);
    const {
      attributes: { type, level, levelOptions, showPrefix, showSearchTerm },
      setAttributes,
      context: { query }
    } = props;
    const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();
    const { postTypeLabel } = usePostTypeLabel(query?.postType);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const blockProps = (0, import_block_editor220.useBlockProps)({
      className: "wp-block-query-title__placeholder"
    });
    if (!SUPPORTED_TYPES.includes(type)) {
      return /* @__PURE__ */ (0, import_jsx_runtime445.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_block_editor220.Warning, { children: (0, import_i18n211.__)("Provided type is not supported.") }) });
    }
    let titleElement;
    if (type === "archive") {
      let title;
      if (archiveTypeLabel) {
        if (showPrefix) {
          if (archiveNameLabel) {
            title = (0, import_i18n211.sprintf)(
              /* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
              (0, import_i18n211._x)("%1$s: %2$s", "archive label"),
              archiveTypeLabel,
              archiveNameLabel
            );
          } else {
            title = (0, import_i18n211.sprintf)(
              /* translators: %s: Archive type title e.g: "Category", "Tag"... */
              (0, import_i18n211.__)("%s: Name"),
              archiveTypeLabel
            );
          }
        } else if (archiveNameLabel) {
          title = archiveNameLabel;
        } else {
          title = (0, import_i18n211.sprintf)(
            /* translators: %s: Archive type title e.g: "Category", "Tag"... */
            (0, import_i18n211.__)("%s name"),
            archiveTypeLabel
          );
        }
      } else {
        title = showPrefix ? (0, import_i18n211.__)("Archive type: Name") : (0, import_i18n211.__)("Archive title");
      }
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime445.jsxs)(import_jsx_runtime445.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_block_editor220.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
          import_components134.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showPrefix: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
              import_components134.__experimentalToolsPanelItem,
              {
                hasValue: () => !showPrefix,
                label: (0, import_i18n211.__)("Show archive type in title"),
                onDeselect: () => setAttributes({ showPrefix: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
                  import_components134.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show archive type in title"),
                    onChange: () => setAttributes({
                      showPrefix: !showPrefix
                    }),
                    checked: showPrefix
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(TagName2, { ...blockProps, children: title })
      ] });
    }
    if (type === "search") {
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime445.jsxs)(import_jsx_runtime445.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_block_editor220.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
          import_components134.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showSearchTerm: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
              import_components134.__experimentalToolsPanelItem,
              {
                hasValue: () => !showSearchTerm,
                label: (0, import_i18n211.__)("Show search term in title"),
                onDeselect: () => setAttributes({ showSearchTerm: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
                  import_components134.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show search term in title"),
                    onChange: () => setAttributes({
                      showSearchTerm: !showSearchTerm
                    }),
                    checked: showSearchTerm
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(TagName2, { ...blockProps, children: showSearchTerm ? (0, import_i18n211.__)("Search results for: \u201Csearch term\u201D") : (0, import_i18n211.__)("Search results") })
      ] });
    }
    if (type === "post-type") {
      let title;
      if (postTypeLabel) {
        if (showPrefix) {
          title = (0, import_i18n211.sprintf)(
            /* translators: %s: Singular post type name of the queried object */
            (0, import_i18n211.__)('Post Type: "%s"'),
            postTypeLabel
          );
        } else {
          title = postTypeLabel;
        }
      } else {
        title = showPrefix ? (0, import_i18n211.__)("Post Type: Name") : (0, import_i18n211.__)("Name");
      }
      titleElement = /* @__PURE__ */ (0, import_jsx_runtime445.jsxs)(import_jsx_runtime445.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_block_editor220.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
          import_components134.__experimentalToolsPanel,
          {
            label: (0, import_i18n211.__)("Settings"),
            resetAll: () => setAttributes({
              showPrefix: true
            }),
            dropdownMenuProps,
            children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
              import_components134.__experimentalToolsPanelItem,
              {
                hasValue: () => !showPrefix,
                label: (0, import_i18n211.__)("Show post type label"),
                onDeselect: () => setAttributes({ showPrefix: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
                  import_components134.ToggleControl,
                  {
                    label: (0, import_i18n211.__)("Show post type label"),
                    onChange: () => setAttributes({
                      showPrefix: !showPrefix
                    }),
                    checked: showPrefix
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(TagName2, { ...blockProps, children: title })
      ] });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime445.jsxs)(import_jsx_runtime445.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(import_block_editor220.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime445.jsx)(
        import_block_editor220.HeadingLevelDropdown,
        {
          value: level,
          options: levelOptions,
          onChange: (newLevel) => setAttributes({ level: newLevel })
        }
      ) }),
      titleElement
    ] });
  }

  // packages/block-library/build-module/query-title/variations.mjs
  var import_i18n212 = __toESM(require_i18n(), 1);
  var variations15 = [
    {
      isDefault: true,
      name: "archive-title",
      title: (0, import_i18n212.__)("Archive Title"),
      description: (0, import_i18n212.__)(
        "Display the archive title based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "archive"
      },
      scope: ["inserter"]
    },
    {
      isDefault: false,
      name: "search-title",
      title: (0, import_i18n212.__)("Search Results Title"),
      description: (0, import_i18n212.__)(
        "Display the search results title based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "search"
      },
      scope: ["inserter"]
    },
    {
      isDefault: false,
      name: "post-type-label",
      title: (0, import_i18n212.__)("Post Type Label"),
      description: (0, import_i18n212.__)(
        "Display the post type label based on the queried object."
      ),
      icon: title_default,
      attributes: {
        type: "post-type"
      },
      scope: ["inserter"]
    }
  ];
  variations15.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.type === variationAttributes.type;
  });
  var variations_default15 = variations15;

  // packages/block-library/build-module/query-title/deprecated.mjs
  var v217 = {
    attributes: {
      type: {
        type: "string"
      },
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v138 = {
    attributes: {
      type: {
        type: "string"
      },
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true
      },
      spacing: {
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default43 = [v217, v138];

  // packages/block-library/build-module/query-title/index.mjs
  var { name: name86 } = block_default85;
  var settings85 = {
    icon: title_default,
    edit: QueryTitleEdit,
    variations: variations_default15,
    deprecated: deprecated_default43
  };
  var init85 = () => initBlock({ name: name86, metadata: block_default85, settings: settings85 });

  // packages/block-library/build-module/query-total/index.mjs
  var query_total_exports = {};
  __export(query_total_exports, {
    init: () => init86,
    metadata: () => block_default86,
    name: () => name87,
    settings: () => settings86
  });

  // packages/block-library/build-module/query-total/block.json
  var block_default86 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/query-total",
    title: "Query Total",
    category: "theme",
    ancestor: ["core/query"],
    description: "Display the total number of results in a query.",
    textdomain: "default",
    attributes: {
      displayType: {
        type: "string",
        default: "total-results"
      }
    },
    usesContext: ["queryId", "query"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      shadow: true,
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-query-total"
  };

  // packages/block-library/build-module/query-total/edit.mjs
  var import_block_editor221 = __toESM(require_block_editor(), 1);
  var import_components136 = __toESM(require_components(), 1);
  var import_i18n213 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/query-total/icons.mjs
  var import_components135 = __toESM(require_components(), 1);
  var import_jsx_runtime446 = __toESM(require_jsx_runtime(), 1);
  var resultsFound = /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(
    import_components135.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(import_components135.Path, { d: "M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z" })
    }
  );
  var displayingResults = /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(
    import_components135.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(import_components135.Path, { d: "M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z" })
    }
  );
  var queryTotal = /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(
    import_components135.SVG,
    {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 24 24",
      width: "24",
      height: "24",
      "aria-hidden": "true",
      focusable: "false",
      children: /* @__PURE__ */ (0, import_jsx_runtime446.jsx)(import_components135.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z" })
    }
  );

  // packages/block-library/build-module/query-total/edit.mjs
  var import_jsx_runtime447 = __toESM(require_jsx_runtime(), 1);
  function QueryTotalEdit({ attributes: attributes2, setAttributes }) {
    const { displayType } = attributes2;
    const blockProps = (0, import_block_editor221.useBlockProps)();
    const getButtonPositionIcon = () => {
      switch (displayType) {
        case "total-results":
          return resultsFound;
        case "range-display":
          return displayingResults;
      }
    };
    const buttonPositionControls = [
      {
        role: "menuitemradio",
        title: (0, import_i18n213.__)("Total results"),
        isActive: displayType === "total-results",
        icon: resultsFound,
        onClick: () => {
          setAttributes({ displayType: "total-results" });
        }
      },
      {
        role: "menuitemradio",
        title: (0, import_i18n213.__)("Range display"),
        isActive: displayType === "range-display",
        icon: displayingResults,
        onClick: () => {
          setAttributes({ displayType: "range-display" });
        }
      }
    ];
    const controls = /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_block_editor221.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_components136.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(
      import_components136.ToolbarDropdownMenu,
      {
        icon: getButtonPositionIcon(),
        label: (0, import_i18n213.__)("Change display type"),
        controls: buttonPositionControls
      }
    ) }) });
    const renderDisplay = () => {
      if (displayType === "total-results") {
        return /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_jsx_runtime447.Fragment, { children: (0, import_i18n213.__)("12 results found") });
      }
      if (displayType === "range-display") {
        return /* @__PURE__ */ (0, import_jsx_runtime447.jsx)(import_jsx_runtime447.Fragment, { children: (0, import_i18n213.__)("Displaying 1 \u2013 10 of 12") });
      }
      return null;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime447.jsxs)("div", { ...blockProps, children: [
      controls,
      renderDisplay()
    ] });
  }

  // packages/block-library/build-module/query-total/index.mjs
  var { name: name87 } = block_default86;
  var settings86 = {
    icon: queryTotal,
    edit: QueryTotalEdit
  };
  var init86 = () => initBlock({ name: name87, metadata: block_default86, settings: settings86 });

  // packages/block-library/build-module/quote/index.mjs
  var quote_exports = {};
  __export(quote_exports, {
    init: () => init87,
    metadata: () => block_default87,
    name: () => name88,
    settings: () => settings87
  });
  var import_i18n215 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/quote/deprecated.mjs
  var import_blocks85 = __toESM(require_blocks(), 1);
  var import_block_editor222 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime448 = __toESM(require_jsx_runtime(), 1);
  var migrateToQuoteV2 = (attributes2) => {
    const { value, ...restAttributes } = attributes2;
    return [
      {
        ...restAttributes
      },
      value ? (0, import_blocks85.parseWithAttributeSchema)(value, {
        type: "array",
        source: "query",
        selector: "p",
        query: {
          content: {
            type: "string",
            source: "html"
          }
        }
      }).map(
        ({ content }) => (0, import_blocks85.createBlock)("core/paragraph", { content })
      ) : (0, import_blocks85.createBlock)("core/paragraph")
    ];
  };
  var TEXT_ALIGN_OPTIONS2 = ["left", "right", "center"];
  var migrateTextAlign3 = (attributes2, innerBlocks) => {
    const { align, ...rest } = attributes2;
    const migratedAttributes = TEXT_ALIGN_OPTIONS2.includes(align) ? { ...rest, textAlign: align } : attributes2;
    return [migratedAttributes, innerBlocks];
  };
  var migrateLargeStyle = (attributes2, innerBlocks) => {
    return [
      {
        ...attributes2,
        className: attributes2.className ? attributes2.className + " is-style-large" : "is-style-large"
      },
      innerBlocks
    ];
  };
  var v410 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      html: false,
      __experimentalOnEnter: true,
      __experimentalOnMerge: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      }
    },
    isEligible: ({ align }) => TEXT_ALIGN_OPTIONS2.includes(align),
    save({ attributes: attributes2 }) {
      const { align, citation } = attributes2;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)("blockquote", { ...import_block_editor222.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.InnerBlocks.Content, {}),
        !import_block_editor222.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate: migrateTextAlign3
  };
  var v312 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: "",
        role: "content"
      },
      align: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      __experimentalSlashInserter: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalDefaultControls: {
          fontSize: true,
          fontAppearance: true
        }
      }
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation } = attributes2;
      const className = clsx_default({
        [`has-text-align-${align}`]: align
      });
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)("blockquote", { ...import_block_editor222.useBlockProps.save({ className }), children: [
        /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { multiline: true, value }),
        !import_block_editor222.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { tagName: "cite", value: citation })
      ] });
    },
    migrate(attributes2) {
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    }
  };
  var v218 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: ""
      },
      align: {
        type: "string"
      }
    },
    migrate(attributes2) {
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)("blockquote", { style: { textAlign: align ? align : null }, children: [
        /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { multiline: true, value }),
        !import_block_editor222.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { tagName: "cite", value: citation })
      ] });
    }
  };
  var v139 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "cite",
        default: ""
      },
      align: {
        type: "string"
      },
      style: {
        type: "number",
        default: 1
      }
    },
    migrate(attributes2) {
      if (attributes2.style === 2) {
        const { style: style2, ...restAttributes } = attributes2;
        return migrateTextAlign3(
          ...migrateLargeStyle(...migrateToQuoteV2(restAttributes))
        );
      }
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation, style: style2 } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)(
        "blockquote",
        {
          className: style2 === 2 ? "is-large" : "",
          style: { textAlign: align ? align : null },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { multiline: true, value }),
            !import_block_editor222.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { tagName: "cite", value: citation })
          ]
        }
      );
    }
  };
  var v03 = {
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: ""
      },
      citation: {
        type: "string",
        source: "html",
        selector: "footer",
        default: ""
      },
      align: {
        type: "string"
      },
      style: {
        type: "number",
        default: 1
      }
    },
    migrate(attributes2) {
      if (!isNaN(parseInt(attributes2.style))) {
        const { style: style2, ...restAttributes } = attributes2;
        return migrateTextAlign3(...migrateToQuoteV2(restAttributes));
      }
      return migrateTextAlign3(...migrateToQuoteV2(attributes2));
    },
    save({ attributes: attributes2 }) {
      const { align, value, citation, style: style2 } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime448.jsxs)(
        "blockquote",
        {
          className: `blocks-quote-style-${style2}`,
          style: { textAlign: align ? align : null },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { multiline: true, value }),
            !import_block_editor222.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime448.jsx)(import_block_editor222.RichText.Content, { tagName: "footer", value: citation })
          ]
        }
      );
    }
  };
  var deprecated_default44 = [v410, v312, v218, v139, v03];

  // packages/block-library/build-module/quote/edit.mjs
  var import_i18n214 = __toESM(require_i18n(), 1);
  var import_block_editor223 = __toESM(require_block_editor(), 1);
  var import_components137 = __toESM(require_components(), 1);
  var import_data131 = __toESM(require_data(), 1);
  var import_element139 = __toESM(require_element(), 1);
  var import_deprecated48 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime449 = __toESM(require_jsx_runtime(), 1);
  var useMigrateOnLoad2 = (attributes2, clientId) => {
    const registry = (0, import_data131.useRegistry)();
    const { updateBlockAttributes, replaceInnerBlocks, selectBlock } = (0, import_data131.useDispatch)(import_block_editor223.store);
    (0, import_element139.useEffect)(() => {
      if (!attributes2.value) {
        return;
      }
      const [newAttributes, newInnerBlocks] = migrateToQuoteV2(attributes2);
      (0, import_deprecated48.default)("Value attribute on the quote block", {
        since: "6.0",
        version: "6.5",
        alternative: "inner blocks"
      });
      const shouldReselectBlock = registry.select(import_block_editor223.store).hasSelectedInnerBlock(clientId, true);
      registry.batch(() => {
        updateBlockAttributes(clientId, newAttributes);
        replaceInnerBlocks(clientId, newInnerBlocks);
        if (shouldReselectBlock) {
          selectBlock(clientId);
        }
      });
    }, [attributes2.value]);
  };
  function QuoteEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter,
    clientId,
    className,
    isSelected
  }) {
    const { textAlign, allowedBlocks } = attributes2;
    const { hasInnerBlocks } = (0, import_data131.useSelect)(
      (select10) => {
        const { getBlockCount } = select10(import_block_editor223.store);
        return {
          hasInnerBlocks: getBlockCount(clientId) > 0
        };
      },
      [clientId]
    );
    useMigrateOnLoad2(attributes2, clientId);
    const blockProps = (0, import_block_editor223.useBlockProps)({
      className: clsx_default(className, {
        [`has-text-align-${textAlign}`]: textAlign
      })
    });
    const innerBlocksProps = (0, import_block_editor223.useInnerBlocksProps)(blockProps, {
      __experimentalCaptureToolbars: true,
      renderAppender: hasInnerBlocks ? false : void 0,
      allowedBlocks
    });
    return /* @__PURE__ */ (0, import_jsx_runtime449.jsxs)(import_jsx_runtime449.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(import_block_editor223.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(
        import_block_editor223.AlignmentControl,
        {
          value: textAlign,
          onChange: (nextAlign) => {
            setAttributes({ textAlign: nextAlign });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime449.jsxs)(import_components137.BlockQuotation, { ...innerBlocksProps, children: [
        innerBlocksProps.children,
        /* @__PURE__ */ (0, import_jsx_runtime449.jsx)(
          Caption,
          {
            attributeKey: "citation",
            tagName: "cite",
            style: { display: "block" },
            isSelected,
            attributes: attributes2,
            setAttributes,
            icon: verse_default,
            label: (0, import_i18n214.__)("Quote citation"),
            placeholder: (
              // translators: placeholder text used for the
              // citation
              (0, import_i18n214.__)("Add citation")
            ),
            addLabel: (0, import_i18n214.__)("Add citation"),
            removeLabel: (0, import_i18n214.__)("Remove citation"),
            excludeElementClassName: true,
            className: "wp-block-quote__citation",
            insertBlocksAfter
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/quote/block.json
  var block_default87 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/quote",
    title: "Quote",
    category: "text",
    description: 'Give quoted text visual emphasis. "In quoting others, we cite ourselves." \u2014 Julio Cort\xE1zar',
    keywords: ["blockquote", "cite"],
    textdomain: "default",
    attributes: {
      value: {
        type: "string",
        source: "html",
        selector: "blockquote",
        multiline: "p",
        default: "",
        role: "content"
      },
      citation: {
        type: "rich-text",
        source: "rich-text",
        selector: "cite",
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["left", "right", "wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          style: true,
          width: true
        }
      },
      dimensions: {
        minHeight: true,
        __experimentalDefaultControls: {
          minHeight: false
        }
      },
      __experimentalOnEnter: true,
      __experimentalOnMerge: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      color: {
        gradients: true,
        heading: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      layout: {
        allowEditing: false
      },
      spacing: {
        blockGap: true,
        padding: true,
        margin: true
      },
      interactivity: {
        clientNavigation: true
      },
      allowedBlocks: true
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "plain", label: "Plain" }
    ],
    editorStyle: "wp-block-quote-editor",
    style: "wp-block-quote"
  };

  // packages/block-library/build-module/quote/save.mjs
  var import_block_editor224 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime450 = __toESM(require_jsx_runtime(), 1);
  function save40({ attributes: attributes2 }) {
    const { textAlign, citation } = attributes2;
    const className = clsx_default({
      [`has-text-align-${textAlign}`]: textAlign
    });
    return /* @__PURE__ */ (0, import_jsx_runtime450.jsxs)("blockquote", { ...import_block_editor224.useBlockProps.save({ className }), children: [
      /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(import_block_editor224.InnerBlocks.Content, {}),
      !import_block_editor224.RichText.isEmpty(citation) && /* @__PURE__ */ (0, import_jsx_runtime450.jsx)(import_block_editor224.RichText.Content, { tagName: "cite", value: citation })
    ] });
  }

  // packages/block-library/build-module/quote/transforms.mjs
  var import_block_editor225 = __toESM(require_block_editor(), 1);
  var import_blocks86 = __toESM(require_blocks(), 1);
  var transforms29 = {
    from: [
      {
        type: "block",
        blocks: ["core/verse"],
        transform: ({ content }) => {
          return (0, import_blocks86.createBlock)("core/quote", {}, [
            (0, import_blocks86.createBlock)("core/paragraph", { content })
          ]);
        }
      },
      {
        type: "block",
        blocks: ["core/pullquote"],
        transform: ({
          value,
          align,
          citation,
          anchor,
          fontSize,
          style: style2
        }) => {
          return (0, import_blocks86.createBlock)(
            "core/quote",
            {
              align,
              citation,
              anchor,
              fontSize,
              style: style2
            },
            [(0, import_blocks86.createBlock)("core/paragraph", { content: value })]
          );
        }
      },
      {
        type: "prefix",
        prefix: ">",
        transform: (content) => (0, import_blocks86.createBlock)("core/quote", {}, [
          (0, import_blocks86.createBlock)("core/paragraph", { content })
        ])
      },
      {
        type: "raw",
        schema: () => ({
          blockquote: {
            children: "*"
          }
        }),
        selector: "blockquote",
        transform: (node, handler) => {
          return (0, import_blocks86.createBlock)(
            "core/quote",
            // Don't try to parse any `cite` out of this content.
            // * There may be more than one cite.
            // * There may be more attribution text than just the cite.
            // * If the cite is nested in the quoted text, it's wrong to
            //   remove it.
            {},
            handler({
              HTML: node.innerHTML,
              mode: "BLOCKS"
            })
          );
        }
      },
      {
        type: "block",
        isMultiBlock: true,
        blocks: ["*"],
        isMatch: ({}, blocks) => {
          if (blocks.length === 1) {
            return [
              "core/paragraph",
              "core/heading",
              "core/list",
              "core/pullquote"
            ].includes(blocks[0].name);
          }
          return !blocks.some(({ name: name118 }) => name118 === "core/quote");
        },
        __experimentalConvert: (blocks) => (0, import_blocks86.createBlock)(
          "core/quote",
          {},
          blocks.map((block) => (0, import_blocks86.cloneSanitizedBlock)(block))
        )
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/pullquote"],
        isMatch: ({}, block) => {
          return block.innerBlocks.every(
            ({ name: name118 }) => name118 === "core/paragraph"
          );
        },
        transform: ({ align, citation, anchor, fontSize, style: style2 }, innerBlocks) => {
          const value = innerBlocks.map(({ attributes: attributes2 }) => `${attributes2.content}`).join("<br>");
          return (0, import_blocks86.createBlock)("core/pullquote", {
            value,
            align,
            citation,
            anchor,
            fontSize,
            style: style2
          });
        }
      },
      {
        type: "block",
        blocks: ["core/verse"],
        isMatch: ({}, block) => {
          return block.innerBlocks.every((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return true;
            }
            const converted = (0, import_blocks86.switchToBlockType)(
              innerBlock,
              "core/paragraph"
            );
            return converted !== null;
          });
        },
        transform: ({}, innerBlocks) => {
          const paragraphs = innerBlocks.flatMap((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return innerBlock;
            }
            return (0, import_blocks86.switchToBlockType)(innerBlock, "core/paragraph") || [];
          });
          const content = paragraphs.map(({ attributes: attributes2 }) => attributes2.content || "").filter(Boolean).join("<br>");
          return (0, import_blocks86.createBlock)("core/verse", { content });
        }
      },
      {
        type: "block",
        blocks: ["core/paragraph"],
        isMatch: ({ citation }, block) => {
          const innerBlocks = block.innerBlocks;
          if (!innerBlocks.length) {
            return !import_block_editor225.RichText.isEmpty(citation);
          }
          return innerBlocks.every((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return true;
            }
            const converted = (0, import_blocks86.switchToBlockType)(
              innerBlock,
              "core/paragraph"
            );
            return converted !== null;
          });
        },
        transform: ({ citation }, innerBlocks) => {
          const paragraphs = innerBlocks.flatMap((innerBlock) => {
            if (innerBlock.name === "core/paragraph") {
              return innerBlock;
            }
            return (0, import_blocks86.switchToBlockType)(innerBlock, "core/paragraph") || [];
          });
          return import_block_editor225.RichText.isEmpty(citation) ? paragraphs : [
            ...paragraphs,
            (0, import_blocks86.createBlock)("core/paragraph", {
              content: citation
            })
          ];
        }
      },
      {
        type: "block",
        blocks: ["core/group"],
        transform: ({ citation, anchor }, innerBlocks) => (0, import_blocks86.createBlock)(
          "core/group",
          { anchor },
          import_block_editor225.RichText.isEmpty(citation) ? innerBlocks : [
            ...innerBlocks,
            (0, import_blocks86.createBlock)("core/paragraph", {
              content: citation
            })
          ]
        )
      }
    ],
    ungroup: ({ citation }, innerBlocks) => import_block_editor225.RichText.isEmpty(citation) ? innerBlocks : [
      ...innerBlocks,
      (0, import_blocks86.createBlock)("core/paragraph", {
        content: citation
      })
    ]
  };
  var transforms_default30 = transforms29;

  // packages/block-library/build-module/quote/index.mjs
  var { name: name88 } = block_default87;
  var TEMPLATE15 = [["core/paragraph", {}]];
  var settings87 = {
    icon: quote_default,
    example: {
      attributes: {
        citation: (0, import_i18n215.__)("Julio Cort\xE1zar")
      },
      innerBlocks: [
        {
          name: "core/paragraph",
          attributes: {
            content: (0, import_i18n215.__)("In quoting others, we cite ourselves.")
          }
        }
      ]
    },
    transforms: transforms_default30,
    template: TEMPLATE15,
    templateInsertUpdatesSelection: true,
    edit: QuoteEdit,
    save: save40,
    deprecated: deprecated_default44
  };
  var init87 = () => initBlock({ name: name88, metadata: block_default87, settings: settings87 });

  // packages/block-library/build-module/block/index.mjs
  var block_exports = {};
  __export(block_exports, {
    init: () => init88,
    metadata: () => block_default88,
    name: () => name89,
    settings: () => settings88
  });
  var import_core_data82 = __toESM(require_core_data(), 1);
  var import_data133 = __toESM(require_data(), 1);
  var import_html_entities13 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/block/block.json
  var block_default88 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/block",
    title: "Pattern",
    category: "reusable",
    description: "Reuse this design across your site.",
    keywords: ["reusable"],
    textdomain: "default",
    attributes: {
      ref: {
        type: "number"
      },
      content: {
        type: "object",
        default: {}
      }
    },
    providesContext: {
      "pattern/overrides": "content"
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false,
      interactivity: {
        clientNavigation: true
      },
      customCSS: false,
      visibility: false
    }
  };

  // packages/block-library/build-module/block/edit.mjs
  var import_data132 = __toESM(require_data(), 1);
  var import_element140 = __toESM(require_element(), 1);
  var import_core_data81 = __toESM(require_core_data(), 1);
  var import_components138 = __toESM(require_components(), 1);
  var import_i18n216 = __toESM(require_i18n(), 1);
  var import_block_editor226 = __toESM(require_block_editor(), 1);
  var import_patterns = __toESM(require_patterns(), 1);
  var import_blocks87 = __toESM(require_blocks(), 1);
  var import_jsx_runtime451 = __toESM(require_jsx_runtime(), 1);
  var { useLayoutClasses } = unlock(import_block_editor226.privateApis);
  var { isOverridableBlock } = unlock(import_patterns.privateApis);
  var fullAlignments = ["full", "wide", "left", "right"];
  var useInferredLayout = (blocks, parentLayout) => {
    const initialInferredAlignmentRef = (0, import_element140.useRef)();
    return (0, import_element140.useMemo)(() => {
      if (!blocks?.length) {
        return {};
      }
      let alignment = initialInferredAlignmentRef.current;
      if (alignment === void 0) {
        const isConstrained = parentLayout?.type === "constrained";
        const hasFullAlignment = blocks.some(
          (block) => fullAlignments.includes(block.attributes.align)
        );
        alignment = isConstrained && hasFullAlignment ? "full" : null;
        initialInferredAlignmentRef.current = alignment;
      }
      const layout = alignment ? parentLayout : void 0;
      return { alignment, layout };
    }, [blocks, parentLayout]);
  };
  function RecursionWarning() {
    const blockProps = (0, import_block_editor226.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_block_editor226.Warning, { children: (0, import_i18n216.__)("Block cannot be rendered inside itself.") }) });
  }
  var NOOP3 = () => {
  };
  function ReusableBlockEditRecursionWrapper(props) {
    const { ref } = props.attributes;
    const hasAlreadyRendered = (0, import_block_editor226.useHasRecursion)(ref);
    if (hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(RecursionWarning, {});
    }
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_block_editor226.RecursionProvider, { uniqueId: ref, children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(ReusableBlockEdit, { ...props }) });
  }
  function ReusableBlockControl({
    recordId,
    canOverrideBlocks,
    hasContent,
    handleEditOriginal,
    resetContent
  }) {
    const canUserEdit = (0, import_data132.useSelect)(
      (select10) => !!select10(import_core_data81.store).canUser("update", {
        kind: "postType",
        name: "wp_block",
        id: recordId
      }),
      [recordId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsxs)(import_jsx_runtime451.Fragment, { children: [
      canUserEdit && !!handleEditOriginal && /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_block_editor226.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_components138.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_components138.ToolbarButton, { onClick: handleEditOriginal, children: (0, import_i18n216.__)("Edit original") }) }) }),
      canOverrideBlocks && /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_block_editor226.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_components138.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
        import_components138.ToolbarButton,
        {
          onClick: resetContent,
          disabled: !hasContent,
          children: (0, import_i18n216.__)("Reset")
        }
      ) }) })
    ] });
  }
  var EMPTY_OBJECT3 = {};
  function ReusableBlockEdit({
    name: name118,
    attributes: { ref, content },
    __unstableParentLayout: parentLayout,
    setAttributes
  }) {
    const { record, hasResolved } = (0, import_core_data81.useEntityRecord)(
      "postType",
      "wp_block",
      ref
    );
    const [blocks] = (0, import_core_data81.useEntityBlockEditor)("postType", "wp_block", {
      id: ref
    });
    const isMissing = hasResolved && !record;
    const { __unstableMarkLastChangeAsPersistent } = (0, import_data132.useDispatch)(import_block_editor226.store);
    const {
      onNavigateToEntityRecord,
      hasPatternOverridesSource,
      supportedBlockTypesRaw
    } = (0, import_data132.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor226.store);
      return {
        onNavigateToEntityRecord: getSettings2().onNavigateToEntityRecord,
        hasPatternOverridesSource: !!(0, import_blocks87.getBlockBindingsSource)(
          "core/pattern-overrides"
        ),
        supportedBlockTypesRaw: getSettings2().__experimentalBlockBindingsSupportedAttributes || EMPTY_OBJECT3
      };
    }, []);
    const canOverrideBlocks = (0, import_element140.useMemo)(() => {
      const supportedBlockTypes = Object.keys(supportedBlockTypesRaw);
      const hasOverridableBlocks = (_blocks) => _blocks?.some((block) => {
        if (supportedBlockTypes.includes(block.name) && isOverridableBlock(block)) {
          return true;
        }
        return hasOverridableBlocks(block.innerBlocks);
      });
      return hasPatternOverridesSource && hasOverridableBlocks(blocks);
    }, [hasPatternOverridesSource, blocks, supportedBlockTypesRaw]);
    const { alignment, layout } = useInferredLayout(blocks, parentLayout);
    const layoutClasses = useLayoutClasses({ layout }, name118);
    const blockProps = (0, import_block_editor226.useBlockProps)({
      className: clsx_default(
        "block-library-block__reusable-block-container",
        layout && layoutClasses,
        { [`align${alignment}`]: alignment }
      )
    });
    const innerBlocksProps = (0, import_block_editor226.useInnerBlocksProps)(blockProps, {
      layout,
      value: blocks,
      onInput: NOOP3,
      onChange: NOOP3,
      renderAppender: blocks?.length ? void 0 : import_block_editor226.InnerBlocks.ButtonBlockAppender
    });
    const handleEditOriginal = () => {
      onNavigateToEntityRecord({
        postId: ref,
        postType: "wp_block"
      });
    };
    const resetContent = () => {
      if (content) {
        __unstableMarkLastChangeAsPersistent();
        setAttributes({ content: void 0 });
      }
    };
    let children = null;
    if (isMissing) {
      children = /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_block_editor226.Warning, { children: (0, import_i18n216.__)("Block has been deleted or is unavailable.") });
    }
    if (!hasResolved) {
      children = /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_components138.Placeholder, { children: /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(import_components138.Spinner, {}) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime451.jsxs)(import_jsx_runtime451.Fragment, { children: [
      hasResolved && !isMissing && /* @__PURE__ */ (0, import_jsx_runtime451.jsx)(
        ReusableBlockControl,
        {
          recordId: ref,
          canOverrideBlocks,
          hasContent: !!content,
          handleEditOriginal: onNavigateToEntityRecord ? handleEditOriginal : void 0,
          resetContent
        }
      ),
      children === null ? /* @__PURE__ */ (0, import_jsx_runtime451.jsx)("div", { ...innerBlocksProps }) : /* @__PURE__ */ (0, import_jsx_runtime451.jsx)("div", { ...blockProps, children })
    ] });
  }

  // packages/block-library/build-module/block/deprecated.mjs
  var isObject3 = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
  var v219 = {
    attributes: {
      ref: {
        type: "number"
      },
      content: {
        type: "object"
      }
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false
    },
    // Force this deprecation to run whenever there's a values sub-property that's an object.
    //
    // This could fail in the future if a block ever has binding to a `values` attribute.
    // Some extra protection is added to ensure `values` is an object, but this only reduces
    // the likelihood, it doesn't solve it completely.
    isEligible({ content }) {
      return !!content && Object.keys(content).every(
        (contentKey) => content[contentKey].values && isObject3(content[contentKey].values)
      );
    },
    /*
     * Old attribute format:
     * content: {
     *     "V98q_x": {
     * 	   		// The attribute values are now stored as a 'values' sub-property.
     *         values: { content: 'My content value' },
     * 	       // ... additional metadata, like the block name can be stored here.
     *     }
     * }
     *
     * New attribute format:
     * content: {
     *     "V98q_x": {
     *         content: 'My content value',
     *     }
     * }
     */
    migrate(attributes2) {
      const { content, ...retainedAttributes } = attributes2;
      if (content && Object.keys(content).length) {
        const updatedContent = { ...content };
        for (const contentKey in content) {
          updatedContent[contentKey] = content[contentKey].values;
        }
        return {
          ...retainedAttributes,
          content: updatedContent
        };
      }
      return attributes2;
    }
  };
  var v140 = {
    attributes: {
      ref: {
        type: "number"
      },
      overrides: {
        type: "object"
      }
    },
    supports: {
      customClassName: false,
      html: false,
      inserter: false,
      renaming: false
    },
    // Force this deprecation to run whenever there's an `overrides` object.
    isEligible({ overrides }) {
      return !!overrides;
    },
    /*
     * Old attribute format:
     * overrides: {
     *     // An key is an id that represents a block.
     *     // The values are the attribute values of the block.
     *     "V98q_x": { content: 'My content value' }
     * }
     *
     * New attribute format:
     * content: {
     *     "V98q_x": { content: 'My content value' }
     * }
     *
     */
    migrate(attributes2) {
      const { overrides, ...retainedAttributes } = attributes2;
      const content = {};
      Object.keys(overrides).forEach((id) => {
        content[id] = overrides[id];
      });
      return {
        ...retainedAttributes,
        content
      };
    }
  };
  var deprecated_default45 = [v219, v140];

  // packages/block-library/build-module/block/index.mjs
  var { name: name89 } = block_default88;
  var settings88 = {
    deprecated: deprecated_default45,
    edit: ReusableBlockEditRecursionWrapper,
    icon: symbol_default,
    __experimentalLabel: ({ ref }) => {
      if (!ref) {
        return;
      }
      const entity = (0, import_data133.select)(import_core_data82.store).getEditedEntityRecord(
        "postType",
        "wp_block",
        ref
      );
      if (!entity?.title) {
        return;
      }
      return (0, import_html_entities13.decodeEntities)(entity.title);
    }
  };
  var init88 = () => initBlock({ name: name89, metadata: block_default88, settings: settings88 });

  // packages/block-library/build-module/read-more/index.mjs
  var read_more_exports = {};
  __export(read_more_exports, {
    init: () => init89,
    metadata: () => block_default89,
    name: () => name90,
    settings: () => settings89
  });
  var import_i18n218 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/read-more/block.json
  var block_default89 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/read-more",
    title: "Read More",
    category: "theme",
    description: "Displays the link of a post, page, or any other content-type.",
    textdomain: "default",
    attributes: {
      content: {
        type: "string",
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    usesContext: ["postId"],
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        text: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true,
          textDecoration: true
        }
      },
      spacing: {
        margin: ["top", "bottom"],
        padding: true,
        __experimentalDefaultControls: {
          padding: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalDefaultControls: {
          width: true
        }
      },
      shadow: true,
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-read-more"
  };

  // packages/block-library/build-module/read-more/edit.mjs
  var import_block_editor227 = __toESM(require_block_editor(), 1);
  var import_components139 = __toESM(require_components(), 1);
  var import_blocks88 = __toESM(require_blocks(), 1);
  var import_i18n217 = __toESM(require_i18n(), 1);
  var import_jsx_runtime452 = __toESM(require_jsx_runtime(), 1);
  function ReadMore({
    attributes: { content, linkTarget },
    setAttributes,
    insertBlocksAfter
  }) {
    const blockProps = (0, import_block_editor227.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime452.jsxs)(import_jsx_runtime452.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(import_block_editor227.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(
        import_components139.__experimentalToolsPanel,
        {
          label: (0, import_i18n217.__)("Settings"),
          resetAll: () => setAttributes({ linkTarget: "_self" }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(
            import_components139.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n217.__)("Open in new tab"),
              isShownByDefault: true,
              hasValue: () => linkTarget !== "_self",
              onDeselect: () => setAttributes({ linkTarget: "_self" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(
                import_components139.ToggleControl,
                {
                  label: (0, import_i18n217.__)("Open in new tab"),
                  onChange: (value) => setAttributes({
                    linkTarget: value ? "_blank" : "_self"
                  }),
                  checked: linkTarget === "_blank"
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime452.jsx)(
        import_block_editor227.RichText,
        {
          identifier: "content",
          tagName: "a",
          "aria-label": (0, import_i18n217.__)("\u201CRead more\u201D link text"),
          placeholder: (0, import_i18n217.__)("Read more"),
          value: content,
          onChange: (newValue) => setAttributes({ content: newValue }),
          __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
            (0, import_blocks88.createBlock)((0, import_blocks88.getDefaultBlockName)())
          ) : void 0,
          withoutInteractiveFormatting: true,
          ...blockProps
        }
      )
    ] });
  }

  // packages/block-library/build-module/read-more/index.mjs
  var { name: name90 } = block_default89;
  var settings89 = {
    icon: link_default,
    edit: ReadMore,
    example: {
      attributes: {
        content: (0, import_i18n218.__)("Read more")
      }
    }
  };
  var init89 = () => initBlock({ name: name90, metadata: block_default89, settings: settings89 });

  // packages/block-library/build-module/rss/index.mjs
  var rss_exports = {};
  __export(rss_exports, {
    init: () => init90,
    metadata: () => block_default90,
    name: () => name91,
    settings: () => settings90
  });

  // packages/block-library/build-module/rss/block.json
  var block_default90 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/rss",
    title: "RSS",
    category: "widgets",
    description: "Display entries from any RSS or Atom feed.",
    keywords: ["atom", "feed"],
    textdomain: "default",
    attributes: {
      columns: {
        type: "number",
        default: 2
      },
      blockLayout: {
        type: "string",
        default: "list"
      },
      feedURL: {
        type: "string",
        default: "",
        role: "content"
      },
      itemsToShow: {
        type: "number",
        default: 5
      },
      displayExcerpt: {
        type: "boolean",
        default: false
      },
      displayAuthor: {
        type: "boolean",
        default: false
      },
      displayDate: {
        type: "boolean",
        default: false
      },
      excerptLength: {
        type: "number",
        default: 55
      },
      openInNewTab: {
        type: "boolean",
        default: false
      },
      rel: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: true,
      html: false,
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          padding: false,
          margin: false
        }
      },
      shadow: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        background: true,
        text: true,
        gradients: true,
        link: true
      }
    },
    editorStyle: "wp-block-rss-editor",
    style: "wp-block-rss"
  };

  // packages/block-library/build-module/rss/edit.mjs
  var import_block_editor228 = __toESM(require_block_editor(), 1);
  var import_components140 = __toESM(require_components(), 1);
  var import_element141 = __toESM(require_element(), 1);
  var import_i18n219 = __toESM(require_i18n(), 1);
  var import_url24 = __toESM(require_url(), 1);
  var import_server_side_render5 = __toESM(require_server_side_render(), 1);
  var import_compose57 = __toESM(require_compose(), 1);
  var import_jsx_runtime453 = __toESM(require_jsx_runtime(), 1);
  var DEFAULT_MIN_ITEMS = 1;
  var DEFAULT_MAX_ITEMS = 20;
  function RSSEdit({ attributes: attributes2, setAttributes, name: name118 }) {
    const [isEditing, setIsEditing] = (0, import_element141.useState)(!attributes2.feedURL);
    const {
      blockLayout,
      columns,
      displayAuthor,
      displayDate,
      displayExcerpt,
      excerptLength,
      feedURL,
      itemsToShow,
      openInNewTab,
      rel
    } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function toggleAttribute(propName) {
      return () => {
        const value = attributes2[propName];
        setAttributes({ [propName]: !value });
      };
    }
    function onSubmitURL(event) {
      event.preventDefault();
      if (feedURL) {
        setAttributes({ feedURL: (0, import_url24.prependHTTPS)(feedURL) });
        setIsEditing(false);
      }
    }
    const { content, status, error: error2 } = (0, import_server_side_render5.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name118
    });
    const disabledRef = (0, import_compose57.useDisabled)();
    const blockProps = (0, import_block_editor228.useBlockProps)({ ref: isEditing ? null : disabledRef });
    const label = (0, import_i18n219.__)("RSS URL");
    if (isEditing) {
      return /* @__PURE__ */ (0, import_jsx_runtime453.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
        import_components140.Placeholder,
        {
          icon: rss_default,
          label,
          instructions: (0, import_i18n219.__)(
            "Display entries from any RSS or Atom feed."
          ),
          children: /* @__PURE__ */ (0, import_jsx_runtime453.jsxs)(
            "form",
            {
              onSubmit: onSubmitURL,
              className: "wp-block-rss__placeholder-form",
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.__experimentalInputControl,
                  {
                    label,
                    type: "url",
                    hideLabelFromVision: true,
                    placeholder: (0, import_i18n219.__)("Enter URL here\u2026"),
                    value: feedURL,
                    onChange: (value) => setAttributes({ feedURL: value }),
                    className: "wp-block-rss__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n219.__)("Apply")
                  }
                )
              ]
            }
          )
        }
      ) });
    }
    const toolbarControls = [
      {
        icon: pencil_default,
        title: (0, import_i18n219.__)("Edit RSS URL"),
        onClick: () => setIsEditing(true)
      },
      {
        icon: list_default,
        title: (0, import_i18n219._x)("List view", "RSS block display setting"),
        onClick: () => setAttributes({ blockLayout: "list" }),
        isActive: blockLayout === "list"
      },
      {
        icon: grid_default,
        title: (0, import_i18n219._x)("Grid view", "RSS block display setting"),
        onClick: () => setAttributes({ blockLayout: "grid" }),
        isActive: blockLayout === "grid"
      }
    ];
    return /* @__PURE__ */ (0, import_jsx_runtime453.jsxs)(import_jsx_runtime453.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_block_editor228.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_components140.ToolbarGroup, { controls: toolbarControls }) }),
      /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_block_editor228.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime453.jsxs)(
        import_components140.__experimentalToolsPanel,
        {
          label: (0, import_i18n219.__)("Settings"),
          resetAll: () => {
            setAttributes({
              itemsToShow: 5,
              displayAuthor: false,
              displayDate: false,
              displayExcerpt: false,
              excerptLength: 55,
              columns: 2,
              openInNewTab: false
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Number of items"),
                hasValue: () => itemsToShow !== 5,
                onDeselect: () => setAttributes({ itemsToShow: 5 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.RangeControl,
                  {
                    label: (0, import_i18n219.__)("Number of items"),
                    value: itemsToShow,
                    onChange: (value) => setAttributes({ itemsToShow: value }),
                    min: DEFAULT_MIN_ITEMS,
                    max: DEFAULT_MAX_ITEMS,
                    required: true
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display author"),
                hasValue: () => !!displayAuthor,
                onDeselect: () => setAttributes({ displayAuthor: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display author"),
                    checked: displayAuthor,
                    onChange: toggleAttribute("displayAuthor")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display date"),
                hasValue: () => !!displayDate,
                onDeselect: () => setAttributes({ displayDate: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display date"),
                    checked: displayDate,
                    onChange: toggleAttribute("displayDate")
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Display excerpt"),
                hasValue: () => !!displayExcerpt,
                onDeselect: () => setAttributes({ displayExcerpt: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Display excerpt"),
                    checked: displayExcerpt,
                    onChange: toggleAttribute("displayExcerpt")
                  }
                )
              }
            ),
            displayExcerpt && /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Max number of words in excerpt"),
                hasValue: () => excerptLength !== 55,
                onDeselect: () => setAttributes({ excerptLength: 55 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.RangeControl,
                  {
                    label: (0, import_i18n219.__)("Max number of words in excerpt"),
                    value: excerptLength,
                    onChange: (value) => setAttributes({ excerptLength: value }),
                    min: 10,
                    max: 100,
                    required: true
                  }
                )
              }
            ),
            blockLayout === "grid" && /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Columns"),
                hasValue: () => columns !== 2,
                onDeselect: () => setAttributes({ columns: 2 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.RangeControl,
                  {
                    label: (0, import_i18n219.__)("Columns"),
                    value: columns,
                    onChange: (value) => setAttributes({ columns: value }),
                    min: 2,
                    max: 6,
                    required: true
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
              import_components140.__experimentalToolsPanelItem,
              {
                label: (0, import_i18n219.__)("Open links in new tab"),
                hasValue: () => !!openInNewTab,
                onDeselect: () => setAttributes({ openInNewTab: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
                  import_components140.ToggleControl,
                  {
                    label: (0, import_i18n219.__)("Open links in new tab"),
                    checked: openInNewTab,
                    onChange: (value) => setAttributes({ openInNewTab: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_block_editor228.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(
        import_components140.TextControl,
        {
          label: (0, import_i18n219.__)("Link relation"),
          help: (0, import_element141.createInterpolateElement)(
            (0, import_i18n219.__)(
              "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_components140.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
            }
          ),
          value: rel || "",
          onChange: (value) => setAttributes({ rel: value })
        }
      ) }),
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime453.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(import_components140.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime453.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime453.jsx)("p", { children: (0, import_i18n219.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n219.__)("Error: %s"),
        error2
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime453.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }

  // packages/block-library/build-module/rss/index.mjs
  var { name: name91 } = block_default90;
  var settings90 = {
    icon: rss_default,
    example: {
      attributes: {
        feedURL: "https://wordpress.org"
      }
    },
    edit: RSSEdit
  };
  var init90 = () => initBlock({ name: name91, metadata: block_default90, settings: settings90 });

  // packages/block-library/build-module/search/index.mjs
  var search_exports = {};
  __export(search_exports, {
    init: () => init91,
    metadata: () => block_default91,
    name: () => name92,
    settings: () => settings91
  });
  var import_i18n222 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/search/block.json
  var block_default91 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/search",
    title: "Search",
    category: "widgets",
    description: "Help visitors find your content.",
    keywords: ["find"],
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        role: "content"
      },
      showLabel: {
        type: "boolean",
        default: true
      },
      placeholder: {
        type: "string",
        default: "",
        role: "content"
      },
      width: {
        type: "number"
      },
      widthUnit: {
        type: "string"
      },
      buttonText: {
        type: "string",
        role: "content"
      },
      buttonPosition: {
        type: "string",
        default: "button-outside"
      },
      buttonUseIcon: {
        type: "boolean",
        default: false
      },
      query: {
        type: "object",
        default: {}
      },
      tagName: {
        type: "string",
        default: ""
      }
    },
    supports: {
      anchor: true,
      align: ["left", "center", "right"],
      color: {
        gradients: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      interactivity: true,
      typography: {
        __experimentalSkipSerialization: true,
        __experimentalSelector: ".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        width: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          color: true,
          radius: true,
          width: true
        }
      },
      spacing: {
        margin: true
      },
      html: false
    },
    editorStyle: "wp-block-search-editor",
    style: "wp-block-search",
    selectors: {
      color: ".wp-block-search .wp-block-search__button, .wp-block-search.wp-block-search__no-button .wp-block-search__input",
      border: ".wp-block-search.wp-block-search__button-outside .wp-block-search__input, .wp-block-search.wp-block-search__button-outside .wp-block-search__button, .wp-block-search.wp-block-search__no-button .wp-block-search__input, .wp-block-search.wp-block-search__button-only .wp-block-search__input, .wp-block-search.wp-block-search__button-only .wp-block-search__button, .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper"
    }
  };

  // packages/block-library/build-module/search/edit.mjs
  var import_block_editor229 = __toESM(require_block_editor(), 1);
  var import_data134 = __toESM(require_data(), 1);
  var import_element142 = __toESM(require_element(), 1);
  var import_components141 = __toESM(require_components(), 1);
  var import_compose58 = __toESM(require_compose(), 1);
  var import_i18n220 = __toESM(require_i18n(), 1);
  var import_dom21 = __toESM(require_dom(), 1);
  var import_a11y4 = __toESM(require_a11y(), 1);
  var import_primitives168 = __toESM(require_primitives(), 1);

  // packages/block-library/build-module/search/utils.mjs
  var PC_WIDTH_DEFAULT = 50;
  var PX_WIDTH_DEFAULT = 350;
  var MIN_WIDTH = 220;
  function isPercentageUnit(unit) {
    return unit === "%";
  }

  // packages/block-library/build-module/search/edit.mjs
  var import_jsx_runtime454 = __toESM(require_jsx_runtime(), 1);
  var TAG_NAME_MESSAGES = {
    "": (0, import_i18n220.__)(
      "Lets the theme decide. Uses the <search> landmark element if the theme opts in, otherwise a <form>."
    ),
    search: (0, import_i18n220.__)(
      "Wraps the block in a <search> landmark, announced as a search region by assistive technologies."
    ),
    form: (0, import_i18n220.__)(
      'Uses a <form role="search"> wrapper for backward compatibility with existing theme styles.'
    )
  };
  var DEFAULT_INNER_PADDING = "4px";
  var PERCENTAGE_WIDTHS = [25, 50, 75, 100];
  var searchBlockIcon = /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_primitives168.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_primitives168.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
  function SearchEdit({
    className,
    attributes: attributes2,
    setAttributes,
    toggleSelection,
    isSelected,
    clientId
  }) {
    const {
      label,
      showLabel,
      placeholder: placeholder2,
      width,
      widthUnit,
      align,
      buttonText,
      buttonPosition,
      buttonUseIcon,
      tagName,
      style: style2
    } = attributes2;
    const wasJustInsertedIntoNavigationBlock = (0, import_data134.useSelect)(
      (select10) => {
        const { getBlockParentsByBlockName, wasBlockJustInserted } = select10(import_block_editor229.store);
        return !!getBlockParentsByBlockName(clientId, "core/navigation")?.length && wasBlockJustInserted(clientId);
      },
      [clientId]
    );
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data134.useDispatch)(import_block_editor229.store);
    (0, import_element142.useEffect)(() => {
      if (wasJustInsertedIntoNavigationBlock) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({
          showLabel: false,
          buttonUseIcon: true,
          buttonPosition: "button-inside"
        });
      }
    }, [
      __unstableMarkNextChangeAsNotPersistent,
      wasJustInsertedIntoNavigationBlock,
      setAttributes
    ]);
    const borderRadius = style2?.border?.radius;
    let borderProps = (0, import_block_editor229.__experimentalUseBorderProps)(attributes2);
    if (typeof borderRadius === "number") {
      borderProps = {
        ...borderProps,
        style: {
          ...borderProps.style,
          borderRadius: `${borderRadius}px`
        }
      };
    }
    const colorProps = (0, import_block_editor229.__experimentalUseColorProps)(attributes2);
    const [fluidTypographySettings, layout] = (0, import_block_editor229.useSettings)(
      "typography.fluid",
      "layout"
    );
    const typographyProps = (0, import_block_editor229.getTypographyClassesAndStyles)(attributes2, {
      typography: {
        fluid: fluidTypographySettings
      },
      layout: {
        wideSize: layout?.wideSize
      }
    });
    const unitControlInstanceId = (0, import_compose58.useInstanceId)(import_components141.__experimentalUnitControl);
    const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
    const isButtonPositionInside = "button-inside" === buttonPosition;
    const isButtonPositionOutside = "button-outside" === buttonPosition;
    const hasNoButton = "no-button" === buttonPosition;
    const hasOnlyButton = "button-only" === buttonPosition;
    const isSearchFieldHidden = hasOnlyButton && !isSelected;
    const searchFieldRef = (0, import_element142.useRef)();
    const buttonRef = (0, import_element142.useRef)();
    const units = (0, import_components141.__experimentalUseCustomUnits)({
      availableUnits: ["%", "px"],
      defaultValues: { "%": PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT }
    });
    const getBlockClassNames = () => {
      return clsx_default(
        className,
        isButtonPositionInside ? "wp-block-search__button-inside" : void 0,
        isButtonPositionOutside ? "wp-block-search__button-outside" : void 0,
        hasNoButton ? "wp-block-search__no-button" : void 0,
        hasOnlyButton ? "wp-block-search__button-only" : void 0,
        !buttonUseIcon && !hasNoButton ? "wp-block-search__text-button" : void 0,
        buttonUseIcon && !hasNoButton ? "wp-block-search__icon-button" : void 0,
        isSearchFieldHidden ? "wp-block-search__searchfield-hidden" : void 0
      );
    };
    const buttonPositionControls = [
      {
        label: (0, import_i18n220.__)("Button outside"),
        value: "button-outside"
      },
      {
        label: (0, import_i18n220.__)("Button inside"),
        value: "button-inside"
      },
      {
        label: (0, import_i18n220.__)("No button"),
        value: "no-button"
      },
      {
        label: (0, import_i18n220.__)("Button only"),
        value: "button-only"
      }
    ];
    const getResizableSides = () => {
      if (hasOnlyButton) {
        return {};
      }
      return {
        right: align !== "right",
        left: align === "right"
      };
    };
    const renderTextField = () => {
      const textFieldClasses = clsx_default(
        "wp-block-search__input",
        hasNoButton ? colorProps.className : void 0,
        isButtonPositionInside ? void 0 : borderProps.className,
        typographyProps.className
      );
      const textFieldStyles = {
        ...hasNoButton ? colorProps.style : {},
        ...isButtonPositionInside ? {
          borderRadius: borderProps.style?.borderRadius,
          borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
          borderTopRightRadius: borderProps.style?.borderTopRightRadius,
          borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
          borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
        } : borderProps.style,
        ...typographyProps.style,
        textDecoration: void 0
      };
      return /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
        "input",
        {
          type: "search",
          className: textFieldClasses,
          style: textFieldStyles,
          "aria-label": (0, import_i18n220.__)("Optional placeholder text"),
          placeholder: placeholder2 ? void 0 : (0, import_i18n220.__)("Optional placeholder\u2026"),
          value: placeholder2,
          onChange: (event) => setAttributes({ placeholder: event.target.value }),
          ref: searchFieldRef
        }
      );
    };
    const renderButton = () => {
      const buttonClasses = clsx_default(
        "wp-block-search__button",
        colorProps.className,
        typographyProps.className,
        isButtonPositionInside ? void 0 : borderProps.className,
        buttonUseIcon ? "has-icon" : void 0,
        (0, import_block_editor229.__experimentalGetElementClassName)("button")
      );
      const buttonStyles = {
        ...colorProps.style,
        ...typographyProps.style,
        ...isButtonPositionInside ? {
          borderRadius: borderProps.style?.borderRadius,
          borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
          borderTopRightRadius: borderProps.style?.borderTopRightRadius,
          borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
          borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
        } : borderProps.style
      };
      return /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(import_jsx_runtime454.Fragment, { children: [
        buttonUseIcon && /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
          "button",
          {
            type: "button",
            className: buttonClasses,
            style: buttonStyles,
            "aria-label": buttonText ? (0, import_dom21.__unstableStripHTML)(buttonText) : (0, import_i18n220.__)("Search"),
            ref: buttonRef,
            children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(icon_default, { icon: searchBlockIcon })
          }
        ),
        !buttonUseIcon && /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
          import_block_editor229.RichText,
          {
            identifier: "buttonText",
            className: buttonClasses,
            style: buttonStyles,
            "aria-label": (0, import_i18n220.__)("Button text"),
            placeholder: (0, import_i18n220.__)("Add button text\u2026"),
            withoutInteractiveFormatting: true,
            value: buttonText,
            onChange: (html) => setAttributes({ buttonText: html })
          }
        )
      ] });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const controls = /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(import_jsx_runtime454.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_block_editor229.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(
        import_components141.__experimentalToolsPanel,
        {
          label: (0, import_i18n220.__)("Settings"),
          resetAll: () => {
            setAttributes({
              width: void 0,
              widthUnit: void 0,
              showLabel: true,
              buttonUseIcon: false,
              buttonPosition: "button-outside"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
              import_components141.__experimentalToolsPanelItem,
              {
                hasValue: () => !showLabel,
                label: (0, import_i18n220.__)("Show label"),
                onDeselect: () => {
                  setAttributes({
                    showLabel: true
                  });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                  import_components141.ToggleControl,
                  {
                    checked: showLabel,
                    label: (0, import_i18n220.__)("Show label"),
                    onChange: (value) => setAttributes({
                      showLabel: value
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
              import_components141.__experimentalToolsPanelItem,
              {
                hasValue: () => buttonPosition !== "button-outside",
                label: (0, import_i18n220.__)("Button position"),
                onDeselect: () => {
                  setAttributes({
                    buttonPosition: "button-outside"
                  });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                  import_components141.SelectControl,
                  {
                    value: buttonPosition,
                    label: (0, import_i18n220.__)("Button position"),
                    onChange: (value) => {
                      setAttributes({
                        buttonPosition: value
                      });
                    },
                    options: buttonPositionControls
                  }
                )
              }
            ),
            buttonPosition !== "no-button" && /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
              import_components141.__experimentalToolsPanelItem,
              {
                hasValue: () => !!buttonUseIcon,
                label: (0, import_i18n220.__)("Use button with icon"),
                onDeselect: () => {
                  setAttributes({
                    buttonUseIcon: false
                  });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                  import_components141.ToggleControl,
                  {
                    checked: buttonUseIcon,
                    label: (0, import_i18n220.__)("Use button with icon"),
                    onChange: (value) => setAttributes({
                      buttonUseIcon: value
                    })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
              import_components141.__experimentalToolsPanelItem,
              {
                hasValue: () => !!width,
                label: (0, import_i18n220.__)("Width"),
                onDeselect: () => {
                  setAttributes({
                    width: void 0,
                    widthUnit: void 0
                  });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(import_components141.__experimentalVStack, { children: [
                  /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                    import_components141.__experimentalUnitControl,
                    {
                      label: (0, import_i18n220.__)("Width"),
                      id: unitControlInputId,
                      min: isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH,
                      max: isPercentageUnit(widthUnit) ? 100 : void 0,
                      step: 1,
                      onChange: (newWidth) => {
                        const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
                        setAttributes({
                          width: parsedNewWidth
                        });
                      },
                      onUnitChange: (newUnit) => {
                        setAttributes({
                          width: "%" === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
                          widthUnit: newUnit
                        });
                      },
                      __unstableInputWidth: "80px",
                      value: `${width}${widthUnit}`,
                      units
                    }
                  ),
                  /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                    import_components141.__experimentalToggleGroupControl,
                    {
                      label: (0, import_i18n220.__)("Percentage Width"),
                      value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
                      hideLabelFromVision: true,
                      onChange: (newWidth) => {
                        setAttributes({
                          width: newWidth,
                          widthUnit: "%"
                        });
                      },
                      isBlock: true,
                      children: PERCENTAGE_WIDTHS.map((widthValue) => {
                        return /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
                          import_components141.__experimentalToggleGroupControlOption,
                          {
                            value: widthValue,
                            label: (0, import_i18n220.sprintf)(
                              /* translators: %d: Percentage value. */
                              (0, import_i18n220.__)("%d%%"),
                              widthValue
                            )
                          },
                          widthValue
                        );
                      })
                    }
                  )
                ] })
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(import_block_editor229.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
        import_components141.SelectControl,
        {
          label: (0, import_i18n220.__)("HTML element"),
          value: tagName ?? "",
          options: [
            { label: (0, import_i18n220.__)("Default"), value: "" },
            { label: "<search>", value: "search" },
            { label: "<form>", value: "form" }
          ],
          onChange: (value) => {
            setAttributes({ tagName: value });
            (0, import_a11y4.speak)(
              TAG_NAME_MESSAGES[value].replace(/[<>]/g, "")
            );
          },
          help: TAG_NAME_MESSAGES[tagName ?? ""]
        }
      ) })
    ] });
    const isNonZeroBorderRadius = (radius) => radius !== void 0 && parseInt(radius, 10) !== 0;
    const padBorderRadius = (radius) => isNonZeroBorderRadius(radius) ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : void 0;
    const getWrapperStyles = () => {
      const styles = isButtonPositionInside ? borderProps.style : {
        borderRadius: borderProps.style?.borderRadius,
        borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
        borderTopRightRadius: borderProps.style?.borderTopRightRadius,
        borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
        borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
      };
      if (isButtonPositionInside) {
        if (typeof borderRadius === "object") {
          const {
            borderTopLeftRadius,
            borderTopRightRadius,
            borderBottomLeftRadius,
            borderBottomRightRadius
          } = borderProps.style;
          return {
            ...styles,
            borderTopLeftRadius: padBorderRadius(borderTopLeftRadius),
            borderTopRightRadius: padBorderRadius(borderTopRightRadius),
            borderBottomLeftRadius: padBorderRadius(
              borderBottomLeftRadius
            ),
            borderBottomRightRadius: padBorderRadius(
              borderBottomRightRadius
            )
          };
        }
        const radius = Number.isInteger(borderRadius) ? `${borderRadius}px` : borderRadius;
        styles.borderRadius = `calc(${radius} + ${DEFAULT_INNER_PADDING})`;
      }
      return styles;
    };
    const blockProps = (0, import_block_editor229.useBlockProps)({
      className: getBlockClassNames(),
      style: {
        ...typographyProps.style,
        // Input opts out of text decoration.
        textDecoration: void 0
      }
    });
    const labelClassnames = clsx_default(
      "wp-block-search__label",
      typographyProps.className
    );
    const Wrapper = "search" === tagName ? "search" : "div";
    return /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(import_jsx_runtime454.Fragment, { children: [
      controls,
      /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(Wrapper, { ...blockProps, children: [
        showLabel && /* @__PURE__ */ (0, import_jsx_runtime454.jsx)(
          import_block_editor229.RichText,
          {
            identifier: "label",
            className: labelClassnames,
            "aria-label": (0, import_i18n220.__)("Label text"),
            placeholder: (0, import_i18n220.__)("Add label\u2026"),
            withoutInteractiveFormatting: true,
            value: label,
            onChange: (html) => setAttributes({ label: html }),
            style: typographyProps.style
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(
          import_components141.ResizableBox,
          {
            size: {
              width: width === void 0 ? "auto" : `${width}${widthUnit}`,
              height: "auto"
            },
            className: clsx_default(
              "wp-block-search__inside-wrapper",
              isButtonPositionInside ? borderProps.className : void 0
            ),
            style: getWrapperStyles(),
            minWidth: MIN_WIDTH,
            enable: getResizableSides(),
            onResizeStart: (event, direction, elt) => {
              setAttributes({
                width: parseInt(elt.offsetWidth, 10),
                widthUnit: "px"
              });
              toggleSelection(false);
            },
            onResizeStop: (event, direction, elt, delta) => {
              setAttributes({
                width: parseInt(width + delta.width, 10)
              });
              toggleSelection(true);
            },
            showHandle: isSelected,
            children: [
              (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0, import_jsx_runtime454.jsxs)(import_jsx_runtime454.Fragment, { children: [
                renderTextField(),
                renderButton()
              ] }),
              hasNoButton && renderTextField()
            ]
          }
        )
      ] })
    ] });
  }

  // packages/block-library/build-module/search/variations.mjs
  var import_i18n221 = __toESM(require_i18n(), 1);
  var variations16 = [
    {
      name: "default",
      isDefault: true,
      attributes: { buttonText: (0, import_i18n221.__)("Search"), label: (0, import_i18n221.__)("Search") }
    }
  ];
  var variations_default16 = variations16;

  // packages/block-library/build-module/search/index.mjs
  var { name: name92 } = block_default91;
  var settings91 = {
    icon: search_default,
    example: {
      attributes: { buttonText: (0, import_i18n222.__)("Search"), label: (0, import_i18n222.__)("Search") },
      viewportWidth: 400
    },
    variations: variations_default16,
    edit: SearchEdit
  };
  var init91 = () => initBlock({ name: name92, metadata: block_default91, settings: settings91 });

  // packages/block-library/build-module/separator/index.mjs
  var separator_exports = {};
  __export(separator_exports, {
    init: () => init92,
    metadata: () => block_default92,
    name: () => name93,
    settings: () => settings92
  });

  // packages/block-library/build-module/separator/edit.mjs
  var import_block_editor230 = __toESM(require_block_editor(), 1);
  var import_components142 = __toESM(require_components(), 1);
  var import_i18n223 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/separator/use-deprecated-opacity.mjs
  var import_element143 = __toESM(require_element(), 1);
  var import_compose59 = __toESM(require_compose(), 1);
  function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
    const [deprecatedOpacityWithNoColor, setDeprecatedOpacityWithNoColor] = (0, import_element143.useState)(false);
    const previousColor = (0, import_compose59.usePrevious)(currentColor);
    (0, import_element143.useEffect)(() => {
      if (opacity === "css" && !currentColor && !previousColor) {
        setDeprecatedOpacityWithNoColor(true);
      }
    }, [currentColor, previousColor, opacity]);
    (0, import_element143.useEffect)(() => {
      if (opacity === "css" && (deprecatedOpacityWithNoColor && currentColor || previousColor && currentColor !== previousColor)) {
        setAttributes({ opacity: "alpha-channel" });
        setDeprecatedOpacityWithNoColor(false);
      }
    }, [deprecatedOpacityWithNoColor, currentColor, previousColor]);
  }

  // packages/block-library/build-module/separator/edit.mjs
  var import_jsx_runtime455 = __toESM(require_jsx_runtime(), 1);
  var HtmlElementControl = ({ tagName, setAttributes }) => {
    return /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
      import_components142.SelectControl,
      {
        label: (0, import_i18n223.__)("HTML element"),
        value: tagName,
        onChange: (newValue) => setAttributes({ tagName: newValue }),
        options: [
          { label: (0, import_i18n223.__)("Default (<hr>)"), value: "hr" },
          { label: "<div>", value: "div" }
        ],
        help: tagName === "hr" ? (0, import_i18n223.__)(
          "Only select <hr> if the separator conveys important information and should be announced by screen readers."
        ) : (0, import_i18n223.__)(
          "The <div> element should only be used if the block is a design element with no semantic meaning."
        )
      }
    );
  };
  function SeparatorEdit({ attributes: attributes2, setAttributes }) {
    const { backgroundColor, opacity, style: style2, tagName } = attributes2;
    const colorProps = (0, import_block_editor230.__experimentalUseColorProps)(attributes2);
    const currentColor = colorProps?.style?.backgroundColor;
    const hasCustomColor = !!style2?.color?.background;
    useDeprecatedOpacity(opacity, currentColor, setAttributes);
    const colorClass = (0, import_block_editor230.getColorClassName)("color", backgroundColor);
    const className = clsx_default(
      {
        "has-text-color": backgroundColor || currentColor,
        [colorClass]: colorClass,
        "has-css-opacity": opacity === "css",
        "has-alpha-channel-opacity": opacity === "alpha-channel"
      },
      colorProps.className
    );
    const styles = {
      color: currentColor,
      backgroundColor: currentColor
    };
    const Wrapper = tagName === "hr" ? import_components142.HorizontalRule : tagName;
    return /* @__PURE__ */ (0, import_jsx_runtime455.jsxs)(import_jsx_runtime455.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(import_block_editor230.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
        HtmlElementControl,
        {
          tagName,
          setAttributes
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime455.jsx)(
        Wrapper,
        {
          ...(0, import_block_editor230.useBlockProps)({
            className,
            style: hasCustomColor ? styles : void 0
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/separator/block.json
  var block_default92 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/separator",
    title: "Separator",
    category: "design",
    description: "Create a break between ideas or sections with a horizontal separator.",
    keywords: ["horizontal-line", "hr", "divider"],
    textdomain: "default",
    attributes: {
      opacity: {
        type: "string",
        default: "alpha-channel"
      },
      tagName: {
        type: "string",
        enum: ["hr", "div"],
        default: "hr"
      }
    },
    supports: {
      anchor: true,
      align: ["center", "wide", "full"],
      color: {
        enableContrastChecker: false,
        __experimentalSkipSerialization: true,
        gradients: true,
        background: true,
        text: false,
        __experimentalDefaultControls: {
          background: true
        }
      },
      spacing: {
        margin: ["top", "bottom"]
      },
      interactivity: {
        clientNavigation: true
      }
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "wide", label: "Wide Line" },
      { name: "dots", label: "Dots" }
    ],
    editorStyle: "wp-block-separator-editor",
    style: "wp-block-separator"
  };

  // packages/block-library/build-module/separator/save.mjs
  var import_block_editor231 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime456 = __toESM(require_jsx_runtime(), 1);
  function separatorSave({ attributes: attributes2 }) {
    const { backgroundColor, style: style2, opacity, tagName: Tag } = attributes2;
    const customColor = style2?.color?.background;
    const colorProps = (0, import_block_editor231.__experimentalGetColorClassesAndStyles)(attributes2);
    const colorClass = (0, import_block_editor231.getColorClassName)("color", backgroundColor);
    const className = clsx_default(
      {
        "has-text-color": backgroundColor || customColor,
        [colorClass]: colorClass,
        "has-css-opacity": opacity === "css",
        "has-alpha-channel-opacity": opacity === "alpha-channel"
      },
      colorProps.className
    );
    const styles = {
      backgroundColor: colorProps?.style?.backgroundColor,
      color: colorClass ? void 0 : customColor
    };
    return /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(Tag, { ...import_block_editor231.useBlockProps.save({ className, style: styles }) });
  }

  // packages/block-library/build-module/separator/transforms.mjs
  var import_blocks89 = __toESM(require_blocks(), 1);
  var transforms30 = {
    from: [
      {
        type: "input",
        regExp: /^-{3,}$/,
        transform: () => {
          const defaultVariation = (0, import_blocks89.getBlockVariations)(
            "core/separator"
          )?.find((variation) => variation.isDefault);
          return [
            (0, import_blocks89.createBlock)(
              "core/separator",
              defaultVariation?.attributes ?? {}
            ),
            (0, import_blocks89.createBlock)((0, import_blocks89.getDefaultBlockName)())
          ];
        }
      },
      {
        type: "raw",
        selector: "hr",
        schema: {
          hr: {}
        }
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/spacer"],
        // Transform to Spacer.
        transform: ({ anchor }) => {
          return (0, import_blocks89.createBlock)("core/spacer", {
            anchor: anchor || void 0
          });
        }
      }
    ]
  };
  var transforms_default31 = transforms30;

  // packages/block-library/build-module/separator/deprecated.mjs
  var import_block_editor232 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime457 = __toESM(require_jsx_runtime(), 1);
  var v141 = {
    attributes: {
      color: {
        type: "string"
      },
      customColor: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { color, customColor } = attributes2;
      const backgroundClass = (0, import_block_editor232.getColorClassName)("background-color", color);
      const colorClass = (0, import_block_editor232.getColorClassName)("color", color);
      const className = clsx_default({
        "has-text-color has-background": color || customColor,
        [backgroundClass]: backgroundClass,
        [colorClass]: colorClass
      });
      const style2 = {
        backgroundColor: backgroundClass ? void 0 : customColor,
        color: colorClass ? void 0 : customColor
      };
      return /* @__PURE__ */ (0, import_jsx_runtime457.jsx)("hr", { ...import_block_editor232.useBlockProps.save({ className, style: style2 }) });
    },
    migrate(attributes2) {
      const { color, customColor, ...restAttributes } = attributes2;
      return {
        ...restAttributes,
        backgroundColor: color ? color : void 0,
        opacity: "css",
        style: customColor ? { color: { background: customColor } } : void 0,
        tagName: "hr"
      };
    }
  };
  var deprecated_default46 = [v141];

  // packages/block-library/build-module/separator/index.mjs
  var { name: name93 } = block_default92;
  var settings92 = {
    icon: separator_default,
    example: {
      attributes: {
        customColor: "#065174",
        className: "is-style-wide"
      }
    },
    transforms: transforms_default31,
    edit: SeparatorEdit,
    save: separatorSave,
    deprecated: deprecated_default46
  };
  var init92 = () => initBlock({ name: name93, metadata: block_default92, settings: settings92 });

  // packages/block-library/build-module/shortcode/index.mjs
  var shortcode_exports = {};
  __export(shortcode_exports, {
    init: () => init93,
    metadata: () => block_default93,
    name: () => name94,
    settings: () => settings93
  });

  // packages/block-library/build-module/shortcode/edit.mjs
  var import_i18n224 = __toESM(require_i18n(), 1);
  var import_block_editor233 = __toESM(require_block_editor(), 1);
  var import_compose60 = __toESM(require_compose(), 1);
  var import_components143 = __toESM(require_components(), 1);
  var import_jsx_runtime458 = __toESM(require_jsx_runtime(), 1);
  function ShortcodeEdit({ attributes: attributes2, setAttributes }) {
    const instanceId = (0, import_compose60.useInstanceId)(ShortcodeEdit);
    const inputId = `blocks-shortcode-input-${instanceId}`;
    return /* @__PURE__ */ (0, import_jsx_runtime458.jsx)("div", { ...(0, import_block_editor233.useBlockProps)(), children: /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(import_components143.Placeholder, { icon: shortcode_default, label: (0, import_i18n224.__)("Shortcode"), children: /* @__PURE__ */ (0, import_jsx_runtime458.jsx)(
      import_block_editor233.PlainText,
      {
        className: "blocks-shortcode__textarea",
        id: inputId,
        value: attributes2.text,
        "aria-label": (0, import_i18n224.__)("Shortcode text"),
        placeholder: (0, import_i18n224.__)("Write shortcode here\u2026"),
        onChange: (text) => setAttributes({ text })
      }
    ) }) });
  }

  // packages/block-library/build-module/shortcode/save.mjs
  var import_element144 = __toESM(require_element(), 1);
  var import_jsx_runtime459 = __toESM(require_jsx_runtime(), 1);
  function save41({ attributes: attributes2 }) {
    return /* @__PURE__ */ (0, import_jsx_runtime459.jsx)(import_element144.RawHTML, { children: attributes2.text });
  }

  // packages/block-library/build-module/shortcode/transforms.mjs
  var import_autop = __toESM(require_autop(), 1);
  var import_blocks90 = __toESM(require_blocks(), 1);
  var import_shortcode2 = __toESM(require_shortcode(), 1);
  var getShortcodeFromTransforms = () => (0, import_blocks90.getBlockTransforms)("from").filter(
    (transform) => transform.type === "shortcode" && transform.blockName !== "core/shortcode"
  );
  var isSingleShortcode = (text, tag) => {
    const trimmed = text.trim();
    const match = (0, import_shortcode2.next)(tag, trimmed);
    return !!match && match.index === 0 && match.content.length === trimmed.length;
  };
  var transforms31 = {
    from: [
      {
        type: "shortcode",
        // Per "Shortcode names should be all lowercase and use all
        // letters, but numbers and underscores should work fine too.
        // Be wary of using hyphens (dashes), you'll be better off not
        // using them." in https://codex.wordpress.org/Shortcode_API
        // Require that the first character be a letter. This notably
        // prevents footnote markings ([1]) from being caught as
        // shortcodes.
        tag: "[a-z][a-z0-9_-]*",
        attributes: {
          text: {
            type: "string",
            shortcode: (attrs, { content }) => {
              return (0, import_autop.removep)((0, import_autop.autop)(content));
            }
          }
        },
        priority: 20
      }
    ],
    // One `to` transform per registered shortcode-from block. A single transform
    // with a dynamic `blocks` list won't work: `isMatch` runs once per
    // transform, so all targets would surface (or none) regardless of which
    // shortcode tag the block actually contains.
    get to() {
      return getShortcodeFromTransforms().map((fromTransform) => ({
        type: "block",
        blocks: [fromTransform.blockName],
        isMatch: ({ text = "" }) => {
          return [].concat(fromTransform.tag).some((tag) => isSingleShortcode(text, tag));
        },
        transform: ({ text = "" }) => {
          return (0, import_blocks90.rawHandler)({ HTML: `<p>${text.trim()}</p>` });
        }
      }));
    }
  };
  var transforms_default32 = transforms31;

  // packages/block-library/build-module/shortcode/block.json
  var block_default93 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/shortcode",
    title: "Shortcode",
    category: "widgets",
    description: "Insert additional custom elements with a WordPress shortcode.",
    textdomain: "default",
    attributes: {
      text: {
        type: "string",
        source: "raw",
        role: "content"
      }
    },
    supports: {
      className: false,
      customClassName: false,
      html: false,
      customCSS: false,
      visibility: false
    },
    editorStyle: "wp-block-shortcode-editor"
  };

  // packages/block-library/build-module/shortcode/index.mjs
  var { name: name94 } = block_default93;
  var settings93 = {
    icon: shortcode_default,
    transforms: transforms_default32,
    edit: ShortcodeEdit,
    save: save41
  };
  var init93 = () => initBlock({ name: name94, metadata: block_default93, settings: settings93 });

  // packages/block-library/build-module/site-logo/index.mjs
  var site_logo_exports = {};
  __export(site_logo_exports, {
    init: () => init94,
    metadata: () => block_default94,
    name: () => name95,
    settings: () => settings94
  });

  // packages/block-library/build-module/site-logo/block.json
  var block_default94 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-logo",
    title: "Site Logo",
    category: "theme",
    description: "Display an image to represent this site. Update this block and the changes apply everywhere.",
    textdomain: "default",
    attributes: {
      width: {
        type: "number"
      },
      isLink: {
        type: "boolean",
        default: true,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      },
      shouldSyncIcon: {
        type: "boolean"
      }
    },
    example: {
      viewportWidth: 500,
      attributes: {
        width: 350,
        className: "block-editor-block-types-list__site-logo-example"
      }
    },
    supports: {
      anchor: true,
      html: false,
      align: true,
      alignWide: false,
      color: {
        text: false,
        background: false
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      filter: {
        duotone: true
      }
    },
    styles: [
      {
        name: "default",
        label: "Default",
        isDefault: true
      },
      { name: "rounded", label: "Rounded" }
    ],
    selectors: {
      filter: {
        duotone: ".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"
      }
    },
    editorStyle: "wp-block-site-logo-editor",
    style: "wp-block-site-logo"
  };

  // packages/block-library/build-module/site-logo/edit.mjs
  var import_blob19 = __toESM(require_blob(), 1);
  var import_element145 = __toESM(require_element(), 1);
  var import_i18n225 = __toESM(require_i18n(), 1);
  var import_components144 = __toESM(require_components(), 1);
  var import_compose61 = __toESM(require_compose(), 1);
  var import_block_editor234 = __toESM(require_block_editor(), 1);
  var import_data135 = __toESM(require_data(), 1);
  var import_core_data83 = __toESM(require_core_data(), 1);
  var import_notices19 = __toESM(require_notices(), 1);
  var import_jsx_runtime460 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES9 = ["image"];
  var { mediaEditKey: mediaEditKey2, openMediaEditorModalKey: openMediaEditorModalKey3 } = unlock(
    import_block_editor234.privateApis
  );
  var SiteLogo = ({
    alt,
    attributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },
    isSelected,
    setAttributes,
    setLogo,
    logoUrl,
    siteUrl,
    logoId,
    iconId,
    setIcon,
    canUserEdit
  }) => {
    const isLargeViewport = (0, import_compose61.useViewportMatch)("medium");
    const isWideAligned = ["wide", "full"].includes(align);
    const isResizable = !isWideAligned && isLargeViewport;
    const [{ naturalWidth, naturalHeight }, setNaturalSize] = (0, import_element145.useState)({});
    const cropButtonRef = (0, import_element145.useRef)();
    const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } = (0, import_data135.useDispatch)(import_block_editor234.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor234.useBlockEditingMode)();
    const isContentOnlyMode = blockEditingMode === "contentOnly";
    const {
      imageEditing,
      maxWidth,
      title,
      editMediaEntity,
      openMediaEditorModal
    } = (0, import_data135.useSelect)((select10) => {
      const settings117 = select10(import_block_editor234.store).getSettings();
      const siteEntities = select10(import_core_data83.store).getEntityRecord(
        "root",
        "__unstableBase"
      );
      return {
        title: siteEntities?.name,
        imageEditing: settings117.imageEditing,
        maxWidth: settings117.maxWidth,
        editMediaEntity: settings117?.[mediaEditKey2],
        openMediaEditorModal: settings117?.[openMediaEditorModalKey3]
      };
    }, []);
    (0, import_element145.useEffect)(() => {
      if (shouldSyncIcon && logoId !== iconId) {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes({ shouldSyncIcon: false });
      }
    }, []);
    const handleMediaUpdate = ({ id: newId }) => {
      if (typeof newId === "number") {
        setLogo(newId);
      }
    };
    function onResizeStart() {
      toggleSelection(false);
    }
    function onResizeStop() {
      toggleSelection(true);
    }
    const img = /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(import_jsx_runtime460.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        "img",
        {
          className: "custom-logo",
          src: logoUrl,
          alt,
          onLoad: (event) => {
            setNaturalSize({
              naturalWidth: event.target.naturalWidth,
              naturalHeight: event.target.naturalHeight
            });
          }
        }
      ),
      (0, import_blob19.isBlobURL)(logoUrl) && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_components144.Spinner, {})
    ] });
    let imgWrapper = img;
    if (isLink) {
      imgWrapper = /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        "a",
        {
          href: siteUrl,
          className: "custom-logo-link",
          rel: "home",
          title,
          onClick: (event) => event.preventDefault(),
          children: img
        }
      );
    }
    if (!isResizable || !naturalWidth || !naturalHeight) {
      return /* @__PURE__ */ (0, import_jsx_runtime460.jsx)("div", { style: { width, height }, children: imgWrapper });
    }
    const defaultWidth = 120;
    const currentWidth = width || defaultWidth;
    const ratio = naturalWidth / naturalHeight;
    const currentHeight = currentWidth / ratio;
    const minWidth = naturalWidth < naturalHeight ? MIN_SIZE2 : Math.ceil(MIN_SIZE2 * ratio);
    const minHeight = naturalHeight < naturalWidth ? MIN_SIZE2 : Math.ceil(MIN_SIZE2 / ratio);
    const maxWidthBuffer = maxWidth * 2.5;
    let showRightHandle = false;
    let showLeftHandle = false;
    if (align === "center") {
      showRightHandle = true;
      showLeftHandle = true;
    } else if ((0, import_i18n225.isRTL)()) {
      if (align === "left") {
        showRightHandle = true;
      } else {
        showLeftHandle = true;
      }
    } else {
      if (align === "right") {
        showLeftHandle = true;
      } else {
        showRightHandle = true;
      }
    }
    const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing && !!editMediaEntity;
    const shouldShowCropAndDimensions = !isContentOnlyMode;
    const shouldUseNewUrl = !window?.__experimentalUseCustomizerSiteLogoUrl;
    const siteIconSettingsUrl = shouldUseNewUrl ? siteUrl + "/wp-admin/options-general.php" : siteUrl + "/wp-admin/customize.php?autofocus[section]=title_tagline";
    const syncSiteIconHelpText = (0, import_element145.createInterpolateElement)(
      (0, import_i18n225.__)(
        "Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."
      ),
      {
        a: (
          // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-no-target-blank
          /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
            "a",
            {
              href: siteIconSettingsUrl,
              target: "_blank",
              rel: "noopener"
            }
          )
        )
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(import_jsx_runtime460.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_block_editor234.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(
        import_components144.__experimentalToolsPanel,
        {
          label: (0, import_i18n225.__)("Settings"),
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!width,
                label: (0, import_i18n225.__)("Image width"),
                onDeselect: () => setAttributes({ width: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
                  import_components144.RangeControl,
                  {
                    label: (0, import_i18n225.__)("Image width"),
                    onChange: (newWidth) => setAttributes({ width: newWidth }),
                    min: minWidth,
                    max: maxWidthBuffer,
                    initialPosition: Math.min(
                      defaultWidth,
                      maxWidthBuffer
                    ),
                    value: width || "",
                    disabled: !isResizable
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !isLink,
                label: (0, import_i18n225.__)("Link image to home"),
                onDeselect: () => setAttributes({ isLink: true }),
                children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Link image to home"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => linkTarget === "_blank",
                label: (0, import_i18n225.__)("Open in new tab"),
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            ),
            canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              import_components144.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!shouldSyncIcon,
                label: (0, import_i18n225.__)("Use as Site Icon"),
                onDeselect: () => {
                  setAttributes({ shouldSyncIcon: false });
                  setIcon(void 0);
                },
                children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
                  import_components144.ToggleControl,
                  {
                    label: (0, import_i18n225.__)("Use as Site Icon"),
                    onChange: (value) => {
                      setAttributes({ shouldSyncIcon: value });
                      setIcon(value ? logoId : void 0);
                    },
                    checked: !!shouldSyncIcon,
                    help: syncSiteIconHelpText
                  }
                )
              }
            )
          ]
        }
      ) }),
      canEditImage && openMediaEditorModal && shouldShowCropAndDimensions && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_block_editor234.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        import_components144.ToolbarButton,
        {
          ref: cropButtonRef,
          onClick: () => openMediaEditorModal({
            id: logoId,
            onUpdate: handleMediaUpdate,
            onClose: () => cropButtonRef.current?.focus()
          }),
          "aria-haspopup": "dialog",
          icon: crop_default,
          label: (0, import_i18n225.__)("Edit image")
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        import_components144.ResizableBox,
        {
          size: {
            width: currentWidth,
            height: currentHeight
          },
          showHandle: isSelected && shouldShowCropAndDimensions,
          minWidth,
          maxWidth: maxWidthBuffer,
          minHeight,
          maxHeight: maxWidthBuffer / ratio,
          lockAspectRatio: true,
          enable: {
            top: false,
            right: showRightHandle,
            bottom: true,
            left: showLeftHandle
          },
          onResizeStart,
          onResizeStop: (event, direction, elt, delta) => {
            onResizeStop();
            setAttributes({
              width: parseInt(currentWidth + delta.width, 10),
              height: parseInt(currentHeight + delta.height, 10)
            });
          },
          children: imgWrapper
        }
      )
    ] });
  };
  function LogoEdit({
    attributes: attributes2,
    className,
    setAttributes,
    isSelected
  }) {
    const { width, shouldSyncIcon } = attributes2;
    const {
      siteLogoId,
      canUserEdit,
      url,
      siteIconId,
      mediaItemData,
      isRequestingMediaItem
    } = (0, import_data135.useSelect)((select10) => {
      const { canUser, getEntityRecord, getEditedEntityRecord } = select10(import_core_data83.store);
      const _canUserEdit = canUser("update", {
        kind: "root",
        name: "site"
      });
      const siteSettings = _canUserEdit ? getEditedEntityRecord("root", "site") : void 0;
      const siteData = getEntityRecord("root", "__unstableBase");
      const _siteLogoId = _canUserEdit ? siteSettings?.site_logo : siteData?.site_logo;
      const _siteIconId = siteSettings?.site_icon;
      const mediaItem = _siteLogoId && select10(import_core_data83.store).getEntityRecord(
        "postType",
        "attachment",
        _siteLogoId,
        {
          context: "view"
        }
      );
      const _isRequestingMediaItem = !!_siteLogoId && !select10(import_core_data83.store).hasFinishedResolution("getEntityRecord", [
        "postType",
        "attachment",
        _siteLogoId,
        { context: "view" }
      ]);
      return {
        siteLogoId: _siteLogoId,
        canUserEdit: _canUserEdit,
        url: siteData?.home,
        mediaItemData: mediaItem,
        isRequestingMediaItem: _isRequestingMediaItem,
        siteIconId: _siteIconId
      };
    }, []);
    const { getSettings: getSettings2 } = (0, import_data135.useSelect)(import_block_editor234.store);
    const [temporaryURL, setTemporaryURL] = (0, import_element145.useState)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { editEntityRecord } = (0, import_data135.useDispatch)(import_core_data83.store);
    const setLogo = (newValue, shouldForceSync = false) => {
      if (shouldSyncIcon || shouldForceSync) {
        setIcon(newValue);
      }
      editEntityRecord("root", "site", void 0, {
        site_logo: newValue
      });
    };
    const setIcon = (newValue) => (
      // The new value needs to be `null` to reset the Site Icon.
      editEntityRecord("root", "site", void 0, {
        site_icon: newValue ?? null
      })
    );
    const { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};
    const onInitialSelectLogo = (media) => {
      if (shouldSyncIcon === void 0) {
        const shouldForceSync = !siteIconId;
        setAttributes({ shouldSyncIcon: shouldForceSync });
        onSelectLogo(media, shouldForceSync);
        return;
      }
      onSelectLogo(media);
    };
    const onSelectLogo = (media, shouldForceSync = false) => {
      if (!media) {
        return;
      }
      if (!media.id && media.url) {
        setTemporaryURL(media.url);
        setLogo(void 0);
        return;
      }
      setLogo(media.id, shouldForceSync);
    };
    const onRemoveLogo = () => {
      setLogo(null);
      setAttributes({ width: void 0 });
    };
    const { createErrorNotice } = (0, import_data135.useDispatch)(import_notices19.store);
    const onUploadError = (message) => {
      createErrorNotice(message, { type: "snackbar" });
      setTemporaryURL();
    };
    const onFilesDrop = (filesList) => {
      getSettings2().mediaUpload({
        allowedTypes: ALLOWED_MEDIA_TYPES9,
        filesList,
        onFileChange([image]) {
          if ((0, import_blob19.isBlobURL)(image?.url)) {
            setTemporaryURL(image.url);
            return;
          }
          onInitialSelectLogo(image);
        },
        onError: onUploadError,
        multiple: false
      });
    };
    const mediaReplaceFlowProps = {
      mediaURL: logoUrl,
      name: !logoUrl ? (0, import_i18n225.__)("Choose logo") : (0, import_i18n225.__)("Replace"),
      onSelect: onSelectLogo,
      onError: onUploadError,
      onReset: onRemoveLogo
    };
    const controls = canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_block_editor234.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
      import_block_editor234.MediaReplaceFlow,
      {
        ...mediaReplaceFlowProps,
        allowedTypes: ALLOWED_MEDIA_TYPES9,
        variant: "toolbar"
      }
    ) });
    let logoImage;
    const isLoading = siteLogoId === void 0 || isRequestingMediaItem;
    if (isLoading) {
      logoImage = /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_components144.Spinner, {});
    }
    (0, import_element145.useEffect)(() => {
      if (logoUrl && temporaryURL) {
        setTemporaryURL();
      }
    }, [logoUrl, temporaryURL]);
    if (!!logoUrl || !!temporaryURL) {
      logoImage = /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)(import_jsx_runtime460.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
          SiteLogo,
          {
            alt,
            attributes: attributes2,
            className,
            isSelected,
            setAttributes,
            logoUrl: temporaryURL || logoUrl,
            setLogo,
            logoId: mediaItemData?.id || siteLogoId,
            siteUrl: url,
            setIcon,
            iconId: siteIconId,
            canUserEdit
          }
        ),
        canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_components144.DropZone, { onFilesDrop })
      ] });
    }
    const placeholder2 = (content) => {
      const placeholderClassName = clsx_default(
        "block-editor-media-placeholder",
        className
      );
      return /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        import_components144.Placeholder,
        {
          className: placeholderClassName,
          preview: logoImage,
          withIllustration: true,
          style: {
            width
          },
          children: content
        }
      );
    };
    const classes = clsx_default(className, {
      "is-default-size": !width,
      "is-transient": temporaryURL
    });
    const blockProps = (0, import_block_editor234.useBlockProps)({ className: classes });
    const mediaInspectorPanel = (canUserEdit || logoUrl) && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_block_editor234.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
      import_components144.__experimentalToolsPanel,
      {
        label: (0, import_i18n225.__)("Media"),
        dropdownMenuProps,
        children: !canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
          "div",
          {
            className: "block-library-site-logo__inspector-media-replace-container",
            style: { gridColumn: "1 / -1" },
            children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              MediaControlPreview,
              {
                url: mediaItemData?.source_url,
                filename: mediaItemData?.media_details?.sizes?.full?.file || mediaItemData?.slug,
                itemGroupProps: {
                  isBordered: true,
                  className: "block-library-site-logo__inspector-readonly-logo-preview"
                },
                className: "block-library-site-logo__inspector-media-replace-title"
              }
            )
          }
        ) : /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
          import_components144.__experimentalToolsPanelItem,
          {
            hasValue: () => !!logoUrl,
            label: (0, import_i18n225.__)("Logo"),
            isShownByDefault: true,
            children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              MediaControl,
              {
                mediaId: siteLogoId,
                mediaUrl: logoUrl,
                filename: mediaItemData?.media_details?.sizes?.full?.file || mediaItemData?.slug,
                allowedTypes: ALLOWED_MEDIA_TYPES9,
                onSelect: onSelectLogo,
                onError: onUploadError,
                onReset: onRemoveLogo,
                isUploading: !!temporaryURL,
                emptyLabel: (0, import_i18n225.__)("Logo")
              }
            )
          }
        )
      }
    ) });
    return /* @__PURE__ */ (0, import_jsx_runtime460.jsxs)("div", { ...blockProps, children: [
      controls,
      mediaInspectorPanel,
      (!!logoUrl || !!temporaryURL) && logoImage,
      (isLoading || !temporaryURL && !logoUrl && !canUserEdit) && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_components144.Placeholder, { className: "site-logo_placeholder", withIllustration: true, children: isLoading && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)("span", { className: "components-placeholder__preview", children: /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(import_components144.Spinner, {}) }) }),
      !isLoading && !temporaryURL && !logoUrl && canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
        import_block_editor234.MediaPlaceholder,
        {
          onSelect: onInitialSelectLogo,
          allowedTypes: ALLOWED_MEDIA_TYPES9,
          onError: onUploadError,
          placeholder: placeholder2,
          mediaLibraryButton: ({ open }) => {
            return /* @__PURE__ */ (0, import_jsx_runtime460.jsx)(
              import_components144.Button,
              {
                __next40pxDefaultSize: true,
                icon: upload_default,
                variant: "primary",
                label: (0, import_i18n225.__)("Choose logo"),
                showTooltip: true,
                tooltipPosition: "middle right",
                onClick: () => {
                  open();
                }
              }
            );
          }
        }
      )
    ] });
  }

  // packages/block-library/build-module/site-logo/transforms.mjs
  var import_blocks91 = __toESM(require_blocks(), 1);
  var transforms32 = {
    to: [
      {
        type: "block",
        blocks: ["core/site-title"],
        transform: ({ isLink, linkTarget }) => {
          return (0, import_blocks91.createBlock)("core/site-title", {
            isLink,
            linkTarget
          });
        }
      }
    ]
  };
  var transforms_default33 = transforms32;

  // packages/block-library/build-module/site-logo/index.mjs
  var { name: name95 } = block_default94;
  var settings94 = {
    icon: site_logo_default,
    example: {},
    edit: LogoEdit,
    transforms: transforms_default33
  };
  var init94 = () => initBlock({ name: name95, metadata: block_default94, settings: settings94 });

  // packages/block-library/build-module/site-tagline/index.mjs
  var site_tagline_exports = {};
  __export(site_tagline_exports, {
    init: () => init95,
    metadata: () => block_default95,
    name: () => name96,
    settings: () => settings95
  });

  // packages/block-library/build-module/site-tagline/block.json
  var block_default95 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-tagline",
    title: "Site Tagline",
    category: "theme",
    description: "Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.",
    keywords: ["description"],
    textdomain: "default",
    attributes: {
      level: {
        type: "number",
        default: 0
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      }
    },
    example: {
      viewportWidth: 350,
      attributes: {
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      contentRole: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true
    },
    editorStyle: "wp-block-site-tagline-editor",
    style: "wp-block-site-tagline"
  };

  // packages/block-library/build-module/site-tagline/edit.mjs
  var import_data136 = __toESM(require_data(), 1);
  var import_core_data84 = __toESM(require_core_data(), 1);
  var import_block_editor235 = __toESM(require_block_editor(), 1);
  var import_i18n226 = __toESM(require_i18n(), 1);
  var import_blocks92 = __toESM(require_blocks(), 1);
  var import_jsx_runtime461 = __toESM(require_jsx_runtime(), 1);
  function SiteTaglineEdit(props) {
    useDeprecatedTextAlign(props);
    const { attributes: attributes2, setAttributes, insertBlocksAfter } = props;
    const { level, levelOptions } = attributes2;
    const canUserEdit = (0, import_data136.useSelect)(
      (select10) => select10(import_core_data84.store).canUser("update", {
        kind: "root",
        name: "site"
      }),
      []
    );
    const [tagline, setTagline] = (0, import_core_data84.useEntityProp)(
      "root",
      canUserEdit ? "site" : "__unstableBase",
      "description",
      void 0
    );
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const blockProps = (0, import_block_editor235.useBlockProps)({
      className: !canUserEdit && !tagline && "wp-block-site-tagline__placeholder"
    });
    const siteTaglineContent = canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(
      import_block_editor235.RichText,
      {
        allowedFormats: [],
        onChange: setTagline,
        "aria-label": (0, import_i18n226.__)("Site tagline text"),
        placeholder: (0, import_i18n226.__)("Write site tagline\u2026"),
        tagName: TagName2,
        value: tagline,
        disableLineBreaks: true,
        __unstableOnSplitAtEnd: insertBlocksAfter ? () => insertBlocksAfter(
          (0, import_blocks92.createBlock)((0, import_blocks92.getDefaultBlockName)())
        ) : void 0,
        ...blockProps
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(TagName2, { ...blockProps, children: tagline || (0, import_i18n226.__)("Site Tagline placeholder") });
    return /* @__PURE__ */ (0, import_jsx_runtime461.jsxs)(import_jsx_runtime461.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(import_block_editor235.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime461.jsx)(
        import_block_editor235.HeadingLevelDropdown,
        {
          value: level,
          options: levelOptions,
          onChange: (newLevel) => setAttributes({ level: newLevel })
        }
      ) }),
      siteTaglineContent
    ] });
  }

  // packages/block-library/build-module/site-tagline/icon.mjs
  var import_components145 = __toESM(require_components(), 1);
  var import_jsx_runtime462 = __toESM(require_jsx_runtime(), 1);
  var icon_default4 = /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(import_components145.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ (0, import_jsx_runtime462.jsx)(import_components145.Path, { d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z" }) });

  // packages/block-library/build-module/site-tagline/deprecated.mjs
  var v220 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 0
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      }
    },
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v143 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default47 = [v220, v143];

  // packages/block-library/build-module/site-tagline/index.mjs
  var { name: name96 } = block_default95;
  var settings95 = {
    icon: icon_default4,
    edit: SiteTaglineEdit,
    deprecated: deprecated_default47
  };
  var init95 = () => initBlock({ name: name96, metadata: block_default95, settings: settings95 });

  // packages/block-library/build-module/site-title/index.mjs
  var site_title_exports = {};
  __export(site_title_exports, {
    init: () => init96,
    metadata: () => block_default96,
    name: () => name97,
    settings: () => settings96
  });

  // packages/block-library/build-module/site-title/block.json
  var block_default96 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/site-title",
    title: "Site Title",
    category: "theme",
    description: "Displays the name of this site. Update the block, and the changes apply everywhere it\u2019s used. This will also appear in the browser title bar and in search results.",
    textdomain: "default",
    attributes: {
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      },
      isLink: {
        type: "boolean",
        default: true,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    example: {
      viewportWidth: 500
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        fitText: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true
    },
    editorStyle: "wp-block-site-title-editor",
    style: "wp-block-site-title"
  };

  // packages/block-library/build-module/site-title/edit.mjs
  var import_data137 = __toESM(require_data(), 1);
  var import_core_data85 = __toESM(require_core_data(), 1);
  var import_i18n227 = __toESM(require_i18n(), 1);
  var import_block_editor236 = __toESM(require_block_editor(), 1);
  var import_components146 = __toESM(require_components(), 1);
  var import_html_entities14 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime463 = __toESM(require_jsx_runtime(), 1);
  function SiteTitleEdit(props) {
    useDeprecatedTextAlign(props);
    const { attributes: attributes2, setAttributes } = props;
    const { level, levelOptions, isLink, linkTarget } = attributes2;
    const canUserEdit = (0, import_data137.useSelect)(
      (select10) => select10(import_core_data85.store).canUser("update", {
        kind: "root",
        name: "site"
      }),
      []
    );
    const [title, setSiteTitle] = (0, import_core_data85.useEntityProp)(
      "root",
      canUserEdit ? "site" : "__unstableBase",
      canUserEdit ? "title" : "name",
      void 0
    );
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor236.useBlockEditingMode)();
    const TagName2 = level === 0 ? "p" : `h${level}`;
    const blockProps = (0, import_block_editor236.useBlockProps)({
      className: !canUserEdit && !title && "wp-block-site-title__placeholder"
    });
    const siteTitleContent = canUserEdit ? /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
      import_block_editor236.RichText,
      {
        tagName: isLink ? "a" : "span",
        href: isLink ? "#site-title-pseudo-link" : void 0,
        "aria-label": (0, import_i18n227.__)("Site title text"),
        placeholder: (0, import_i18n227.__)("Write site title\u2026"),
        value: title,
        onChange: (newTitle) => setSiteTitle(newTitle.trim()),
        allowedFormats: [],
        disableLineBreaks: true
      }
    ) }) : /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(TagName2, { ...blockProps, children: isLink ? /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
      "a",
      {
        href: "#site-title-pseudo-link",
        onClick: (event) => event.preventDefault(),
        children: (0, import_html_entities14.decodeEntities)(title) || (0, import_i18n227.__)("Site Title placeholder")
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime463.jsx)("span", { children: (0, import_html_entities14.decodeEntities)(title) || (0, import_i18n227.__)("Site Title placeholder") }) });
    return /* @__PURE__ */ (0, import_jsx_runtime463.jsxs)(import_jsx_runtime463.Fragment, { children: [
      blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(import_block_editor236.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
        import_block_editor236.HeadingLevelDropdown,
        {
          value: level,
          options: levelOptions,
          onChange: (newLevel) => setAttributes({ level: newLevel })
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(import_block_editor236.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime463.jsxs)(
        import_components146.__experimentalToolsPanel,
        {
          label: (0, import_i18n227.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: true,
              linkTarget: "_self"
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
              import_components146.__experimentalToolsPanelItem,
              {
                hasValue: () => !isLink,
                label: (0, import_i18n227.__)("Make title link to home"),
                onDeselect: () => setAttributes({ isLink: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
                  import_components146.ToggleControl,
                  {
                    label: (0, import_i18n227.__)("Make title link to home"),
                    onChange: () => setAttributes({ isLink: !isLink }),
                    checked: isLink
                  }
                )
              }
            ),
            isLink && /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
              import_components146.__experimentalToolsPanelItem,
              {
                hasValue: () => linkTarget !== "_self",
                label: (0, import_i18n227.__)("Open in new tab"),
                onDeselect: () => setAttributes({ linkTarget: "_self" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime463.jsx)(
                  import_components146.ToggleControl,
                  {
                    label: (0, import_i18n227.__)("Open in new tab"),
                    onChange: (value) => setAttributes({
                      linkTarget: value ? "_blank" : "_self"
                    }),
                    checked: linkTarget === "_blank"
                  }
                )
              }
            )
          ]
        }
      ) }),
      siteTitleContent
    ] });
  }

  // packages/block-library/build-module/site-title/deprecated.mjs
  var v221 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 1
      },
      levelOptions: {
        type: "array",
        default: [0, 1, 2, 3, 4, 5, 6]
      },
      isLink: {
        type: "boolean",
        default: true,
        role: "content"
      },
      linkTarget: {
        type: "string",
        default: "_self",
        role: "content"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true,
        margin: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var v144 = {
    attributes: {
      level: {
        type: "number",
        default: 1
      },
      textAlign: {
        type: "string"
      },
      isLink: {
        type: "boolean",
        default: true
      },
      linkTarget: {
        type: "string",
        default: "_self"
      }
    },
    supports: {
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextTransform: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true
      }
    },
    save() {
      return null;
    },
    migrate: migrate_font_family_default,
    isEligible({ style: style2 }) {
      return style2?.typography?.fontFamily;
    }
  };
  var deprecated_default48 = [v221, v144];

  // packages/block-library/build-module/site-title/transforms.mjs
  var import_blocks93 = __toESM(require_blocks(), 1);
  var transforms33 = {
    to: [
      {
        type: "block",
        blocks: ["core/site-logo"],
        transform: ({ isLink, linkTarget }) => {
          return (0, import_blocks93.createBlock)("core/site-logo", {
            isLink,
            linkTarget
          });
        }
      }
    ]
  };
  var transforms_default34 = transforms33;

  // packages/block-library/build-module/site-title/index.mjs
  var { name: name97 } = block_default96;
  var settings96 = {
    icon: map_marker_default,
    example: {
      viewportWidth: 350,
      attributes: {
        style: {
          typography: {
            textAlign: "center"
          }
        }
      }
    },
    edit: SiteTitleEdit,
    transforms: transforms_default34,
    deprecated: deprecated_default48
  };
  var init96 = () => initBlock({ name: name97, metadata: block_default96, settings: settings96 });

  // packages/block-library/build-module/social-link/index.mjs
  var social_link_exports = {};
  __export(social_link_exports, {
    init: () => init97,
    metadata: () => block_default97,
    name: () => name98,
    settings: () => settings97
  });

  // packages/block-library/build-module/social-link/edit.mjs
  var import_keycodes9 = __toESM(require_keycodes(), 1);
  var import_data138 = __toESM(require_data(), 1);
  var import_block_editor237 = __toESM(require_block_editor(), 1);
  var import_element146 = __toESM(require_element(), 1);
  var import_components147 = __toESM(require_components(), 1);
  var import_compose62 = __toESM(require_compose(), 1);
  var import_i18n229 = __toESM(require_i18n(), 1);
  var import_blocks94 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/social-link/social-list.mjs
  var import_i18n228 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/social-link/icons/amazon.mjs
  var import_primitives169 = __toESM(require_primitives(), 1);
  var import_jsx_runtime464 = __toESM(require_jsx_runtime(), 1);
  var AmazonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(import_primitives169.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime464.jsx)(import_primitives169.Path, { d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z" }) });

  // packages/block-library/build-module/social-link/icons/bandcamp.mjs
  var import_primitives170 = __toESM(require_primitives(), 1);
  var import_jsx_runtime465 = __toESM(require_jsx_runtime(), 1);
  var BandcampIcon = () => /* @__PURE__ */ (0, import_jsx_runtime465.jsx)(import_primitives170.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime465.jsx)(import_primitives170.Path, { d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289" }) });

  // packages/block-library/build-module/social-link/icons/behance.mjs
  var import_primitives171 = __toESM(require_primitives(), 1);
  var import_jsx_runtime466 = __toESM(require_jsx_runtime(), 1);
  var BehanceIcon = () => /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(import_primitives171.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime466.jsx)(import_primitives171.Path, { d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z" }) });

  // packages/block-library/build-module/social-link/icons/bluesky.mjs
  var import_primitives172 = __toESM(require_primitives(), 1);
  var import_jsx_runtime467 = __toESM(require_jsx_runtime(), 1);
  var BlueskyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(import_primitives172.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime467.jsx)(import_primitives172.Path, { d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z" }) });

  // packages/block-library/build-module/social-link/icons/chain.mjs
  var import_primitives173 = __toESM(require_primitives(), 1);
  var import_jsx_runtime468 = __toESM(require_jsx_runtime(), 1);
  var ChainIcon = () => /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(import_primitives173.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime468.jsx)(import_primitives173.Path, { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" }) });

  // packages/block-library/build-module/social-link/icons/codepen.mjs
  var import_primitives174 = __toESM(require_primitives(), 1);
  var import_jsx_runtime469 = __toESM(require_jsx_runtime(), 1);
  var CodepenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(import_primitives174.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime469.jsx)(import_primitives174.Path, { d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z" }) });

  // packages/block-library/build-module/social-link/icons/deviantart.mjs
  var import_primitives175 = __toESM(require_primitives(), 1);
  var import_jsx_runtime470 = __toESM(require_jsx_runtime(), 1);
  var DeviantArtIcon = () => /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(import_primitives175.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime470.jsx)(import_primitives175.Path, { d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z" }) });

  // packages/block-library/build-module/social-link/icons/discord.mjs
  var import_primitives176 = __toESM(require_primitives(), 1);
  var import_jsx_runtime471 = __toESM(require_jsx_runtime(), 1);
  var DiscordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(import_primitives176.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime471.jsx)(import_primitives176.Path, { d: "M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z" }) });

  // packages/block-library/build-module/social-link/icons/dribbble.mjs
  var import_primitives177 = __toESM(require_primitives(), 1);
  var import_jsx_runtime472 = __toESM(require_jsx_runtime(), 1);
  var DribbbleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(import_primitives177.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime472.jsx)(import_primitives177.Path, { d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z" }) });

  // packages/block-library/build-module/social-link/icons/dropbox.mjs
  var import_primitives178 = __toESM(require_primitives(), 1);
  var import_jsx_runtime473 = __toESM(require_jsx_runtime(), 1);
  var DropboxIcon = () => /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_primitives178.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime473.jsx)(import_primitives178.Path, { d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z" }) });

  // packages/block-library/build-module/social-link/icons/etsy.mjs
  var import_primitives179 = __toESM(require_primitives(), 1);
  var import_jsx_runtime474 = __toESM(require_jsx_runtime(), 1);
  var EtsyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(import_primitives179.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime474.jsx)(import_primitives179.Path, { d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z" }) });

  // packages/block-library/build-module/social-link/icons/facebook.mjs
  var import_primitives180 = __toESM(require_primitives(), 1);
  var import_jsx_runtime475 = __toESM(require_jsx_runtime(), 1);
  var FacebookIcon = () => /* @__PURE__ */ (0, import_jsx_runtime475.jsx)(import_primitives180.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime475.jsx)(import_primitives180.Path, { d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z" }) });

  // packages/block-library/build-module/social-link/icons/feed.mjs
  var import_primitives181 = __toESM(require_primitives(), 1);
  var import_jsx_runtime476 = __toESM(require_jsx_runtime(), 1);
  var FeedIcon = () => /* @__PURE__ */ (0, import_jsx_runtime476.jsx)(import_primitives181.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime476.jsx)(import_primitives181.Path, { d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z" }) });

  // packages/block-library/build-module/social-link/icons/fivehundredpx.mjs
  var import_primitives182 = __toESM(require_primitives(), 1);
  var import_jsx_runtime477 = __toESM(require_jsx_runtime(), 1);
  var FivehundredpxIcon = () => /* @__PURE__ */ (0, import_jsx_runtime477.jsx)(import_primitives182.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime477.jsx)(import_primitives182.Path, { d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z" }) });

  // packages/block-library/build-module/social-link/icons/flickr.mjs
  var import_primitives183 = __toESM(require_primitives(), 1);
  var import_jsx_runtime478 = __toESM(require_jsx_runtime(), 1);
  var FlickrIcon = () => /* @__PURE__ */ (0, import_jsx_runtime478.jsx)(import_primitives183.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime478.jsx)(import_primitives183.Path, { d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z" }) });

  // packages/block-library/build-module/social-link/icons/foursquare.mjs
  var import_primitives184 = __toESM(require_primitives(), 1);
  var import_jsx_runtime479 = __toESM(require_jsx_runtime(), 1);
  var FoursquareIcon = () => /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_primitives184.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime479.jsx)(import_primitives184.Path, { d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z" }) });

  // packages/block-library/build-module/social-link/icons/goodreads.mjs
  var import_primitives185 = __toESM(require_primitives(), 1);
  var import_jsx_runtime480 = __toESM(require_jsx_runtime(), 1);
  var GoodreadsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime480.jsx)(import_primitives185.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime480.jsx)(import_primitives185.Path, { d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z" }) });

  // packages/block-library/build-module/social-link/icons/google.mjs
  var import_primitives186 = __toESM(require_primitives(), 1);
  var import_jsx_runtime481 = __toESM(require_jsx_runtime(), 1);
  var GoogleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(import_primitives186.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime481.jsx)(import_primitives186.Path, { d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z" }) });

  // packages/block-library/build-module/social-link/icons/github.mjs
  var import_primitives187 = __toESM(require_primitives(), 1);
  var import_jsx_runtime482 = __toESM(require_jsx_runtime(), 1);
  var GitHubIcon = () => /* @__PURE__ */ (0, import_jsx_runtime482.jsx)(import_primitives187.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime482.jsx)(import_primitives187.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z" }) });

  // packages/block-library/build-module/social-link/icons/gravatar.mjs
  var import_primitives188 = __toESM(require_primitives(), 1);
  var import_jsx_runtime483 = __toESM(require_jsx_runtime(), 1);
  var GravatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime483.jsx)(import_primitives188.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime483.jsx)(import_primitives188.Path, { d: "M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" }) });

  // packages/block-library/build-module/social-link/icons/instagram.mjs
  var import_primitives189 = __toESM(require_primitives(), 1);
  var import_jsx_runtime484 = __toESM(require_jsx_runtime(), 1);
  var InstagramIcon = () => /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(import_primitives189.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime484.jsx)(import_primitives189.Path, { d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" }) });

  // packages/block-library/build-module/social-link/icons/lastfm.mjs
  var import_primitives190 = __toESM(require_primitives(), 1);
  var import_jsx_runtime485 = __toESM(require_jsx_runtime(), 1);
  var LastfmIcon = () => /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(import_primitives190.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime485.jsx)(import_primitives190.Path, { d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z" }) });

  // packages/block-library/build-module/social-link/icons/linkedin.mjs
  var import_primitives191 = __toESM(require_primitives(), 1);
  var import_jsx_runtime486 = __toESM(require_jsx_runtime(), 1);
  var LinkedInIcon = () => /* @__PURE__ */ (0, import_jsx_runtime486.jsx)(import_primitives191.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime486.jsx)(import_primitives191.Path, { d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" }) });

  // packages/block-library/build-module/social-link/icons/mail.mjs
  var import_primitives192 = __toESM(require_primitives(), 1);
  var import_jsx_runtime487 = __toESM(require_jsx_runtime(), 1);
  var MailIcon = () => /* @__PURE__ */ (0, import_jsx_runtime487.jsx)(import_primitives192.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime487.jsx)(import_primitives192.Path, { d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z" }) });

  // packages/block-library/build-module/social-link/icons/mastodon.mjs
  var import_primitives193 = __toESM(require_primitives(), 1);
  var import_jsx_runtime488 = __toESM(require_jsx_runtime(), 1);
  var MastodonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime488.jsx)(import_primitives193.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime488.jsx)(import_primitives193.Path, { d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z" }) });

  // packages/block-library/build-module/social-link/icons/meetup.mjs
  var import_primitives194 = __toESM(require_primitives(), 1);
  var import_jsx_runtime489 = __toESM(require_jsx_runtime(), 1);
  var MeetupIcon = () => /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(import_primitives194.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime489.jsx)(import_primitives194.Path, { d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z" }) });

  // packages/block-library/build-module/social-link/icons/medium.mjs
  var import_primitives195 = __toESM(require_primitives(), 1);
  var import_jsx_runtime490 = __toESM(require_jsx_runtime(), 1);
  var MediumIcon = () => /* @__PURE__ */ (0, import_jsx_runtime490.jsx)(import_primitives195.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime490.jsx)(import_primitives195.Path, { d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12" }) });

  // packages/block-library/build-module/social-link/icons/patreon.mjs
  var import_primitives196 = __toESM(require_primitives(), 1);
  var import_jsx_runtime491 = __toESM(require_jsx_runtime(), 1);
  var PatreonIcon = () => /* @__PURE__ */ (0, import_jsx_runtime491.jsx)(import_primitives196.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime491.jsx)(import_primitives196.Path, { d: "M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" }) });

  // packages/block-library/build-module/social-link/icons/pinterest.mjs
  var import_primitives197 = __toESM(require_primitives(), 1);
  var import_jsx_runtime492 = __toESM(require_jsx_runtime(), 1);
  var PinterestIcon = () => /* @__PURE__ */ (0, import_jsx_runtime492.jsx)(import_primitives197.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime492.jsx)(import_primitives197.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });

  // packages/block-library/build-module/social-link/icons/pocket.mjs
  var import_primitives198 = __toESM(require_primitives(), 1);
  var import_jsx_runtime493 = __toESM(require_jsx_runtime(), 1);
  var PocketIcon = () => /* @__PURE__ */ (0, import_jsx_runtime493.jsx)(import_primitives198.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime493.jsx)(import_primitives198.Path, { d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z" }) });

  // packages/block-library/build-module/social-link/icons/reddit.mjs
  var import_primitives199 = __toESM(require_primitives(), 1);
  var import_jsx_runtime494 = __toESM(require_jsx_runtime(), 1);
  var RedditIcon = () => /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(import_primitives199.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime494.jsx)(import_primitives199.Path, { d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z" }) });

  // packages/block-library/build-module/social-link/icons/skype.mjs
  var import_primitives200 = __toESM(require_primitives(), 1);
  var import_jsx_runtime495 = __toESM(require_jsx_runtime(), 1);
  var SkypeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_primitives200.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime495.jsx)(import_primitives200.Path, { d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z" }) });

  // packages/block-library/build-module/social-link/icons/snapchat.mjs
  var import_primitives201 = __toESM(require_primitives(), 1);
  var import_jsx_runtime496 = __toESM(require_jsx_runtime(), 1);
  var SnapchatIcon = () => /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(import_primitives201.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime496.jsx)(import_primitives201.Path, { d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z" }) });

  // packages/block-library/build-module/social-link/icons/soundcloud.mjs
  var import_primitives202 = __toESM(require_primitives(), 1);
  var import_jsx_runtime497 = __toESM(require_jsx_runtime(), 1);
  var SoundCloudIcon = () => /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(import_primitives202.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime497.jsx)(import_primitives202.Path, { d: "M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z" }) });

  // packages/block-library/build-module/social-link/icons/spotify.mjs
  var import_primitives203 = __toESM(require_primitives(), 1);
  var import_jsx_runtime498 = __toESM(require_jsx_runtime(), 1);
  var SpotifyIcon = () => /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(import_primitives203.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime498.jsx)(import_primitives203.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865" }) });

  // packages/block-library/build-module/social-link/icons/telegram.mjs
  var import_primitives204 = __toESM(require_primitives(), 1);
  var import_jsx_runtime499 = __toESM(require_jsx_runtime(), 1);
  var TelegramIcon = () => /* @__PURE__ */ (0, import_jsx_runtime499.jsx)(import_primitives204.SVG, { width: "24", height: "24", viewBox: "0 0 128 128", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime499.jsx)(import_primitives204.Path, { d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z" }) });

  // packages/block-library/build-module/social-link/icons/threads.mjs
  var import_primitives205 = __toESM(require_primitives(), 1);
  var import_jsx_runtime500 = __toESM(require_jsx_runtime(), 1);
  var ThreadsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime500.jsx)(import_primitives205.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime500.jsx)(import_primitives205.Path, { d: "M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" }) });

  // packages/block-library/build-module/social-link/icons/tiktok.mjs
  var import_primitives206 = __toESM(require_primitives(), 1);
  var import_jsx_runtime501 = __toESM(require_jsx_runtime(), 1);
  var TiktokIcon = () => /* @__PURE__ */ (0, import_jsx_runtime501.jsx)(import_primitives206.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime501.jsx)(import_primitives206.Path, { d: "M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z" }) });

  // packages/block-library/build-module/social-link/icons/tumblr.mjs
  var import_primitives207 = __toESM(require_primitives(), 1);
  var import_jsx_runtime502 = __toESM(require_jsx_runtime(), 1);
  var TumblrIcon = () => /* @__PURE__ */ (0, import_jsx_runtime502.jsx)(import_primitives207.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime502.jsx)(import_primitives207.Path, { d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" }) });

  // packages/block-library/build-module/social-link/icons/twitch.mjs
  var import_primitives208 = __toESM(require_primitives(), 1);
  var import_jsx_runtime503 = __toESM(require_jsx_runtime(), 1);
  var TwitchIcon = () => /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(import_primitives208.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime503.jsx)(import_primitives208.Path, { d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z" }) });

  // packages/block-library/build-module/social-link/icons/twitter.mjs
  var import_primitives209 = __toESM(require_primitives(), 1);
  var import_jsx_runtime504 = __toESM(require_jsx_runtime(), 1);
  var TwitterIcon = () => /* @__PURE__ */ (0, import_jsx_runtime504.jsx)(import_primitives209.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime504.jsx)(import_primitives209.Path, { d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" }) });

  // packages/block-library/build-module/social-link/icons/vimeo.mjs
  var import_primitives210 = __toESM(require_primitives(), 1);
  var import_jsx_runtime505 = __toESM(require_jsx_runtime(), 1);
  var VimeoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_primitives210.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime505.jsx)(import_primitives210.Path, { d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z" }) });

  // packages/block-library/build-module/social-link/icons/vk.mjs
  var import_primitives211 = __toESM(require_primitives(), 1);
  var import_jsx_runtime506 = __toESM(require_jsx_runtime(), 1);
  var VkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime506.jsx)(import_primitives211.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime506.jsx)(import_primitives211.Path, { d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z" }) });

  // packages/block-library/build-module/social-link/icons/whatsapp.mjs
  var import_primitives212 = __toESM(require_primitives(), 1);
  var import_jsx_runtime507 = __toESM(require_jsx_runtime(), 1);
  var WhatsAppIcon = () => /* @__PURE__ */ (0, import_jsx_runtime507.jsx)(import_primitives212.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime507.jsx)(import_primitives212.Path, { d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" }) });

  // packages/block-library/build-module/social-link/icons/wordpress.mjs
  var import_primitives213 = __toESM(require_primitives(), 1);
  var import_jsx_runtime508 = __toESM(require_jsx_runtime(), 1);
  var WordPressIcon = () => /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(
    import_primitives213.SVG,
    {
      width: "24",
      height: "24",
      viewBox: "0 0 24 24",
      version: "1.1",
      xmlns: "http://www.w3.org/2000/svg",
      children: /* @__PURE__ */ (0, import_jsx_runtime508.jsx)(import_primitives213.Path, { d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z" })
    }
  );

  // packages/block-library/build-module/social-link/icons/x.mjs
  var import_primitives214 = __toESM(require_primitives(), 1);
  var import_jsx_runtime509 = __toESM(require_jsx_runtime(), 1);
  var XIcon = () => /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(import_primitives214.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime509.jsx)(import_primitives214.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) });

  // packages/block-library/build-module/social-link/icons/yelp.mjs
  var import_primitives215 = __toESM(require_primitives(), 1);
  var import_jsx_runtime510 = __toESM(require_jsx_runtime(), 1);
  var YelpIcon = () => /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(import_primitives215.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime510.jsx)(import_primitives215.Path, { d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z" }) });

  // packages/block-library/build-module/social-link/icons/youtube.mjs
  var import_primitives216 = __toESM(require_primitives(), 1);
  var import_jsx_runtime511 = __toESM(require_jsx_runtime(), 1);
  var YouTubeIcon = () => /* @__PURE__ */ (0, import_jsx_runtime511.jsx)(import_primitives216.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0, import_jsx_runtime511.jsx)(import_primitives216.Path, { d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z" }) });

  // packages/block-library/build-module/social-link/social-list.mjs
  function getSocialService(variation) {
    if (!variation?.name) {
      return {
        icon: ChainIcon,
        label: (0, import_i18n228.__)("Social Icon")
      };
    }
    return {
      icon: variation?.icon ?? ChainIcon,
      label: variation?.title ?? (0, import_i18n228.__)("Social Icon")
    };
  }

  // packages/block-library/build-module/social-link/edit.mjs
  var import_jsx_runtime512 = __toESM(require_jsx_runtime(), 1);
  var SocialLinkURLPopover = ({
    url,
    setAttributes,
    setPopover,
    popoverAnchor,
    clientId
  }) => {
    const { removeBlock } = (0, import_data138.useDispatch)(import_block_editor237.store);
    return /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
      import_block_editor237.URLPopover,
      {
        anchor: popoverAnchor,
        "aria-label": (0, import_i18n229.__)("Edit social link"),
        onClose: () => {
          setPopover(false);
          popoverAnchor?.focus();
        },
        children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
          "form",
          {
            className: "block-editor-url-popover__link-editor",
            onSubmit: (event) => {
              event.preventDefault();
              setPopover(false);
              popoverAnchor?.focus();
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)("div", { className: "block-editor-url-input", children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
              import_block_editor237.URLInput,
              {
                value: url,
                onChange: (nextURL) => setAttributes({ url: nextURL }),
                placeholder: (0, import_i18n229.__)("Enter social link"),
                label: (0, import_i18n229.__)("Enter social link"),
                hideLabelFromVision: true,
                disableSuggestions: true,
                onKeyDown: (event) => {
                  if (!!url || event.defaultPrevented || ![import_keycodes9.BACKSPACE, import_keycodes9.DELETE].includes(
                    event.keyCode
                  )) {
                    return;
                  }
                  removeBlock(clientId);
                },
                suffix: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components147.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
                  import_components147.Button,
                  {
                    icon: keyboard_return_default,
                    label: (0, import_i18n229.__)("Apply"),
                    type: "submit",
                    size: "small"
                  }
                ) })
              }
            ) })
          }
        )
      }
    );
  };
  var SocialLinkEdit = ({
    attributes: attributes2,
    context,
    isSelected,
    setAttributes,
    clientId,
    name: name118
  }) => {
    const { url, service, label = "", rel } = attributes2;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const {
      showLabels,
      iconColor,
      iconColorValue,
      iconBackgroundColor,
      iconBackgroundColorValue
    } = context;
    const [showURLPopover, setPopover] = (0, import_element146.useState)(false);
    const wrapperClasses = clsx_default(
      "wp-social-link",
      // Manually adding this class for backwards compatibility of CSS when moving the
      // blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883
      "wp-block-social-link",
      "wp-social-link-" + service,
      {
        "wp-social-link__is-incomplete": !url,
        [`has-${iconColor}-color`]: iconColor,
        [`has-${iconBackgroundColor}-background-color`]: iconBackgroundColor
      }
    );
    const [popoverAnchor, setPopoverAnchor] = (0, import_element146.useState)(null);
    const isContentOnlyMode = (0, import_block_editor237.useBlockEditingMode)() === "contentOnly";
    const { activeVariation } = (0, import_data138.useSelect)(
      (select10) => {
        const { getActiveBlockVariation } = select10(import_blocks94.store);
        return {
          activeVariation: getActiveBlockVariation(name118, attributes2)
        };
      },
      [name118, attributes2]
    );
    const { icon: icon2, label: socialLinkName } = getSocialService(activeVariation);
    const socialLinkText = label.trim() === "" ? socialLinkName : label;
    const ref = (0, import_element146.useRef)();
    const blockProps = (0, import_block_editor237.useBlockProps)({
      className: "wp-block-social-link-anchor",
      ref: (0, import_compose62.useMergeRefs)([setPopoverAnchor, ref]),
      onClick: () => setPopover(true),
      onKeyDown: (event) => {
        if (event.keyCode === import_keycodes9.ENTER) {
          event.preventDefault();
          setPopover(true);
        }
      }
    });
    return /* @__PURE__ */ (0, import_jsx_runtime512.jsxs)(import_jsx_runtime512.Fragment, { children: [
      isContentOnlyMode && showLabels && // Add an extra control to modify the label attribute when content only mode is active.
      // With content only mode active, the inspector is hidden, so users need another way
      // to edit this attribute.
      /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_block_editor237.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
        import_components147.Dropdown,
        {
          popoverProps: { placement: "bottom-start" },
          renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
            import_components147.ToolbarButton,
            {
              onClick: onToggle,
              "aria-haspopup": "true",
              "aria-expanded": isOpen,
              children: (0, import_i18n229.__)("Text")
            }
          ),
          renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
            import_components147.TextControl,
            {
              className: "wp-block-social-link__toolbar_content_text",
              label: (0, import_i18n229.__)("Text"),
              help: (0, import_i18n229.__)(
                "Provide a text label or use the default."
              ),
              value: label,
              onChange: (value) => setAttributes({ label: value }),
              placeholder: socialLinkName
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_block_editor237.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
        import_components147.__experimentalToolsPanel,
        {
          label: (0, import_i18n229.__)("Settings"),
          resetAll: () => {
            setAttributes({ label: void 0 });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
            import_components147.__experimentalToolsPanelItem,
            {
              isShownByDefault: true,
              label: (0, import_i18n229.__)("Text"),
              hasValue: () => !!label,
              onDeselect: () => {
                setAttributes({ label: void 0 });
              },
              children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
                import_components147.TextControl,
                {
                  label: (0, import_i18n229.__)("Text"),
                  help: (0, import_i18n229.__)(
                    "The text is visible when enabled from the parent Social Icons block."
                  ),
                  value: label,
                  onChange: (value) => setAttributes({ label: value }),
                  placeholder: socialLinkName
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_block_editor237.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
        import_components147.TextControl,
        {
          label: (0, import_i18n229.__)("Link relation"),
          help: (0, import_element146.createInterpolateElement)(
            (0, import_i18n229.__)(
              "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
            ),
            {
              a: /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components147.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
            }
          ),
          value: rel || "",
          onChange: (value) => setAttributes({ rel: value })
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime512.jsxs)(
        "li",
        {
          role: "presentation",
          className: wrapperClasses,
          style: {
            color: iconColorValue,
            backgroundColor: iconBackgroundColorValue
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime512.jsxs)("button", { "aria-haspopup": "dialog", ...blockProps, role: "button", children: [
              /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(import_components147.Icon, { icon: icon2 }),
              /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
                "span",
                {
                  className: clsx_default("wp-block-social-link-label", {
                    "screen-reader-text": !showLabels
                  }),
                  children: socialLinkText
                }
              )
            ] }),
            isSelected && showURLPopover && /* @__PURE__ */ (0, import_jsx_runtime512.jsx)(
              SocialLinkURLPopover,
              {
                url,
                setAttributes,
                setPopover,
                popoverAnchor,
                clientId
              }
            )
          ]
        }
      )
    ] });
  };
  var edit_default28 = SocialLinkEdit;

  // packages/block-library/build-module/social-link/block.json
  var block_default97 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/social-link",
    title: "Social Icon",
    category: "widgets",
    parent: ["core/social-links"],
    description: "Display an icon linking to a social profile or site.",
    textdomain: "default",
    attributes: {
      url: {
        type: "string",
        role: "content"
      },
      service: {
        type: "string"
      },
      label: {
        type: "string",
        role: "content"
      },
      rel: {
        type: "string"
      }
    },
    usesContext: [
      "openInNewTab",
      "showLabels",
      "iconColor",
      "iconColorValue",
      "iconBackgroundColor",
      "iconBackgroundColorValue"
    ],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-social-link-editor"
  };

  // packages/block-library/build-module/social-link/variations.mjs
  var import_i18n230 = __toESM(require_i18n(), 1);
  var variations17 = [
    {
      isDefault: true,
      name: "wordpress",
      attributes: { service: "wordpress" },
      title: (0, import_i18n230._x)("WordPress", "social link block variation name"),
      icon: WordPressIcon
    },
    {
      name: "fivehundredpx",
      attributes: { service: "fivehundredpx" },
      title: (0, import_i18n230._x)("500px", "social link block variation name"),
      icon: FivehundredpxIcon
    },
    {
      name: "amazon",
      attributes: { service: "amazon" },
      title: (0, import_i18n230._x)("Amazon", "social link block variation name"),
      icon: AmazonIcon
    },
    {
      name: "bandcamp",
      attributes: { service: "bandcamp" },
      title: (0, import_i18n230._x)("Bandcamp", "social link block variation name"),
      icon: BandcampIcon
    },
    {
      name: "behance",
      attributes: { service: "behance" },
      title: (0, import_i18n230._x)("Behance", "social link block variation name"),
      icon: BehanceIcon
    },
    {
      name: "bluesky",
      attributes: { service: "bluesky" },
      title: (0, import_i18n230._x)("Bluesky", "social link block variation name"),
      icon: BlueskyIcon
    },
    {
      name: "chain",
      attributes: { service: "chain" },
      title: (0, import_i18n230._x)("Link", "social link block variation name"),
      icon: ChainIcon
    },
    {
      name: "codepen",
      attributes: { service: "codepen" },
      title: (0, import_i18n230._x)("CodePen", "social link block variation name"),
      icon: CodepenIcon
    },
    {
      name: "deviantart",
      attributes: { service: "deviantart" },
      title: (0, import_i18n230._x)("DeviantArt", "social link block variation name"),
      icon: DeviantArtIcon
    },
    {
      name: "discord",
      attributes: { service: "discord" },
      title: (0, import_i18n230._x)("Discord", "social link block variation name"),
      icon: DiscordIcon
    },
    {
      name: "dribbble",
      attributes: { service: "dribbble" },
      title: (0, import_i18n230._x)("Dribbble", "social link block variation name"),
      icon: DribbbleIcon
    },
    {
      name: "dropbox",
      attributes: { service: "dropbox" },
      title: (0, import_i18n230._x)("Dropbox", "social link block variation name"),
      icon: DropboxIcon
    },
    {
      name: "etsy",
      attributes: { service: "etsy" },
      title: (0, import_i18n230._x)("Etsy", "social link block variation name"),
      icon: EtsyIcon
    },
    {
      name: "facebook",
      attributes: { service: "facebook" },
      title: (0, import_i18n230._x)("Facebook", "social link block variation name"),
      icon: FacebookIcon
    },
    {
      name: "feed",
      attributes: { service: "feed" },
      title: (0, import_i18n230._x)("RSS Feed", "social link block variation name"),
      icon: FeedIcon
    },
    {
      name: "flickr",
      attributes: { service: "flickr" },
      title: (0, import_i18n230._x)("Flickr", "social link block variation name"),
      icon: FlickrIcon
    },
    {
      name: "foursquare",
      attributes: { service: "foursquare" },
      title: (0, import_i18n230._x)("Foursquare", "social link block variation name"),
      icon: FoursquareIcon
    },
    {
      name: "goodreads",
      attributes: { service: "goodreads" },
      title: (0, import_i18n230._x)("Goodreads", "social link block variation name"),
      icon: GoodreadsIcon
    },
    {
      name: "google",
      attributes: { service: "google" },
      title: (0, import_i18n230._x)("Google", "social link block variation name"),
      icon: GoogleIcon
    },
    {
      name: "github",
      attributes: { service: "github" },
      title: (0, import_i18n230._x)("GitHub", "social link block variation name"),
      icon: GitHubIcon
    },
    {
      name: "gravatar",
      attributes: { service: "gravatar" },
      title: (0, import_i18n230._x)("Gravatar", "social link block variation name"),
      icon: GravatarIcon
    },
    {
      name: "instagram",
      attributes: { service: "instagram" },
      title: (0, import_i18n230._x)("Instagram", "social link block variation name"),
      icon: InstagramIcon
    },
    {
      name: "lastfm",
      attributes: { service: "lastfm" },
      title: (0, import_i18n230._x)("Last.fm", "social link block variation name"),
      icon: LastfmIcon
    },
    {
      name: "linkedin",
      attributes: { service: "linkedin" },
      title: (0, import_i18n230._x)("LinkedIn", "social link block variation name"),
      icon: LinkedInIcon
    },
    {
      name: "mail",
      attributes: { service: "mail" },
      title: (0, import_i18n230._x)("Mail", "social link block variation name"),
      keywords: ["email", "e-mail"],
      icon: MailIcon
    },
    {
      name: "mastodon",
      attributes: { service: "mastodon" },
      title: (0, import_i18n230._x)("Mastodon", "social link block variation name"),
      icon: MastodonIcon
    },
    {
      name: "meetup",
      attributes: { service: "meetup" },
      title: (0, import_i18n230._x)("Meetup", "social link block variation name"),
      icon: MeetupIcon
    },
    {
      name: "medium",
      attributes: { service: "medium" },
      title: (0, import_i18n230._x)("Medium", "social link block variation name"),
      icon: MediumIcon
    },
    {
      name: "patreon",
      attributes: { service: "patreon" },
      title: (0, import_i18n230._x)("Patreon", "social link block variation name"),
      icon: PatreonIcon
    },
    {
      name: "pinterest",
      attributes: { service: "pinterest" },
      title: (0, import_i18n230._x)("Pinterest", "social link block variation name"),
      icon: PinterestIcon
    },
    {
      name: "pocket",
      attributes: { service: "pocket" },
      title: (0, import_i18n230._x)("Pocket", "social link block variation name"),
      icon: PocketIcon
    },
    {
      name: "reddit",
      attributes: { service: "reddit" },
      title: (0, import_i18n230._x)("Reddit", "social link block variation name"),
      icon: RedditIcon
    },
    {
      name: "skype",
      attributes: { service: "skype" },
      title: (0, import_i18n230._x)("Skype", "social link block variation name"),
      icon: SkypeIcon,
      // Deprecated: Skype service is no longer available.
      scope: []
    },
    {
      name: "snapchat",
      attributes: { service: "snapchat" },
      title: (0, import_i18n230._x)("Snapchat", "social link block variation name"),
      icon: SnapchatIcon
    },
    {
      name: "soundcloud",
      attributes: { service: "soundcloud" },
      title: (0, import_i18n230._x)("SoundCloud", "social link block variation name"),
      icon: SoundCloudIcon
    },
    {
      name: "spotify",
      attributes: { service: "spotify" },
      title: (0, import_i18n230._x)("Spotify", "social link block variation name"),
      icon: SpotifyIcon
    },
    {
      name: "telegram",
      attributes: { service: "telegram" },
      title: (0, import_i18n230._x)("Telegram", "social link block variation name"),
      icon: TelegramIcon
    },
    {
      name: "threads",
      attributes: { service: "threads" },
      title: (0, import_i18n230._x)("Threads", "social link block variation name"),
      icon: ThreadsIcon
    },
    {
      name: "tiktok",
      attributes: { service: "tiktok" },
      title: (0, import_i18n230._x)("TikTok", "social link block variation name"),
      icon: TiktokIcon
    },
    {
      name: "tumblr",
      attributes: { service: "tumblr" },
      title: (0, import_i18n230._x)("Tumblr", "social link block variation name"),
      icon: TumblrIcon
    },
    {
      name: "twitch",
      attributes: { service: "twitch" },
      title: (0, import_i18n230._x)("Twitch", "social link block variation name"),
      icon: TwitchIcon
    },
    {
      name: "twitter",
      attributes: { service: "twitter" },
      title: (0, import_i18n230._x)("Twitter", "social link block variation name"),
      icon: TwitterIcon
    },
    {
      name: "vimeo",
      attributes: { service: "vimeo" },
      title: (0, import_i18n230._x)("Vimeo", "social link block variation name"),
      icon: VimeoIcon
    },
    {
      name: "vk",
      attributes: { service: "vk" },
      title: (0, import_i18n230._x)("VK", "social link block variation name"),
      icon: VkIcon
    },
    {
      name: "whatsapp",
      attributes: { service: "whatsapp" },
      title: (0, import_i18n230._x)("WhatsApp", "social link block variation name"),
      icon: WhatsAppIcon
    },
    {
      name: "x",
      attributes: { service: "x" },
      keywords: ["twitter"],
      title: (0, import_i18n230._x)("X", "social link block variation name"),
      icon: XIcon
    },
    {
      name: "yelp",
      attributes: { service: "yelp" },
      title: (0, import_i18n230._x)("Yelp", "social link block variation name"),
      icon: YelpIcon
    },
    {
      name: "youtube",
      attributes: { service: "youtube" },
      title: (0, import_i18n230._x)("YouTube", "social link block variation name"),
      icon: YouTubeIcon
    }
  ];
  variations17.forEach((variation) => {
    if (variation.isActive) {
      return;
    }
    variation.isActive = (blockAttributes8, variationAttributes) => blockAttributes8.service === variationAttributes.service;
  });
  var variations_default17 = variations17;

  // packages/block-library/build-module/social-link/index.mjs
  var { name: name98 } = block_default97;
  var settings97 = {
    icon: share_default,
    edit: edit_default28,
    variations: variations_default17
  };
  var init97 = () => initBlock({ name: name98, metadata: block_default97, settings: settings97 });

  // packages/block-library/build-module/social-links/index.mjs
  var social_links_exports = {};
  __export(social_links_exports, {
    init: () => init98,
    metadata: () => block_default98,
    name: () => name99,
    settings: () => settings98
  });

  // packages/block-library/build-module/social-links/deprecated.mjs
  var import_block_editor238 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime513 = __toESM(require_jsx_runtime(), 1);
  var migrateWithLayout3 = (attributes2) => {
    if (!!attributes2.layout) {
      return attributes2;
    }
    const { className } = attributes2;
    const prefix = `items-justified-`;
    const justifiedItemsRegex = new RegExp(`\\b${prefix}[^ ]*[ ]?\\b`, "g");
    const newAttributes = {
      ...attributes2,
      className: className?.replace(justifiedItemsRegex, "").trim()
    };
    const justifyContent = className?.match(justifiedItemsRegex)?.[0]?.trim();
    if (justifyContent) {
      Object.assign(newAttributes, {
        layout: {
          type: "flex",
          justifyContent: justifyContent.slice(prefix.length)
        }
      });
    }
    return newAttributes;
  };
  var deprecated18 = [
    // V1. Remove CSS variable use for colors.
    {
      attributes: {
        iconColor: {
          type: "string"
        },
        customIconColor: {
          type: "string"
        },
        iconColorValue: {
          type: "string"
        },
        iconBackgroundColor: {
          type: "string"
        },
        customIconBackgroundColor: {
          type: "string"
        },
        iconBackgroundColorValue: {
          type: "string"
        },
        openInNewTab: {
          type: "boolean",
          default: false
        },
        size: {
          type: "string"
        }
      },
      providesContext: {
        openInNewTab: "openInNewTab"
      },
      supports: {
        align: ["left", "center", "right"],
        anchor: true
      },
      migrate: migrateWithLayout3,
      save: (props) => {
        const {
          attributes: {
            iconBackgroundColorValue,
            iconColorValue,
            itemsJustification,
            size
          }
        } = props;
        const className = clsx_default(size, {
          "has-icon-color": iconColorValue,
          "has-icon-background-color": iconBackgroundColorValue,
          [`items-justified-${itemsJustification}`]: itemsJustification
        });
        const style2 = {
          "--wp--social-links--icon-color": iconColorValue,
          "--wp--social-links--icon-background-color": iconBackgroundColorValue
        };
        return /* @__PURE__ */ (0, import_jsx_runtime513.jsx)("ul", { ...import_block_editor238.useBlockProps.save({ className, style: style2 }), children: /* @__PURE__ */ (0, import_jsx_runtime513.jsx)(import_block_editor238.InnerBlocks.Content, {}) });
      }
    }
  ];
  var deprecated_default49 = deprecated18;

  // packages/block-library/build-module/social-links/edit.mjs
  var import_element147 = __toESM(require_element(), 1);
  var import_block_editor239 = __toESM(require_block_editor(), 1);
  var import_components148 = __toESM(require_components(), 1);
  var import_i18n231 = __toESM(require_i18n(), 1);
  var import_data139 = __toESM(require_data(), 1);
  var import_jsx_runtime514 = __toESM(require_jsx_runtime(), 1);
  var sizeOptions = [
    { label: (0, import_i18n231.__)("Default"), value: "" },
    { label: (0, import_i18n231.__)("Small"), value: "has-small-icon-size" },
    { label: (0, import_i18n231.__)("Normal"), value: "has-normal-icon-size" },
    { label: (0, import_i18n231.__)("Large"), value: "has-large-icon-size" },
    { label: (0, import_i18n231.__)("Huge"), value: "has-huge-icon-size" }
  ];
  function SocialLinksEdit(props) {
    const {
      clientId,
      attributes: attributes2,
      iconBackgroundColor,
      iconColor,
      isSelected,
      setAttributes,
      setIconBackgroundColor,
      setIconColor
    } = props;
    const {
      iconBackgroundColorValue,
      iconColorValue,
      openInNewTab,
      showLabels,
      size
    } = attributes2;
    const { hasSocialIcons, hasSelectedChild, hasSelectedStyleState } = (0, import_data139.useSelect)(
      (select10) => {
        const {
          getBlockCount,
          hasSelectedInnerBlock,
          hasSelectedBlockStyleState
        } = select10(import_block_editor239.store);
        return {
          hasSocialIcons: getBlockCount(clientId) > 0,
          hasSelectedChild: hasSelectedInnerBlock(clientId),
          hasSelectedStyleState: hasSelectedBlockStyleState(clientId)
        };
      },
      [clientId]
    );
    const hasAnySelected = isSelected || hasSelectedChild;
    const logosOnly = attributes2.className?.includes("is-style-logos-only");
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    (0, import_element147.useEffect)(() => {
      if (logosOnly) {
        let restore;
        setAttributes((prev) => {
          restore = {
            iconBackgroundColor: prev.iconBackgroundColor,
            iconBackgroundColorValue: prev.iconBackgroundColorValue,
            customIconBackgroundColor: prev.customIconBackgroundColor
          };
          return {
            iconBackgroundColor: void 0,
            iconBackgroundColorValue: void 0,
            customIconBackgroundColor: void 0
          };
        });
        return () => setAttributes({ ...restore });
      }
    }, [logosOnly, setAttributes]);
    const className = clsx_default(size, {
      "has-visible-labels": showLabels,
      "has-icon-color": iconColor.color || iconColorValue,
      "has-icon-background-color": iconBackgroundColor.color || iconBackgroundColorValue
    });
    const blockProps = (0, import_block_editor239.useBlockProps)({ className });
    const innerBlocksProps = (0, import_block_editor239.useInnerBlocksProps)(blockProps, {
      templateLock: false,
      orientation: attributes2.layout?.orientation ?? "horizontal",
      __experimentalAppenderTagName: "li",
      renderAppender: !hasSocialIcons || hasAnySelected ? import_block_editor239.InnerBlocks.ButtonBlockAppender : void 0
    });
    const colorSettings = [
      {
        // Use custom attribute as fallback to prevent loss of named color selection when
        // switching themes to a new theme that does not have a matching named color.
        value: iconColor.color || iconColorValue,
        onChange: (colorValue) => {
          setIconColor(colorValue);
          setAttributes({ iconColorValue: colorValue });
        },
        label: (0, import_i18n231.__)("Icon color"),
        resetAllFilter: () => {
          setIconColor(void 0);
          setAttributes({ iconColorValue: void 0 });
        }
      }
    ];
    if (!logosOnly) {
      colorSettings.push({
        // Use custom attribute as fallback to prevent loss of named color selection when
        // switching themes to a new theme that does not have a matching named color.
        value: iconBackgroundColor.color || iconBackgroundColorValue,
        onChange: (colorValue) => {
          setIconBackgroundColor(colorValue);
          setAttributes({
            iconBackgroundColorValue: colorValue
          });
        },
        label: (0, import_i18n231.__)("Icon background"),
        resetAllFilter: () => {
          setIconBackgroundColor(void 0);
          setAttributes({ iconBackgroundColorValue: void 0 });
        }
      });
    }
    const colorGradientSettings = (0, import_block_editor239.__experimentalUseMultipleOriginColorsAndGradients)();
    const showColorControls = colorGradientSettings.hasColorsOrGradients && !hasSelectedStyleState;
    return /* @__PURE__ */ (0, import_jsx_runtime514.jsxs)(import_jsx_runtime514.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(import_block_editor239.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime514.jsxs)(
        import_components148.__experimentalToolsPanel,
        {
          label: (0, import_i18n231.__)("Settings"),
          resetAll: () => {
            setAttributes({
              openInNewTab: false,
              showLabels: false,
              size: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                hasValue: () => !!size,
                label: (0, import_i18n231.__)("Icon size"),
                onDeselect: () => setAttributes({ size: void 0 }),
                children: /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
                  import_components148.SelectControl,
                  {
                    label: (0, import_i18n231.__)("Icon size"),
                    onChange: (newSize) => {
                      setAttributes({
                        size: newSize === "" ? void 0 : newSize
                      });
                    },
                    value: size ?? "",
                    options: sizeOptions
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                label: (0, import_i18n231.__)("Show text"),
                hasValue: () => !!showLabels,
                onDeselect: () => setAttributes({ showLabels: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
                  import_components148.ToggleControl,
                  {
                    label: (0, import_i18n231.__)("Show text"),
                    checked: showLabels,
                    onChange: () => setAttributes({ showLabels: !showLabels })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
              import_components148.__experimentalToolsPanelItem,
              {
                isShownByDefault: true,
                label: (0, import_i18n231.__)("Open links in new tab"),
                hasValue: () => !!openInNewTab,
                onDeselect: () => setAttributes({ openInNewTab: false }),
                children: /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
                  import_components148.ToggleControl,
                  {
                    label: (0, import_i18n231.__)("Open links in new tab"),
                    checked: openInNewTab,
                    onChange: () => setAttributes({
                      openInNewTab: !openInNewTab
                    })
                  }
                )
              }
            )
          ]
        }
      ) }),
      showColorControls && /* @__PURE__ */ (0, import_jsx_runtime514.jsxs)(import_block_editor239.InspectorControls, { group: "color", children: [
        colorSettings.map(
          ({ onChange, label, value, resetAllFilter }) => /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
            import_block_editor239.__experimentalColorGradientSettingsDropdown,
            {
              __experimentalIsRenderedInSidebar: true,
              settings: [
                {
                  colorValue: value,
                  label,
                  onColorChange: onChange,
                  isShownByDefault: true,
                  resetAllFilter,
                  enableAlpha: true,
                  clearable: true
                }
              ],
              panelId: clientId,
              ...colorGradientSettings
            },
            `social-links-color-${label}`
          )
        ),
        !logosOnly && /* @__PURE__ */ (0, import_jsx_runtime514.jsx)(
          import_block_editor239.ContrastChecker,
          {
            ...{
              textColor: iconColorValue,
              backgroundColor: iconBackgroundColorValue
            },
            isLargeText: false
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime514.jsx)("ul", { ...innerBlocksProps })
    ] });
  }
  var iconColorAttributes = {
    iconColor: "icon-color",
    iconBackgroundColor: "icon-background-color"
  };
  var edit_default29 = (0, import_block_editor239.withColors)(iconColorAttributes)(SocialLinksEdit);

  // packages/block-library/build-module/social-links/block.json
  var block_default98 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/social-links",
    title: "Social Icons",
    category: "widgets",
    allowedBlocks: ["core/social-link"],
    description: "Display icons linking to your social profiles or sites.",
    keywords: ["links"],
    textdomain: "default",
    attributes: {
      iconColor: {
        type: "string"
      },
      customIconColor: {
        type: "string"
      },
      iconColorValue: {
        type: "string"
      },
      iconBackgroundColor: {
        type: "string"
      },
      customIconBackgroundColor: {
        type: "string"
      },
      iconBackgroundColorValue: {
        type: "string"
      },
      openInNewTab: {
        type: "boolean",
        default: false
      },
      showLabels: {
        type: "boolean",
        default: false
      },
      size: {
        type: "string"
      }
    },
    providesContext: {
      openInNewTab: "openInNewTab",
      showLabels: "showLabels",
      iconColor: "iconColor",
      iconColorValue: "iconColorValue",
      iconBackgroundColor: "iconBackgroundColor",
      iconBackgroundColorValue: "iconBackgroundColorValue"
    },
    supports: {
      align: ["left", "center", "right"],
      anchor: true,
      html: false,
      __experimentalExposeControlsToChildren: true,
      layout: {
        allowSwitching: false,
        allowInheriting: false,
        allowVerticalAlignment: false,
        default: {
          type: "flex"
        }
      },
      background: {
        gradient: true
      },
      color: {
        enableContrastChecker: false,
        background: true,
        gradients: true,
        text: false,
        __experimentalDefaultControls: {
          background: false
        }
      },
      spacing: {
        blockGap: ["horizontal", "vertical"],
        margin: true,
        padding: true,
        units: ["px", "em", "rem", "vh", "vw"],
        __experimentalDefaultControls: {
          blockGap: true,
          margin: true,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      },
      contentRole: true,
      listView: true
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "logos-only", label: "Logos Only" },
      { name: "pill-shape", label: "Pill Shape" }
    ],
    editorStyle: "wp-block-social-links-editor",
    style: "wp-block-social-links"
  };

  // packages/block-library/build-module/social-links/save.mjs
  var import_block_editor240 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime515 = __toESM(require_jsx_runtime(), 1);
  function save42(props) {
    const {
      attributes: {
        iconBackgroundColorValue,
        iconColorValue,
        showLabels,
        size
      }
    } = props;
    const className = clsx_default(size, {
      "has-visible-labels": showLabels,
      "has-icon-color": iconColorValue,
      "has-icon-background-color": iconBackgroundColorValue
    });
    const blockProps = import_block_editor240.useBlockProps.save({ className });
    const innerBlocksProps = import_block_editor240.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime515.jsx)("ul", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/social-links/index.mjs
  var { name: name99 } = block_default98;
  var settings98 = {
    example: {
      innerBlocks: [
        {
          name: "core/social-link",
          attributes: {
            service: "wordpress",
            url: "https://wordpress.org"
          }
        },
        {
          name: "core/social-link",
          attributes: {
            service: "facebook",
            url: "https://www.facebook.com/WordPress/"
          }
        },
        {
          name: "core/social-link",
          attributes: {
            service: "twitter",
            url: "https://twitter.com/WordPress"
          }
        }
      ]
    },
    icon: share_default,
    edit: edit_default29,
    save: save42,
    deprecated: deprecated_default49
  };
  var init98 = () => initBlock({ name: name99, metadata: block_default98, settings: settings98 });

  // packages/block-library/build-module/spacer/index.mjs
  var spacer_exports = {};
  __export(spacer_exports, {
    init: () => init99,
    metadata: () => block_default99,
    name: () => name100,
    settings: () => settings99
  });

  // packages/block-library/build-module/spacer/deprecated.mjs
  var import_block_editor241 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime516 = __toESM(require_jsx_runtime(), 1);
  var deprecated19 = [
    {
      attributes: {
        height: {
          type: "number",
          default: 100
        },
        width: {
          type: "number"
        }
      },
      migrate(attributes2) {
        const { height, width } = attributes2;
        return {
          ...attributes2,
          width: width !== void 0 ? `${width}px` : void 0,
          height: height !== void 0 ? `${height}px` : void 0
        };
      },
      save({ attributes: attributes2 }) {
        return /* @__PURE__ */ (0, import_jsx_runtime516.jsx)(
          "div",
          {
            ...import_block_editor241.useBlockProps.save({
              style: {
                height: attributes2.height,
                width: attributes2.width
              },
              "aria-hidden": true
            })
          }
        );
      }
    }
  ];
  var deprecated_default50 = deprecated19;

  // packages/block-library/build-module/spacer/edit.mjs
  var import_block_editor243 = __toESM(require_block_editor(), 1);
  var import_components150 = __toESM(require_components(), 1);
  var import_element148 = __toESM(require_element(), 1);
  var import_data140 = __toESM(require_data(), 1);

  // packages/block-library/build-module/spacer/controls.mjs
  var import_i18n232 = __toESM(require_i18n(), 1);
  var import_block_editor242 = __toESM(require_block_editor(), 1);
  var import_components149 = __toESM(require_components(), 1);
  var import_compose63 = __toESM(require_compose(), 1);

  // packages/block-library/build-module/spacer/constants.mjs
  var MIN_SPACER_SIZE = 0;

  // packages/block-library/build-module/spacer/controls.mjs
  var import_jsx_runtime517 = __toESM(require_jsx_runtime(), 1);
  var { useSpacingSizes } = unlock(import_block_editor242.privateApis);
  function DimensionInput({ label, onChange, isResizing, value = "" }) {
    const inputId = (0, import_compose63.useInstanceId)(import_components149.__experimentalUnitControl, "block-spacer-height-input");
    const spacingSizes = useSpacingSizes();
    const [spacingUnits] = (0, import_block_editor242.useSettings)("spacing.units");
    const availableUnits = spacingUnits ? spacingUnits.filter((unit) => unit !== "%") : ["px", "em", "rem", "vw", "vh"];
    const units = (0, import_components149.__experimentalUseCustomUnits)({
      availableUnits,
      defaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 }
    });
    const [parsedQuantity, parsedUnit] = (0, import_components149.__experimentalParseQuantityAndUnitFromRawValue)(value);
    const computedValue = (0, import_block_editor242.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? "px" : parsedUnit].join("");
    return /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(import_jsx_runtime517.Fragment, { children: spacingSizes?.length < 2 ? /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
      import_components149.__experimentalUnitControl,
      {
        id: inputId,
        isResetValueOnUnitChange: true,
        min: MIN_SPACER_SIZE,
        onChange,
        value: computedValue,
        units,
        label
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime517.jsx)("div", { className: "tools-panel-item-spacing", children: /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
      import_block_editor242.__experimentalSpacingSizesControl,
      {
        values: { all: computedValue },
        onChange: ({ all }) => {
          onChange(all);
        },
        label,
        sides: ["all"],
        units,
        allowReset: false,
        splitOnAxis: false,
        showSideInLabel: false
      }
    ) }) });
  }
  function SpacerControls({
    setAttributes,
    orientation,
    height,
    width,
    isResizing
  }) {
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(import_block_editor242.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime517.jsxs)(
      import_components149.__experimentalToolsPanel,
      {
        label: (0, import_i18n232.__)("Settings"),
        resetAll: () => {
          setAttributes({
            width: void 0,
            height: "100px"
          });
        },
        dropdownMenuProps,
        children: [
          orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
            import_components149.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n232.__)("Width"),
              isShownByDefault: true,
              hasValue: () => width !== void 0,
              onDeselect: () => setAttributes({ width: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
                DimensionInput,
                {
                  label: (0, import_i18n232.__)("Width"),
                  value: width,
                  onChange: (nextWidth) => setAttributes({ width: nextWidth }),
                  isResizing
                }
              )
            }
          ),
          orientation !== "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
            import_components149.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n232.__)("Height"),
              isShownByDefault: true,
              hasValue: () => height !== "100px",
              onDeselect: () => setAttributes({ height: "100px" }),
              children: /* @__PURE__ */ (0, import_jsx_runtime517.jsx)(
                DimensionInput,
                {
                  label: (0, import_i18n232.__)("Height"),
                  value: height,
                  onChange: (nextHeight) => setAttributes({ height: nextHeight }),
                  isResizing
                }
              )
            }
          )
        ]
      }
    ) });
  }

  // packages/block-library/build-module/spacer/edit.mjs
  var import_jsx_runtime518 = __toESM(require_jsx_runtime(), 1);
  var { useSpacingSizes: useSpacingSizes2 } = unlock(import_block_editor243.privateApis);
  var ResizableSpacer = ({
    orientation,
    onResizeStart,
    onResize,
    onResizeStop,
    isSelected,
    isResizing,
    setIsResizing,
    ...props
  }) => {
    const getCurrentSize = (elt) => {
      return orientation === "horizontal" ? elt.clientWidth : elt.clientHeight;
    };
    const getNextVal = (elt) => {
      return `${getCurrentSize(elt)}px`;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
      import_components150.ResizableBox,
      {
        className: clsx_default("block-library-spacer__resize-container", {
          "resize-horizontal": orientation === "horizontal",
          "is-resizing": isResizing,
          "is-selected": isSelected
        }),
        onResizeStart: (_event, _direction, elt) => {
          const nextVal = getNextVal(elt);
          onResizeStart(nextVal);
          onResize(nextVal);
        },
        onResize: (_event, _direction, elt) => {
          onResize(getNextVal(elt));
          if (!isResizing) {
            setIsResizing(true);
          }
        },
        onResizeStop: (_event, _direction, elt) => {
          const nextVal = getCurrentSize(elt);
          onResizeStop(`${nextVal}px`);
          setIsResizing(false);
        },
        __experimentalShowTooltip: true,
        __experimentalTooltipProps: {
          axis: orientation === "horizontal" ? "x" : "y",
          position: "corner",
          isVisible: isResizing
        },
        showHandle: isSelected,
        ...props
      }
    );
  };
  var SpacerEdit = ({
    attributes: attributes2,
    isSelected,
    setAttributes,
    toggleSelection,
    context,
    __unstableParentLayout: parentLayout,
    className
  }) => {
    const disableCustomSpacingSizes = (0, import_data140.useSelect)((select10) => {
      const editorSettings = select10(import_block_editor243.store).getSettings();
      return editorSettings?.disableCustomSpacingSizes;
    });
    const { orientation } = context;
    const {
      orientation: parentOrientation,
      type,
      default: { type: defaultType } = {}
    } = parentLayout || {};
    const isFlexLayout = type === "flex" || !type && defaultType === "flex";
    const inheritedOrientation = !parentOrientation && isFlexLayout ? "horizontal" : parentOrientation || orientation;
    const { height, width, style: blockStyle = {} } = attributes2;
    const { layout = {} } = blockStyle;
    const { selfStretch, flexSize } = layout;
    const spacingSizes = useSpacingSizes2();
    const [isResizing, setIsResizing] = (0, import_element148.useState)(false);
    const [temporaryHeight, setTemporaryHeight] = (0, import_element148.useState)(null);
    const [temporaryWidth, setTemporaryWidth] = (0, import_element148.useState)(null);
    const onResizeStart = () => toggleSelection(false);
    const onResizeStop = () => toggleSelection(true);
    const { __unstableMarkNextChangeAsNotPersistent } = (0, import_data140.useDispatch)(import_block_editor243.store);
    const handleOnVerticalResizeStop = (newHeight) => {
      onResizeStop();
      if (isFlexLayout) {
        setAttributes({
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: newHeight,
              selfStretch: "fixed"
            }
          }
        });
      }
      setAttributes({ height: newHeight });
      setTemporaryHeight(null);
    };
    const handleOnHorizontalResizeStop = (newWidth) => {
      onResizeStop();
      if (isFlexLayout) {
        setAttributes({
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: newWidth,
              selfStretch: "fixed"
            }
          }
        });
      }
      setAttributes({ width: newWidth });
      setTemporaryWidth(null);
    };
    const getHeightForVerticalBlocks = () => {
      if (isFlexLayout) {
        return void 0;
      }
      return temporaryHeight || (0, import_block_editor243.getSpacingPresetCssVar)(height) || void 0;
    };
    const getWidthForHorizontalBlocks = () => {
      if (isFlexLayout) {
        return void 0;
      }
      return temporaryWidth || (0, import_block_editor243.getSpacingPresetCssVar)(width) || void 0;
    };
    const sizeConditionalOnOrientation = inheritedOrientation === "horizontal" ? temporaryWidth || flexSize : temporaryHeight || flexSize;
    const style2 = {
      height: inheritedOrientation === "horizontal" ? 24 : getHeightForVerticalBlocks(),
      width: inheritedOrientation === "horizontal" ? getWidthForHorizontalBlocks() : void 0,
      // In vertical flex containers, the spacer shrinks to nothing without a minimum width.
      minWidth: inheritedOrientation === "vertical" && isFlexLayout ? 48 : void 0,
      // Add flex-basis so temporary sizes are respected.
      flexBasis: isFlexLayout ? sizeConditionalOnOrientation : void 0,
      // Remove flex-grow when resizing.
      flexGrow: isFlexLayout && isResizing ? 0 : void 0
    };
    const resizableBoxWithOrientation = (blockOrientation) => {
      if (blockOrientation === "horizontal") {
        return /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
          ResizableSpacer,
          {
            minWidth: MIN_SPACER_SIZE,
            enable: {
              top: false,
              right: true,
              bottom: false,
              left: false,
              topRight: false,
              bottomRight: false,
              bottomLeft: false,
              topLeft: false
            },
            orientation: blockOrientation,
            onResizeStart,
            onResize: setTemporaryWidth,
            onResizeStop: handleOnHorizontalResizeStop,
            isSelected,
            isResizing,
            setIsResizing
          }
        );
      }
      return /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(import_jsx_runtime518.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
        ResizableSpacer,
        {
          minHeight: MIN_SPACER_SIZE,
          enable: {
            top: false,
            right: false,
            bottom: true,
            left: false,
            topRight: false,
            bottomRight: false,
            bottomLeft: false,
            topLeft: false
          },
          orientation: blockOrientation,
          onResizeStart,
          onResize: setTemporaryHeight,
          onResizeStop: handleOnVerticalResizeStop,
          isSelected,
          isResizing,
          setIsResizing
        }
      ) });
    };
    (0, import_element148.useEffect)(() => {
      const setAttributesCovertly = (nextAttributes) => {
        __unstableMarkNextChangeAsNotPersistent();
        setAttributes(nextAttributes);
      };
      if (isFlexLayout && selfStretch !== "fill" && selfStretch !== "fit" && flexSize === void 0) {
        if (inheritedOrientation === "horizontal") {
          const newSize = (0, import_block_editor243.getCustomValueFromPreset)(width, spacingSizes) || (0, import_block_editor243.getCustomValueFromPreset)(height, spacingSizes) || "100px";
          setAttributesCovertly({
            width: "0px",
            style: {
              ...blockStyle,
              layout: {
                ...layout,
                flexSize: newSize,
                selfStretch: "fixed"
              }
            }
          });
        } else {
          const newSize = (0, import_block_editor243.getCustomValueFromPreset)(height, spacingSizes) || (0, import_block_editor243.getCustomValueFromPreset)(width, spacingSizes) || "100px";
          setAttributesCovertly({
            height: "0px",
            style: {
              ...blockStyle,
              layout: {
                ...layout,
                flexSize: newSize,
                selfStretch: "fixed"
              }
            }
          });
        }
      } else if (isFlexLayout && (selfStretch === "fill" || selfStretch === "fit")) {
        setAttributesCovertly(
          inheritedOrientation === "horizontal" ? { width: void 0 } : { height: void 0 }
        );
      } else if (!isFlexLayout && (selfStretch || flexSize)) {
        setAttributesCovertly({
          ...inheritedOrientation === "horizontal" ? { width: flexSize } : { height: flexSize },
          style: {
            ...blockStyle,
            layout: {
              ...layout,
              flexSize: void 0,
              selfStretch: void 0
            }
          }
        });
      }
    }, [
      blockStyle,
      flexSize,
      height,
      inheritedOrientation,
      isFlexLayout,
      layout,
      selfStretch,
      setAttributes,
      spacingSizes,
      width,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const blockEditingMode = (0, import_block_editor243.useBlockEditingMode)();
    return /* @__PURE__ */ (0, import_jsx_runtime518.jsxs)(import_jsx_runtime518.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
        "div",
        {
          ...(0, import_block_editor243.useBlockProps)({
            style: style2,
            className: clsx_default(className, {
              "custom-sizes-disabled": disableCustomSpacingSizes
            })
          }),
          children: blockEditingMode === "default" && resizableBoxWithOrientation(inheritedOrientation)
        }
      ),
      !isFlexLayout && /* @__PURE__ */ (0, import_jsx_runtime518.jsx)(
        SpacerControls,
        {
          setAttributes,
          height: temporaryHeight || height,
          width: temporaryWidth || width,
          orientation: inheritedOrientation,
          isResizing
        }
      )
    ] });
  };
  var edit_default30 = SpacerEdit;

  // packages/block-library/build-module/spacer/block.json
  var block_default99 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/spacer",
    title: "Spacer",
    category: "design",
    description: "Add white space between blocks and customize its height.",
    textdomain: "default",
    attributes: {
      height: {
        type: "string",
        default: "100px"
      },
      width: {
        type: "string"
      }
    },
    usesContext: ["orientation"],
    supports: {
      anchor: true,
      spacing: {
        margin: ["top", "bottom"],
        __experimentalDefaultControls: {
          margin: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-spacer-editor",
    style: "wp-block-spacer"
  };

  // packages/block-library/build-module/spacer/transforms.mjs
  var import_blocks95 = __toESM(require_blocks(), 1);
  var transforms34 = {
    to: [
      {
        type: "block",
        blocks: ["core/separator"],
        // Transform to Separator.
        transform: ({ anchor }) => {
          return (0, import_blocks95.createBlock)("core/separator", {
            anchor: anchor || void 0
          });
        }
      }
    ]
  };
  var transforms_default35 = transforms34;

  // packages/block-library/build-module/spacer/save.mjs
  var import_block_editor244 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime519 = __toESM(require_jsx_runtime(), 1);
  function save43({ attributes: attributes2 }) {
    const { height, width, style: style2 } = attributes2;
    const { layout: { selfStretch } = {} } = style2 || {};
    const finalHeight = selfStretch === "fill" || selfStretch === "fit" ? void 0 : height;
    return /* @__PURE__ */ (0, import_jsx_runtime519.jsx)(
      "div",
      {
        ...import_block_editor244.useBlockProps.save({
          style: {
            height: (0, import_block_editor244.getSpacingPresetCssVar)(finalHeight),
            width: (0, import_block_editor244.getSpacingPresetCssVar)(width)
          },
          "aria-hidden": true
        })
      }
    );
  }

  // packages/block-library/build-module/spacer/index.mjs
  var { name: name100 } = block_default99;
  var settings99 = {
    icon: resize_corner_ne_default,
    transforms: transforms_default35,
    edit: edit_default30,
    save: save43,
    deprecated: deprecated_default50
  };
  var init99 = () => initBlock({ name: name100, metadata: block_default99, settings: settings99 });

  // packages/block-library/build-module/tab-panel/index.mjs
  var tab_panel_exports = {};
  __export(tab_panel_exports, {
    init: () => init100,
    metadata: () => block_default100,
    name: () => name101,
    settings: () => settings100
  });
  var import_i18n235 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/tab-panel/edit.mjs
  var import_block_editor248 = __toESM(require_block_editor(), 1);
  var import_data144 = __toESM(require_data(), 1);
  var import_element149 = __toESM(require_element(), 1);

  // packages/block-library/build-module/tab-panel/controls.mjs
  var import_block_editor247 = __toESM(require_block_editor(), 1);
  var import_components152 = __toESM(require_components(), 1);
  var import_i18n234 = __toESM(require_i18n(), 1);
  var import_data143 = __toESM(require_data(), 1);

  // packages/block-library/build-module/tabs/tab-toolbar-controls.mjs
  var import_i18n233 = __toESM(require_i18n(), 1);
  var import_block_editor246 = __toESM(require_block_editor(), 1);
  var import_components151 = __toESM(require_components(), 1);
  var import_data142 = __toESM(require_data(), 1);

  // packages/block-library/build-module/tabs/use-tab-actions.mjs
  var import_blocks96 = __toESM(require_blocks(), 1);
  var import_block_editor245 = __toESM(require_block_editor(), 1);
  var import_data141 = __toESM(require_data(), 1);
  function useTabActions(tabsClientId) {
    const registry = (0, import_data141.useRegistry)();
    const {
      insertBlock,
      removeBlock,
      moveBlocksToPosition,
      updateBlockAttributes,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data141.useDispatch)(import_block_editor245.store);
    const getTabsState = () => {
      const { getBlocks, getBlockAttributes: getBlockAttributes4 } = registry.select(import_block_editor245.store);
      const tabsAttributes = tabsClientId ? getBlockAttributes4(tabsClientId) : void 0;
      const tabPanels = tabsClientId ? getBlocks(tabsClientId).find(
        (block) => block.name === "core/tab-panels"
      ) : void 0;
      return {
        tabPanelsClientId: tabPanels?.clientId ?? null,
        tabPanelBlocks: tabPanels?.innerBlocks ?? [],
        activeIndex: tabsAttributes?.editorActiveTabIndex ?? tabsAttributes?.activeTabIndex ?? 0
      };
    };
    const insertTab = (atIndex) => {
      const { tabPanelsClientId, tabPanelBlocks } = getTabsState();
      if (!tabPanelsClientId) {
        return;
      }
      const newIndex = atIndex ?? tabPanelBlocks.length;
      insertBlock(
        (0, import_blocks96.createBlock)("core/tab-panel"),
        newIndex,
        tabPanelsClientId,
        false
      );
      __unstableMarkNextChangeAsNotPersistent();
      updateBlockAttributes(tabsClientId, {
        editorActiveTabIndex: newIndex
      });
    };
    const removeTab = (atIndex) => {
      const { tabPanelBlocks, activeIndex } = getTabsState();
      const tabCount = tabPanelBlocks.length;
      if (tabCount <= 1) {
        return;
      }
      const removeIndex = atIndex ?? activeIndex;
      const target = tabPanelBlocks[removeIndex];
      if (!target) {
        return;
      }
      const newActiveIndex = removeIndex >= tabCount - 1 ? tabCount - 2 : removeIndex;
      __unstableMarkNextChangeAsNotPersistent();
      updateBlockAttributes(tabsClientId, {
        editorActiveTabIndex: newActiveIndex
      });
      removeBlock(target.clientId, false);
    };
    const moveTab = (direction) => {
      const { tabPanelsClientId, tabPanelBlocks, activeIndex } = getTabsState();
      if (!tabPanelsClientId) {
        return;
      }
      const toIndex = activeIndex + direction;
      const target = tabPanelBlocks[activeIndex];
      if (!target || toIndex < 0 || toIndex >= tabPanelBlocks.length) {
        return;
      }
      __unstableMarkNextChangeAsNotPersistent();
      updateBlockAttributes(tabsClientId, {
        editorActiveTabIndex: toIndex
      });
      moveBlocksToPosition(
        [target.clientId],
        tabPanelsClientId,
        tabPanelsClientId,
        toIndex
      );
    };
    return { insertTab, removeTab, moveTab };
  }

  // packages/block-library/build-module/tabs/tab-toolbar-controls.mjs
  var import_jsx_runtime520 = __toESM(require_jsx_runtime(), 1);
  function TabToolbarControls({ tabsClientId }) {
    const { insertTab, removeTab } = useTabActions(tabsClientId);
    const isRemoveDisabled = (0, import_data142.useSelect)(
      (select10) => {
        if (!tabsClientId) {
          return true;
        }
        const tabPanels = select10(import_block_editor246.store).getBlocks(tabsClientId).find((block) => block.name === "core/tab-panels");
        return (tabPanels?.innerBlocks.length ?? 0) <= 1;
      },
      [tabsClientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime520.jsx)(import_block_editor246.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime520.jsxs)(import_components151.ToolbarGroup, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime520.jsx)(
        import_components151.ToolbarButton,
        {
          className: "components-toolbar__control",
          onClick: () => insertTab(),
          text: (0, import_i18n233.__)("Add tab")
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime520.jsx)(
        import_components151.ToolbarButton,
        {
          className: "components-toolbar__control",
          onClick: () => removeTab(),
          text: (0, import_i18n233.__)("Remove tab"),
          disabled: isRemoveDisabled
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/tab-panel/controls.mjs
  var import_jsx_runtime521 = __toESM(require_jsx_runtime(), 1);
  function Controls3({ tabsClientId, blockIndex, isDefaultTab }) {
    const { updateBlockAttributes } = (0, import_data143.useDispatch)(import_block_editor247.store);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    return /* @__PURE__ */ (0, import_jsx_runtime521.jsxs)(import_jsx_runtime521.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(TabToolbarControls, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(import_block_editor247.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(
        import_components152.__experimentalToolsPanel,
        {
          label: (0, import_i18n234.__)("Settings"),
          resetAll: () => {
            updateBlockAttributes(tabsClientId, {
              activeTabIndex: 0
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(
            import_components152.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n234.__)("Default tab"),
              hasValue: () => isDefaultTab && blockIndex !== 0,
              onDeselect: () => {
                updateBlockAttributes(tabsClientId, {
                  activeTabIndex: 0
                });
              },
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime521.jsx)(
                import_components152.CheckboxControl,
                {
                  label: (0, import_i18n234.__)("Default tab"),
                  checked: isDefaultTab,
                  onChange: (value) => {
                    updateBlockAttributes(tabsClientId, {
                      activeTabIndex: value ? blockIndex : 0
                    });
                  }
                }
              )
            }
          )
        }
      ) })
    ] });
  }

  // packages/block-library/build-module/tab-panel/edit.mjs
  var import_jsx_runtime522 = __toESM(require_jsx_runtime(), 1);
  function Edit16({ clientId, isSelected }) {
    const {
      activeTabIndex,
      editorActiveTabIndex,
      blockIndex,
      hasInnerBlocksSelected,
      tabsClientId
    } = (0, import_data144.useSelect)(
      (select10) => {
        const {
          getBlockRootClientId,
          getBlockIndex,
          hasSelectedInnerBlock,
          getBlockAttributes: getBlockAttributes4
        } = select10(import_block_editor248.store);
        const tabPanelsClientId = getBlockRootClientId(clientId);
        const _tabsClientId = getBlockRootClientId(tabPanelsClientId);
        const tabsAttributes = getBlockAttributes4(_tabsClientId) ?? {};
        const _blockIndex = getBlockIndex(clientId);
        const _hasInnerBlocksSelected = hasSelectedInnerBlock(
          clientId,
          true
        );
        return {
          activeTabIndex: tabsAttributes.activeTabIndex,
          editorActiveTabIndex: tabsAttributes.editorActiveTabIndex,
          blockIndex: _blockIndex,
          hasInnerBlocksSelected: _hasInnerBlocksSelected,
          tabsClientId: _tabsClientId
        };
      },
      [clientId]
    );
    const effectiveActiveIndex = editorActiveTabIndex ?? activeTabIndex;
    const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0, import_data144.useDispatch)(import_block_editor248.store);
    (0, import_element149.useEffect)(() => {
      const isTabSelected = isSelected || hasInnerBlocksSelected;
      if (isTabSelected && tabsClientId && effectiveActiveIndex !== blockIndex) {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(tabsClientId, {
          editorActiveTabIndex: blockIndex
        });
      }
    }, [
      isSelected,
      hasInnerBlocksSelected,
      tabsClientId,
      effectiveActiveIndex,
      blockIndex,
      updateBlockAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
    const isActiveTab = effectiveActiveIndex === blockIndex;
    const isDefaultTab = activeTabIndex === blockIndex;
    const isSelectedTab = isSelected || hasInnerBlocksSelected || isActiveTab;
    const blockProps = (0, import_block_editor248.useBlockProps)({
      hidden: !isSelectedTab,
      tabIndex: isSelectedTab ? 0 : -1
    });
    const innerBlocksProps = (0, import_block_editor248.useInnerBlocksProps)(blockProps, {});
    return /* @__PURE__ */ (0, import_jsx_runtime522.jsxs)("section", { ...innerBlocksProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime522.jsx)(
        Controls3,
        {
          tabsClientId,
          blockIndex,
          isDefaultTab
        }
      ),
      isSelectedTab && innerBlocksProps.children
    ] });
  }

  // packages/block-library/build-module/tab-panel/save.mjs
  var import_block_editor249 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime523 = __toESM(require_jsx_runtime(), 1);
  function save44() {
    const blockProps = import_block_editor249.useBlockProps.save({
      role: "tabpanel",
      tabIndex: 0
    });
    const innerBlocksProps = import_block_editor249.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime523.jsx)("section", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/tab-panel/block.json
  var block_default100 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tab-panel",
    title: "Tab Panel",
    description: "Content for a tab in a tabbed interface.",
    category: "design",
    textdomain: "default",
    attributes: {
      label: {
        type: "string",
        default: ""
      }
    },
    parent: ["core/tab-panels"],
    usesContext: ["core/tabs-id"],
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      html: false,
      color: {
        background: true,
        button: true,
        heading: true,
        link: true,
        text: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      layout: true,
      shadow: true,
      spacing: {
        blockGap: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true,
          __experimentalFontFamily: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      visibility: false
    },
    providesContext: {
      "core/tab-label": "label"
    },
    style: "wp-block-tab-panel"
  };

  // packages/block-library/build-module/tab-panel/index.mjs
  var TEMPLATE16 = [
    [
      "core/paragraph",
      {
        placeholder: (0, import_i18n235.__)("Type / to choose a block")
      }
    ]
  ];
  var { name: name101 } = block_default100;
  var settings100 = {
    icon: tab_panel_default,
    template: TEMPLATE16,
    __experimentalLabel(attributes2, { context }) {
      const { label } = attributes2;
      const customName = attributes2?.metadata?.name;
      const hasLabel = label?.trim().length > 0;
      if (context === "list-view" && (customName || hasLabel)) {
        return customName || label;
      }
      if (context === "breadcrumb" && customName) {
        return customName;
      }
    },
    edit: Edit16,
    save: save44
  };
  var init100 = () => initBlock({ name: name101, metadata: block_default100, settings: settings100 });

  // packages/block-library/build-module/tab-panels/index.mjs
  var tab_panels_exports = {};
  __export(tab_panels_exports, {
    init: () => init101,
    metadata: () => block_default101,
    name: () => name102,
    settings: () => settings101
  });

  // packages/block-library/build-module/tab-panels/edit.mjs
  var import_block_editor250 = __toESM(require_block_editor(), 1);
  var import_data145 = __toESM(require_data(), 1);
  var import_jsx_runtime524 = __toESM(require_jsx_runtime(), 1);
  function Edit17({ clientId }) {
    const blockProps = (0, import_block_editor250.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor250.useInnerBlocksProps)(blockProps, {
      templateLock: false,
      renderAppender: false
      // Appender handled by individual tab blocks
    });
    const tabsClientId = (0, import_data145.useSelect)(
      (select10) => select10(import_block_editor250.store).getBlockRootClientId(clientId),
      [clientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime524.jsxs)(import_jsx_runtime524.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime524.jsx)(TabToolbarControls, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime524.jsx)("div", { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/tab-panels/save.mjs
  var import_block_editor251 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime525 = __toESM(require_jsx_runtime(), 1);
  function save45() {
    const blockProps = import_block_editor251.useBlockProps.save();
    const innerBlocksProps = import_block_editor251.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime525.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/tab-panels/block.json
  var block_default101 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tab-panels",
    title: "Tab Panels",
    description: "Container for tab panel content in a tabbed interface.",
    category: "design",
    textdomain: "default",
    parent: ["core/tabs"],
    allowedBlocks: ["core/tab-panel"],
    supports: {
      html: false,
      visibility: false,
      lock: false,
      color: {
        background: true,
        text: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      shadow: true,
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    }
  };

  // packages/block-library/build-module/tab-panels/index.mjs
  var TAB_PANELS_TEMPLATE = [["core/tab-panel"], ["core/tab-panel"]];
  var { name: name102 } = block_default101;
  var settings101 = {
    icon: contents_default,
    template: TAB_PANELS_TEMPLATE,
    edit: Edit17,
    save: save45
  };
  var init101 = () => initBlock({ name: name102, metadata: block_default101, settings: settings101 });

  // packages/block-library/build-module/table/index.mjs
  var table_exports = {};
  __export(table_exports, {
    init: () => init102,
    metadata: () => block_default102,
    name: () => name103,
    settings: () => settings102
  });
  var import_i18n237 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/table/deprecated.mjs
  var import_block_editor252 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime526 = __toESM(require_jsx_runtime(), 1);
  var oldColors = {
    "subtle-light-gray": "#f3f4f5",
    "subtle-pale-green": "#e9fbe5",
    "subtle-pale-blue": "#e7f5fe",
    "subtle-pale-pink": "#fcf0ef"
  };
  var v4Query = {
    content: {
      type: "rich-text",
      source: "rich-text"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    },
    colspan: {
      type: "string",
      source: "attribute",
      attribute: "colspan"
    },
    rowspan: {
      type: "string",
      source: "attribute",
      attribute: "rowspan"
    }
  };
  var v411 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v4Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-table > table",
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const colorProps = (0, import_block_editor252.__experimentalGetColorClassesAndStyles)(attributes2);
      const borderProps = (0, import_block_editor252.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default(colorProps.className, borderProps.className, {
        "has-fixed-layout": hasFixedLayout
      });
      const hasCaption = !import_block_editor252.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime526.jsx)("tr", { children: cells.map(
          ({
            content,
            tag,
            scope,
            align,
            colspan,
            rowspan
          }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
              import_block_editor252.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0,
                colSpan: colspan,
                rowSpan: rowspan
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)("figure", { ...import_block_editor252.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)(
          "table",
          {
            className: classes === "" ? void 0 : classes,
            style: { ...colorProps.style, ...borderProps.style },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "head", rows: head }),
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "body", rows: body }),
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "foot", rows: foot })
            ]
          }
        ),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
          import_block_editor252.RichText.Content,
          {
            tagName: "figcaption",
            value: caption,
            className: (0, import_block_editor252.__experimentalGetElementClassName)(
              "caption"
            )
          }
        )
      ] });
    }
  };
  var v3Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    }
  };
  var v313 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        default: ""
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v3Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      __experimentalSelector: ".wp-block-table > table"
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const colorProps = (0, import_block_editor252.__experimentalGetColorClassesAndStyles)(attributes2);
      const borderProps = (0, import_block_editor252.__experimentalGetBorderClassesAndStyles)(attributes2);
      const classes = clsx_default(colorProps.className, borderProps.className, {
        "has-fixed-layout": hasFixedLayout
      });
      const hasCaption = !import_block_editor252.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime526.jsx)("tr", { children: cells.map(
          ({ content, tag, scope, align }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
              import_block_editor252.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)("figure", { ...import_block_editor252.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)(
          "table",
          {
            className: classes === "" ? void 0 : classes,
            style: { ...colorProps.style, ...borderProps.style },
            children: [
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "head", rows: head }),
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "body", rows: body }),
              /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "foot", rows: foot })
            ]
          }
        ),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(import_block_editor252.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var v2Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    },
    align: {
      type: "string",
      source: "attribute",
      attribute: "data-align"
    }
  };
  var v222 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      backgroundColor: {
        type: "string"
      },
      caption: {
        type: "string",
        source: "html",
        selector: "figcaption",
        default: ""
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v2Query
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      __experimentalSelector: ".wp-block-table > table"
    },
    save: ({ attributes: attributes2 }) => {
      const { hasFixedLayout, head, body, foot, backgroundColor, caption } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const backgroundClass = (0, import_block_editor252.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const classes = clsx_default(backgroundClass, {
        "has-fixed-layout": hasFixedLayout,
        "has-background": !!backgroundClass
      });
      const hasCaption = !import_block_editor252.RichText.isEmpty(caption);
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime526.jsx)("tr", { children: cells.map(
          ({ content, tag, scope, align }, cellIndex) => {
            const cellClasses = clsx_default({
              [`has-text-align-${align}`]: align
            });
            return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
              import_block_editor252.RichText.Content,
              {
                className: cellClasses ? cellClasses : void 0,
                "data-align": align,
                tagName: tag,
                value: content,
                scope: tag === "th" ? scope : void 0
              },
              cellIndex
            );
          }
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)("figure", { ...import_block_editor252.useBlockProps.save(), children: [
        /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)("table", { className: classes === "" ? void 0 : classes, children: [
          /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "head", rows: head }),
          /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "body", rows: body }),
          /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "foot", rows: foot })
        ] }),
        hasCaption && /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(import_block_editor252.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    },
    isEligible: (attributes2) => {
      return attributes2.backgroundColor && attributes2.backgroundColor in oldColors && !attributes2.style;
    },
    // This version is the first to introduce the style attribute to the
    // table block. As a result, we'll explicitly override that.
    migrate: (attributes2) => {
      return {
        ...attributes2,
        backgroundColor: void 0,
        style: {
          color: {
            background: oldColors[attributes2.backgroundColor]
          }
        }
      };
    }
  };
  var v1Query = {
    content: {
      type: "string",
      source: "html"
    },
    tag: {
      type: "string",
      default: "td",
      source: "tag"
    },
    scope: {
      type: "string",
      source: "attribute",
      attribute: "scope"
    }
  };
  var v145 = {
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: false
      },
      backgroundColor: {
        type: "string"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: v1Query
          }
        }
      }
    },
    supports: {
      align: true
    },
    save({ attributes: attributes2 }) {
      const { hasFixedLayout, head, body, foot, backgroundColor } = attributes2;
      const isEmpty = !head.length && !body.length && !foot.length;
      if (isEmpty) {
        return null;
      }
      const backgroundClass = (0, import_block_editor252.getColorClassName)(
        "background-color",
        backgroundColor
      );
      const classes = clsx_default(backgroundClass, {
        "has-fixed-layout": hasFixedLayout,
        "has-background": !!backgroundClass
      });
      const Section = ({ type, rows }) => {
        if (!rows.length) {
          return null;
        }
        const Tag = `t${type}`;
        return /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime526.jsx)("tr", { children: cells.map(
          ({ content, tag, scope }, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(
            import_block_editor252.RichText.Content,
            {
              tagName: tag,
              value: content,
              scope: tag === "th" ? scope : void 0
            },
            cellIndex
          )
        ) }, rowIndex)) });
      };
      return /* @__PURE__ */ (0, import_jsx_runtime526.jsxs)("table", { className: classes, children: [
        /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "head", rows: head }),
        /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "body", rows: body }),
        /* @__PURE__ */ (0, import_jsx_runtime526.jsx)(Section, { type: "foot", rows: foot })
      ] });
    }
  };
  var deprecated_default51 = [v411, v313, v222, v145];

  // packages/block-library/build-module/table/edit.mjs
  var import_element150 = __toESM(require_element(), 1);
  var import_block_editor253 = __toESM(require_block_editor(), 1);
  var import_i18n236 = __toESM(require_i18n(), 1);
  var import_components153 = __toESM(require_components(), 1);

  // packages/block-library/build-module/table/state.mjs
  var INHERITED_COLUMN_ATTRIBUTES = ["align"];
  function createTable({ rowCount, columnCount }) {
    return {
      body: Array.from({ length: rowCount }).map(() => ({
        cells: Array.from({ length: columnCount }).map(() => ({
          content: "",
          tag: "td"
        }))
      }))
    };
  }
  function getFirstRow(state) {
    if (!isEmptyTableSection(state.head)) {
      return state.head[0];
    }
    if (!isEmptyTableSection(state.body)) {
      return state.body[0];
    }
    if (!isEmptyTableSection(state.foot)) {
      return state.foot[0];
    }
  }
  function getCellAttribute(state, cellLocation, attributeName) {
    const { sectionName, rowIndex, columnIndex } = cellLocation;
    return state[sectionName]?.[rowIndex]?.cells?.[columnIndex]?.[attributeName];
  }
  function updateSelectedCell(state, selection, updateCell) {
    if (!selection) {
      return state;
    }
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } = selection;
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (selectionSectionName && selectionSectionName !== sectionName) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row, rowIndex) => {
            if (selectionRowIndex && selectionRowIndex !== rowIndex) {
              return row;
            }
            return {
              cells: row.cells.map(
                (cellAttributes, columnIndex) => {
                  const cellLocation = {
                    sectionName,
                    columnIndex,
                    rowIndex
                  };
                  if (!isCellSelected(cellLocation, selection)) {
                    return cellAttributes;
                  }
                  return updateCell(cellAttributes);
                }
              )
            };
          })
        ];
      })
    );
  }
  function isCellSelected(cellLocation, selection) {
    if (!cellLocation || !selection) {
      return false;
    }
    switch (selection.type) {
      case "column":
        return selection.type === "column" && cellLocation.columnIndex === selection.columnIndex;
      case "cell":
        return selection.type === "cell" && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
    }
  }
  function insertRow(state, { sectionName, rowIndex, columnCount }) {
    const firstRow = getFirstRow(state);
    const cellCount = columnCount === void 0 ? firstRow?.cells?.length : columnCount;
    if (!cellCount) {
      return state;
    }
    return {
      [sectionName]: [
        ...state[sectionName].slice(0, rowIndex),
        {
          cells: Array.from({ length: cellCount }).map(
            (_2, index2) => {
              const firstCellInColumn = firstRow?.cells?.[index2] ?? {};
              const inheritedAttributes = Object.fromEntries(
                Object.entries(firstCellInColumn).filter(
                  ([key]) => INHERITED_COLUMN_ATTRIBUTES.includes(key)
                )
              );
              return {
                ...inheritedAttributes,
                content: "",
                tag: sectionName === "head" ? "th" : "td"
              };
            }
          )
        },
        ...state[sectionName].slice(rowIndex)
      ]
    };
  }
  function deleteRow(state, { sectionName, rowIndex }) {
    return {
      [sectionName]: state[sectionName].filter(
        (row, index2) => index2 !== rowIndex
      )
    };
  }
  function insertColumn(state, { columnIndex }) {
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (isEmptyTableSection(section)) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row) => {
            if (isEmptyRow(row) || row.cells.length < columnIndex) {
              return row;
            }
            return {
              cells: [
                ...row.cells.slice(0, columnIndex),
                {
                  content: "",
                  tag: sectionName === "head" ? "th" : "td"
                },
                ...row.cells.slice(columnIndex)
              ]
            };
          })
        ];
      })
    );
  }
  function deleteColumn(state, { columnIndex }) {
    const tableSections = Object.fromEntries(
      Object.entries(state).filter(
        ([key]) => ["head", "body", "foot"].includes(key)
      )
    );
    return Object.fromEntries(
      Object.entries(tableSections).map(([sectionName, section]) => {
        if (isEmptyTableSection(section)) {
          return [sectionName, section];
        }
        return [
          sectionName,
          section.map((row) => ({
            cells: row.cells.length >= columnIndex ? row.cells.filter(
              (cell, index2) => index2 !== columnIndex
            ) : row.cells
          })).filter((row) => row.cells.length)
        ];
      })
    );
  }
  function toggleSection(state, sectionName) {
    if (!isEmptyTableSection(state[sectionName])) {
      return { [sectionName]: [] };
    }
    const columnCount = state.body?.[0]?.cells?.length ?? 1;
    return insertRow(state, { sectionName, rowIndex: 0, columnCount });
  }
  function isEmptyTableSection(section) {
    return !section || !section.length || section.every(isEmptyRow);
  }
  function isEmptyRow(row) {
    return !(row.cells && row.cells.length);
  }

  // packages/block-library/build-module/table/edit.mjs
  var import_jsx_runtime527 = __toESM(require_jsx_runtime(), 1);
  var ALIGNMENT_CONTROLS = [
    {
      icon: align_left_default,
      title: (0, import_i18n236.__)("Align column left"),
      align: "left"
    },
    {
      icon: align_center_default,
      title: (0, import_i18n236.__)("Align column center"),
      align: "center"
    },
    {
      icon: align_right_default,
      title: (0, import_i18n236.__)("Align column right"),
      align: "right"
    }
  ];
  var cellAriaLabel = {
    head: (0, import_i18n236.__)("Header cell text"),
    body: (0, import_i18n236.__)("Body cell text"),
    foot: (0, import_i18n236.__)("Footer cell text")
  };
  var placeholder = {
    head: (0, import_i18n236._x)("Header label", "table header"),
    foot: (0, import_i18n236._x)("Footer label", "table footer")
  };
  function TSection({ name: name118, ...props }) {
    const TagName2 = `t${name118}`;
    return /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(TagName2, { ...props });
  }
  function TableEdit({
    attributes: attributes2,
    setAttributes,
    insertBlocksAfter,
    isSelected: isSingleSelected
  }) {
    const { hasFixedLayout, head, foot } = attributes2;
    const [initialRowCount, setInitialRowCount] = (0, import_element150.useState)(2);
    const [initialColumnCount, setInitialColumnCount] = (0, import_element150.useState)(2);
    const [selectedCell, setSelectedCell] = (0, import_element150.useState)();
    const colorProps = (0, import_block_editor253.__experimentalUseColorProps)(attributes2);
    const borderProps = (0, import_block_editor253.__experimentalUseBorderProps)(attributes2);
    const blockEditingMode = (0, import_block_editor253.useBlockEditingMode)();
    const tableRef = (0, import_element150.useRef)();
    const [hasTableCreated, setHasTableCreated] = (0, import_element150.useState)(false);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    function onChangeInitialColumnCount(count) {
      setInitialColumnCount(count);
    }
    function onChangeInitialRowCount(count) {
      setInitialRowCount(count);
    }
    function onCreateTable(event) {
      event.preventDefault();
      setAttributes(
        createTable({
          rowCount: parseInt(initialRowCount, 10) || 2,
          columnCount: parseInt(initialColumnCount, 10) || 2
        })
      );
      setHasTableCreated(true);
    }
    function onChangeFixedLayout() {
      setAttributes({ hasFixedLayout: !hasFixedLayout });
    }
    const onChange = (0, import_element150.useCallback)(
      function(content) {
        if (!selectedCell) {
          return;
        }
        setAttributes(
          (currentAttributes) => updateSelectedCell(
            currentAttributes,
            selectedCell,
            (cellAttributes) => ({
              ...cellAttributes,
              content
            })
          )
        );
      },
      [selectedCell, setAttributes]
    );
    function onChangeColumnAlignment(align) {
      if (!selectedCell) {
        return;
      }
      const columnSelection = {
        type: "column",
        columnIndex: selectedCell.columnIndex
      };
      const newAttributes = updateSelectedCell(
        attributes2,
        columnSelection,
        (cellAttributes) => ({
          ...cellAttributes,
          align
        })
      );
      setAttributes(newAttributes);
    }
    function getCellAlignment() {
      if (!selectedCell) {
        return;
      }
      return getCellAttribute(attributes2, selectedCell, "align");
    }
    function onToggleHeaderSection() {
      setAttributes(toggleSection(attributes2, "head"));
    }
    function onToggleFooterSection() {
      setAttributes(toggleSection(attributes2, "foot"));
    }
    function onInsertRow(delta) {
      if (!selectedCell) {
        return;
      }
      const { sectionName, rowIndex } = selectedCell;
      const newRowIndex = rowIndex + delta;
      setAttributes(
        insertRow(attributes2, {
          sectionName,
          rowIndex: newRowIndex
        })
      );
      setSelectedCell({
        sectionName,
        rowIndex: newRowIndex,
        columnIndex: 0,
        type: "cell"
      });
    }
    function onInsertRowBefore() {
      onInsertRow(0);
    }
    function onInsertRowAfter() {
      onInsertRow(1);
    }
    function onDeleteRow() {
      if (!selectedCell) {
        return;
      }
      const { sectionName, rowIndex } = selectedCell;
      setSelectedCell();
      setAttributes(deleteRow(attributes2, { sectionName, rowIndex }));
    }
    function onInsertColumn(delta = 0) {
      if (!selectedCell) {
        return;
      }
      const { columnIndex } = selectedCell;
      const newColumnIndex = columnIndex + delta;
      setAttributes(
        insertColumn(attributes2, {
          columnIndex: newColumnIndex
        })
      );
      setSelectedCell({
        rowIndex: 0,
        columnIndex: newColumnIndex,
        type: "cell"
      });
    }
    function onInsertColumnBefore() {
      onInsertColumn(0);
    }
    function onInsertColumnAfter() {
      onInsertColumn(1);
    }
    function onDeleteColumn() {
      if (!selectedCell) {
        return;
      }
      const { sectionName, columnIndex } = selectedCell;
      setSelectedCell();
      setAttributes(
        deleteColumn(attributes2, { sectionName, columnIndex })
      );
    }
    (0, import_element150.useEffect)(() => {
      if (!isSingleSelected) {
        setSelectedCell();
      }
    }, [isSingleSelected]);
    (0, import_element150.useEffect)(() => {
      if (hasTableCreated) {
        tableRef?.current?.querySelector('td div[contentEditable="true"]')?.focus();
        setHasTableCreated(false);
      }
    }, [hasTableCreated]);
    const sections = ["head", "body", "foot"].filter(
      (name118) => !isEmptyTableSection(attributes2[name118])
    );
    const tableControls = [
      {
        icon: table_row_before_default,
        title: (0, import_i18n236.__)("Insert row before"),
        isDisabled: !selectedCell,
        onClick: onInsertRowBefore
      },
      {
        icon: table_row_after_default,
        title: (0, import_i18n236.__)("Insert row after"),
        isDisabled: !selectedCell,
        onClick: onInsertRowAfter
      },
      {
        icon: table_row_delete_default,
        title: (0, import_i18n236.__)("Delete row"),
        isDisabled: !selectedCell,
        onClick: onDeleteRow
      },
      {
        icon: table_column_before_default,
        title: (0, import_i18n236.__)("Insert column before"),
        isDisabled: !selectedCell,
        onClick: onInsertColumnBefore
      },
      {
        icon: table_column_after_default,
        title: (0, import_i18n236.__)("Insert column after"),
        isDisabled: !selectedCell,
        onClick: onInsertColumnAfter
      },
      {
        icon: table_column_delete_default,
        title: (0, import_i18n236.__)("Delete column"),
        isDisabled: !selectedCell,
        onClick: onDeleteColumn
      }
    ];
    const renderedSections = sections.map((name118) => /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(TSection, { name: name118, children: attributes2[name118].map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime527.jsx)("tr", { children: cells.map((cellProps, columnIndex) => {
      const isSelected = selectedCell?.sectionName === name118 && selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === columnIndex;
      return /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
        Cell,
        {
          name: name118,
          rowIndex,
          columnIndex,
          onChange: (
            // Only pass the `onChange` handler to the selectedCell.
            // Cell components are memoized, so it's best to avoid
            // passing in a value that will cause all cells to re-render
            // whenever it changes.
            isSelected ? onChange : void 0
          ),
          setSelectedCell,
          ...cellProps
        },
        columnIndex
      );
    }) }, rowIndex)) }, name118));
    const isEmpty = !sections.length;
    return /* @__PURE__ */ (0, import_jsx_runtime527.jsxs)("figure", { ...(0, import_block_editor253.useBlockProps)({ ref: tableRef }), children: [
      !isEmpty && blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime527.jsxs)(import_jsx_runtime527.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(import_block_editor253.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
          import_block_editor253.AlignmentControl,
          {
            label: (0, import_i18n236.__)("Align column content"),
            alignmentControls: ALIGNMENT_CONTROLS,
            value: getCellAlignment(),
            onChange: (nextAlign) => onChangeColumnAlignment(nextAlign)
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(import_block_editor253.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
          import_components153.ToolbarDropdownMenu,
          {
            icon: table_default,
            label: (0, import_i18n236.__)("Edit table"),
            controls: tableControls
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(import_block_editor253.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime527.jsxs)(
        import_components153.__experimentalToolsPanel,
        {
          label: (0, import_i18n236.__)("Settings"),
          resetAll: () => {
            setAttributes({
              hasFixedLayout: true,
              head: [],
              foot: []
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
              import_components153.__experimentalToolsPanelItem,
              {
                hasValue: () => hasFixedLayout !== true,
                label: (0, import_i18n236.__)("Fixed width table cells"),
                onDeselect: () => setAttributes({ hasFixedLayout: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                  import_components153.ToggleControl,
                  {
                    label: (0, import_i18n236.__)("Fixed width table cells"),
                    checked: !!hasFixedLayout,
                    onChange: onChangeFixedLayout
                  }
                )
              }
            ),
            !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime527.jsxs)(import_jsx_runtime527.Fragment, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                import_components153.__experimentalToolsPanelItem,
                {
                  hasValue: () => head && head.length,
                  label: (0, import_i18n236.__)("Header section"),
                  onDeselect: () => setAttributes({ head: [] }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                    import_components153.ToggleControl,
                    {
                      label: (0, import_i18n236.__)("Header section"),
                      checked: !!(head && head.length),
                      onChange: onToggleHeaderSection
                    }
                  )
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                import_components153.__experimentalToolsPanelItem,
                {
                  hasValue: () => foot && foot.length,
                  label: (0, import_i18n236.__)("Footer section"),
                  onDeselect: () => setAttributes({ foot: [] }),
                  isShownByDefault: true,
                  children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                    import_components153.ToggleControl,
                    {
                      label: (0, import_i18n236.__)("Footer section"),
                      checked: !!(foot && foot.length),
                      onChange: onToggleFooterSection
                    }
                  )
                }
              )
            ] })
          ]
        }
      ) }),
      !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
        "table",
        {
          className: clsx_default(
            colorProps.className,
            borderProps.className,
            {
              "has-fixed-layout": hasFixedLayout,
              // This is required in the editor only to overcome
              // the fact the editor rewrites individual border
              // widths into a shorthand format.
              "has-individual-borders": (0, import_components153.__experimentalHasSplitBorders)(
                attributes2?.style?.border
              )
            }
          ),
          style: { ...colorProps.style, ...borderProps.style },
          children: renderedSections
        }
      ),
      isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
        import_components153.Placeholder,
        {
          label: (0, import_i18n236.__)("Table"),
          icon: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(import_block_editor253.BlockIcon, { icon: block_table_default, showColors: true }),
          instructions: (0, import_i18n236.__)("Insert a table for sharing data."),
          children: /* @__PURE__ */ (0, import_jsx_runtime527.jsxs)(
            "form",
            {
              className: "blocks-table__placeholder-form",
              onSubmit: onCreateTable,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                  import_components153.TextControl,
                  {
                    type: "number",
                    label: (0, import_i18n236.__)("Column count"),
                    value: initialColumnCount,
                    onChange: onChangeInitialColumnCount,
                    min: "1",
                    className: "blocks-table__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                  import_components153.TextControl,
                  {
                    type: "number",
                    label: (0, import_i18n236.__)("Row count"),
                    value: initialRowCount,
                    onChange: onChangeInitialRowCount,
                    min: "1",
                    className: "blocks-table__placeholder-input"
                  }
                ),
                /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
                  import_components153.Button,
                  {
                    __next40pxDefaultSize: true,
                    variant: "primary",
                    type: "submit",
                    children: (0, import_i18n236.__)("Create Table")
                  }
                )
              ]
            }
          )
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
        Caption,
        {
          attributes: attributes2,
          setAttributes,
          isSelected: isSingleSelected,
          insertBlocksAfter,
          label: (0, import_i18n236.__)("Table caption text"),
          showToolbarButton: isSingleSelected && blockEditingMode === "default"
        }
      )
    ] });
  }
  var Cell = (0, import_element150.memo)(function({
    tag: CellTag,
    name: name118,
    scope,
    colspan,
    rowspan,
    rowIndex,
    columnIndex,
    align,
    content,
    onChange,
    setSelectedCell
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
      CellTag,
      {
        scope: CellTag === "th" ? scope : void 0,
        colSpan: colspan,
        rowSpan: rowspan,
        className: clsx_default(
          {
            [`has-text-align-${align}`]: align
          },
          "wp-block-table__cell-content"
        ),
        children: /* @__PURE__ */ (0, import_jsx_runtime527.jsx)(
          import_block_editor253.RichText,
          {
            identifier: `${name118}.${rowIndex}.cells.${columnIndex}.content`,
            value: content,
            onChange,
            onFocus: () => {
              setSelectedCell({
                sectionName: name118,
                rowIndex,
                columnIndex,
                type: "cell"
              });
            },
            "aria-label": cellAriaLabel[name118],
            placeholder: placeholder[name118]
          }
        )
      }
    );
  });
  var edit_default31 = TableEdit;

  // packages/block-library/build-module/table/block.json
  var block_default102 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/table",
    title: "Table",
    category: "text",
    description: "Create structured content in rows and columns to display information.",
    textdomain: "default",
    attributes: {
      hasFixedLayout: {
        type: "boolean",
        default: true
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      head: {
        type: "array",
        default: [],
        source: "query",
        selector: "thead tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      },
      body: {
        type: "array",
        default: [],
        source: "query",
        selector: "tbody tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      },
      foot: {
        type: "array",
        default: [],
        source: "query",
        selector: "tfoot tr",
        query: {
          cells: {
            type: "array",
            default: [],
            source: "query",
            selector: "td,th",
            query: {
              content: {
                type: "rich-text",
                source: "rich-text",
                role: "content"
              },
              tag: {
                type: "string",
                default: "td",
                source: "tag"
              },
              scope: {
                type: "string",
                source: "attribute",
                attribute: "scope"
              },
              align: {
                type: "string",
                source: "attribute",
                attribute: "data-align"
              },
              colspan: {
                type: "string",
                source: "attribute",
                attribute: "colspan"
              },
              rowspan: {
                type: "string",
                source: "attribute",
                attribute: "rowspan"
              }
            }
          }
        }
      }
    },
    supports: {
      anchor: true,
      align: true,
      color: {
        __experimentalSkipSerialization: true,
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      __experimentalBorder: {
        __experimentalSkipSerialization: true,
        color: true,
        style: true,
        width: true,
        __experimentalDefaultControls: {
          color: true,
          style: true,
          width: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    selectors: {
      root: ".wp-block-table > table",
      spacing: ".wp-block-table"
    },
    styles: [
      {
        name: "regular",
        label: "Default",
        isDefault: true
      },
      { name: "stripes", label: "Stripes" }
    ],
    editorStyle: "wp-block-table-editor",
    style: "wp-block-table"
  };

  // packages/block-library/build-module/table/save.mjs
  var import_block_editor254 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime528 = __toESM(require_jsx_runtime(), 1);
  function save46({ attributes: attributes2 }) {
    const { hasFixedLayout, head, body, foot, caption } = attributes2;
    const isEmpty = !head.length && !body.length && !foot.length;
    if (isEmpty) {
      return null;
    }
    const colorProps = (0, import_block_editor254.__experimentalGetColorClassesAndStyles)(attributes2);
    const borderProps = (0, import_block_editor254.__experimentalGetBorderClassesAndStyles)(attributes2);
    const classes = clsx_default(colorProps.className, borderProps.className, {
      "has-fixed-layout": hasFixedLayout
    });
    const hasCaption = !import_block_editor254.RichText.isEmpty(caption);
    const Section = ({ type, rows }) => {
      if (!rows.length) {
        return null;
      }
      const Tag = `t${type}`;
      return /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime528.jsx)("tr", { children: cells.map(
        ({
          content,
          tag,
          scope,
          align,
          colspan,
          rowspan
        }, cellIndex) => {
          const cellClasses = clsx_default({
            [`has-text-align-${align}`]: align
          });
          return /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
            import_block_editor254.RichText.Content,
            {
              className: cellClasses ? cellClasses : void 0,
              "data-align": align,
              tagName: tag,
              value: content,
              scope: tag === "th" ? scope : void 0,
              colSpan: colspan,
              rowSpan: rowspan
            },
            cellIndex
          );
        }
      ) }, rowIndex)) });
    };
    return /* @__PURE__ */ (0, import_jsx_runtime528.jsxs)("figure", { ...import_block_editor254.useBlockProps.save(), children: [
      /* @__PURE__ */ (0, import_jsx_runtime528.jsxs)(
        "table",
        {
          className: classes === "" ? void 0 : classes,
          style: { ...colorProps.style, ...borderProps.style },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(Section, { type: "head", rows: head }),
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(Section, { type: "body", rows: body }),
            /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(Section, { type: "foot", rows: foot })
          ]
        }
      ),
      hasCaption && /* @__PURE__ */ (0, import_jsx_runtime528.jsx)(
        import_block_editor254.RichText.Content,
        {
          tagName: "figcaption",
          value: caption,
          className: (0, import_block_editor254.__experimentalGetElementClassName)("caption")
        }
      )
    ] });
  }

  // packages/block-library/build-module/table/transforms.mjs
  var import_blocks97 = __toESM(require_blocks(), 1);

  // packages/block-library/build-module/table/utils.mjs
  function normalizeRowColSpan(rowColSpan) {
    const parsedValue = parseInt(rowColSpan, 10);
    if (!Number.isInteger(parsedValue)) {
      return void 0;
    }
    return parsedValue < 0 || parsedValue === 1 ? void 0 : parsedValue.toString();
  }

  // packages/block-library/build-module/table/transforms.mjs
  var tableContentPasteSchema = ({ phrasingContentSchema }) => ({
    tr: {
      allowEmpty: true,
      children: {
        th: {
          allowEmpty: true,
          children: phrasingContentSchema,
          attributes: ["scope", "colspan", "rowspan", "style"]
        },
        td: {
          allowEmpty: true,
          children: phrasingContentSchema,
          attributes: ["colspan", "rowspan", "style"]
        }
      }
    }
  });
  var tablePasteSchema = (args) => ({
    table: {
      children: {
        thead: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        },
        tfoot: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        },
        tbody: {
          allowEmpty: true,
          children: tableContentPasteSchema(args)
        }
      }
    }
  });
  var transforms35 = {
    from: [
      {
        type: "raw",
        selector: "table",
        schema: tablePasteSchema,
        transform: (node) => {
          const attributes2 = Array.from(node.children).reduce(
            (sectionAcc, section) => {
              if (!section.children.length) {
                return sectionAcc;
              }
              const sectionName = section.nodeName.toLowerCase().slice(1);
              const sectionAttributes = Array.from(
                section.children
              ).reduce((rowAcc, row) => {
                if (!row.children.length) {
                  return rowAcc;
                }
                const rowAttributes = Array.from(
                  row.children
                ).reduce((colAcc, col) => {
                  const rowspan = normalizeRowColSpan(
                    col.getAttribute("rowspan")
                  );
                  const colspan = normalizeRowColSpan(
                    col.getAttribute("colspan")
                  );
                  const { textAlign } = col.style || {};
                  let align;
                  if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
                    align = textAlign;
                  }
                  colAcc.push({
                    tag: col.nodeName.toLowerCase(),
                    content: col.innerHTML,
                    rowspan,
                    colspan,
                    align
                  });
                  return colAcc;
                }, []);
                rowAcc.push({
                  cells: rowAttributes
                });
                return rowAcc;
              }, []);
              sectionAcc[sectionName] = sectionAttributes;
              return sectionAcc;
            },
            {}
          );
          return (0, import_blocks97.createBlock)("core/table", attributes2);
        }
      }
    ]
  };
  var transforms_default36 = transforms35;

  // packages/block-library/build-module/table/index.mjs
  var { name: name103 } = block_default102;
  var settings102 = {
    icon: block_table_default,
    example: {
      attributes: {
        head: [
          {
            cells: [
              {
                content: (0, import_i18n237.__)("Version"),
                tag: "th"
              },
              {
                content: (0, import_i18n237.__)("Jazz Musician"),
                tag: "th"
              },
              {
                content: (0, import_i18n237.__)("Release Date"),
                tag: "th"
              }
            ]
          }
        ],
        body: [
          {
            cells: [
              {
                content: "5.2",
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("Jaco Pastorius"),
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("May 7, 2019"),
                tag: "td"
              }
            ]
          },
          {
            cells: [
              {
                content: "5.1",
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("Betty Carter"),
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("February 21, 2019"),
                tag: "td"
              }
            ]
          },
          {
            cells: [
              {
                content: "5.0",
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("Bebo Vald\xE9s"),
                tag: "td"
              },
              {
                content: (0, import_i18n237.__)("December 6, 2018"),
                tag: "td"
              }
            ]
          }
        ]
      },
      viewportWidth: 450
    },
    transforms: transforms_default36,
    edit: edit_default31,
    save: save46,
    deprecated: deprecated_default51
  };
  var init102 = () => initBlock({ name: name103, metadata: block_default102, settings: settings102 });

  // packages/block-library/build-module/table-of-contents/index.mjs
  var table_of_contents_exports = {};
  __export(table_of_contents_exports, {
    init: () => init103,
    metadata: () => block_default103,
    name: () => name104,
    settings: () => settings103
  });
  var import_i18n239 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/table-of-contents/deprecated.mjs
  var import_block_editor255 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime529 = __toESM(require_jsx_runtime(), 1);
  var ENTRY_CLASS_NAME = "wp-block-table-of-contents__entry";
  var attributes = {
    headings: {
      type: "array",
      items: {
        type: "object"
      },
      default: []
    },
    onlyIncludeCurrentPage: {
      type: "boolean",
      default: false
    },
    maxLevel: {
      type: "number"
    },
    ordered: {
      type: "boolean",
      default: true
    }
  };
  var supports2 = {
    anchor: true,
    ariaLabel: true,
    html: false,
    color: {
      text: true,
      background: true,
      gradients: true,
      link: true
    },
    spacing: {
      margin: true,
      padding: true
    },
    typography: {
      fontSize: true,
      lineHeight: true,
      __experimentalFontFamily: true,
      __experimentalFontWeight: true,
      __experimentalFontStyle: true,
      __experimentalTextTransform: true,
      __experimentalTextDecoration: true,
      __experimentalLetterSpacing: true,
      __experimentalDefaultControls: {
        fontSize: true
      }
    },
    interactivity: {
      clientNavigation: true
    },
    __experimentalBorder: {
      radius: true,
      color: true,
      width: true,
      style: true,
      __experimentalDefaultControls: {
        radius: true,
        color: true,
        width: true,
        style: true
      }
    }
  };
  function linearToNestedHeadingList(headingList) {
    const nestedHeadingList = [];
    headingList.forEach((heading, key) => {
      if (heading.content === "") {
        return;
      }
      if (heading.level === headingList[0].level) {
        if (headingList[key + 1]?.level > heading.level) {
          let endOfSlice = headingList.length;
          for (let i = key + 1; i < headingList.length; i++) {
            if (headingList[i].level === heading.level) {
              endOfSlice = i;
              break;
            }
          }
          nestedHeadingList.push({
            heading,
            children: linearToNestedHeadingList(
              headingList.slice(key + 1, endOfSlice)
            )
          });
        } else {
          nestedHeadingList.push({
            heading,
            children: null
          });
        }
      }
    });
    return nestedHeadingList;
  }
  function TableOfContentsList({ nestedHeadingList, ordered = true }) {
    return /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(import_jsx_runtime529.Fragment, { children: nestedHeadingList.map((node, index2) => {
      const { content, link } = node.heading;
      const entry = link ? /* @__PURE__ */ (0, import_jsx_runtime529.jsx)("a", { className: ENTRY_CLASS_NAME, href: link, children: content }) : /* @__PURE__ */ (0, import_jsx_runtime529.jsx)("span", { className: ENTRY_CLASS_NAME, children: content });
      const NestedListTag = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime529.jsxs)("li", { children: [
        entry,
        node.children ? /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(NestedListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(
          TableOfContentsList,
          {
            nestedHeadingList: node.children,
            ordered
          }
        ) }) : null
      ] }, index2);
    }) });
  }
  var hasOwn = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
  var v146 = {
    attributes,
    supports: supports2,
    isEligible: (blockAttributes8, innerBlocks, { blockNode } = {}) => {
      return hasOwn(blockAttributes8, "headings") || blockNode?.innerHTML?.includes("wp-block-table-of-contents");
    },
    migrate: ({ headings, ...persistentAttributes }) => persistentAttributes,
    save({ attributes: { headings = [], ordered = true } }) {
      if (headings.length === 0) {
        return null;
      }
      const ListTag = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime529.jsx)("nav", { ...import_block_editor255.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(ListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime529.jsx)(
        TableOfContentsList,
        {
          nestedHeadingList: linearToNestedHeadingList(
            headings
          ),
          ordered
        }
      ) }) });
    }
  };
  var deprecated_default52 = [v146];

  // packages/block-library/build-module/table-of-contents/block.json
  var block_default103 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    __experimental: true,
    name: "core/table-of-contents",
    title: "Table of Contents",
    category: "design",
    description: "Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.",
    keywords: ["document outline", "summary"],
    textdomain: "default",
    attributes: {
      headings: {
        type: "array",
        items: {
          type: "object"
        },
        default: [],
        role: "local"
      },
      onlyIncludeCurrentPage: {
        type: "boolean",
        default: false
      },
      maxLevel: {
        type: "number"
      },
      ordered: {
        type: "boolean",
        default: true
      }
    },
    supports: {
      anchor: true,
      ariaLabel: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        text: true,
        background: true,
        gradients: true,
        link: true
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-table-of-contents"
  };

  // packages/block-library/build-module/table-of-contents/edit.mjs
  var import_block_editor257 = __toESM(require_block_editor(), 1);
  var import_blocks99 = __toESM(require_blocks(), 1);
  var import_components154 = __toESM(require_components(), 1);
  var import_data147 = __toESM(require_data(), 1);
  var import_element152 = __toESM(require_element(), 1);
  var import_i18n238 = __toESM(require_i18n(), 1);
  var import_compose64 = __toESM(require_compose(), 1);
  var import_notices20 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/table-of-contents/list.mjs
  var import_jsx_runtime530 = __toESM(require_jsx_runtime(), 1);
  var ENTRY_CLASS_NAME2 = "wp-block-table-of-contents__entry";
  function TableOfContentsList2({
    nestedHeadingList,
    disableLinkActivation,
    onClick,
    ordered = true
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime530.jsx)(import_jsx_runtime530.Fragment, { children: nestedHeadingList.map((node, index2) => {
      const { content, link } = node.heading;
      const entry = link ? /* @__PURE__ */ (0, import_jsx_runtime530.jsx)(
        "a",
        {
          className: ENTRY_CLASS_NAME2,
          href: link,
          "aria-disabled": disableLinkActivation || void 0,
          onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
          children: content
        }
      ) : /* @__PURE__ */ (0, import_jsx_runtime530.jsx)("span", { className: ENTRY_CLASS_NAME2, children: content });
      const NestedListTag = ordered ? "ol" : "ul";
      return /* @__PURE__ */ (0, import_jsx_runtime530.jsxs)("li", { children: [
        entry,
        node.children ? /* @__PURE__ */ (0, import_jsx_runtime530.jsx)(NestedListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime530.jsx)(
          TableOfContentsList2,
          {
            nestedHeadingList: node.children,
            disableLinkActivation,
            onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
            ordered
          }
        ) }) : null
      ] }, index2);
    }) });
  }

  // packages/block-library/build-module/table-of-contents/utils.mjs
  var import_blocks98 = __toESM(require_blocks(), 1);
  var import_escape_html3 = __toESM(require_escape_html(), 1);
  function linearToNestedHeadingList2(headingList) {
    const nestedHeadingList = [];
    headingList.forEach((heading, key) => {
      if (heading.content === "") {
        return;
      }
      if (heading.level === headingList[0].level) {
        if (headingList[key + 1]?.level > heading.level) {
          let endOfSlice = headingList.length;
          for (let i = key + 1; i < headingList.length; i++) {
            if (headingList[i].level === heading.level) {
              endOfSlice = i;
              break;
            }
          }
          nestedHeadingList.push({
            heading,
            children: linearToNestedHeadingList2(
              headingList.slice(key + 1, endOfSlice)
            )
          });
        } else {
          nestedHeadingList.push({
            heading,
            children: null
          });
        }
      }
    });
    return nestedHeadingList;
  }
  function createListItemBlocks(nestedHeadingList, ordered) {
    return nestedHeadingList.map(
      ({ heading: { content, link }, children }) => (0, import_blocks98.createBlock)(
        "core/list-item",
        {
          // Headings are plain text, and links can carry query args on
          // paginated posts, so both need escaping to become markup.
          content: link ? `<a href="${(0, import_escape_html3.escapeAttribute)(
            link
          )}">${(0, import_escape_html3.escapeEditableHTML)(content)}</a>` : (0, import_escape_html3.escapeEditableHTML)(content)
        },
        children?.length ? [
          (0, import_blocks98.createBlock)(
            "core/list",
            { ordered },
            createListItemBlocks(children, ordered)
          )
        ] : []
      )
    );
  }

  // packages/block-library/build-module/table-of-contents/hooks.mjs
  var import_es6 = __toESM(require_es6(), 1);
  var import_data146 = __toESM(require_data(), 1);
  var import_dom22 = __toESM(require_dom(), 1);
  var import_element151 = __toESM(require_element(), 1);
  var import_url25 = __toESM(require_url(), 1);
  var import_block_editor256 = __toESM(require_block_editor(), 1);
  function getLatestHeadings(select10, clientId) {
    const {
      getBlockAttributes: getBlockAttributes4,
      getBlockName,
      getBlocksByName,
      getClientIdsOfDescendants
    } = select10(import_block_editor256.store);
    const permalink = select10("core/editor").getPermalink() ?? null;
    const isPaginated = getBlocksByName("core/nextpage").length !== 0;
    const { onlyIncludeCurrentPage, maxLevel } = getBlockAttributes4(clientId) ?? {};
    const [postContentClientId = ""] = getBlocksByName("core/post-content");
    const allBlockClientIds = getClientIdsOfDescendants(postContentClientId);
    let tocPage = 1;
    if (isPaginated && onlyIncludeCurrentPage) {
      const tocIndex = allBlockClientIds.indexOf(clientId);
      for (const [
        blockIndex,
        blockClientId
      ] of allBlockClientIds.entries()) {
        if (blockIndex >= tocIndex) {
          break;
        }
        if (getBlockName(blockClientId) === "core/nextpage") {
          tocPage++;
        }
      }
    }
    const latestHeadings = [];
    let headingPage = 1;
    let headingPageLink = null;
    if (typeof permalink === "string") {
      headingPageLink = isPaginated ? (0, import_url25.addQueryArgs)(permalink, { page: headingPage }) : permalink;
    }
    for (const blockClientId of allBlockClientIds) {
      const blockName = getBlockName(blockClientId);
      if (blockName === "core/nextpage") {
        headingPage++;
        if (onlyIncludeCurrentPage && headingPage > tocPage) {
          break;
        }
        if (typeof permalink === "string") {
          headingPageLink = (0, import_url25.addQueryArgs)(
            (0, import_url25.removeQueryArgs)(permalink, ["page"]),
            { page: headingPage }
          );
        }
      } else if (!onlyIncludeCurrentPage || headingPage === tocPage) {
        if (blockName === "core/heading") {
          const headingAttributes = getBlockAttributes4(blockClientId);
          if (maxLevel && headingAttributes.level > maxLevel) {
            continue;
          }
          const canBeLinked = typeof headingPageLink === "string" && typeof headingAttributes.anchor === "string" && headingAttributes.anchor !== "";
          latestHeadings.push({
            // Convert line breaks to spaces, and get rid of HTML tags in the headings.
            content: (0, import_dom22.__unstableStripHTML)(
              headingAttributes.content.replace(
                /(<br *\/?>)+/g,
                " "
              )
            ),
            level: headingAttributes.level,
            link: canBeLinked ? `${headingPageLink}#${headingAttributes.anchor}` : null
          });
        }
      }
    }
    return latestHeadings;
  }
  function observeCallback(select10, dispatch, clientId) {
    const { getBlockAttributes: getBlockAttributes4 } = select10(import_block_editor256.store);
    const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = dispatch(import_block_editor256.store);
    const attributes2 = getBlockAttributes4(clientId);
    if (attributes2 === null) {
      return;
    }
    const headings = getLatestHeadings(select10, clientId);
    if (!(0, import_es6.default)(headings, attributes2.headings)) {
      window.queueMicrotask(() => {
        __unstableMarkNextChangeAsNotPersistent();
        updateBlockAttributes(clientId, { headings });
      });
    }
  }
  function useObserveHeadings(clientId) {
    const registry = (0, import_data146.useRegistry)();
    (0, import_element151.useEffect)(() => {
      return registry.subscribe(
        () => observeCallback(registry.select, registry.dispatch, clientId)
      );
    }, [registry, clientId]);
  }

  // packages/block-library/build-module/table-of-contents/edit.mjs
  var import_jsx_runtime531 = __toESM(require_jsx_runtime(), 1);
  function TableOfContentsToolbar({
    clientId,
    headingTree,
    ordered,
    setAttributes
  }) {
    const canInsertList = (0, import_data147.useSelect)(
      (select10) => {
        const { getBlockRootClientId, canInsertBlockType } = select10(import_block_editor257.store);
        const rootClientId = getBlockRootClientId(clientId);
        return canInsertBlockType("core/list", rootClientId);
      },
      [clientId]
    );
    const { replaceBlocks } = (0, import_data147.useDispatch)(import_block_editor257.store);
    const [isConfirmingDetach, setIsConfirmingDetach] = (0, import_element152.useState)(false);
    return /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(import_jsx_runtime531.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(import_block_editor257.BlockControls, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(import_components154.ToolbarGroup, { children: [
          /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
            import_components154.ToolbarButton,
            {
              icon: (0, import_i18n238.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
              title: (0, import_i18n238.__)("Unordered"),
              description: (0, import_i18n238.__)("Convert to unordered list"),
              onClick: () => setAttributes({ ordered: false }),
              isActive: ordered === false
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
            import_components154.ToolbarButton,
            {
              icon: (0, import_i18n238.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
              title: (0, import_i18n238.__)("Ordered"),
              description: (0, import_i18n238.__)("Convert to ordered list"),
              onClick: () => setAttributes({ ordered: true }),
              isActive: ordered === true
            }
          )
        ] }),
        canInsertList && /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(import_components154.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
          import_components154.ToolbarButton,
          {
            onClick: () => setIsConfirmingDetach(true),
            children: (0, import_i18n238.__)("Detach")
          }
        ) })
      ] }),
      isConfirmingDetach && /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
        import_components154.__experimentalConfirmDialog,
        {
          isOpen: true,
          title: (0, import_i18n238.__)("Detach Table of Contents"),
          __experimentalHideHeader: false,
          confirmButtonText: (0, import_i18n238.__)("Detach"),
          onConfirm: () => {
            setIsConfirmingDetach(false);
            replaceBlocks(
              clientId,
              (0, import_blocks99.createBlock)(
                "core/list",
                { ordered },
                createListItemBlocks(headingTree, ordered)
              )
            );
          },
          onCancel: () => setIsConfirmingDetach(false),
          size: "medium",
          children: (0, import_i18n238.__)(
            "The Table of Contents block lists the headings in the post. Detaching will enable you to edit, reorder, or remove entries. However, new headings will no longer be added automatically."
          )
        }
      )
    ] });
  }
  function TableOfContentsEdit({
    attributes: {
      headings = [],
      onlyIncludeCurrentPage,
      maxLevel,
      ordered = true
    },
    clientId,
    setAttributes
  }) {
    useObserveHeadings(clientId);
    const blockProps = (0, import_block_editor257.useBlockProps)();
    const instanceId = (0, import_compose64.useInstanceId)(
      TableOfContentsEdit,
      "table-of-contents"
    );
    const { createWarningNotice } = (0, import_data147.useDispatch)(import_notices20.store);
    const showRedirectionPreventedNotice = (event) => {
      event.preventDefault();
      createWarningNotice((0, import_i18n238.__)("Links are disabled in the editor."), {
        id: `block-library/core/table-of-contents/redirection-prevented/${instanceId}`,
        type: "snackbar"
      });
    };
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const headingTree = linearToNestedHeadingList2(headings);
    const toolbarControls = /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
      TableOfContentsToolbar,
      {
        clientId,
        headingTree,
        ordered,
        setAttributes
      }
    );
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(import_block_editor257.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(
      import_components154.__experimentalToolsPanel,
      {
        label: (0, import_i18n238.__)("Settings"),
        resetAll: () => {
          setAttributes({
            onlyIncludeCurrentPage: false,
            maxLevel: void 0,
            ordered: true
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
            import_components154.__experimentalToolsPanelItem,
            {
              hasValue: () => !!onlyIncludeCurrentPage,
              label: (0, import_i18n238.__)("Only include current page"),
              onDeselect: () => setAttributes({ onlyIncludeCurrentPage: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
                import_components154.ToggleControl,
                {
                  label: (0, import_i18n238.__)("Only include current page"),
                  checked: onlyIncludeCurrentPage,
                  onChange: (value) => setAttributes({ onlyIncludeCurrentPage: value }),
                  help: onlyIncludeCurrentPage ? (0, import_i18n238.__)(
                    "Only including headings from the current page (if the post is paginated)."
                  ) : (0, import_i18n238.__)(
                    "Include headings from all pages (if the post is paginated)."
                  )
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
            import_components154.__experimentalToolsPanelItem,
            {
              hasValue: () => !!maxLevel,
              label: (0, import_i18n238.__)("Limit heading levels"),
              onDeselect: () => setAttributes({ maxLevel: void 0 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
                import_components154.SelectControl,
                {
                  label: (0, import_i18n238.__)("Include headings down to level"),
                  value: maxLevel || "",
                  options: [
                    { value: "", label: (0, import_i18n238.__)("All levels") },
                    { value: "1", label: (0, import_i18n238.__)("Heading 1") },
                    { value: "2", label: (0, import_i18n238.__)("Heading 2") },
                    { value: "3", label: (0, import_i18n238.__)("Heading 3") },
                    { value: "4", label: (0, import_i18n238.__)("Heading 4") },
                    { value: "5", label: (0, import_i18n238.__)("Heading 5") },
                    { value: "6", label: (0, import_i18n238.__)("Heading 6") }
                  ],
                  onChange: (value) => setAttributes({
                    maxLevel: value ? parseInt(value) : void 0
                  }),
                  help: !maxLevel ? (0, import_i18n238.__)(
                    "Including all heading levels in the table of contents."
                  ) : (0, import_i18n238.__)(
                    "Only include headings up to and including this level."
                  )
                }
              )
            }
          )
        ]
      }
    ) });
    if (headings.length === 0) {
      return /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(import_jsx_runtime531.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime531.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
          import_components154.Placeholder,
          {
            icon: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(import_block_editor257.BlockIcon, { icon: table_of_contents_default }),
            label: (0, import_i18n238.__)("Table of Contents"),
            instructions: (0, import_i18n238.__)(
              "Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here."
            )
          }
        ) }),
        inspectorControls
      ] });
    }
    const ListTag = ordered ? "ol" : "ul";
    return /* @__PURE__ */ (0, import_jsx_runtime531.jsxs)(import_jsx_runtime531.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime531.jsx)("nav", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(ListTag, { children: /* @__PURE__ */ (0, import_jsx_runtime531.jsx)(
        TableOfContentsList2,
        {
          nestedHeadingList: headingTree,
          disableLinkActivation: true,
          onClick: showRedirectionPreventedNotice,
          ordered
        }
      ) }) }),
      toolbarControls,
      inspectorControls
    ] });
  }

  // packages/block-library/build-module/table-of-contents/index.mjs
  var { name: name104 } = block_default103;
  var settings103 = {
    icon: table_of_contents_default,
    deprecated: deprecated_default52,
    edit: TableOfContentsEdit,
    example: {
      innerBlocks: [
        {
          name: "core/heading",
          attributes: {
            level: 2,
            content: (0, import_i18n239.__)("Heading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 3,
            content: (0, import_i18n239.__)("Subheading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 2,
            content: (0, import_i18n239.__)("Heading")
          }
        },
        {
          name: "core/heading",
          attributes: {
            level: 3,
            content: (0, import_i18n239.__)("Subheading")
          }
        }
      ],
      attributes: {
        headings: [
          {
            content: (0, import_i18n239.__)("Heading"),
            level: 2
          },
          {
            content: (0, import_i18n239.__)("Subheading"),
            level: 3
          },
          {
            content: (0, import_i18n239.__)("Heading"),
            level: 2
          },
          {
            content: (0, import_i18n239.__)("Subheading"),
            level: 3
          }
        ]
      }
    }
  };
  var init103 = () => initBlock({ name: name104, metadata: block_default103, settings: settings103 });

  // packages/block-library/build-module/tab-list/index.mjs
  var tab_list_exports = {};
  __export(tab_list_exports, {
    init: () => init104,
    metadata: () => block_default104,
    name: () => name105,
    settings: () => settings104
  });

  // packages/block-library/build-module/tab-list/edit.mjs
  var import_i18n241 = __toESM(require_i18n(), 1);
  var import_block_editor259 = __toESM(require_block_editor(), 1);
  var import_components156 = __toESM(require_components(), 1);
  var import_data149 = __toESM(require_data(), 1);
  var import_element153 = __toESM(require_element(), 1);

  // packages/block-library/build-module/tab-list/tab-movers.mjs
  var import_i18n240 = __toESM(require_i18n(), 1);
  var import_block_editor258 = __toESM(require_block_editor(), 1);
  var import_components155 = __toESM(require_components(), 1);
  var import_data148 = __toESM(require_data(), 1);
  var import_jsx_runtime532 = __toESM(require_jsx_runtime(), 1);
  function TabMovers({ tabsClientId }) {
    const { moveTab } = useTabActions(tabsClientId);
    const { tabCount, activeIndex } = (0, import_data148.useSelect)(
      (select10) => {
        if (!tabsClientId) {
          return { tabCount: 0, activeIndex: 0 };
        }
        const { getBlocks, getBlockAttributes: getBlockAttributes4 } = select10(import_block_editor258.store);
        const tabsAttributes = getBlockAttributes4(tabsClientId);
        const tabPanels = getBlocks(tabsClientId).find(
          (block) => block.name === "core/tab-panels"
        );
        return {
          tabCount: tabPanels?.innerBlocks.length ?? 0,
          activeIndex: tabsAttributes?.editorActiveTabIndex ?? tabsAttributes?.activeTabIndex ?? 0
        };
      },
      [tabsClientId]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime532.jsxs)(import_block_editor258.BlockControls, { group: "parent", children: [
      /* @__PURE__ */ (0, import_jsx_runtime532.jsx)(
        import_components155.ToolbarButton,
        {
          className: "wp-block-tab-list__mover-button",
          icon: (0, import_i18n240.isRTL)() ? chevron_right_default : chevron_left_default,
          label: (0, import_i18n240.__)("Move tab before"),
          onClick: () => moveTab(-1),
          disabled: activeIndex <= 0,
          accessibleWhenDisabled: true
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime532.jsx)(
        import_components155.ToolbarButton,
        {
          className: "wp-block-tab-list__mover-button",
          icon: (0, import_i18n240.isRTL)() ? chevron_left_default : chevron_right_default,
          label: (0, import_i18n240.__)("Move tab after"),
          onClick: () => moveTab(1),
          disabled: activeIndex >= tabCount - 1,
          accessibleWhenDisabled: true
        }
      )
    ] });
  }

  // packages/block-library/build-module/tab-list/edit.mjs
  var import_jsx_runtime533 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY9 = [];
  function Edit18({
    attributes: attributes2,
    clientId,
    setAttributes,
    __unstableLayoutClassNames: layoutClassNames
  }) {
    const { ariaLabel } = attributes2;
    const colorProps = (0, import_block_editor259.__experimentalUseColorProps)(attributes2);
    const borderProps = (0, import_block_editor259.__experimentalUseBorderProps)(attributes2);
    const spacingProps = (0, import_block_editor259.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const { tabsClientId, tabPanels, editorActiveTabIndex, activeTabIndex } = (0, import_data149.useSelect)(
      (select10) => {
        const { getBlockRootClientId, getBlockAttributes: getBlockAttributes4, getBlocks } = select10(import_block_editor259.store);
        const rootClientId = getBlockRootClientId(clientId);
        const tabsAttributes = getBlockAttributes4(rootClientId);
        const tabPanelsBlock = getBlocks(rootClientId)?.find(
          (block) => block.name === "core/tab-panels"
        );
        return {
          tabsClientId: rootClientId,
          tabPanels: tabPanelsBlock?.innerBlocks ?? EMPTY_ARRAY9,
          editorActiveTabIndex: tabsAttributes?.editorActiveTabIndex,
          activeTabIndex: tabsAttributes?.activeTabIndex ?? 0
        };
      },
      [clientId]
    );
    const registry = (0, import_data149.useRegistry)();
    const { isBlockSelected, hasSelectedInnerBlock } = (0, import_data149.useSelect)(import_block_editor259.store);
    const {
      updateBlockAttributes,
      selectBlock,
      __unstableMarkNextChangeAsNotPersistent
    } = (0, import_data149.useDispatch)(import_block_editor259.store);
    const { insertTab, removeTab } = useTabActions(tabsClientId);
    const effectiveActiveIndex = editorActiveTabIndex ?? activeTabIndex;
    const tabsList = (0, import_element153.useMemo)(
      () => tabPanels.map((tab) => ({
        label: tab.attributes.label || "",
        clientId: tab.clientId
      })),
      [tabPanels]
    );
    function selectTabPanel(tabIndex) {
      if (tabsClientId && tabIndex !== effectiveActiveIndex) {
        registry.batch(() => {
          selectBlock(clientId);
          __unstableMarkNextChangeAsNotPersistent();
          updateBlockAttributes(tabsClientId, {
            editorActiveTabIndex: tabIndex
          });
        });
      }
    }
    function handleLabelChange(tabIndex, newLabel) {
      const tab = tabsList[tabIndex];
      if (tab?.clientId) {
        updateBlockAttributes(tab.clientId, { label: newLabel });
      }
    }
    const menuRef = (0, import_element153.useRef)();
    const prevTabCountRef = (0, import_element153.useRef)(tabsList.length);
    (0, import_element153.useEffect)(() => {
      const prevCount = prevTabCountRef.current;
      prevTabCountRef.current = tabsList.length;
      if (!menuRef.current || tabsList.length === prevCount) {
        return;
      }
      if (!isBlockSelected(tabsClientId) && !hasSelectedInnerBlock(tabsClientId, true)) {
        return;
      }
      const focusButtonAt = (index2) => {
        window.requestAnimationFrame(() => {
          const button = menuRef.current?.querySelectorAll("button")?.[index2];
          (button?.querySelector("[contenteditable]") ?? button)?.focus();
        });
      };
      focusButtonAt(effectiveActiveIndex);
    }, [
      effectiveActiveIndex,
      hasSelectedInnerBlock,
      isBlockSelected,
      tabsClientId,
      tabsList.length
    ]);
    const blockProps = (0, import_block_editor259.useBlockProps)({
      role: "tablist",
      ref: menuRef,
      // Applied manually since this block has no inner blocks for the layout
      // support to add its container classes to.
      className: layoutClassNames
    });
    const buttonClassName = clsx_default(colorProps.className, borderProps.className);
    const buttonStyle = {
      ...colorProps.style,
      ...borderProps.style,
      ...spacingProps.style
    };
    return /* @__PURE__ */ (0, import_jsx_runtime533.jsxs)(import_jsx_runtime533.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(import_block_editor259.InspectorControls, { group: "settings", children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(
        import_components156.__experimentalToolsPanel,
        {
          label: (0, import_i18n241.__)("Settings"),
          resetAll: () => setAttributes({
            ariaLabel: void 0
          }),
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(
            import_components156.__experimentalToolsPanelItem,
            {
              label: (0, import_i18n241.__)("Label"),
              isShownByDefault: true,
              hasValue: () => !!ariaLabel,
              onDeselect: () => setAttributes({ ariaLabel: void 0 }),
              children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(
                import_components156.TextControl,
                {
                  label: (0, import_i18n241.__)("Label"),
                  help: (0, import_i18n241.__)(
                    "Briefly describe this tab section for screen reader users. Examples: Event information, Product details, and Account settings."
                  ),
                  value: ariaLabel || "",
                  onChange: (value) => setAttributes({
                    ariaLabel: value || void 0
                  })
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(TabMovers, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(TabToolbarControls, { tabsClientId }),
      /* @__PURE__ */ (0, import_jsx_runtime533.jsx)("div", { ...blockProps, children: tabsList.map((tab, index2) => {
        const isActive = index2 === effectiveActiveIndex;
        return /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(
          "button",
          {
            type: "button",
            role: "tab",
            "aria-selected": isActive,
            className: buttonClassName || void 0,
            style: buttonStyle,
            tabIndex: -1,
            onFocus: () => {
              selectTabPanel(index2);
            },
            children: /* @__PURE__ */ (0, import_jsx_runtime533.jsx)(
              import_block_editor259.RichText,
              {
                tagName: "span",
                withoutInteractiveFormatting: true,
                placeholder: (0, import_i18n241.__)("Tab title"),
                value: tab.label,
                onChange: (newLabel) => handleLabelChange(index2, newLabel),
                __unstableOnSplitAtEnd: () => insertTab(index2 + 1),
                onRemove: () => removeTab(index2)
              }
            )
          },
          tab.clientId || index2
        );
      }) })
    ] });
  }
  var edit_default32 = Edit18;

  // packages/block-library/build-module/tab-list/save.mjs
  var import_block_editor260 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime534 = __toESM(require_jsx_runtime(), 1);
  function save47({ attributes: attributes2 }) {
    const { tabs } = attributes2;
    const blockProps = import_block_editor260.useBlockProps.save({
      role: "tablist"
    });
    const colorProps = (0, import_block_editor260.__experimentalGetColorClassesAndStyles)(attributes2);
    const borderProps = (0, import_block_editor260.__experimentalGetBorderClassesAndStyles)(attributes2);
    const spacingProps = (0, import_block_editor260.__experimentalGetSpacingClassesAndStyles)(attributes2);
    const buttonClassName = clsx_default(colorProps.className, borderProps.className);
    const buttonStyle = {
      ...colorProps.style,
      ...borderProps.style,
      ...spacingProps.style
    };
    return /* @__PURE__ */ (0, import_jsx_runtime534.jsx)("div", { ...blockProps, children: tabs.map((tab, index2) => /* @__PURE__ */ (0, import_jsx_runtime534.jsx)(
      import_block_editor260.RichText.Content,
      {
        className: buttonClassName || void 0,
        style: buttonStyle,
        tagName: "button",
        value: tab.label,
        type: "button",
        role: "tab"
      },
      index2
    )) });
  }

  // packages/block-library/build-module/tab-list/block.json
  var block_default104 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tab-list",
    title: "Tab List",
    description: "Display the tab buttons for a tabbed interface.",
    category: "design",
    textdomain: "default",
    parent: ["core/tabs"],
    usesContext: ["core/tabs-list"],
    attributes: {
      tabs: {
        type: "array",
        source: "query",
        selector: "button",
        query: {
          label: {
            type: "rich-text",
            source: "rich-text",
            role: "content"
          }
        },
        default: []
      }
    },
    supports: {
      html: false,
      ariaLabel: true,
      visibility: false,
      lock: false,
      color: {
        background: true,
        text: true,
        __experimentalSkipSerialization: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true,
        __experimentalSkipSerialization: true
      },
      layout: {
        default: {
          type: "flex",
          flexWrap: "wrap"
        },
        allowVerticalAlignment: false,
        allowOrientation: false,
        allowWrap: false
      },
      spacing: {
        padding: true,
        blockGap: true,
        __experimentalSkipSerialization: ["padding"],
        __experimentalDefaultControls: {
          padding: true,
          blockGap: true
        }
      }
    },
    selectors: {
      border: ".wp-block-tab-list button",
      color: {
        background: ".wp-block-tab-list button",
        text: ".wp-block-tab-list button"
      },
      spacing: {
        padding: ".wp-block-tab-list button"
      }
    },
    style: "wp-block-tab-list",
    editorStyle: "wp-block-tab-list-editor"
  };

  // packages/block-library/build-module/tab-list/index.mjs
  var { name: name105 } = block_default104;
  var settings104 = {
    icon: tab_list_default,
    edit: edit_default32,
    save: save47
  };
  var init104 = () => initBlock({ name: name105, metadata: block_default104, settings: settings104 });

  // packages/block-library/build-module/tabs/index.mjs
  var tabs_exports2 = {};
  __export(tabs_exports2, {
    init: () => init105,
    metadata: () => block_default105,
    name: () => name106,
    settings: () => settings105
  });
  var import_i18n242 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/tabs/edit.mjs
  var import_block_editor262 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/tabs/use-tab-list-items-sync.mjs
  var import_block_editor261 = __toESM(require_block_editor(), 1);
  var import_data150 = __toESM(require_data(), 1);
  var import_element154 = __toESM(require_element(), 1);
  var EMPTY_ARRAY10 = [];
  function useTabListItemsSync(tabsClientId) {
    const { tabPanels, tabListClientId } = (0, import_data150.useSelect)(
      (select10) => {
        const { getBlocks } = select10(import_block_editor261.store);
        const innerBlocks = getBlocks(tabsClientId);
        const tabPanelsBlock = innerBlocks.find(
          (block) => block.name === "core/tab-panels"
        );
        const tabList = innerBlocks.find(
          (block) => block.name === "core/tab-list"
        );
        return {
          tabPanels: tabPanelsBlock?.innerBlocks ?? EMPTY_ARRAY10,
          tabListClientId: tabList?.clientId ?? null
        };
      },
      [tabsClientId]
    );
    const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0, import_data150.useDispatch)(import_block_editor261.store);
    const { getBlockAttributes: getBlockAttributes4 } = (0, import_data150.useSelect)(import_block_editor261.store);
    (0, import_element154.useEffect)(() => {
      if (!tabListClientId) {
        return;
      }
      const newTabs = tabPanels.map((tab) => ({
        label: tab.attributes.label || ""
      }));
      const currentTabs = getBlockAttributes4(tabListClientId)?.tabs ?? [];
      if (JSON.stringify(newTabs) === JSON.stringify(currentTabs)) {
        return;
      }
      __unstableMarkNextChangeAsNotPersistent();
      updateBlockAttributes(tabListClientId, { tabs: newTabs });
    }, [
      tabPanels,
      tabListClientId,
      getBlockAttributes4,
      updateBlockAttributes,
      __unstableMarkNextChangeAsNotPersistent
    ]);
  }

  // packages/block-library/build-module/tabs/edit.mjs
  var import_jsx_runtime535 = __toESM(require_jsx_runtime(), 1);
  function Edit19({ clientId }) {
    useTabListItemsSync(clientId);
    const blockProps = (0, import_block_editor262.useBlockProps)();
    const innerBlockProps = (0, import_block_editor262.useInnerBlocksProps)(blockProps, {
      __experimentalCaptureToolbars: true,
      templateLock: "all",
      renderAppender: false
    });
    return /* @__PURE__ */ (0, import_jsx_runtime535.jsxs)("div", { ...innerBlockProps, children: [
      /* @__PURE__ */ (0, import_jsx_runtime535.jsx)(TabToolbarControls, { tabsClientId: clientId }),
      innerBlockProps.children
    ] });
  }
  var edit_default33 = Edit19;

  // packages/block-library/build-module/tabs/save.mjs
  var import_block_editor263 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime536 = __toESM(require_jsx_runtime(), 1);
  function save48() {
    const blockProps = import_block_editor263.useBlockProps.save();
    const innerBlocksProps = import_block_editor263.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime536.jsx)("div", { ...innerBlocksProps });
  }

  // packages/block-library/build-module/tabs/block.json
  var block_default105 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tabs",
    title: "Tabs",
    description: "Display content in a tabbed interface to help users navigate detailed content with ease.",
    category: "design",
    textdomain: "default",
    allowedBlocks: ["core/tab-list", "core/tab-panels"],
    attributes: {
      activeTabIndex: {
        type: "number",
        default: 0
      },
      editorActiveTabIndex: {
        type: "number",
        role: "local"
      }
    },
    supports: {
      align: true,
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        text: true,
        background: true,
        heading: true,
        button: true,
        link: true,
        __experimentalDefaultControls: {
          text: true,
          background: true
        }
      },
      __experimentalBorder: {
        color: true,
        radius: true,
        style: true,
        width: true
      },
      layout: {
        allowEditing: false
      },
      html: false,
      interactivity: true,
      spacing: {
        blockGap: true,
        margin: true,
        padding: true
      },
      shadow: true,
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      }
    },
    usesContext: ["core/tabs-list", "core/tabs-id"],
    style: "wp-block-tabs",
    viewScriptModule: "@wordpress/block-library/tabs/view"
  };

  // packages/block-library/build-module/tabs/index.mjs
  var { name: name106 } = block_default105;
  var TEMPLATE17 = [["core/tab-list"], ["core/tab-panels"]];
  var settings105 = {
    icon: tabs_default,
    example: {
      innerBlocks: [
        {
          name: "core/tab-list",
          attributes: {
            tabs: [
              { label: (0, import_i18n242.__)("Tab 1") },
              { label: (0, import_i18n242.__)("Tab 2") }
            ]
          }
        },
        {
          name: "core/tab-panels",
          innerBlocks: [1, 2].map((index2) => ({
            name: "core/tab-panel",
            attributes: {
              anchor: `tab-${index2}`,
              label: (0, import_i18n242.sprintf)(
                /** translators: %s: tab index number */
                (0, import_i18n242.__)("Tab %s"),
                index2
              )
            },
            innerBlocks: [
              {
                name: "core/paragraph",
                attributes: {
                  content: (0, import_i18n242.__)(
                    "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
                  )
                }
              }
            ]
          }))
        }
      ]
    },
    // Initial tab/panel creation is delegated to the tab-panels template, applied when its inner blocks are empty.
    template: TEMPLATE17,
    edit: edit_default33,
    save: save48
  };
  var init105 = () => initBlock({ name: name106, metadata: block_default105, settings: settings105 });

  // packages/block-library/build-module/tag-cloud/index.mjs
  var tag_cloud_exports = {};
  __export(tag_cloud_exports, {
    init: () => init106,
    metadata: () => block_default106,
    name: () => name107,
    settings: () => settings106
  });

  // packages/block-library/build-module/tag-cloud/transforms.mjs
  var import_blocks100 = __toESM(require_blocks(), 1);
  var transforms36 = {
    from: [
      {
        type: "block",
        blocks: ["core/categories"],
        transform: () => (0, import_blocks100.createBlock)("core/tag-cloud")
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/categories"],
        transform: () => (0, import_blocks100.createBlock)("core/categories")
      }
    ]
  };
  var transforms_default37 = transforms36;

  // packages/block-library/build-module/tag-cloud/block.json
  var block_default106 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/tag-cloud",
    title: "Tag Cloud",
    category: "widgets",
    description: "A cloud of popular keywords, each sized by how often it appears.",
    textdomain: "default",
    attributes: {
      numberOfTags: {
        type: "number",
        default: 45,
        minimum: 1,
        maximum: 100
      },
      taxonomy: {
        type: "string",
        default: "post_tag"
      },
      showTagCounts: {
        type: "boolean",
        default: false
      },
      smallestFontSize: {
        type: "string",
        default: "8pt"
      },
      largestFontSize: {
        type: "string",
        default: "22pt"
      }
    },
    styles: [
      { name: "default", label: "Default", isDefault: true },
      { name: "outline", label: "Outline" }
    ],
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      html: false,
      align: true,
      color: {
        background: true,
        link: true,
        text: false,
        __experimentalDefaultControls: {
          background: true,
          link: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalLetterSpacing: true
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/tag-cloud/edit.mjs
  var import_components157 = __toESM(require_components(), 1);
  var import_data151 = __toESM(require_data(), 1);
  var import_i18n243 = __toESM(require_i18n(), 1);
  var import_block_editor264 = __toESM(require_block_editor(), 1);
  var import_core_data86 = __toESM(require_core_data(), 1);
  var import_server_side_render6 = __toESM(require_server_side_render(), 1);
  var import_compose65 = __toESM(require_compose(), 1);
  var import_jsx_runtime537 = __toESM(require_jsx_runtime(), 1);
  var MIN_TAGS = 1;
  var MAX_TAGS = 100;
  var MIN_FONT_SIZE = 0.1;
  var MAX_FONT_SIZE = 100;
  function TagCloudEdit({ attributes: attributes2, setAttributes, name: name118 }) {
    const {
      taxonomy,
      showTagCounts,
      numberOfTags,
      smallestFontSize,
      largestFontSize
    } = attributes2;
    const [availableUnits] = (0, import_block_editor264.useSettings)("spacing.units");
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const units = (0, import_components157.__experimentalUseCustomUnits)({
      availableUnits: availableUnits ? [...availableUnits, "pt"] : ["%", "px", "em", "rem", "pt"]
    });
    const taxonomies = (0, import_data151.useSelect)(
      (select10) => select10(import_core_data86.store).getTaxonomies({ per_page: -1 }),
      []
    );
    const getTaxonomyOptions = () => {
      const selectOption = {
        label: (0, import_i18n243.__)("- Select -"),
        value: "",
        disabled: true
      };
      const taxonomyOptions = (taxonomies ?? []).filter((tax) => !!tax.show_cloud).map((item) => {
        return {
          value: item.slug,
          label: item.name
        };
      });
      return [selectOption, ...taxonomyOptions];
    };
    const onFontSizeChange = (fontSizeLabel, newValue) => {
      const [quantity, newUnit] = (0, import_components157.__experimentalParseQuantityAndUnitFromRawValue)(newValue);
      if (!Number.isFinite(quantity)) {
        return;
      }
      const updateObj = { [fontSizeLabel]: newValue };
      Object.entries({
        smallestFontSize,
        largestFontSize
      }).forEach(([attribute, currentValue]) => {
        const [currentQuantity, currentUnit] = (0, import_components157.__experimentalParseQuantityAndUnitFromRawValue)(currentValue);
        if (attribute !== fontSizeLabel && currentUnit !== newUnit) {
          updateObj[attribute] = `${currentQuantity}${newUnit}`;
        }
      });
      setAttributes(updateObj);
    };
    const inspectorControls = /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(import_block_editor264.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime537.jsxs)(
      import_components157.__experimentalToolsPanel,
      {
        label: (0, import_i18n243.__)("Settings"),
        resetAll: () => {
          setAttributes({
            taxonomy: "post_tag",
            showTagCounts: false,
            numberOfTags: 45,
            smallestFontSize: "8pt",
            largestFontSize: "22pt"
          });
        },
        dropdownMenuProps,
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
            import_components157.__experimentalToolsPanelItem,
            {
              hasValue: () => taxonomy !== "post_tag",
              label: (0, import_i18n243.__)("Taxonomy"),
              onDeselect: () => setAttributes({ taxonomy: "post_tag" }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
                import_components157.SelectControl,
                {
                  label: (0, import_i18n243.__)("Taxonomy"),
                  options: getTaxonomyOptions(),
                  value: taxonomy,
                  onChange: (selectedTaxonomy) => setAttributes({ taxonomy: selectedTaxonomy })
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
            import_components157.__experimentalToolsPanelItem,
            {
              hasValue: () => smallestFontSize !== "8pt" || largestFontSize !== "22pt",
              label: (0, import_i18n243.__)("Font size"),
              onDeselect: () => setAttributes({
                smallestFontSize: "8pt",
                largestFontSize: "22pt"
              }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime537.jsxs)(import_components157.Flex, { gap: 4, children: [
                /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(import_components157.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
                  import_components157.__experimentalUnitControl,
                  {
                    label: (0, import_i18n243.__)("Smallest size"),
                    value: smallestFontSize,
                    onChange: (value) => {
                      onFontSizeChange(
                        "smallestFontSize",
                        value
                      );
                    },
                    units,
                    min: MIN_FONT_SIZE,
                    max: MAX_FONT_SIZE
                  }
                ) }),
                /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(import_components157.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
                  import_components157.__experimentalUnitControl,
                  {
                    label: (0, import_i18n243.__)("Largest size"),
                    value: largestFontSize,
                    onChange: (value) => {
                      onFontSizeChange(
                        "largestFontSize",
                        value
                      );
                    },
                    units,
                    min: MIN_FONT_SIZE,
                    max: MAX_FONT_SIZE
                  }
                ) })
              ] })
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
            import_components157.__experimentalToolsPanelItem,
            {
              hasValue: () => numberOfTags !== 45,
              label: (0, import_i18n243.__)("Number of tags"),
              onDeselect: () => setAttributes({ numberOfTags: 45 }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
                import_components157.RangeControl,
                {
                  label: (0, import_i18n243.__)("Number of tags"),
                  value: numberOfTags,
                  onChange: (value) => setAttributes({ numberOfTags: value }),
                  min: MIN_TAGS,
                  max: MAX_TAGS,
                  required: true
                }
              )
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
            import_components157.__experimentalToolsPanelItem,
            {
              hasValue: () => showTagCounts !== false,
              label: (0, import_i18n243.__)("Show tag counts"),
              onDeselect: () => setAttributes({ showTagCounts: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(
                import_components157.ToggleControl,
                {
                  label: (0, import_i18n243.__)("Show tag counts"),
                  checked: showTagCounts,
                  onChange: () => setAttributes({ showTagCounts: !showTagCounts })
                }
              )
            }
          )
        ]
      }
    ) });
    const { content, status, error: error2 } = (0, import_server_side_render6.useServerSideRender)({
      attributes: attributes2,
      skipBlockSupportAttributes: true,
      block: name118
    });
    const disabledRef = (0, import_compose65.useDisabled)();
    const blockProps = (0, import_block_editor264.useBlockProps)({ ref: disabledRef });
    return /* @__PURE__ */ (0, import_jsx_runtime537.jsxs)(import_jsx_runtime537.Fragment, { children: [
      inspectorControls,
      status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime537.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(import_components157.Spinner, {}) }),
      status === "error" && /* @__PURE__ */ (0, import_jsx_runtime537.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime537.jsx)("p", { children: (0, import_i18n243.sprintf)(
        /* translators: %s: error message returned when rendering the block. */
        (0, import_i18n243.__)("Error: %s"),
        error2
      ) }) }),
      status === "success" && /* @__PURE__ */ (0, import_jsx_runtime537.jsx)(html_renderer_default, { wrapperProps: blockProps, html: content })
    ] });
  }
  var edit_default34 = TagCloudEdit;

  // packages/block-library/build-module/tag-cloud/index.mjs
  var { name: name107 } = block_default106;
  var settings106 = {
    icon: tag_default,
    example: {},
    edit: edit_default34,
    transforms: transforms_default37
  };
  var init106 = () => initBlock({ name: name107, metadata: block_default106, settings: settings106 });

  // packages/block-library/build-module/template-part/index.mjs
  var template_part_exports = {};
  __export(template_part_exports, {
    init: () => init107,
    metadata: () => block_default107,
    name: () => name108,
    settings: () => settings107
  });
  var import_core_data94 = __toESM(require_core_data(), 1);
  var import_data160 = __toESM(require_data(), 1);
  var import_hooks80 = __toESM(require_hooks(), 1);
  var import_html_entities15 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/template-part/block.json
  var block_default107 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/template-part",
    title: "Template Part",
    category: "theme",
    description: "Edit the different global regions of your site, like the header, footer, sidebar, or create your own.",
    textdomain: "default",
    attributes: {
      slug: {
        type: "string"
      },
      theme: {
        type: "string"
      },
      tagName: {
        type: "string"
      },
      area: {
        type: "string"
      }
    },
    supports: {
      align: true,
      html: false,
      reusable: false,
      renaming: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-template-part-editor"
  };

  // packages/block-library/build-module/template-part/edit/index.mjs
  var import_blocks105 = __toESM(require_blocks(), 1);
  var import_data158 = __toESM(require_data(), 1);
  var import_block_editor269 = __toESM(require_block_editor(), 1);
  var import_components163 = __toESM(require_components(), 1);
  var import_i18n250 = __toESM(require_i18n(), 1);
  var import_core_data92 = __toESM(require_core_data(), 1);
  var import_element161 = __toESM(require_element(), 1);
  var import_notices23 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/template-part/edit/placeholder.mjs
  var import_i18n246 = __toESM(require_i18n(), 1);
  var import_components159 = __toESM(require_components(), 1);
  var import_element157 = __toESM(require_element(), 1);
  var import_data153 = __toESM(require_data(), 1);
  var import_core_data88 = __toESM(require_core_data(), 1);

  // packages/block-library/build-module/template-part/edit/utils/hooks.mjs
  var import_data152 = __toESM(require_data(), 1);
  var import_core_data87 = __toESM(require_core_data(), 1);
  var import_block_editor265 = __toESM(require_block_editor(), 1);
  var import_element155 = __toESM(require_element(), 1);
  var import_blocks101 = __toESM(require_blocks(), 1);
  var import_i18n244 = __toESM(require_i18n(), 1);
  function useAlternativeTemplateParts(area, excludedId) {
    const { templateParts, isResolving } = (0, import_data152.useSelect)((select10) => {
      const { getEntityRecords, isResolving: _isResolving } = select10(import_core_data87.store);
      const query = { per_page: -1 };
      return {
        templateParts: getEntityRecords(
          "postType",
          "wp_template_part",
          query
        ),
        isResolving: _isResolving("getEntityRecords", [
          "postType",
          "wp_template_part",
          query
        ])
      };
    }, []);
    const filteredTemplateParts = (0, import_element155.useMemo)(() => {
      if (!templateParts) {
        return [];
      }
      return templateParts.filter(
        (templatePart) => createTemplatePartId(
          templatePart.theme,
          templatePart.slug
        ) !== excludedId && (!area || "uncategorized" === area || templatePart.area === area)
      ) || [];
    }, [templateParts, area, excludedId]);
    return {
      templateParts: filteredTemplateParts,
      isResolving
    };
  }
  function useAlternativeBlockPatterns(area, clientId) {
    return (0, import_data152.useSelect)(
      (select10) => {
        const blockNameWithArea = area ? `core/template-part/${area}` : "core/template-part";
        const { getBlockRootClientId, getPatternsByBlockTypes } = select10(import_block_editor265.store);
        const rootClientId = getBlockRootClientId(clientId);
        return getPatternsByBlockTypes(blockNameWithArea, rootClientId);
      },
      [area, clientId]
    );
  }
  function useCreateTemplatePartFromBlocks(area, setAttributes) {
    const { saveEntityRecord } = (0, import_data152.useDispatch)(import_core_data87.store);
    return async (blocks = [], title = (0, import_i18n244.__)("Untitled Template Part")) => {
      const cleanSlug = paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
      const record = {
        title,
        slug: cleanSlug,
        content: (0, import_blocks101.serialize)(blocks),
        // `area` is filterable on the server and defaults to `UNCATEGORIZED`
        // if provided value is not allowed.
        area
      };
      const templatePart = await saveEntityRecord(
        "postType",
        "wp_template_part",
        record
      );
      setAttributes({
        slug: templatePart.slug,
        theme: templatePart.theme,
        area: void 0
      });
    };
  }
  function useTemplatePartArea(area) {
    return (0, import_data152.useSelect)(
      (select10) => {
        const definedAreas = select10(import_core_data87.store).getCurrentTheme()?.default_template_part_areas || [];
        const selectedArea = definedAreas.find(
          (definedArea) => definedArea.area === area
        );
        const defaultArea = definedAreas.find(
          (definedArea) => definedArea.area === "uncategorized"
        );
        return {
          icon: selectedArea?.icon || defaultArea?.icon,
          label: selectedArea?.label || (0, import_i18n244.__)("Template Part"),
          tagName: selectedArea?.area_tag ?? "div"
        };
      },
      [area]
    );
  }

  // packages/block-library/build-module/template-part/edit/title-modal.mjs
  var import_element156 = __toESM(require_element(), 1);
  var import_i18n245 = __toESM(require_i18n(), 1);
  var import_components158 = __toESM(require_components(), 1);
  var import_jsx_runtime538 = __toESM(require_jsx_runtime(), 1);
  function TitleModal({ areaLabel, onClose, onSubmit }) {
    const [title, setTitle] = (0, import_element156.useState)("");
    const submitForCreation = (event) => {
      event.preventDefault();
      onSubmit(title);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(
      import_components158.Modal,
      {
        title: (0, import_i18n245.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n245.__)("Create new %s"),
          areaLabel.toLowerCase()
        ),
        onRequestClose: onClose,
        focusOnMount: "firstContentElement",
        size: "small",
        children: /* @__PURE__ */ (0, import_jsx_runtime538.jsx)("form", { onSubmit: submitForCreation, children: /* @__PURE__ */ (0, import_jsx_runtime538.jsxs)(import_components158.__experimentalVStack, { spacing: "5", children: [
          /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(
            import_components158.TextControl,
            {
              label: (0, import_i18n245.__)("Name"),
              value: title,
              onChange: setTitle,
              placeholder: (0, import_i18n245.__)("Custom Template Part")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime538.jsxs)(import_components158.__experimentalHStack, { justify: "right", children: [
            /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(
              import_components158.Button,
              {
                __next40pxDefaultSize: true,
                variant: "tertiary",
                onClick: () => {
                  onClose();
                  setTitle("");
                },
                children: (0, import_i18n245.__)("Cancel")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime538.jsx)(
              import_components158.Button,
              {
                variant: "primary",
                type: "submit",
                accessibleWhenDisabled: true,
                disabled: !title.length,
                __next40pxDefaultSize: true,
                children: (0, import_i18n245.__)("Create")
              }
            )
          ] })
        ] }) })
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/placeholder.mjs
  var import_jsx_runtime539 = __toESM(require_jsx_runtime(), 1);
  function TemplatePartPlaceholder({
    area,
    clientId,
    templatePartId,
    onOpenSelectionModal,
    setAttributes
  }) {
    const { templateParts, isResolving } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const { isBlockBasedTheme, canCreateTemplatePart } = (0, import_data153.useSelect)(
      (select10) => {
        const { getCurrentTheme, canUser } = select10(import_core_data88.store);
        return {
          isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
          canCreateTemplatePart: canUser("create", {
            kind: "postType",
            name: "wp_template_part"
          })
        };
      },
      []
    );
    const [showTitleModal, setShowTitleModal] = (0, import_element157.useState)(false);
    const areaObject = useTemplatePartArea(area);
    const createFromBlocks = useCreateTemplatePartFromBlocks(
      area,
      setAttributes
    );
    return /* @__PURE__ */ (0, import_jsx_runtime539.jsxs)(
      import_components159.Placeholder,
      {
        icon: getTemplatePartIcon(areaObject.icon),
        label: areaObject.label,
        instructions: isBlockBasedTheme ? (0, import_i18n246.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n246.__)("Choose an existing %s or create a new one."),
          areaObject.label.toLowerCase()
        ) : (0, import_i18n246.sprintf)(
          // Translators: %s as template part area title ("Header", "Footer", etc.).
          (0, import_i18n246.__)("Choose an existing %s."),
          areaObject.label.toLowerCase()
        ),
        children: [
          isResolving && /* @__PURE__ */ (0, import_jsx_runtime539.jsx)(import_components159.Spinner, {}),
          !isResolving && !!(templateParts.length || blockPatterns.length) && /* @__PURE__ */ (0, import_jsx_runtime539.jsx)(
            import_components159.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              onClick: onOpenSelectionModal,
              children: (0, import_i18n246.__)("Choose")
            }
          ),
          !isResolving && isBlockBasedTheme && canCreateTemplatePart && /* @__PURE__ */ (0, import_jsx_runtime539.jsx)(
            import_components159.Button,
            {
              __next40pxDefaultSize: true,
              variant: "secondary",
              onClick: () => {
                setShowTitleModal(true);
              },
              children: (0, import_i18n246.__)("Start blank")
            }
          ),
          showTitleModal && /* @__PURE__ */ (0, import_jsx_runtime539.jsx)(
            TitleModal,
            {
              areaLabel: areaObject.label,
              onClose: () => setShowTitleModal(false),
              onSubmit: (title) => {
                createFromBlocks([], title);
              }
            }
          )
        ]
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/selection-modal.mjs
  var import_element158 = __toESM(require_element(), 1);
  var import_i18n247 = __toESM(require_i18n(), 1);
  var import_notices21 = __toESM(require_notices(), 1);
  var import_data154 = __toESM(require_data(), 1);
  var import_block_editor266 = __toESM(require_block_editor(), 1);
  var import_components160 = __toESM(require_components(), 1);

  // packages/block-library/build-module/template-part/edit/utils/map-template-part-to-block-pattern.mjs
  var import_blocks102 = __toESM(require_blocks(), 1);
  function mapTemplatePartToBlockPattern(templatePart) {
    return {
      name: createTemplatePartId(templatePart.theme, templatePart.slug),
      title: templatePart.title.rendered,
      blocks: (0, import_blocks102.parse)(templatePart.content.raw),
      templatePart
    };
  }

  // packages/block-library/build-module/template-part/edit/selection-modal.mjs
  var import_jsx_runtime540 = __toESM(require_jsx_runtime(), 1);
  function TemplatePartSelectionModal({
    setAttributes,
    onClose,
    templatePartId = null,
    area,
    clientId
  }) {
    const [searchValue, setSearchValue] = (0, import_element158.useState)("");
    const { templateParts } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const filteredTemplateParts = (0, import_element158.useMemo)(() => {
      const partsAsPatterns = templateParts.map(
        (templatePart) => mapTemplatePartToBlockPattern(templatePart)
      );
      return searchPatterns(partsAsPatterns, searchValue);
    }, [templateParts, searchValue]);
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const filteredBlockPatterns = (0, import_element158.useMemo)(() => {
      return searchPatterns(blockPatterns, searchValue);
    }, [blockPatterns, searchValue]);
    const { createSuccessNotice } = (0, import_data154.useDispatch)(import_notices21.store);
    const onTemplatePartSelect = (templatePart) => {
      setAttributes({
        slug: templatePart.slug,
        theme: templatePart.theme,
        area: void 0
      });
      createSuccessNotice(
        (0, import_i18n247.sprintf)(
          /* translators: %s: template part title. */
          (0, import_i18n247.__)('Template Part "%s" inserted.'),
          templatePart.title?.rendered || templatePart.slug
        ),
        {
          type: "snackbar"
        }
      );
      onClose();
    };
    const hasTemplateParts = !!filteredTemplateParts.length;
    const hasBlockPatterns = !!filteredBlockPatterns.length;
    return /* @__PURE__ */ (0, import_jsx_runtime540.jsxs)("div", { className: "block-library-template-part__selection-content", children: [
      /* @__PURE__ */ (0, import_jsx_runtime540.jsx)("div", { className: "block-library-template-part__selection-search", children: /* @__PURE__ */ (0, import_jsx_runtime540.jsx)(
        import_components160.SearchControl,
        {
          onChange: setSearchValue,
          value: searchValue,
          label: (0, import_i18n247.__)("Search"),
          placeholder: (0, import_i18n247.__)("Search")
        }
      ) }),
      hasTemplateParts && /* @__PURE__ */ (0, import_jsx_runtime540.jsxs)("div", { children: [
        /* @__PURE__ */ (0, import_jsx_runtime540.jsx)("h2", { children: (0, import_i18n247.__)("Existing template parts") }),
        /* @__PURE__ */ (0, import_jsx_runtime540.jsx)(
          import_block_editor266.__experimentalBlockPatternsList,
          {
            blockPatterns: filteredTemplateParts,
            onClickPattern: (pattern) => {
              onTemplatePartSelect(pattern.templatePart);
            }
          }
        )
      ] }),
      !hasTemplateParts && !hasBlockPatterns && /* @__PURE__ */ (0, import_jsx_runtime540.jsx)(import_components160.__experimentalHStack, { alignment: "center", children: /* @__PURE__ */ (0, import_jsx_runtime540.jsx)("p", { children: (0, import_i18n247.__)("No results found.") }) })
    ] });
  }

  // packages/block-library/build-module/template-part/edit/advanced-controls.mjs
  var import_core_data90 = __toESM(require_core_data(), 1);
  var import_components162 = __toESM(require_components(), 1);
  var import_i18n249 = __toESM(require_i18n(), 1);
  var import_data156 = __toESM(require_data(), 1);
  var import_block_editor267 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/template-part/edit/import-controls.mjs
  var import_i18n248 = __toESM(require_i18n(), 1);
  var import_element159 = __toESM(require_element(), 1);
  var import_data155 = __toESM(require_data(), 1);
  var import_components161 = __toESM(require_components(), 1);
  var import_core_data89 = __toESM(require_core_data(), 1);
  var import_notices22 = __toESM(require_notices(), 1);

  // packages/block-library/build-module/template-part/edit/utils/transformers.mjs
  var import_blocks103 = __toESM(require_blocks(), 1);
  function transformWidgetToBlock(widget) {
    if (widget.id_base !== "block") {
      let attributes2;
      if (widget._embedded.about[0].is_multi) {
        attributes2 = {
          idBase: widget.id_base,
          instance: widget.instance
        };
      } else {
        attributes2 = {
          id: widget.id
        };
      }
      return switchLegacyWidgetType(
        (0, import_blocks103.createBlock)("core/legacy-widget", attributes2)
      );
    }
    const parsedBlocks = (0, import_blocks103.parse)(widget.instance.raw.content, {
      __unstableSkipAutop: true
    });
    if (!parsedBlocks.length) {
      return void 0;
    }
    const block = parsedBlocks[0];
    if (block.name === "core/widget-group") {
      return (0, import_blocks103.createBlock)(
        (0, import_blocks103.getGroupingBlockName)(),
        void 0,
        transformInnerBlocks(block.innerBlocks)
      );
    }
    if (block.innerBlocks.length > 0) {
      return (0, import_blocks103.cloneBlock)(
        block,
        void 0,
        transformInnerBlocks(block.innerBlocks)
      );
    }
    return block;
  }
  function switchLegacyWidgetType(block) {
    const transforms40 = (0, import_blocks103.getPossibleBlockTransformations)([block]).filter(
      (item) => {
        if (!item.transforms) {
          return true;
        }
        const hasWildCardFrom = item.transforms?.from?.find(
          (from) => from.blocks && from.blocks.includes("*")
        );
        const hasWildCardTo = item.transforms?.to?.find(
          (to) => to.blocks && to.blocks.includes("*")
        );
        return !hasWildCardFrom && !hasWildCardTo;
      }
    );
    if (!transforms40.length) {
      return void 0;
    }
    return (0, import_blocks103.switchToBlockType)(block, transforms40[0].name);
  }
  function transformInnerBlocks(innerBlocks = []) {
    return innerBlocks.flatMap((block) => {
      if (block.name === "core/legacy-widget") {
        return switchLegacyWidgetType(block);
      }
      return (0, import_blocks103.createBlock)(
        block.name,
        block.attributes,
        transformInnerBlocks(block.innerBlocks)
      );
    }).filter((block) => !!block);
  }

  // packages/block-library/build-module/template-part/edit/import-controls.mjs
  var import_jsx_runtime541 = __toESM(require_jsx_runtime(), 1);
  var SIDEBARS_QUERY = {
    per_page: -1,
    _fields: "id,name,description,status,widgets"
  };
  function TemplatePartImportControls({ area, setAttributes }) {
    const [selectedSidebar, setSelectedSidebar] = (0, import_element159.useState)("");
    const [isBusy, setIsBusy] = (0, import_element159.useState)(false);
    const registry = (0, import_data155.useRegistry)();
    const { sidebars, hasResolved } = (0, import_data155.useSelect)((select10) => {
      const { getSidebars, hasFinishedResolution } = select10(import_core_data89.store);
      return {
        sidebars: getSidebars(SIDEBARS_QUERY),
        hasResolved: hasFinishedResolution("getSidebars", [
          SIDEBARS_QUERY
        ])
      };
    }, []);
    const { createErrorNotice } = (0, import_data155.useDispatch)(import_notices22.store);
    const createFromBlocks = useCreateTemplatePartFromBlocks(
      area,
      setAttributes
    );
    const options2 = (0, import_element159.useMemo)(() => {
      const sidebarOptions = (sidebars ?? []).filter(
        (widgetArea) => widgetArea.id !== "wp_inactive_widgets" && widgetArea.widgets.length > 0
      ).map((widgetArea) => {
        return {
          value: widgetArea.id,
          label: widgetArea.name
        };
      });
      if (!sidebarOptions.length) {
        return [];
      }
      return [
        { value: "", label: (0, import_i18n248.__)("Select widget area") },
        ...sidebarOptions
      ];
    }, [sidebars]);
    if (!hasResolved) {
      return /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(import_components161.__experimentalSpacer, { marginBottom: "0" });
    }
    if (hasResolved && !options2.length) {
      return null;
    }
    async function createFromWidgets(event) {
      event.preventDefault();
      if (isBusy || !selectedSidebar) {
        return;
      }
      setIsBusy(true);
      const sidebar = options2.find(
        ({ value }) => value === selectedSidebar
      );
      const { getWidgets } = registry.resolveSelect(import_core_data89.store);
      const widgets = await getWidgets({
        sidebar: sidebar.value,
        _embed: "about"
      });
      const skippedWidgets = /* @__PURE__ */ new Set();
      const blocks = widgets.flatMap((widget) => {
        const block = transformWidgetToBlock(widget);
        if (!block) {
          skippedWidgets.add(widget.id_base);
          return [];
        }
        return block;
      });
      await createFromBlocks(
        blocks,
        /* translators: %s: name of the widget area */
        (0, import_i18n248.sprintf)((0, import_i18n248.__)("Widget area: %s"), sidebar.label)
      );
      if (skippedWidgets.size) {
        createErrorNotice(
          (0, import_i18n248.sprintf)(
            /* translators: %s: the list of widgets */
            (0, import_i18n248.__)("Unable to import the following widgets: %s."),
            Array.from(skippedWidgets).join(", ")
          ),
          {
            type: "snackbar"
          }
        );
      }
      setIsBusy(false);
    }
    return /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(import_components161.__experimentalSpacer, { marginBottom: "4", children: /* @__PURE__ */ (0, import_jsx_runtime541.jsxs)(import_components161.__experimentalHStack, { as: "form", onSubmit: createFromWidgets, children: [
      /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(import_components161.FlexBlock, { children: /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(
        import_components161.SelectControl,
        {
          label: (0, import_i18n248.__)("Import widget area"),
          value: selectedSidebar,
          options: options2,
          onChange: (value) => setSelectedSidebar(value),
          disabled: !options2.length
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(
        import_components161.FlexItem,
        {
          style: {
            marginBottom: "8px",
            marginTop: "auto"
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime541.jsx)(
            import_components161.Button,
            {
              __next40pxDefaultSize: true,
              variant: "primary",
              type: "submit",
              isBusy,
              "aria-disabled": isBusy || !selectedSidebar,
              children: (0, import_i18n248._x)("Import", "button label")
            }
          )
        }
      )
    ] }) });
  }

  // packages/block-library/build-module/template-part/edit/advanced-controls.mjs
  var import_jsx_runtime542 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl7 } = unlock(import_block_editor267.privateApis);
  function TemplatePartAdvancedControls({
    tagName,
    setAttributes,
    isEntityAvailable,
    templatePartId,
    defaultWrapper,
    hasInnerBlocks,
    clientId
  }) {
    const [area, setArea] = (0, import_core_data90.useEntityProp)(
      "postType",
      "wp_template_part",
      "area",
      templatePartId
    );
    const [title, setTitle] = (0, import_core_data90.useEntityProp)(
      "postType",
      "wp_template_part",
      "title",
      templatePartId
    );
    const defaultTemplatePartAreas = (0, import_data156.useSelect)(
      (select10) => select10(import_core_data90.store).getCurrentTheme()?.default_template_part_areas || [],
      []
    );
    const areaOptions = defaultTemplatePartAreas.map(
      ({ label, area: _area }) => ({
        label,
        value: _area
      })
    );
    return /* @__PURE__ */ (0, import_jsx_runtime542.jsxs)(import_jsx_runtime542.Fragment, { children: [
      isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime542.jsxs)(import_jsx_runtime542.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(
          import_components162.TextControl,
          {
            label: (0, import_i18n249.__)("Title"),
            value: title,
            onChange: (value) => {
              setTitle(value);
            },
            onFocus: (event) => event.target.select()
          }
        ),
        /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(
          import_components162.SelectControl,
          {
            label: (0, import_i18n249.__)("Area"),
            labelPosition: "top",
            options: areaOptions,
            value: area,
            onChange: setArea
          }
        )
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(
        HTMLElementControl7,
        {
          tagName: tagName || "",
          onChange: (value) => setAttributes({ tagName: value }),
          clientId,
          options: [
            {
              label: (0, import_i18n249.sprintf)(
                /* translators: %s: HTML tag based on area. */
                (0, import_i18n249.__)("Default based on area (%s)"),
                `<${defaultWrapper}>`
              ),
              value: ""
            },
            { label: "<header>", value: "header" },
            { label: "<main>", value: "main" },
            { label: "<section>", value: "section" },
            { label: "<article>", value: "article" },
            { label: "<aside>", value: "aside" },
            { label: "<footer>", value: "footer" },
            { label: "<div>", value: "div" }
          ]
        }
      ),
      !hasInnerBlocks && /* @__PURE__ */ (0, import_jsx_runtime542.jsx)(
        TemplatePartImportControls,
        {
          area,
          setAttributes
        }
      )
    ] });
  }

  // packages/block-library/build-module/template-part/edit/inner-blocks.mjs
  var import_core_data91 = __toESM(require_core_data(), 1);
  var import_block_editor268 = __toESM(require_block_editor(), 1);
  var import_data157 = __toESM(require_data(), 1);
  var import_element160 = __toESM(require_element(), 1);
  var import_blocks104 = __toESM(require_blocks(), 1);
  var import_jsx_runtime543 = __toESM(require_jsx_runtime(), 1);
  function useRenderAppender(hasInnerBlocks) {
    const blockEditingMode = (0, import_block_editor268.useBlockEditingMode)();
    if (blockEditingMode === "contentOnly") {
      return false;
    }
    if (!hasInnerBlocks) {
      return import_block_editor268.InnerBlocks.ButtonBlockAppender;
    }
  }
  function useLayout(layout) {
    const themeSupportsLayout = (0, import_data157.useSelect)((select10) => {
      const { getSettings: getSettings2 } = select10(import_block_editor268.store);
      return getSettings2()?.supportsLayout;
    }, []);
    const [defaultLayout] = (0, import_block_editor268.useSettings)("layout");
    if (themeSupportsLayout) {
      return layout?.inherit ? defaultLayout || {} : layout;
    }
  }
  function NonEditableTemplatePartPreview({
    postId: id,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    (0, import_block_editor268.useBlockEditingMode)("disabled");
    const { content, editedBlocks } = (0, import_data157.useSelect)(
      (select10) => {
        if (!id) {
          return {};
        }
        const { getEditedEntityRecord } = select10(import_core_data91.store);
        const editedRecord = getEditedEntityRecord(
          "postType",
          "wp_template_part",
          id,
          { context: "view" }
        );
        return {
          editedBlocks: editedRecord.blocks,
          content: editedRecord.content
        };
      },
      [id]
    );
    const blocks = (0, import_element160.useMemo)(() => {
      if (!id) {
        return void 0;
      }
      if (editedBlocks) {
        return editedBlocks;
      }
      if (!content || typeof content !== "string") {
        return [];
      }
      return (0, import_blocks104.parse)(content);
    }, [id, editedBlocks, content]);
    const innerBlocksProps = (0, import_block_editor268.useInnerBlocksProps)(blockProps, {
      value: blocks,
      onInput: () => {
      },
      onChange: () => {
      },
      renderAppender: false,
      layout: useLayout(layout)
    });
    return /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(TagName2, { ...innerBlocksProps });
  }
  function EditableTemplatePartInnerBlocks({
    postId: id,
    hasInnerBlocks,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    const onNavigateToEntityRecord = (0, import_data157.useSelect)(
      (select10) => select10(import_block_editor268.store).getSettings().onNavigateToEntityRecord,
      []
    );
    const [blocks, onInput, onChange] = (0, import_core_data91.useEntityBlockEditor)(
      "postType",
      "wp_template_part",
      { id }
    );
    const innerBlocksProps = (0, import_block_editor268.useInnerBlocksProps)(blockProps, {
      value: blocks,
      onInput,
      onChange,
      renderAppender: useRenderAppender(hasInnerBlocks),
      layout: useLayout(layout)
    });
    const blockEditingMode = (0, import_block_editor268.useBlockEditingMode)();
    const customProps = blockEditingMode === "contentOnly" && onNavigateToEntityRecord ? {
      onDoubleClick: () => onNavigateToEntityRecord({
        postId: id,
        postType: "wp_template_part"
      })
    } : {};
    return /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(TagName2, { ...innerBlocksProps, ...customProps });
  }
  function TemplatePartInnerBlocks({
    postId: id,
    hasInnerBlocks,
    layout,
    tagName: TagName2,
    blockProps
  }) {
    const { canViewTemplatePart, canEditTemplatePart } = (0, import_data157.useSelect)(
      (select10) => {
        return {
          canViewTemplatePart: !!select10(import_core_data91.store).canUser("read", {
            kind: "postType",
            name: "wp_template_part",
            id
          }),
          canEditTemplatePart: !!select10(import_core_data91.store).canUser("update", {
            kind: "postType",
            name: "wp_template_part",
            id
          })
        };
      },
      [id]
    );
    if (!canViewTemplatePart) {
      return null;
    }
    const TemplatePartInnerBlocksComponent = canEditTemplatePart ? EditableTemplatePartInnerBlocks : NonEditableTemplatePartPreview;
    return /* @__PURE__ */ (0, import_jsx_runtime543.jsx)(
      TemplatePartInnerBlocksComponent,
      {
        postId: id,
        hasInnerBlocks,
        layout,
        tagName: TagName2,
        blockProps
      }
    );
  }

  // packages/block-library/build-module/template-part/edit/index.mjs
  var import_jsx_runtime544 = __toESM(require_jsx_runtime(), 1);
  var SUPPORTED_AREAS = ["header", "footer", "navigation-overlay"];
  function ReplaceButton({
    isEntityAvailable,
    area,
    templatePartId,
    isTemplatePartSelectionOpen,
    setIsTemplatePartSelectionOpen
  }) {
    const { templateParts } = useAlternativeTemplateParts(
      area,
      templatePartId
    );
    const hasReplacements = !!templateParts.length;
    const canReplace = isEntityAvailable && hasReplacements && SUPPORTED_AREAS.includes(area);
    if (!canReplace) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
      import_components163.MenuItem,
      {
        onClick: () => {
          setIsTemplatePartSelectionOpen(true);
        },
        "aria-expanded": isTemplatePartSelectionOpen,
        "aria-haspopup": "dialog",
        children: (0, import_i18n250.__)("Replace")
      }
    );
  }
  function TemplatesList({ area, clientId, isEntityAvailable, onSelect }) {
    const blockPatterns = useAlternativeBlockPatterns(area, clientId);
    const canReplace = isEntityAvailable && !!blockPatterns.length && SUPPORTED_AREAS.includes(area);
    if (!canReplace) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_components163.PanelBody, { title: (0, import_i18n250.__)("Design"), children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
      import_block_editor269.__experimentalBlockPatternsList,
      {
        label: (0, import_i18n250.__)("Templates"),
        blockPatterns,
        onClickPattern: onSelect,
        showTitlesAsTooltip: true
      }
    ) });
  }
  function TemplatePartEdit({
    attributes: attributes2,
    setAttributes,
    clientId
  }) {
    const { createSuccessNotice } = (0, import_data158.useDispatch)(import_notices23.store);
    const { editEntityRecord } = (0, import_data158.useDispatch)(import_core_data92.store);
    const currentTheme = (0, import_data158.useSelect)(
      (select10) => select10(import_core_data92.store).getCurrentTheme()?.stylesheet,
      []
    );
    const { slug, theme = currentTheme, tagName, layout = {} } = attributes2;
    const templatePartId = createTemplatePartId(theme, slug);
    const hasAlreadyRendered = (0, import_block_editor269.useHasRecursion)(templatePartId);
    const [isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen] = (0, import_element161.useState)(false);
    const {
      isResolved,
      hasInnerBlocks,
      isMissing,
      area,
      onNavigateToEntityRecord,
      title,
      canUserEdit,
      canUserEditBlock
    } = (0, import_data158.useSelect)(
      (select10) => {
        const { getEditedEntityRecord, hasFinishedResolution } = select10(import_core_data92.store);
        const { getBlockCount, getSettings: getSettings2, canEditBlock } = select10(import_block_editor269.store);
        const getEntityArgs = [
          "postType",
          "wp_template_part",
          templatePartId
        ];
        const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null;
        const _area = entityRecord?.area || attributes2.area;
        const hasResolvedEntity = templatePartId ? hasFinishedResolution(
          "getEditedEntityRecord",
          getEntityArgs
        ) : false;
        const _canUserEdit = hasResolvedEntity ? select10(import_core_data92.store).canUser("update", {
          kind: "postType",
          name: "wp_template_part",
          id: templatePartId
        }) : false;
        return {
          hasInnerBlocks: getBlockCount(clientId) > 0,
          isResolved: hasResolvedEntity,
          isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0),
          area: _area,
          onNavigateToEntityRecord: getSettings2().onNavigateToEntityRecord,
          title: entityRecord?.title,
          canUserEdit: !!_canUserEdit,
          canUserEditBlock: canEditBlock(clientId)
        };
      },
      [templatePartId, attributes2.area, clientId]
    );
    const areaObject = useTemplatePartArea(area);
    const blockProps = (0, import_block_editor269.useBlockProps)();
    const isPlaceholder = !slug;
    const isEntityAvailable = !isPlaceholder && !isMissing && isResolved;
    const TagName2 = tagName || areaObject.tagName;
    const onPatternSelect = async (pattern) => {
      await editEntityRecord(
        "postType",
        "wp_template_part",
        templatePartId,
        {
          blocks: pattern.blocks,
          content: (0, import_blocks105.serialize)(pattern.blocks)
        }
      );
      createSuccessNotice(
        (0, import_i18n250.sprintf)(
          /* translators: %s: template part title. */
          (0, import_i18n250.__)('Template Part "%s" updated.'),
          title || slug
        ),
        {
          type: "snackbar"
        }
      );
    };
    if (!hasInnerBlocks && (slug && !theme || slug && isMissing)) {
      return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.Warning, { children: (0, import_i18n250.sprintf)(
        /* translators: %s: Template part slug. */
        (0, import_i18n250.__)(
          "Template part has been deleted or is unavailable: %s"
        ),
        slug
      ) }) });
    }
    if (isEntityAvailable && hasAlreadyRendered) {
      return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.Warning, { children: (0, import_i18n250.__)("Block cannot be rendered inside itself.") }) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_jsx_runtime544.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime544.jsxs)(import_block_editor269.RecursionProvider, { uniqueId: templatePartId, children: [
        isEntityAvailable && onNavigateToEntityRecord && canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
          import_components163.ToolbarButton,
          {
            onClick: () => {
              onNavigateToEntityRecord({
                postId: templatePartId,
                postType: "wp_template_part"
              });
            },
            children: (0, import_i18n250.__)("Edit original")
          }
        ) }),
        canUserEdit && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
          TemplatePartAdvancedControls,
          {
            tagName,
            setAttributes,
            isEntityAvailable,
            templatePartId,
            defaultWrapper: areaObject.tagName,
            hasInnerBlocks,
            clientId
          }
        ) }),
        isPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
          TemplatePartPlaceholder,
          {
            area: attributes2.area,
            templatePartId,
            clientId,
            setAttributes,
            onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => {
          if (!canUserEditBlock || !(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
            return null;
          }
          return /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
            ReplaceButton,
            {
              ...{
                isEntityAvailable,
                area,
                clientId,
                templatePartId,
                isTemplatePartSelectionOpen,
                setIsTemplatePartSelectionOpen
              }
            }
          );
        } }),
        /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_block_editor269.InspectorControls, { group: "settings", children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
          TemplatesList,
          {
            area,
            clientId,
            isEntityAvailable,
            onSelect: (pattern) => onPatternSelect(pattern)
          }
        ) }),
        isEntityAvailable && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
          TemplatePartInnerBlocks,
          {
            tagName: TagName2,
            blockProps,
            postId: templatePartId,
            hasInnerBlocks,
            layout
          }
        ),
        !isPlaceholder && !isResolved && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(TagName2, { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(import_components163.Spinner, {}) })
      ] }),
      isTemplatePartSelectionOpen && /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
        import_components163.Modal,
        {
          overlayClassName: "block-editor-template-part__selection-modal",
          title: (0, import_i18n250.sprintf)(
            // Translators: %s as template part area title ("Header", "Footer", etc.).
            (0, import_i18n250.__)("Choose a %s"),
            areaObject.label.toLowerCase()
          ),
          onRequestClose: () => setIsTemplatePartSelectionOpen(false),
          isFullScreen: true,
          children: /* @__PURE__ */ (0, import_jsx_runtime544.jsx)(
            TemplatePartSelectionModal,
            {
              templatePartId,
              clientId,
              area,
              setAttributes,
              onClose: () => setIsTemplatePartSelectionOpen(false)
            }
          )
        }
      )
    ] });
  }

  // packages/block-library/build-module/template-part/variations.mjs
  var import_core_data93 = __toESM(require_core_data(), 1);
  var import_data159 = __toESM(require_data(), 1);
  function enhanceTemplatePartVariations(settings117, name118) {
    if (name118 !== "core/template-part") {
      return settings117;
    }
    if (settings117.variations) {
      const isActive = (blockAttributes8, variationAttributes) => {
        const { area, theme, slug } = blockAttributes8;
        if (area) {
          return area === variationAttributes.area;
        }
        if (!slug) {
          return false;
        }
        const { getCurrentTheme, getEntityRecord } = (0, import_data159.select)(import_core_data93.store);
        const entity = getEntityRecord(
          "postType",
          "wp_template_part",
          `${theme || getCurrentTheme()?.stylesheet}//${slug}`
        );
        if (entity?.slug) {
          return entity.slug === variationAttributes.slug;
        }
        return entity?.area === variationAttributes.area;
      };
      const variations19 = settings117.variations.map((variation) => {
        return {
          ...variation,
          ...!variation.isActive && { isActive },
          ...typeof variation.icon === "string" && {
            icon: getTemplatePartIcon(variation.icon)
          }
        };
      });
      return {
        ...settings117,
        variations: variations19
      };
    }
    return settings117;
  }

  // packages/block-library/build-module/template-part/index.mjs
  var { name: name108 } = block_default107;
  var settings107 = {
    icon: symbol_filled_default,
    __experimentalLabel: ({ slug, theme }) => {
      if (!slug) {
        return;
      }
      const { getCurrentTheme, getEditedEntityRecord } = (0, import_data160.select)(import_core_data94.store);
      const entity = getEditedEntityRecord(
        "postType",
        "wp_template_part",
        (theme || getCurrentTheme()?.stylesheet) + "//" + slug
      );
      if (!entity) {
        return;
      }
      return (0, import_html_entities15.decodeEntities)(entity.title) || capitalCase(entity.slug || "");
    },
    edit: TemplatePartEdit
  };
  var init107 = () => {
    (0, import_hooks80.addFilter)(
      "blocks.registerBlockType",
      "core/template-part",
      enhanceTemplatePartVariations
    );
    const DISALLOWED_PARENTS = ["core/post-template", "core/post-content"];
    (0, import_hooks80.addFilter)(
      "blockEditor.__unstableCanInsertBlockType",
      "core/block-library/removeTemplatePartsFromPostTemplates",
      (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
        if (blockType.name !== "core/template-part") {
          return canInsert;
        }
        for (const disallowedParentType of DISALLOWED_PARENTS) {
          const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
            rootClientId,
            disallowedParentType
          ).length;
          if (hasDisallowedParent) {
            return false;
          }
        }
        return true;
      }
    );
    return initBlock({ name: name108, metadata: block_default107, settings: settings107 });
  };

  // packages/block-library/build-module/term-count/index.mjs
  var term_count_exports = {};
  __export(term_count_exports, {
    init: () => init108,
    metadata: () => block_default108,
    name: () => name109,
    settings: () => settings108
  });

  // packages/block-library/build-module/term-count/block.json
  var block_default108 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-count",
    title: "Term Count",
    category: "theme",
    description: "Displays the post count of a taxonomy term.",
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    attributes: {
      bracketType: {
        type: "string",
        enum: ["none", "round", "square", "curly", "angle"],
        default: "round"
      }
    },
    supports: {
      anchor: true,
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true
      },
      color: {
        gradients: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      shadow: true,
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-term-count"
  };

  // packages/block-library/build-module/term-count/edit.mjs
  var import_i18n251 = __toESM(require_i18n(), 1);
  var import_block_editor270 = __toESM(require_block_editor(), 1);
  var import_components165 = __toESM(require_components(), 1);

  // packages/block-library/build-module/term-count/icons.mjs
  var import_components164 = __toESM(require_components(), 1);
  var import_jsx_runtime545 = __toESM(require_jsx_runtime(), 1);
  var bareNumber = /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.Path, { d: "M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z" }) });
  var numberInParenthesis = /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z" }) });
  var numberInSquareBrackets = /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.Path, { d: "M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
  var numberInCurlyBrackets = /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z" }) });
  var numberInAngleBrackets = /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime545.jsx)(import_components164.Path, { d: "M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });

  // packages/block-library/build-module/term-count/use-term-count.mjs
  var import_core_data95 = __toESM(require_core_data(), 1);
  var import_data161 = __toESM(require_data(), 1);
  function useTermCount(termId, taxonomy) {
    const [count] = (0, import_core_data95.useEntityProp)("taxonomy", taxonomy, "count", termId);
    const templateBasedData = useTemplateBasedTermData();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      termCount: hasContext ? count || "" : templateBasedData
    };
  }
  function useTemplateBasedTermData() {
    const templateSlug = (0, import_data161.useSelect)((select10) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select10("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select10(import_core_data95.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data161.useSelect)(
      (select10) => {
        if (!taxonomy || !termSlug) {
          return "";
        }
        const { getEntityRecords } = select10(import_core_data95.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0].count || "";
        }
        return "";
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-count/edit.mjs
  var import_jsx_runtime546 = __toESM(require_jsx_runtime(), 1);
  var BRACKET_TYPES = {
    none: { label: (0, import_i18n251.__)("No brackets"), icon: bareNumber },
    round: {
      label: (0, import_i18n251.__)("Round brackets"),
      icon: numberInParenthesis,
      before: "(",
      after: ")"
    },
    square: {
      label: (0, import_i18n251.__)("Square brackets"),
      icon: numberInSquareBrackets,
      before: "[",
      after: "]"
    },
    curly: {
      label: (0, import_i18n251.__)("Curly brackets"),
      icon: numberInCurlyBrackets,
      before: "{",
      after: "}"
    },
    angle: {
      label: (0, import_i18n251.__)("Angle brackets"),
      icon: numberInAngleBrackets,
      before: "<",
      after: ">"
    }
  };
  function TermCountEdit({
    attributes: attributes2,
    setAttributes,
    context: { termId, taxonomy }
  }) {
    const { bracketType } = attributes2;
    const term = useTermCount(termId, taxonomy);
    const termCount = term?.termCount || 0;
    const blockProps = (0, import_block_editor270.useBlockProps)();
    const bracketTypeControls = Object.entries(BRACKET_TYPES).map(
      ([type, { label, icon: icon2 }]) => ({
        role: "menuitemradio",
        title: label,
        isActive: bracketType === type,
        icon: icon2,
        onClick: () => {
          setAttributes({ bracketType: type });
        }
      })
    );
    const formatTermCount = (count, type) => {
      const { before = "", after = "" } = BRACKET_TYPES[type] || {};
      return `${before}${count}${after}`;
    };
    return /* @__PURE__ */ (0, import_jsx_runtime546.jsxs)(import_jsx_runtime546.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime546.jsx)(import_block_editor270.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime546.jsx)(
        import_components165.ToolbarDropdownMenu,
        {
          icon: BRACKET_TYPES[bracketType]?.icon ?? bareNumber,
          label: (0, import_i18n251.__)("Change bracket type"),
          controls: bracketTypeControls
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime546.jsx)("div", { ...blockProps, children: formatTermCount(termCount, bracketType) })
    ] });
  }

  // packages/block-library/build-module/term-count/index.mjs
  var { name: name109 } = block_default108;
  var settings108 = {
    icon: term_count_default,
    example: {},
    edit: TermCountEdit
  };
  var init108 = () => initBlock({ name: name109, metadata: block_default108, settings: settings108 });

  // packages/block-library/build-module/term-description/index.mjs
  var term_description_exports = {};
  __export(term_description_exports, {
    init: () => init109,
    metadata: () => block_default109,
    name: () => name110,
    settings: () => settings109
  });

  // packages/block-library/build-module/term-description/block.json
  var block_default109 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-description",
    title: "Term Description",
    category: "theme",
    description: "Display the description of categories, tags and custom taxonomies when viewing an archive.",
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        padding: true,
        margin: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      shadow: true,
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    }
  };

  // packages/block-library/build-module/term-description/edit.mjs
  var import_i18n252 = __toESM(require_i18n(), 1);
  var import_block_editor271 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/term-description/use-term-description.mjs
  var import_core_data96 = __toESM(require_core_data(), 1);
  var import_data162 = __toESM(require_data(), 1);
  function useTermDescription(termId, taxonomy) {
    const [description, setDescription, fullDescription] = (0, import_core_data96.useEntityProp)(
      "taxonomy",
      taxonomy,
      "description",
      termId
    );
    const templateBasedData = useTemplateBasedTermData2();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      setDescription,
      termDescription: hasContext ? fullDescription?.rendered || description || "" : templateBasedData
    };
  }
  function useTemplateBasedTermData2() {
    const templateSlug = (0, import_data162.useSelect)((select10) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select10("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select10(import_core_data96.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[1]) {
        taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
      } else if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data162.useSelect)(
      (select10) => {
        if (!taxonomy || !termSlug) {
          return "";
        }
        const { getEntityRecords } = select10(import_core_data96.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0].description || "";
        }
        return "";
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-description/edit.mjs
  var import_jsx_runtime547 = __toESM(require_jsx_runtime(), 1);
  function TermDescriptionEdit({
    context: { termId, taxonomy }
  }) {
    const { termDescription } = useTermDescription(termId, taxonomy);
    const blockProps = (0, import_block_editor271.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(import_jsx_runtime547.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("div", { ...blockProps, children: termDescription ? /* @__PURE__ */ (0, import_jsx_runtime547.jsx)(
      "div",
      {
        dangerouslySetInnerHTML: { __html: termDescription }
      }
    ) : /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("div", { className: "wp-block-term-description__placeholder", children: /* @__PURE__ */ (0, import_jsx_runtime547.jsx)("span", { children: (0, import_i18n252.__)("Term Description") }) }) }) });
  }

  // packages/block-library/build-module/term-description/deprecated.mjs
  var v147 = {
    attributes: {
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      spacing: {
        margin: true,
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: true,
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    },
    save: () => null
  };
  var deprecated_default53 = [v147];

  // packages/block-library/build-module/term-description/index.mjs
  var { name: name110 } = block_default109;
  var settings109 = {
    icon: term_description_default,
    edit: TermDescriptionEdit,
    example: {},
    deprecated: deprecated_default53
  };
  var init109 = () => initBlock({ name: name110, metadata: block_default109, settings: settings109 });

  // packages/block-library/build-module/term-name/index.mjs
  var term_name_exports = {};
  __export(term_name_exports, {
    init: () => init110,
    metadata: () => block_default110,
    name: () => name111,
    settings: () => settings110
  });

  // packages/block-library/build-module/term-name/block.json
  var block_default110 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-name",
    title: "Term Name",
    category: "theme",
    description: "Displays the name of a taxonomy term.",
    keywords: ["term title"],
    textdomain: "default",
    usesContext: ["termId", "taxonomy"],
    attributes: {
      level: {
        type: "number",
        default: 0
      },
      isLink: {
        type: "boolean",
        default: false
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      shadow: true,
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          width: true,
          style: true
        }
      }
    },
    style: "wp-block-term-name"
  };

  // packages/block-library/build-module/term-name/edit.mjs
  var import_i18n253 = __toESM(require_i18n(), 1);
  var import_block_editor272 = __toESM(require_block_editor(), 1);
  var import_components166 = __toESM(require_components(), 1);
  var import_html_entities16 = __toESM(require_html_entities(), 1);

  // packages/block-library/build-module/term-name/use-term-name.mjs
  var import_core_data97 = __toESM(require_core_data(), 1);
  var import_data163 = __toESM(require_data(), 1);
  function useTermName(termId, taxonomy) {
    const contextBasedTerm = (0, import_data163.useSelect)(
      (select10) => {
        if (!termId || !taxonomy) {
          return null;
        }
        return select10(import_core_data97.store).getEntityRecord(
          "taxonomy",
          taxonomy,
          termId
        );
      },
      [termId, taxonomy]
    );
    const templateBasedTerm = useTemplateBasedTermData3();
    const hasContext = Boolean(termId && taxonomy);
    return {
      hasContext,
      term: hasContext ? contextBasedTerm : templateBasedTerm
    };
  }
  function useTemplateBasedTermData3() {
    const templateSlug = (0, import_data163.useSelect)((select10) => {
      const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select10("core/editor");
      const currentPostType = getCurrentPostType();
      const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
      return templateId ? select10(import_core_data97.store).getEditedEntityRecord(
        "postType",
        "wp_template",
        templateId
      )?.slug : null;
    }, []);
    const taxonomyMatches = templateSlug?.match(
      /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
    );
    let taxonomy;
    let termSlug;
    if (taxonomyMatches) {
      if (taxonomyMatches[3]) {
        taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
        termSlug = taxonomyMatches[7];
      }
      taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
    }
    return (0, import_data163.useSelect)(
      (select10) => {
        if (!taxonomy || !termSlug) {
          return null;
        }
        const { getEntityRecords } = select10(import_core_data97.store);
        const termRecords = getEntityRecords("taxonomy", taxonomy, {
          slug: termSlug,
          per_page: 1
        });
        if (termRecords && termRecords[0]) {
          return termRecords[0];
        }
        return null;
      },
      [taxonomy, termSlug]
    );
  }

  // packages/block-library/build-module/term-name/edit.mjs
  var import_jsx_runtime548 = __toESM(require_jsx_runtime(), 1);
  function TermNameEdit({
    attributes: attributes2,
    setAttributes,
    context: { termId, taxonomy }
  }) {
    const { level = 0, isLink, levelOptions } = attributes2;
    const { term } = useTermName(termId, taxonomy);
    const termName2 = term?.name ? (0, import_html_entities16.decodeEntities)(term.name) : (0, import_i18n253.__)("Term Name");
    const blockProps = (0, import_block_editor272.useBlockProps)();
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const TagName2 = level === 0 ? "p" : `h${level}`;
    let termNameDisplay = termName2;
    if (isLink) {
      termNameDisplay = /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
        "a",
        {
          href: "#term-name-pseudo-link",
          onClick: (e3) => e3.preventDefault(),
          children: termName2
        }
      );
    }
    return /* @__PURE__ */ (0, import_jsx_runtime548.jsxs)(import_jsx_runtime548.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(import_block_editor272.BlockControls, { group: "block", children: /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
        import_block_editor272.HeadingLevelDropdown,
        {
          value: level,
          options: levelOptions,
          onChange: (newLevel) => {
            setAttributes({ level: newLevel });
          }
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(import_block_editor272.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
        import_components166.__experimentalToolsPanel,
        {
          label: (0, import_i18n253.__)("Settings"),
          resetAll: () => {
            setAttributes({
              isLink: false
            });
          },
          dropdownMenuProps,
          children: /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
            import_components166.__experimentalToolsPanelItem,
            {
              hasValue: () => !!isLink,
              label: (0, import_i18n253.__)("Make term name a link"),
              onDeselect: () => setAttributes({ isLink: false }),
              isShownByDefault: true,
              children: /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(
                import_components166.ToggleControl,
                {
                  label: (0, import_i18n253.__)("Make term name a link"),
                  onChange: () => setAttributes({ isLink: !isLink }),
                  checked: isLink
                }
              )
            }
          )
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime548.jsx)(TagName2, { ...blockProps, children: termNameDisplay })
    ] });
  }

  // packages/block-library/build-module/term-name/deprecated.mjs
  var v148 = {
    attributes: {
      textAlign: {
        type: "string"
      },
      level: {
        type: "number",
        default: 0
      },
      isLink: {
        type: "boolean",
        default: false
      },
      levelOptions: {
        type: "array"
      }
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true,
          link: true
        }
      },
      spacing: {
        padding: true
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          color: true,
          width: true,
          style: true
        }
      }
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign;
    },
    save: () => null
  };
  var deprecated_default54 = [v148];

  // packages/block-library/build-module/term-name/index.mjs
  var { name: name111 } = block_default110;
  var settings110 = {
    icon: term_name_default,
    example: {},
    edit: TermNameEdit,
    deprecated: deprecated_default54
  };
  var init110 = () => initBlock({ name: name111, metadata: block_default110, settings: settings110 });

  // packages/block-library/build-module/terms-query/index.mjs
  var terms_query_exports = {};
  __export(terms_query_exports, {
    init: () => init111,
    metadata: () => block_default111,
    name: () => name112,
    settings: () => settings111
  });

  // packages/block-library/build-module/terms-query/block.json
  var block_default111 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/terms-query",
    title: "Terms Query",
    category: "theme",
    description: "An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.",
    keywords: ["terms", "taxonomy", "categories", "tags", "list"],
    textdomain: "default",
    attributes: {
      termQuery: {
        type: "object",
        default: {
          perPage: 10,
          taxonomy: "category",
          order: "asc",
          orderBy: "name",
          include: [],
          hideEmpty: true,
          showNested: false,
          inherit: false
        }
      },
      tagName: {
        type: "string",
        default: "div"
      }
    },
    usesContext: ["templateSlug"],
    providesContext: {
      termQuery: "termQuery"
    },
    supports: {
      anchor: true,
      align: ["wide", "full"],
      html: false,
      layout: true,
      interactivity: true
    }
  };

  // packages/block-library/build-module/terms-query/edit/index.mjs
  var import_data167 = __toESM(require_data(), 1);
  var import_block_editor277 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/edit/terms-query-content.mjs
  var import_element164 = __toESM(require_element(), 1);
  var import_block_editor275 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/edit/inspector-controls/index.mjs
  var import_i18n258 = __toESM(require_i18n(), 1);
  var import_components174 = __toESM(require_components(), 1);
  var import_block_editor274 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/terms-query/utils.mjs
  var import_core_data98 = __toESM(require_core_data(), 1);
  var import_data164 = __toESM(require_data(), 1);
  var import_element162 = __toESM(require_element(), 1);
  function usePublicTaxonomies() {
    const taxonomies = (0, import_data164.useSelect)(
      (select10) => select10(import_core_data98.store).getTaxonomies({ per_page: -1 }),
      []
    );
    return (0, import_element162.useMemo)(() => {
      return taxonomies?.filter(
        ({ visibility }) => visibility?.publicly_queryable
      ) || [];
    }, [taxonomies]);
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs
  var import_components167 = __toESM(require_components(), 1);
  var import_jsx_runtime549 = __toESM(require_jsx_runtime(), 1);
  function TaxonomyControl({ value, onChange, ...props }) {
    const taxonomies = usePublicTaxonomies();
    const taxonomyOptions = taxonomies.map((taxonomy) => ({
      label: taxonomy.name,
      value: taxonomy.slug
    }));
    return /* @__PURE__ */ (0, import_jsx_runtime549.jsx)(
      import_components167.SelectControl,
      {
        options: taxonomyOptions,
        value,
        onChange,
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/order-control.mjs
  var import_i18n254 = __toESM(require_i18n(), 1);
  var import_components168 = __toESM(require_components(), 1);
  var import_jsx_runtime550 = __toESM(require_jsx_runtime(), 1);
  function OrderControl3({ orderBy, order, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime550.jsx)(
      import_components168.SelectControl,
      {
        options: [
          {
            label: (0, import_i18n254.__)("Name: A \u2192 Z"),
            value: "name/asc"
          },
          {
            label: (0, import_i18n254.__)("Name: Z \u2192 A"),
            value: "name/desc"
          },
          {
            label: (0, import_i18n254.__)("Count, high to low"),
            value: "count/desc"
          },
          {
            label: (0, import_i18n254.__)("Count, low to high"),
            value: "count/asc"
          }
        ],
        value: orderBy + "/" + order,
        onChange: (value) => {
          const [newOrderBy, newOrder] = value.split("/");
          onChange(newOrderBy, newOrder);
        },
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/empty-terms-control.mjs
  var import_components169 = __toESM(require_components(), 1);
  var import_jsx_runtime551 = __toESM(require_jsx_runtime(), 1);
  function EmptyTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime551.jsx)(
      import_components169.ToggleControl,
      {
        checked: !value,
        onChange: (showEmpty) => onChange(!showEmpty),
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/nested-terms-control.mjs
  var import_components170 = __toESM(require_components(), 1);
  var import_jsx_runtime552 = __toESM(require_jsx_runtime(), 1);
  function NestedTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime552.jsx)(import_components170.ToggleControl, { checked: value, onChange, ...props });
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/inherit-control.mjs
  var import_components171 = __toESM(require_components(), 1);
  var import_i18n255 = __toESM(require_i18n(), 1);
  var import_jsx_runtime553 = __toESM(require_jsx_runtime(), 1);
  function InheritControl({ value, onChange, label }) {
    return /* @__PURE__ */ (0, import_jsx_runtime553.jsxs)(
      import_components171.__experimentalToggleGroupControl,
      {
        label,
        isBlock: true,
        onChange: (newValue) => {
          onChange({
            inherit: newValue === "default"
          });
        },
        help: value ? (0, import_i18n255.__)(
          "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."
        ) : (0, import_i18n255.__)("Display terms based on specific criteria."),
        value: value ? "default" : "custom",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime553.jsx)(
            import_components171.__experimentalToggleGroupControlOption,
            {
              value: "default",
              label: (0, import_i18n255.__)("Default")
            }
          ),
          /* @__PURE__ */ (0, import_jsx_runtime553.jsx)(import_components171.__experimentalToggleGroupControlOption, { value: "custom", label: (0, import_i18n255.__)("Custom") })
        ]
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/max-terms-control.mjs
  var import_i18n256 = __toESM(require_i18n(), 1);
  var import_components172 = __toESM(require_components(), 1);
  var import_jsx_runtime554 = __toESM(require_jsx_runtime(), 1);
  function MaxTermsControl({ value, onChange, ...props }) {
    return /* @__PURE__ */ (0, import_jsx_runtime554.jsx)(
      import_components172.RangeControl,
      {
        value,
        min: 0,
        max: 100,
        onChange,
        help: (0, import_i18n256.__)(
          "Limit the number of terms you want to show. To show all terms, use 0 (zero)."
        ),
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/advanced-controls.mjs
  var import_i18n257 = __toESM(require_i18n(), 1);
  var import_block_editor273 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime555 = __toESM(require_jsx_runtime(), 1);
  var { HTMLElementControl: HTMLElementControl8 } = unlock(import_block_editor273.privateApis);
  function AdvancedControls({
    TagName: TagName2,
    setAttributes,
    clientId
  }) {
    return /* @__PURE__ */ (0, import_jsx_runtime555.jsx)(import_block_editor273.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime555.jsx)(
      HTMLElementControl8,
      {
        tagName: TagName2,
        onChange: (value) => setAttributes({ tagName: value }),
        clientId,
        options: [
          { label: (0, import_i18n257.__)("Default (<div>)"), value: "div" },
          { label: "<main>", value: "main" },
          { label: "<section>", value: "section" },
          { label: "<aside>", value: "aside" }
        ]
      }
    ) });
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/include-control.mjs
  var import_components173 = __toESM(require_components(), 1);
  var import_data165 = __toESM(require_data(), 1);
  var import_core_data99 = __toESM(require_core_data(), 1);
  var import_element163 = __toESM(require_element(), 1);
  var import_compose66 = __toESM(require_compose(), 1);
  var import_html_entities17 = __toESM(require_html_entities(), 1);
  var import_jsx_runtime556 = __toESM(require_jsx_runtime(), 1);
  var EMPTY_ARRAY11 = [];
  var BASE_QUERY3 = {
    order: "asc",
    _fields: "id,name",
    context: "view"
  };
  function IncludeControl({
    value: include,
    taxonomy,
    onChange,
    ...props
  }) {
    const [search, setSearch] = (0, import_element163.useState)("");
    const [value, setValue] = (0, import_element163.useState)(EMPTY_ARRAY11);
    const [suggestions, setSuggestions] = (0, import_element163.useState)(EMPTY_ARRAY11);
    const debouncedSearch = (0, import_compose66.useDebounce)(setSearch, 250);
    const { searchResults, searchHasResolved } = (0, import_data165.useSelect)(
      (select10) => {
        if (!search) {
          return { searchResults: EMPTY_ARRAY11, searchHasResolved: true };
        }
        const { getEntityRecords, hasFinishedResolution } = select10(import_core_data99.store);
        const selectorArgs = [
          "taxonomy",
          taxonomy,
          {
            ...BASE_QUERY3,
            search,
            orderby: "name",
            exclude: include,
            per_page: 20
          }
        ];
        return {
          searchResults: getEntityRecords(...selectorArgs),
          searchHasResolved: hasFinishedResolution(
            "getEntityRecords",
            selectorArgs
          )
        };
      },
      [search, taxonomy, include]
    );
    const currentTerms = (0, import_data165.useSelect)(
      (select10) => {
        if (!include?.length) {
          return EMPTY_ARRAY11;
        }
        const { getEntityRecords } = select10(import_core_data99.store);
        return getEntityRecords("taxonomy", taxonomy, {
          ...BASE_QUERY3,
          include,
          per_page: include.length
        });
      },
      [include, taxonomy]
    );
    (0, import_element163.useEffect)(() => {
      if (!include?.length) {
        setValue(EMPTY_ARRAY11);
      }
      if (!currentTerms?.length) {
        return;
      }
      const sanitizedValue = include.reduce((accumulator, id) => {
        const entity = currentTerms.find((term) => term.id === id);
        if (entity) {
          accumulator.push({
            id,
            value: (0, import_html_entities17.decodeEntities)(entity.name)
          });
        }
        return accumulator;
      }, []);
      setValue(sanitizedValue);
    }, [include, currentTerms]);
    const entitiesInfo = (0, import_element163.useMemo)(() => {
      if (!searchResults?.length) {
        return { names: EMPTY_ARRAY11, mapByName: {} };
      }
      const names = [];
      const mapByName = {};
      searchResults.forEach((result) => {
        const decodedName = (0, import_html_entities17.decodeEntities)(result.name);
        names.push(decodedName);
        mapByName[decodedName] = result;
      });
      return { names, mapByName };
    }, [searchResults]);
    (0, import_element163.useEffect)(() => {
      if (!searchHasResolved) {
        return;
      }
      setSuggestions(entitiesInfo.names);
    }, [entitiesInfo.names, searchHasResolved]);
    const getIdByValue = (entitiesMappedByName, entity) => entity?.id || entitiesMappedByName?.[entity]?.id;
    const onTermChange = (newValue) => {
      const ids = Array.from(
        newValue.reduce((accumulator, entity) => {
          const id = getIdByValue(entitiesInfo.mapByName, entity);
          if (id) {
            accumulator.add(id);
          }
          return accumulator;
        }, /* @__PURE__ */ new Set())
      );
      setSuggestions(EMPTY_ARRAY11);
      onChange(ids);
    };
    return /* @__PURE__ */ (0, import_jsx_runtime556.jsx)(
      import_components173.FormTokenField,
      {
        value,
        onInputChange: debouncedSearch,
        suggestions,
        onChange: onTermChange,
        help: "",
        ...props
      }
    );
  }

  // packages/block-library/build-module/terms-query/edit/inspector-controls/index.mjs
  var import_jsx_runtime557 = __toESM(require_jsx_runtime(), 1);
  function TermsQueryInspectorControls({
    attributes: attributes2,
    setQuery,
    setAttributes,
    clientId,
    templateSlug
  }) {
    const { termQuery, tagName: TagName2 } = attributes2;
    const {
      taxonomy,
      orderBy,
      order,
      hideEmpty,
      inherit,
      showNested,
      perPage,
      include
    } = termQuery;
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const taxonomies = usePublicTaxonomies();
    const isTaxonomyHierarchical = taxonomies.find(
      (_taxonomy) => _taxonomy.slug === taxonomy
    )?.hierarchical;
    const inheritQuery = !!inherit;
    const displayInheritControl = ["taxonomy", "category", "tag", "archive"].includes(templateSlug) || templateSlug?.startsWith("taxonomy-") || templateSlug?.startsWith("category-") || templateSlug?.startsWith("tag-");
    const displayShowNestedControl = isTaxonomyHierarchical;
    const hasIncludeFilter = !!include?.length;
    const queryTypeControlLabel = (0, import_i18n258.__)("Query type");
    const taxonomyControlLabel = (0, import_i18n258.__)("Taxonomy");
    const orderByControlLabel = (0, import_i18n258.__)("Order by");
    const emptyTermsControlLabel = (0, import_i18n258.__)("Show empty terms");
    const nestedTermsControlLabel = (0, import_i18n258.__)("Show nested terms");
    const maxTermsControlLabel = (0, import_i18n258.__)("Max terms");
    const includeControlLabel = (0, import_i18n258.__)("Selected terms");
    return /* @__PURE__ */ (0, import_jsx_runtime557.jsxs)(import_jsx_runtime557.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(import_block_editor274.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime557.jsxs)(
        import_components174.__experimentalToolsPanel,
        {
          label: (0, import_i18n258.__)("Settings"),
          resetAll: () => {
            setAttributes({
              termQuery: {
                taxonomy: "category",
                order: "asc",
                orderBy: "name",
                include: [],
                hideEmpty: true,
                showNested: false,
                inherit: false,
                perPage: 10
              }
            });
          },
          dropdownMenuProps,
          children: [
            displayInheritControl && /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => inherit !== false,
                label: queryTypeControlLabel,
                onDeselect: () => setQuery({ inherit: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  InheritControl,
                  {
                    label: queryTypeControlLabel,
                    value: inherit,
                    onChange: setQuery
                  }
                )
              }
            ),
            !inheritQuery && /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => taxonomy !== "category",
                label: taxonomyControlLabel,
                onDeselect: () => {
                  setQuery({ taxonomy: "category" });
                },
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  TaxonomyControl,
                  {
                    label: taxonomyControlLabel,
                    value: taxonomy,
                    onChange: (value) => (
                      // We also need to reset the include filter when changing taxonomy.
                      setQuery({ taxonomy: value, include: [] })
                    )
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => orderBy !== "name" || order !== "asc",
                label: orderByControlLabel,
                onDeselect: () => setQuery({ orderBy: "name", order: "asc" }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  OrderControl3,
                  {
                    label: orderByControlLabel,
                    ...{ orderBy, order },
                    onChange: (newOrderBy, newOrder) => {
                      setQuery({
                        orderBy: newOrderBy,
                        order: newOrder
                      });
                    },
                    disabled: hasIncludeFilter,
                    help: hasIncludeFilter ? (0, import_i18n258.__)(
                      "When specific terms are selected, the order is based on their selection order."
                    ) : void 0
                  }
                )
              }
            ),
            !inheritQuery && /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => !!include?.length,
                label: includeControlLabel,
                onDeselect: () => setQuery({
                  include: [],
                  orderBy: "name",
                  order: "asc"
                }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  IncludeControl,
                  {
                    label: includeControlLabel,
                    taxonomy,
                    value: include,
                    onChange: (value) => setQuery({ include: value })
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => hideEmpty !== true,
                label: emptyTermsControlLabel,
                onDeselect: () => setQuery({ hideEmpty: true }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  EmptyTermsControl,
                  {
                    label: emptyTermsControlLabel,
                    value: hideEmpty,
                    onChange: (value) => setQuery({ hideEmpty: value })
                  }
                )
              }
            ),
            displayShowNestedControl && /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => showNested !== false,
                label: nestedTermsControlLabel,
                onDeselect: () => setQuery({ showNested: false }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  NestedTermsControl,
                  {
                    label: nestedTermsControlLabel,
                    value: showNested,
                    onChange: (value) => setQuery({ showNested: value }),
                    disabled: hasIncludeFilter,
                    help: hasIncludeFilter ? (0, import_i18n258.__)(
                      "When specific terms are selected, only those are displayed."
                    ) : void 0
                  }
                )
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
              import_components174.__experimentalToolsPanelItem,
              {
                hasValue: () => perPage !== 10,
                label: maxTermsControlLabel,
                onDeselect: () => setQuery({ perPage: 10 }),
                isShownByDefault: true,
                children: /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
                  MaxTermsControl,
                  {
                    label: maxTermsControlLabel,
                    value: perPage,
                    onChange: (value) => setQuery({ perPage: value })
                  }
                )
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime557.jsx)(
        AdvancedControls,
        {
          TagName: TagName2,
          setAttributes,
          clientId
        }
      )
    ] });
  }

  // packages/block-library/build-module/terms-query/edit/terms-query-content.mjs
  var import_jsx_runtime558 = __toESM(require_jsx_runtime(), 1);
  function TermsQueryContent({
    attributes: attributes2,
    setAttributes,
    clientId,
    context
  }) {
    const { tagName: TagName2 } = attributes2;
    const blockProps = (0, import_block_editor275.useBlockProps)();
    const innerBlocksProps = (0, import_block_editor275.useInnerBlocksProps)(blockProps, {});
    const setQuery = (0, import_element164.useCallback)(
      (newQuery) => setAttributes((prevAttributes) => ({
        termQuery: { ...prevAttributes.termQuery, ...newQuery }
      })),
      [setAttributes]
    );
    return /* @__PURE__ */ (0, import_jsx_runtime558.jsxs)(import_jsx_runtime558.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime558.jsx)(
        TermsQueryInspectorControls,
        {
          attributes: attributes2,
          setQuery,
          setAttributes,
          clientId,
          templateSlug: context?.templateSlug
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime558.jsx)(TagName2, { ...innerBlocksProps })
    ] });
  }

  // packages/block-library/build-module/terms-query/edit/terms-query-placeholder.mjs
  var import_data166 = __toESM(require_data(), 1);
  var import_blocks106 = __toESM(require_blocks(), 1);
  var import_block_editor276 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime559 = __toESM(require_jsx_runtime(), 1);
  function TermsQueryPlaceholder({
    attributes: attributes2,
    clientId,
    name: name118
  }) {
    const { blockType, activeBlockVariation, scopeVariations } = (0, import_data166.useSelect)(
      (select10) => {
        const {
          getActiveBlockVariation,
          getBlockType: getBlockType6,
          getBlockVariations: getBlockVariations4
        } = select10(import_blocks106.store);
        return {
          blockType: getBlockType6(name118),
          activeBlockVariation: getActiveBlockVariation(
            name118,
            attributes2
          ),
          scopeVariations: getBlockVariations4(name118, "block")
        };
      },
      [name118, attributes2]
    );
    const icon2 = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
    const label = activeBlockVariation?.title || blockType?.title;
    const { replaceInnerBlocks } = (0, import_data166.useDispatch)(import_block_editor276.store);
    const blockProps = (0, import_block_editor276.useBlockProps)();
    return /* @__PURE__ */ (0, import_jsx_runtime559.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime559.jsx)(
      import_block_editor276.__experimentalBlockVariationPicker,
      {
        icon: icon2,
        label,
        variations: scopeVariations,
        onSelect: (variation) => {
          if (variation.innerBlocks) {
            replaceInnerBlocks(
              clientId,
              (0, import_blocks106.createBlocksFromInnerBlocksTemplate)(
                variation.innerBlocks
              ),
              false
            );
          }
        }
      }
    ) });
  }

  // packages/block-library/build-module/terms-query/edit/index.mjs
  var import_jsx_runtime560 = __toESM(require_jsx_runtime(), 1);
  var TermsQueryEdit = (props) => {
    const hasInnerBlocks = (0, import_data167.useSelect)(
      (select10) => !!select10(import_block_editor277.store).getBlocks(props.clientId).length,
      [props.clientId]
    );
    const Component = hasInnerBlocks ? TermsQueryContent : TermsQueryPlaceholder;
    return /* @__PURE__ */ (0, import_jsx_runtime560.jsx)(Component, { ...props });
  };
  var edit_default35 = TermsQueryEdit;

  // packages/block-library/build-module/terms-query/save.mjs
  var import_block_editor278 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime561 = __toESM(require_jsx_runtime(), 1);
  function save49({ attributes: { tagName: Tag = "div" } }) {
    const blockProps = import_block_editor278.useBlockProps.save();
    const innerBlocksProps = import_block_editor278.useInnerBlocksProps.save(blockProps);
    return /* @__PURE__ */ (0, import_jsx_runtime561.jsx)(Tag, { ...innerBlocksProps });
  }

  // packages/block-library/build-module/terms-query/variations.mjs
  var import_i18n259 = __toESM(require_i18n(), 1);
  var import_components175 = __toESM(require_components(), 1);
  var import_jsx_runtime562 = __toESM(require_jsx_runtime(), 1);
  var titleDate2 = /* @__PURE__ */ (0, import_jsx_runtime562.jsx)(import_components175.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime562.jsx)(import_components175.Path, { d: "M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z" }) });
  var titleExcerpt2 = /* @__PURE__ */ (0, import_jsx_runtime562.jsx)(import_components175.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0, import_jsx_runtime562.jsx)(import_components175.Path, { d: "m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z" }) });
  var termName = [
    "core/term-name",
    {
      isLink: true
    }
  ];
  var variations18 = [
    {
      name: "name",
      title: (0, import_i18n259.__)("Name"),
      description: (0, import_i18n259.__)("Display the terms' names."),
      attributes: {},
      icon: titleDate2,
      scope: ["block"],
      innerBlocks: [["core/term-template", {}, [termName]]]
    },
    {
      name: "name-count",
      title: (0, import_i18n259.__)("Name & Count"),
      description: (0, import_i18n259.__)(
        "Display the terms' names and number of posts assigned to each term."
      ),
      attributes: {},
      icon: titleExcerpt2,
      scope: ["block"],
      innerBlocks: [
        [
          "core/term-template",
          {},
          [
            [
              "core/group",
              { layout: { type: "flex", flexWrap: "nowrap" } },
              [termName, ["core/term-count"]]
            ]
          ]
        ]
      ]
    }
  ];
  var variations_default18 = variations18;

  // packages/block-library/build-module/terms-query/index.mjs
  var { name: name112 } = block_default111;
  var TEMPLATE18 = [["core/term-template"]];
  var settings111 = {
    icon: loop_default,
    template: TEMPLATE18,
    edit: edit_default35,
    save: save49,
    example: {},
    variations: variations_default18
  };
  var init111 = () => initBlock({ name: name112, metadata: block_default111, settings: settings111 });

  // packages/block-library/build-module/term-template/index.mjs
  var term_template_exports = {};
  __export(term_template_exports, {
    init: () => init112,
    metadata: () => block_default112,
    name: () => name113,
    settings: () => settings112
  });

  // packages/block-library/build-module/term-template/block.json
  var block_default112 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/term-template",
    title: "Term Template",
    category: "theme",
    ancestor: ["core/terms-query"],
    description: "Contains the block elements used to render a taxonomy term, like the name, description, and more.",
    textdomain: "default",
    usesContext: ["termQuery"],
    supports: {
      anchor: true,
      reusable: false,
      html: false,
      align: ["wide", "full"],
      layout: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalFontWeight: true,
        __experimentalFontStyle: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalLetterSpacing: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      spacing: {
        margin: true,
        padding: true,
        blockGap: {
          __experimentalDefault: "1.25em"
        },
        __experimentalDefaultControls: {
          blockGap: true,
          padding: false,
          margin: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true
      },
      shadow: true
    },
    style: "wp-block-term-template",
    editorStyle: "wp-block-term-template-editor"
  };

  // packages/block-library/build-module/term-template/edit.mjs
  var import_components176 = __toESM(require_components(), 1);
  var import_element165 = __toESM(require_element(), 1);
  var import_data168 = __toESM(require_data(), 1);
  var import_i18n260 = __toESM(require_i18n(), 1);
  var import_block_editor279 = __toESM(require_block_editor(), 1);
  var import_core_data100 = __toESM(require_core_data(), 1);
  var import_jsx_runtime563 = __toESM(require_jsx_runtime(), 1);
  var INNER_BLOCKS_LAYOUT2 = { type: "default" };
  function TermTemplateInnerBlocks({ classList }) {
    const innerBlocksProps = (0, import_block_editor279.useInnerBlocksProps)(
      { className: clsx_default("wp-block-term", classList) },
      {
        __unstableDisableLayoutClassNames: true,
        layout: INNER_BLOCKS_LAYOUT2
      }
    );
    return /* @__PURE__ */ (0, import_jsx_runtime563.jsx)("li", { ...innerBlocksProps });
  }
  function TermTemplateBlockPreview({
    blocks,
    blockContextId,
    classList,
    isHidden,
    setActiveBlockContextId
  }) {
    const blockPreviewProps = (0, import_block_editor279.__experimentalUseBlockPreview)({
      blocks,
      props: {
        className: clsx_default("wp-block-term", classList)
      }
    });
    const handleOnClick = () => {
      setActiveBlockContextId(blockContextId);
    };
    const style2 = {
      display: isHidden ? "none" : void 0
    };
    return /* @__PURE__ */ (0, import_jsx_runtime563.jsx)(
      "li",
      {
        ...blockPreviewProps,
        tabIndex: 0,
        role: "button",
        onClick: handleOnClick,
        onKeyPress: handleOnClick,
        style: style2
      }
    );
  }
  var MemoizedTermTemplateBlockPreview = (0, import_element165.memo)(TermTemplateBlockPreview);
  function TermTemplateEdit({
    clientId,
    attributes: { layout },
    setAttributes,
    context: {
      termQuery: {
        taxonomy,
        order,
        orderBy,
        hideEmpty,
        showNested = false,
        perPage,
        include
      } = {}
    },
    __unstableLayoutClassNames
  }) {
    const { type: layoutType, columnCount = 3 } = layout || {};
    const [activeBlockContextId, setActiveBlockContextId] = (0, import_element165.useState)();
    const queryArgs = {
      hide_empty: hideEmpty,
      order,
      orderby: orderBy,
      // There is a mismatch between `WP_Term_Query` and the REST API parameter default
      // values to fetch all items. In `WP_Term_Query`, the default is `''|0` and in
      // the REST API is `-1`.
      per_page: perPage || -1
    };
    if (!showNested && !include?.length) {
      queryArgs.parent = 0;
    }
    if (include?.length) {
      queryArgs.include = include;
      queryArgs.orderby = "include";
      queryArgs.order = "asc";
    }
    const { records: terms } = (0, import_core_data100.useEntityRecords)(
      "taxonomy",
      taxonomy,
      queryArgs
    );
    const blocks = (0, import_data168.useSelect)(
      (select10) => select10(import_block_editor279.store).getBlocks(clientId),
      [clientId]
    );
    const blockProps = (0, import_block_editor279.useBlockProps)({
      className: __unstableLayoutClassNames
    });
    const blockContexts = (0, import_element165.useMemo)(
      () => terms?.map((term) => ({
        taxonomy,
        termId: term.id,
        classList: `term-${term.id}`,
        termData: term
      })),
      [terms, taxonomy]
    );
    if (!terms) {
      return /* @__PURE__ */ (0, import_jsx_runtime563.jsx)("ul", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime563.jsx)("li", { className: "wp-block-term term-loading", children: /* @__PURE__ */ (0, import_jsx_runtime563.jsx)("div", { className: "term-loading-placeholder" }) }) });
    }
    if (!terms.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime563.jsxs)("p", { ...blockProps, children: [
        " ",
        (0, import_i18n260.__)("No terms found.")
      ] });
    }
    const setDisplayLayout = (newDisplayLayout) => setAttributes((prevAttributes) => ({
      layout: { ...prevAttributes.layout, ...newDisplayLayout }
    }));
    return /* @__PURE__ */ (0, import_jsx_runtime563.jsxs)(import_jsx_runtime563.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime563.jsx)(import_block_editor279.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime563.jsx)(
        import_components176.ToolbarGroup,
        {
          controls: [
            {
              icon: list_default,
              title: (0, import_i18n260._x)(
                "List view",
                "Term template block display setting"
              ),
              onClick: () => setDisplayLayout({ type: "default" }),
              isActive: layoutType === "default" || layoutType === "constrained"
            },
            {
              icon: grid_default,
              title: (0, import_i18n260._x)(
                "Grid view",
                "Term template block display setting"
              ),
              onClick: () => setDisplayLayout({
                type: "grid",
                columnCount
              }),
              isActive: layoutType === "grid"
            }
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime563.jsx)("ul", { ...blockProps, children: blockContexts?.map((blockContext) => /* @__PURE__ */ (0, import_jsx_runtime563.jsxs)(
        import_block_editor279.BlockContextProvider,
        {
          value: blockContext,
          children: [
            blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId) ? /* @__PURE__ */ (0, import_jsx_runtime563.jsx)(
              TermTemplateInnerBlocks,
              {
                classList: blockContext.classList
              }
            ) : null,
            /* @__PURE__ */ (0, import_jsx_runtime563.jsx)(
              MemoizedTermTemplateBlockPreview,
              {
                blocks,
                blockContextId: blockContext.termId,
                classList: blockContext.classList,
                setActiveBlockContextId,
                isHidden: blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId)
              }
            )
          ]
        },
        blockContext.termId
      )) })
    ] });
  }

  // packages/block-library/build-module/term-template/save.mjs
  var import_block_editor280 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime564 = __toESM(require_jsx_runtime(), 1);
  function TermTemplateSave() {
    return /* @__PURE__ */ (0, import_jsx_runtime564.jsx)(import_block_editor280.InnerBlocks.Content, {});
  }

  // packages/block-library/build-module/term-template/index.mjs
  var { name: name113 } = block_default112;
  var TEMPLATE19 = [["core/term-name"]];
  var settings112 = {
    icon: layout_default,
    template: TEMPLATE19,
    edit: TermTemplateEdit,
    save: TermTemplateSave,
    example: {}
  };
  var init112 = () => initBlock({ name: name113, metadata: block_default112, settings: settings112 });

  // packages/block-library/build-module/text-columns/index.mjs
  var text_columns_exports = {};
  __export(text_columns_exports, {
    init: () => init113,
    metadata: () => block_default113,
    name: () => name114,
    settings: () => settings113
  });

  // packages/block-library/build-module/text-columns/edit.mjs
  var import_i18n261 = __toESM(require_i18n(), 1);
  var import_components177 = __toESM(require_components(), 1);
  var import_block_editor281 = __toESM(require_block_editor(), 1);
  var import_deprecated61 = __toESM(require_deprecated(), 1);
  var import_jsx_runtime565 = __toESM(require_jsx_runtime(), 1);
  function TextColumnsEdit({ attributes: attributes2, setAttributes }) {
    const { width, content, columns } = attributes2;
    (0, import_deprecated61.default)("The Text Columns block", {
      since: "5.3",
      alternative: "the Columns block"
    });
    return /* @__PURE__ */ (0, import_jsx_runtime565.jsxs)(import_jsx_runtime565.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(import_block_editor281.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(
        import_block_editor281.BlockAlignmentToolbar,
        {
          value: width,
          onChange: (nextWidth) => setAttributes({ width: nextWidth }),
          controls: ["center", "wide", "full"]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(import_block_editor281.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(import_components177.PanelBody, { children: /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(
        import_components177.RangeControl,
        {
          label: (0, import_i18n261.__)("Columns"),
          value: columns,
          onChange: (value) => setAttributes({ columns: value }),
          min: 2,
          max: 4,
          required: true
        }
      ) }) }),
      /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(
        "div",
        {
          ...(0, import_block_editor281.useBlockProps)({
            className: `align${width} columns-${columns}`
          }),
          children: Array.from({ length: columns }).map((_2, index2) => {
            return /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(
              "div",
              {
                className: "wp-block-column",
                children: /* @__PURE__ */ (0, import_jsx_runtime565.jsx)(
                  import_block_editor281.RichText,
                  {
                    tagName: "p",
                    value: content?.[index2]?.children,
                    onChange: (nextContent) => {
                      setAttributes({
                        content: [
                          ...content.slice(0, index2),
                          { children: nextContent },
                          ...content.slice(index2 + 1)
                        ]
                      });
                    },
                    "aria-label": (0, import_i18n261.sprintf)(
                      // translators: %d: column index (starting with 1)
                      (0, import_i18n261.__)("Column %d text"),
                      index2 + 1
                    ),
                    placeholder: (0, import_i18n261.__)("New Column")
                  }
                )
              },
              `column-${index2}`
            );
          })
        }
      )
    ] });
  }

  // packages/block-library/build-module/text-columns/block.json
  var block_default113 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/text-columns",
    title: "Text Columns (deprecated)",
    icon: "columns",
    category: "design",
    description: "This block is deprecated. Please use the Columns block instead.",
    textdomain: "default",
    attributes: {
      content: {
        type: "array",
        source: "query",
        selector: "p",
        query: {
          children: {
            type: "string",
            source: "html"
          }
        },
        default: [{}, {}]
      },
      columns: {
        type: "number",
        default: 2
      },
      width: {
        type: "string"
      }
    },
    supports: {
      inserter: false,
      interactivity: {
        clientNavigation: true
      }
    },
    editorStyle: "wp-block-text-columns-editor",
    style: "wp-block-text-columns"
  };

  // packages/block-library/build-module/text-columns/save.mjs
  var import_block_editor282 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime566 = __toESM(require_jsx_runtime(), 1);
  function save50({ attributes: attributes2 }) {
    const { width, content, columns } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime566.jsx)(
      "div",
      {
        ...import_block_editor282.useBlockProps.save({
          className: `align${width} columns-${columns}`
        }),
        children: Array.from({ length: columns }).map((_2, index2) => /* @__PURE__ */ (0, import_jsx_runtime566.jsx)("div", { className: "wp-block-column", children: /* @__PURE__ */ (0, import_jsx_runtime566.jsx)(
          import_block_editor282.RichText.Content,
          {
            tagName: "p",
            value: content?.[index2]?.children
          }
        ) }, `column-${index2}`))
      }
    );
  }

  // packages/block-library/build-module/text-columns/transforms.mjs
  var import_blocks107 = __toESM(require_blocks(), 1);
  var transforms37 = {
    to: [
      {
        type: "block",
        blocks: ["core/columns"],
        transform: ({ className, columns, content, width }) => (0, import_blocks107.createBlock)(
          "core/columns",
          {
            align: "wide" === width || "full" === width ? width : void 0,
            className,
            columns
          },
          content.map(
            ({ children }) => (0, import_blocks107.createBlock)("core/column", {}, [
              (0, import_blocks107.createBlock)("core/paragraph", {
                content: children
              })
            ])
          )
        )
      }
    ]
  };
  var transforms_default38 = transforms37;

  // packages/block-library/build-module/text-columns/index.mjs
  var { name: name114 } = block_default113;
  var settings113 = {
    transforms: transforms_default38,
    getEditWrapperProps(attributes2) {
      const { width } = attributes2;
      if ("wide" === width || "full" === width) {
        return { "data-align": width };
      }
    },
    edit: TextColumnsEdit,
    save: save50
  };
  var init113 = () => initBlock({ name: name114, metadata: block_default113, settings: settings113 });

  // packages/block-library/build-module/verse/index.mjs
  var verse_exports = {};
  __export(verse_exports, {
    init: () => init114,
    metadata: () => block_default114,
    name: () => name115,
    settings: () => settings114
  });
  var import_i18n263 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/verse/deprecated.mjs
  var import_block_editor283 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime567 = __toESM(require_jsx_runtime(), 1);
  var v149 = {
    attributes: {
      content: {
        type: "string",
        source: "html",
        selector: "pre",
        default: ""
      },
      textAlign: {
        type: "string"
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime567.jsx)(
        import_block_editor283.RichText.Content,
        {
          tagName: "pre",
          style: { textAlign },
          value: content
        }
      );
    },
    migrate: migrate_text_align_default
  };
  var v223 = {
    attributes: {
      content: {
        type: "string",
        source: "html",
        selector: "pre",
        default: "",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      color: {
        gradients: true,
        link: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true
      },
      spacing: {
        padding: true
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime567.jsx)("pre", { ...import_block_editor283.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime567.jsx)(import_block_editor283.RichText.Content, { value: content }) });
    },
    migrate(attributes2) {
      return migrate_text_align_default(migrate_font_family_default(attributes2));
    },
    isEligible({ style: style2, textAlign }) {
      return style2?.typography?.fontFamily || !!textAlign;
    }
  };
  var v314 = {
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      },
      textAlign: {
        type: "string"
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true
      },
      color: {
        gradients: true,
        link: true
      },
      dimensions: {
        minHeight: true
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true
      },
      spacing: {
        margin: true,
        padding: true
      },
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    save({ attributes: attributes2 }) {
      const { textAlign, content } = attributes2;
      const className = clsx_default({
        [`has-text-align-${textAlign}`]: textAlign
      });
      return /* @__PURE__ */ (0, import_jsx_runtime567.jsx)("pre", { ...import_block_editor283.useBlockProps.save({ className }), children: /* @__PURE__ */ (0, import_jsx_runtime567.jsx)(import_block_editor283.RichText.Content, { value: content }) });
    },
    migrate: migrate_text_align_default,
    isEligible(attributes2) {
      return !!attributes2.textAlign || !!attributes2.className?.match(
        /\bhas-text-align-(left|center|right)\b/
      );
    }
  };
  var deprecated_default55 = [v314, v223, v149];

  // packages/block-library/build-module/verse/edit.mjs
  var import_i18n262 = __toESM(require_i18n(), 1);
  var import_block_editor284 = __toESM(require_block_editor(), 1);
  var import_blocks108 = __toESM(require_blocks(), 1);
  var import_jsx_runtime568 = __toESM(require_jsx_runtime(), 1);
  function VerseEdit(props) {
    const {
      attributes: attributes2,
      setAttributes,
      mergeBlocks,
      onRemove,
      insertBlocksAfter,
      style: style2
    } = props;
    const { content } = attributes2;
    useDeprecatedTextAlign(props);
    const blockProps = (0, import_block_editor284.useBlockProps)({ style: style2 });
    return /* @__PURE__ */ (0, import_jsx_runtime568.jsx)(
      import_block_editor284.RichText,
      {
        tagName: "pre",
        identifier: "content",
        preserveWhiteSpace: true,
        value: content,
        onChange: (nextContent) => {
          setAttributes({
            content: nextContent
          });
        },
        "aria-label": (0, import_i18n262.__)("Poetry text"),
        placeholder: (0, import_i18n262.__)("Write poetry\u2026"),
        onRemove,
        onMerge: mergeBlocks,
        ...blockProps,
        __unstablePastePlainText: true,
        __unstableOnSplitAtDoubleLineEnd: insertBlocksAfter ? () => insertBlocksAfter(
          (0, import_blocks108.createBlock)((0, import_blocks108.getDefaultBlockName)())
        ) : void 0
      }
    );
  }

  // packages/block-library/build-module/verse/block.json
  var block_default114 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/verse",
    title: "Poetry",
    category: "text",
    description: "Insert poetry. Use special spacing formats. Or quote song lyrics.",
    keywords: ["poetry", "poem", "verse", "stanza", "song", "lyrics"],
    textdomain: "default",
    attributes: {
      content: {
        type: "rich-text",
        source: "rich-text",
        selector: "pre",
        __unstablePreserveWhiteSpace: true,
        role: "content"
      }
    },
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      color: {
        gradients: true,
        link: true,
        __experimentalDefaultControls: {
          background: true,
          text: true
        }
      },
      dimensions: {
        minHeight: true,
        __experimentalDefaultControls: {
          minHeight: false
        }
      },
      typography: {
        fontSize: true,
        __experimentalFontFamily: true,
        lineHeight: true,
        textAlign: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalTextDecoration: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      __experimentalBorder: {
        radius: true,
        width: true,
        color: true,
        style: true
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-verse",
    editorStyle: "wp-block-verse-editor"
  };

  // packages/block-library/build-module/verse/save.mjs
  var import_block_editor285 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime569 = __toESM(require_jsx_runtime(), 1);
  function save51({ attributes: attributes2 }) {
    const { content } = attributes2;
    return /* @__PURE__ */ (0, import_jsx_runtime569.jsx)("pre", { ...import_block_editor285.useBlockProps.save(), children: /* @__PURE__ */ (0, import_jsx_runtime569.jsx)(import_block_editor285.RichText.Content, { value: content }) });
  }

  // packages/block-library/build-module/verse/transforms.mjs
  var import_blocks109 = __toESM(require_blocks(), 1);
  var transforms38 = {
    from: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks109.createBlock)("core/verse", attributes2)
      }
    ],
    to: [
      {
        type: "block",
        blocks: ["core/paragraph"],
        transform: (attributes2) => (0, import_blocks109.createBlock)("core/paragraph", attributes2)
      }
    ]
  };
  var transforms_default39 = transforms38;

  // packages/block-library/build-module/verse/index.mjs
  var { name: name115 } = block_default114;
  var settings114 = {
    icon: verse_default,
    example: {
      attributes: {
        /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
        // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
        content: (0, import_i18n263.__)(
          "WHAT was he doing, the great god Pan,\n	Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n    With the dragon-fly on the river."
        )
        /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
      }
    },
    transforms: transforms_default39,
    deprecated: deprecated_default55,
    merge(attributes2, attributesToMerge) {
      return {
        content: attributes2.content + "\n\n" + attributesToMerge.content
      };
    },
    edit: VerseEdit,
    save: save51
  };
  var init114 = () => initBlock({ name: name115, metadata: block_default114, settings: settings114 });

  // packages/block-library/build-module/video/index.mjs
  var video_exports = {};
  __export(video_exports, {
    init: () => init115,
    metadata: () => block_default115,
    name: () => name116,
    settings: () => settings115
  });
  var import_i18n267 = __toESM(require_i18n(), 1);

  // packages/block-library/build-module/video/deprecated.mjs
  var import_block_editor286 = __toESM(require_block_editor(), 1);

  // packages/block-library/build-module/video/block.json
  var block_default115 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/video",
    title: "Video",
    category: "media",
    description: "Embed a video from your media library or upload a new one.",
    keywords: ["movie"],
    textdomain: "default",
    attributes: {
      autoplay: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "autoplay"
      },
      caption: {
        type: "rich-text",
        source: "rich-text",
        selector: "figcaption",
        role: "content"
      },
      controls: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "controls",
        default: true
      },
      id: {
        type: "number",
        role: "content"
      },
      loop: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "loop"
      },
      muted: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "muted"
      },
      poster: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "poster"
      },
      preload: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "preload",
        default: "metadata"
      },
      blob: {
        type: "string",
        role: "local"
      },
      src: {
        type: "string",
        source: "attribute",
        selector: "video",
        attribute: "src",
        role: "content"
      },
      width: {
        type: "number"
      },
      height: {
        type: "number"
      },
      playsInline: {
        type: "boolean",
        source: "attribute",
        selector: "video",
        attribute: "playsinline"
      },
      tracks: {
        role: "content",
        type: "array",
        items: {
          type: "object"
        },
        default: []
      }
    },
    supports: {
      anchor: true,
      align: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      interactivity: {
        clientNavigation: true
      },
      shadow: {
        __experimentalSkipSerialization: true
      }
    },
    selectors: {
      shadow: ".wp-block-video video"
    },
    editorStyle: "wp-block-video-editor",
    style: "wp-block-video"
  };

  // packages/block-library/build-module/video/tracks.mjs
  var import_jsx_runtime570 = __toESM(require_jsx_runtime(), 1);
  function Tracks({ tracks = [] }) {
    return tracks.map((track) => {
      const { id, ...trackAttrs } = track;
      return /* @__PURE__ */ (0, import_jsx_runtime570.jsx)("track", { ...trackAttrs }, id ?? trackAttrs.src);
    });
  }

  // packages/block-library/build-module/video/deprecated.mjs
  var import_jsx_runtime571 = __toESM(require_jsx_runtime(), 1);
  var { attributes: blockAttributes7 } = block_default115;
  var v150 = {
    attributes: blockAttributes7,
    save({ attributes: attributes2 }) {
      const {
        autoplay,
        caption,
        controls,
        loop,
        muted,
        poster,
        preload,
        src,
        playsInline,
        tracks
      } = attributes2;
      return /* @__PURE__ */ (0, import_jsx_runtime571.jsxs)("figure", { ...import_block_editor286.useBlockProps.save(), children: [
        src && /* @__PURE__ */ (0, import_jsx_runtime571.jsx)(
          "video",
          {
            autoPlay: autoplay,
            controls,
            loop,
            muted,
            poster,
            preload: preload !== "metadata" ? preload : void 0,
            src,
            playsInline,
            children: /* @__PURE__ */ (0, import_jsx_runtime571.jsx)(Tracks, { tracks })
          }
        ),
        !import_block_editor286.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime571.jsx)(import_block_editor286.RichText.Content, { tagName: "figcaption", value: caption })
      ] });
    }
  };
  var deprecated21 = [v150];
  var deprecated_default56 = deprecated21;

  // packages/block-library/build-module/video/edit.mjs
  var import_blob20 = __toESM(require_blob(), 1);
  var import_components180 = __toESM(require_components(), 1);
  var import_block_editor288 = __toESM(require_block_editor(), 1);
  var import_element168 = __toESM(require_element(), 1);
  var import_i18n266 = __toESM(require_i18n(), 1);
  var import_data170 = __toESM(require_data(), 1);
  var import_notices24 = __toESM(require_notices(), 1);
  var import_url27 = __toESM(require_url(), 1);

  // packages/block-library/build-module/video/edit-common-settings.mjs
  var import_i18n264 = __toESM(require_i18n(), 1);
  var import_components178 = __toESM(require_components(), 1);
  var import_element166 = __toESM(require_element(), 1);
  var import_jsx_runtime572 = __toESM(require_jsx_runtime(), 1);
  var options = [
    { value: "auto", label: (0, import_i18n264.__)("Auto") },
    { value: "metadata", label: (0, import_i18n264.__)("Metadata") },
    { value: "none", label: (0, import_i18n264._x)("None", "Preload value") }
  ];
  var VideoSettings = ({ setAttributes, attributes: attributes2 }) => {
    const { autoplay, controls, loop, muted, playsInline, preload } = attributes2;
    const autoPlayHelpText = (0, import_i18n264.__)(
      "Autoplay may cause usability issues for some users."
    );
    const getAutoplayHelp = (0, import_element166.useCallback)((checked) => {
      return checked ? autoPlayHelpText : null;
    }, []);
    const toggleFactory = (0, import_element166.useMemo)(() => {
      const toggleAttribute = (attribute) => {
        return (newValue) => {
          setAttributes({
            [attribute]: newValue,
            // Set muted and playsInLine when autoplay changes
            // playsInline is set to true when autoplay is true to support iOS devices
            ...attribute === "autoplay" && {
              muted: newValue,
              playsInline: newValue
            }
          });
        };
      };
      return {
        autoplay: toggleAttribute("autoplay"),
        loop: toggleAttribute("loop"),
        muted: toggleAttribute("muted"),
        controls: toggleAttribute("controls"),
        playsInline: toggleAttribute("playsInline")
      };
    }, []);
    const onChangePreload = (0, import_element166.useCallback)((value) => {
      setAttributes({ preload: value });
    }, []);
    return /* @__PURE__ */ (0, import_jsx_runtime572.jsxs)(import_jsx_runtime572.Fragment, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Autoplay"),
          isShownByDefault: true,
          hasValue: () => !!autoplay,
          onDeselect: () => {
            setAttributes({ autoplay: false, muted: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.ToggleControl,
            {
              label: (0, import_i18n264.__)("Autoplay"),
              onChange: toggleFactory.autoplay,
              checked: !!autoplay,
              help: getAutoplayHelp
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Loop"),
          isShownByDefault: true,
          hasValue: () => !!loop,
          onDeselect: () => {
            setAttributes({ loop: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.ToggleControl,
            {
              label: (0, import_i18n264.__)("Loop"),
              onChange: toggleFactory.loop,
              checked: !!loop
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Muted"),
          isShownByDefault: true,
          hasValue: () => !!muted,
          onDeselect: () => {
            setAttributes({ muted: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.ToggleControl,
            {
              label: (0, import_i18n264.__)("Muted"),
              onChange: toggleFactory.muted,
              checked: !!muted,
              disabled: autoplay,
              help: autoplay ? (0, import_i18n264.__)("Muted because of Autoplay.") : null
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Playback controls"),
          isShownByDefault: true,
          hasValue: () => !controls,
          onDeselect: () => {
            setAttributes({ controls: true });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.ToggleControl,
            {
              label: (0, import_i18n264.__)("Playback controls"),
              onChange: toggleFactory.controls,
              checked: !!controls
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Play inline"),
          isShownByDefault: true,
          hasValue: () => !!playsInline,
          onDeselect: () => {
            setAttributes({ playsInline: false });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.ToggleControl,
            {
              label: (0, import_i18n264.__)("Play inline"),
              onChange: toggleFactory.playsInline,
              checked: !!playsInline,
              disabled: autoplay,
              help: autoplay ? (0, import_i18n264.__)("Play inline enabled because of Autoplay.") : (0, import_i18n264.__)(
                "When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player."
              )
            }
          )
        }
      ),
      /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
        import_components178.__experimentalToolsPanelItem,
        {
          label: (0, import_i18n264.__)("Preload"),
          isShownByDefault: true,
          hasValue: () => preload !== "metadata",
          onDeselect: () => {
            setAttributes({ preload: "metadata" });
          },
          children: /* @__PURE__ */ (0, import_jsx_runtime572.jsx)(
            import_components178.SelectControl,
            {
              label: (0, import_i18n264.__)("Preload"),
              value: preload,
              onChange: onChangePreload,
              options,
              hideCancelButton: true
            }
          )
        }
      )
    ] });
  };
  var edit_common_settings_default = VideoSettings;

  // packages/block-library/build-module/video/tracks-editor.mjs
  var import_i18n265 = __toESM(require_i18n(), 1);
  var import_components179 = __toESM(require_components(), 1);
  var import_block_editor287 = __toESM(require_block_editor(), 1);
  var import_data169 = __toESM(require_data(), 1);
  var import_element167 = __toESM(require_element(), 1);
  var import_url26 = __toESM(require_url(), 1);
  var import_jsx_runtime573 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_TYPES = ["text/vtt"];
  var DEFAULT_KIND = "subtitles";
  var KIND_OPTIONS = [
    { label: (0, import_i18n265.__)("Subtitles"), value: "subtitles" },
    { label: (0, import_i18n265.__)("Captions"), value: "captions" },
    { label: (0, import_i18n265.__)("Descriptions"), value: "descriptions" },
    { label: (0, import_i18n265.__)("Chapters"), value: "chapters" },
    { label: (0, import_i18n265.__)("Metadata"), value: "metadata" }
  ];
  var DEFAULT_TRACK = {
    src: "",
    label: "",
    srcLang: "en",
    kind: DEFAULT_KIND,
    default: false
  };
  function TrackList({ tracks, onEditPress }) {
    const content = tracks.map((track, index2) => {
      return /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(
        import_components179.__experimentalHStack,
        {
          className: "block-library-video-tracks-editor__track-list-track",
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)("span", { children: track.label }),
            /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_components179.__experimentalHStack, { justify: "flex-end", children: [
              track.default && /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(Badge, { intent: "none", children: (0, import_i18n265.__)("Default") }),
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                import_components179.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "tertiary",
                  onClick: () => onEditPress(index2),
                  "aria-label": (0, import_i18n265.sprintf)(
                    /* translators: %s: Label of the video text track e.g: "French subtitles". */
                    (0, import_i18n265._x)("Edit %s", "text tracks"),
                    track.label
                  ),
                  children: (0, import_i18n265.__)("Edit")
                }
              )
            ] })
          ]
        },
        track.id ?? track.src
      );
    });
    return /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
      import_components179.MenuGroup,
      {
        label: (0, import_i18n265.__)("Text tracks"),
        className: "block-library-video-tracks-editor__track-list",
        children: content
      }
    );
  }
  function SingleTrackEditor({
    track,
    onChange,
    onClose,
    onRemove,
    allowSettingDefault
  }) {
    const [trackState, setTrackState] = (0, import_element167.useState)({
      ...DEFAULT_TRACK,
      ...track
    });
    const { src, label, srcLang, kind, default: isDefaultTrack } = trackState;
    const fileName = src.startsWith("blob:") ? "" : (0, import_url26.getFilename)(src) || "";
    return /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(
      import_components179.__experimentalVStack,
      {
        className: "block-library-video-tracks-editor__single-track-editor",
        spacing: "4",
        children: [
          /* @__PURE__ */ (0, import_jsx_runtime573.jsx)("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label", children: (0, import_i18n265.__)("Edit track") }),
          /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)("span", { children: [
            (0, import_i18n265.__)("File"),
            ": ",
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)("b", { children: fileName })
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_components179.__experimentalGrid, { columns: 2, gap: 4, children: [
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
              import_components179.TextControl,
              {
                onChange: (newLabel) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  label: newLabel
                })),
                label: (0, import_i18n265.__)("Label"),
                value: label,
                help: (0, import_i18n265.__)("Title of track")
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
              import_components179.TextControl,
              {
                onChange: (newSrcLang) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  srcLang: newSrcLang
                })),
                label: (0, import_i18n265.__)("Source language"),
                value: srcLang,
                help: (0, import_i18n265.__)("Language tag (en, fr, etc.)")
              }
            )
          ] }),
          /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_components179.__experimentalVStack, { spacing: "4", children: [
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
              import_components179.SelectControl,
              {
                className: "block-library-video-tracks-editor__single-track-editor-kind-select",
                options: KIND_OPTIONS,
                value: kind,
                label: (0, import_i18n265.__)("Kind"),
                onChange: (newKind) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  kind: newKind
                }))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
              import_components179.ToggleControl,
              {
                label: (0, import_i18n265.__)("Set as default track"),
                checked: isDefaultTrack,
                disabled: !allowSettingDefault,
                onChange: (defaultTrack) => setTrackState((prevTrackState) => ({
                  ...prevTrackState,
                  default: defaultTrack
                }))
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_components179.__experimentalHStack, { className: "block-library-video-tracks-editor__single-track-editor-buttons-container", children: [
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                import_components179.Button,
                {
                  __next40pxDefaultSize: true,
                  isDestructive: true,
                  variant: "link",
                  onClick: onRemove,
                  children: (0, import_i18n265.__)("Remove track")
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                import_components179.Button,
                {
                  __next40pxDefaultSize: true,
                  variant: "primary",
                  onClick: () => {
                    onChange(trackState);
                    onClose();
                  },
                  children: (0, import_i18n265.__)("Apply")
                }
              )
            ] })
          ] })
        ]
      }
    );
  }
  function TracksEditor({ tracks = [], onChange }) {
    const mediaUpload = (0, import_data169.useSelect)((select10) => {
      return select10(import_block_editor287.store).getSettings().mediaUpload;
    }, []);
    const [trackBeingEdited, setTrackBeingEdited] = (0, import_element167.useState)(null);
    const dropdownPopoverRef = (0, import_element167.useRef)();
    const handleTrackSelect = (selectedTracks = [], appendTracks = false) => {
      const existingTracksMap = new Map(
        tracks.map((track) => [track.id, track])
      );
      const tracksToAdd = selectedTracks.map(({ id, title, url }) => {
        if (existingTracksMap.has(id)) {
          return existingTracksMap.get(id);
        }
        return {
          ...DEFAULT_TRACK,
          id,
          label: title || "",
          src: url
        };
      });
      if (tracksToAdd.length === 0) {
        return;
      }
      onChange([...appendTracks ? tracks : [], ...tracksToAdd]);
    };
    function uploadFiles(event) {
      const files = event.target.files;
      mediaUpload({
        allowedTypes: ALLOWED_TYPES,
        filesList: files,
        onFileChange: (selectedTracks) => {
          if (!Array.isArray(selectedTracks)) {
            return;
          }
          const uploadedTracks = selectedTracks.filter(
            (track) => !!track?.id
          );
          if (!uploadedTracks.length) {
            return;
          }
          handleTrackSelect(uploadedTracks, true);
        }
      });
    }
    (0, import_element167.useEffect)(() => {
      dropdownPopoverRef.current?.focus();
    }, [trackBeingEdited]);
    if (!mediaUpload) {
      return null;
    }
    return /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
      import_components179.Dropdown,
      {
        contentClassName: "block-library-video-tracks-editor",
        focusOnMount: true,
        popoverProps: {
          ref: dropdownPopoverRef
        },
        renderToggle: ({ isOpen, onToggle }) => {
          const handleOnToggle = () => {
            if (!isOpen) {
              setTrackBeingEdited(null);
            }
            onToggle();
          };
          return /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(import_components179.ToolbarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
            import_components179.ToolbarButton,
            {
              "aria-expanded": isOpen,
              "aria-haspopup": "true",
              onClick: handleOnToggle,
              children: (0, import_i18n265.__)("Text tracks")
            }
          ) });
        },
        renderContent: () => {
          if (trackBeingEdited !== null) {
            return /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
              SingleTrackEditor,
              {
                track: tracks[trackBeingEdited],
                onChange: (newTrack) => {
                  const newTracks = [...tracks];
                  newTracks[trackBeingEdited] = newTrack;
                  onChange(newTracks);
                },
                onClose: () => setTrackBeingEdited(null),
                onRemove: () => {
                  onChange(
                    tracks.filter(
                      (_track, index2) => index2 !== trackBeingEdited
                    )
                  );
                  setTrackBeingEdited(null);
                },
                allowSettingDefault: !tracks.some((track) => track.default) || tracks[trackBeingEdited].default
              }
            );
          }
          return /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_jsx_runtime573.Fragment, { children: [
            tracks.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)("div", { className: "block-library-video-tracks-editor__tracks-informative-message", children: [
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)("h2", { className: "block-library-video-tracks-editor__tracks-informative-message-title", children: (0, import_i18n265.__)("Text tracks") }),
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)("p", { className: "block-library-video-tracks-editor__tracks-informative-message-description", children: (0, import_i18n265.__)(
                "Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users."
              ) })
            ] }),
            /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_components179.NavigableMenu, { children: [
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                TrackList,
                {
                  tracks,
                  onEditPress: setTrackBeingEdited
                }
              ),
              /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                import_components179.MenuGroup,
                {
                  className: "block-library-video-tracks-editor__add-tracks-container",
                  label: (0, import_i18n265.__)("Add tracks"),
                  children: /* @__PURE__ */ (0, import_jsx_runtime573.jsxs)(import_block_editor287.MediaUploadCheck, { children: [
                    /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                      import_block_editor287.MediaUpload,
                      {
                        onSelect: handleTrackSelect,
                        allowedTypes: ALLOWED_TYPES,
                        value: tracks.map(({ id }) => id),
                        multiple: true,
                        render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                          import_components179.MenuItem,
                          {
                            icon: media_default,
                            onClick: open,
                            children: (0, import_i18n265.__)("Open Media Library")
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                      import_components179.FormFileUpload,
                      {
                        onChange: uploadFiles,
                        accept: ".vtt,text/vtt",
                        multiple: true,
                        render: ({ openFileDialog }) => {
                          return /* @__PURE__ */ (0, import_jsx_runtime573.jsx)(
                            import_components179.MenuItem,
                            {
                              icon: upload_default,
                              onClick: openFileDialog,
                              children: (0, import_i18n265._x)("Upload", "verb")
                            }
                          );
                        }
                      }
                    )
                  ] })
                }
              )
            ] })
          ] });
        }
      }
    );
  }

  // packages/block-library/build-module/video/edit.mjs
  var import_jsx_runtime574 = __toESM(require_jsx_runtime(), 1);
  var ALLOWED_MEDIA_TYPES10 = ["video"];
  function VideoEdit({
    isSelected: isSingleSelected,
    attributes: attributes2,
    className,
    setAttributes,
    insertBlocksAfter,
    onReplace
  }) {
    const videoPlayer = (0, import_element168.useRef)();
    const {
      id,
      controls,
      poster,
      src,
      tracks,
      width,
      height,
      autoplay,
      loop,
      muted,
      playsInline
    } = attributes2;
    const aspectRatio = width && height ? `${width} / ${height}` : void 0;
    const videoStyle = {
      ...aspectRatio && { aspectRatio },
      ...(0, import_block_editor288.__experimentalGetShadowClassesAndStyles)(attributes2).style
    };
    const [temporaryURL, setTemporaryURL] = (0, import_element168.useState)(attributes2.blob);
    const dropdownMenuProps = useToolsPanelDropdownMenuProps();
    const blockEditingMode = (0, import_block_editor288.useBlockEditingMode)();
    const hasNonContentControls = blockEditingMode === "default";
    useUploadMediaFromBlobURL({
      url: temporaryURL,
      allowedTypes: ALLOWED_MEDIA_TYPES10,
      onChange: onSelectVideo,
      onError: onUploadError
    });
    (0, import_element168.useEffect)(() => {
      if (videoPlayer.current) {
        videoPlayer.current.load();
      }
    }, [poster]);
    function onSelectVideo(media) {
      if (!media || !media.url) {
        setAttributes({
          src: void 0,
          id: void 0,
          poster: void 0,
          caption: void 0,
          blob: void 0
        });
        setTemporaryURL();
        return;
      }
      if ((0, import_blob20.isBlobURL)(media.url)) {
        setTemporaryURL(media.url);
        return;
      }
      setAttributes({
        blob: void 0,
        src: media.url,
        id: media.id,
        poster: media.image?.src !== media.icon ? media.image?.src : void 0,
        caption: media.caption
      });
      setTemporaryURL();
    }
    function onSelectURL(newSrc) {
      if (newSrc !== src) {
        const url = (0, import_url27.prependHTTPS)(newSrc);
        const embedBlock = createUpgradedEmbedBlock({
          attributes: { url }
        });
        if (void 0 !== embedBlock && onReplace) {
          onReplace(embedBlock);
          return;
        }
        setAttributes({
          blob: void 0,
          src: url,
          id: void 0,
          poster: void 0
        });
        setTemporaryURL();
      }
    }
    const { createErrorNotice } = (0, import_data170.useDispatch)(import_notices24.store);
    function onUploadError(message) {
      createErrorNotice(message, { type: "snackbar" });
    }
    const placeholder2 = (content) => {
      return /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
        import_components180.Placeholder,
        {
          className: "block-editor-media-placeholder",
          withIllustration: !isSingleSelected,
          icon: video_default,
          label: (0, import_i18n266.__)("Video"),
          instructions: (0, import_i18n266.__)(
            "Drag and drop a video, upload, or choose from your library."
          ),
          children: content
        }
      );
    };
    const classes = clsx_default(className, {
      "is-transient": !!temporaryURL
    });
    const blockProps = (0, import_block_editor288.useBlockProps)({
      className: classes
    });
    if (!src && !temporaryURL) {
      return /* @__PURE__ */ (0, import_jsx_runtime574.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
        import_block_editor288.MediaPlaceholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(import_block_editor288.BlockIcon, { icon: video_default }),
          onSelect: onSelectVideo,
          onSelectURL,
          accept: "video/*",
          allowedTypes: ALLOWED_MEDIA_TYPES10,
          value: attributes2,
          onError: onUploadError,
          placeholder: placeholder2
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime574.jsxs)(import_jsx_runtime574.Fragment, { children: [
      isSingleSelected && /* @__PURE__ */ (0, import_jsx_runtime574.jsxs)(import_jsx_runtime574.Fragment, { children: [
        /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(import_block_editor288.BlockControls, { children: /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
          TracksEditor,
          {
            tracks,
            onChange: (newTracks) => {
              setAttributes({ tracks: newTracks });
            }
          }
        ) }),
        /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(import_block_editor288.BlockControls, { group: "other", children: /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
          import_block_editor288.MediaReplaceFlow,
          {
            mediaId: id,
            mediaURL: src,
            allowedTypes: ALLOWED_MEDIA_TYPES10,
            accept: "video/*",
            onSelect: onSelectVideo,
            onSelectURL,
            onError: onUploadError,
            onReset: () => onSelectVideo(void 0),
            variant: "toolbar"
          }
        ) })
      ] }),
      /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(import_block_editor288.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime574.jsxs)(
        import_components180.__experimentalToolsPanel,
        {
          label: (0, import_i18n266.__)("Settings"),
          resetAll: () => {
            setAttributes({
              autoplay: false,
              controls: true,
              loop: false,
              muted: false,
              playsInline: false,
              preload: "metadata",
              poster: void 0
            });
          },
          dropdownMenuProps,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
              edit_common_settings_default,
              {
                setAttributes,
                attributes: attributes2
              }
            ),
            /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
              poster_image_default,
              {
                poster,
                onChange: (posterImage) => setAttributes({
                  poster: posterImage?.url
                })
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ (0, import_jsx_runtime574.jsxs)("figure", { ...blockProps, children: [
        /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
          "video",
          {
            controls,
            inert: !isSingleSelected ? "true" : void 0,
            poster,
            src: src || temporaryURL,
            ref: videoPlayer,
            autoPlay: autoplay,
            loop,
            muted,
            playsInline,
            width,
            height,
            style: Object.keys(videoStyle).length ? videoStyle : void 0,
            children: /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(Tracks, { tracks })
          }
        ),
        !!temporaryURL && /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(import_components180.Spinner, {}),
        /* @__PURE__ */ (0, import_jsx_runtime574.jsx)(
          Caption,
          {
            attributes: attributes2,
            setAttributes,
            isSelected: isSingleSelected,
            insertBlocksAfter,
            label: (0, import_i18n266.__)("Video caption text"),
            showToolbarButton: isSingleSelected && hasNonContentControls
          }
        )
      ] })
    ] });
  }
  var edit_default36 = VideoEdit;

  // packages/block-library/build-module/video/save.mjs
  var import_block_editor289 = __toESM(require_block_editor(), 1);
  var import_jsx_runtime575 = __toESM(require_jsx_runtime(), 1);
  function save52({ attributes: attributes2 }) {
    const {
      autoplay,
      caption,
      controls,
      loop,
      muted,
      poster,
      preload,
      src,
      playsInline,
      tracks,
      width,
      height
    } = attributes2;
    const aspectRatio = width && height ? `${width} / ${height}` : void 0;
    const videoStyle = {
      ...aspectRatio && { aspectRatio },
      ...(0, import_block_editor289.__experimentalGetShadowClassesAndStyles)(attributes2).style
    };
    return /* @__PURE__ */ (0, import_jsx_runtime575.jsxs)("figure", { ...import_block_editor289.useBlockProps.save(), children: [
      src && /* @__PURE__ */ (0, import_jsx_runtime575.jsx)(
        "video",
        {
          autoPlay: autoplay,
          controls,
          loop,
          muted,
          poster,
          preload: preload !== "metadata" ? preload : void 0,
          src,
          playsInline,
          width,
          height,
          style: Object.keys(videoStyle).length ? videoStyle : void 0,
          children: /* @__PURE__ */ (0, import_jsx_runtime575.jsx)(Tracks, { tracks })
        }
      ),
      !import_block_editor289.RichText.isEmpty(caption) && /* @__PURE__ */ (0, import_jsx_runtime575.jsx)(
        import_block_editor289.RichText.Content,
        {
          className: (0, import_block_editor289.__experimentalGetElementClassName)("caption"),
          tagName: "figcaption",
          value: caption
        }
      )
    ] });
  }

  // packages/block-library/build-module/video/transforms.mjs
  var import_blob21 = __toESM(require_blob(), 1);
  var import_blocks110 = __toESM(require_blocks(), 1);
  var transforms39 = {
    from: [
      {
        type: "files",
        isMatch(files) {
          return files.length === 1 && files[0].type.indexOf("video/") === 0;
        },
        transform(files) {
          const file = files[0];
          const block = (0, import_blocks110.createBlock)("core/video", {
            blob: (0, import_blob21.createBlobURL)(file)
          });
          return block;
        }
      },
      {
        type: "shortcode",
        tag: "video",
        attributes: {
          src: {
            type: "string",
            shortcode: ({
              named: { src, mp4, m4v, webm, ogv, flv }
            }) => {
              return src || mp4 || m4v || webm || ogv || flv;
            }
          },
          poster: {
            type: "string",
            shortcode: ({ named: { poster } }) => {
              return poster;
            }
          },
          loop: {
            type: "string",
            shortcode: ({ named: { loop } }) => {
              return loop;
            }
          },
          autoplay: {
            type: "string",
            shortcode: ({ named: { autoplay } }) => {
              return autoplay;
            }
          },
          preload: {
            type: "string",
            shortcode: ({ named: { preload } }) => {
              return preload;
            }
          }
        }
      },
      {
        type: "raw",
        isMatch: (node) => node.nodeName === "P" && node.children.length === 1 && node.firstChild.nodeName === "VIDEO",
        transform: (node) => {
          const videoElement = node.firstChild;
          const attributes2 = {
            autoplay: videoElement.hasAttribute("autoplay") ? true : void 0,
            controls: videoElement.hasAttribute("controls") ? void 0 : false,
            loop: videoElement.hasAttribute("loop") ? true : void 0,
            muted: videoElement.hasAttribute("muted") ? true : void 0,
            preload: videoElement.getAttribute("preload") || void 0,
            playsInline: videoElement.hasAttribute("playsinline") ? true : void 0,
            poster: videoElement.getAttribute("poster") || void 0,
            src: videoElement.getAttribute("src") || void 0
          };
          if ((0, import_blob21.isBlobURL)(attributes2.src)) {
            attributes2.blob = attributes2.src;
            delete attributes2.src;
          }
          return (0, import_blocks110.createBlock)("core/video", attributes2);
        }
      }
    ]
  };
  var transforms_default40 = transforms39;

  // packages/block-library/build-module/video/index.mjs
  var { name: name116 } = block_default115;
  var settings115 = {
    icon: video_default,
    example: {
      attributes: {
        src: "https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",
        // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
        caption: (0, import_i18n267.__)("Wood thrush singing in Central Park, NYC.")
      }
    },
    transforms: transforms_default40,
    deprecated: deprecated_default56,
    edit: edit_default36,
    save: save52
  };
  var init115 = () => initBlock({ name: name116, metadata: block_default115, settings: settings115 });

  // packages/block-library/build-module/footnotes/index.mjs
  var footnotes_exports = {};
  __export(footnotes_exports, {
    init: () => init116,
    metadata: () => block_default116,
    name: () => name117,
    settings: () => settings116
  });
  var import_rich_text10 = __toESM(require_rich_text(), 1);

  // packages/block-library/build-module/footnotes/edit.mjs
  var import_block_editor290 = __toESM(require_block_editor(), 1);
  var import_core_data101 = __toESM(require_core_data(), 1);
  var import_i18n268 = __toESM(require_i18n(), 1);
  var import_components181 = __toESM(require_components(), 1);
  var import_jsx_runtime576 = __toESM(require_jsx_runtime(), 1);
  function FootnotesEdit({ context: { postType, postId } }) {
    const [meta, updateMeta] = (0, import_core_data101.useEntityProp)(
      "postType",
      postType,
      "meta",
      postId
    );
    const footnotesSupported = "string" === typeof meta?.footnotes;
    let parsed;
    try {
      parsed = JSON.parse(meta?.footnotes || "[]");
    } catch {
    }
    const footnotes = Array.isArray(parsed) ? parsed : [];
    const blockProps = (0, import_block_editor290.useBlockProps)();
    if (!footnotesSupported) {
      return /* @__PURE__ */ (0, import_jsx_runtime576.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime576.jsx)(
        import_components181.Placeholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime576.jsx)(import_block_editor290.BlockIcon, { icon: format_list_numbered_default }),
          label: (0, import_i18n268.__)("Footnotes"),
          instructions: (0, import_i18n268.__)(
            "Footnotes are not supported here. Add this block to post or page content."
          )
        }
      ) });
    }
    if (!footnotes.length) {
      return /* @__PURE__ */ (0, import_jsx_runtime576.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0, import_jsx_runtime576.jsx)(
        import_components181.Placeholder,
        {
          icon: /* @__PURE__ */ (0, import_jsx_runtime576.jsx)(import_block_editor290.BlockIcon, { icon: format_list_numbered_default }),
          label: (0, import_i18n268.__)("Footnotes"),
          instructions: (0, import_i18n268.__)(
            "Footnotes found in blocks within this document will be displayed here."
          )
        }
      ) });
    }
    return /* @__PURE__ */ (0, import_jsx_runtime576.jsx)("ol", { ...blockProps, children: footnotes.map(({ id, content }) => (
      /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
      /* @__PURE__ */ (0, import_jsx_runtime576.jsxs)(
        "li",
        {
          onMouseDown: (event) => {
            if (event.target === event.currentTarget) {
              event.target.firstElementChild.focus();
              event.preventDefault();
            }
          },
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime576.jsx)(
              import_block_editor290.RichText,
              {
                id,
                tagName: "span",
                value: content,
                identifier: id,
                onFocus: (event) => {
                  if (!event.target.textContent.trim()) {
                    event.target.scrollIntoView();
                  }
                },
                onChange: (nextFootnote) => {
                  updateMeta({
                    ...meta,
                    footnotes: JSON.stringify(
                      footnotes.map((footnote) => {
                        return footnote.id === id ? {
                          content: nextFootnote,
                          id
                        } : footnote;
                      })
                    )
                  });
                }
              }
            ),
            " ",
            /* @__PURE__ */ (0, import_jsx_runtime576.jsx)("a", { href: `#${id}-link`, children: "\u21A9\uFE0E" })
          ]
        },
        id
      )
    )) });
  }

  // packages/block-library/build-module/footnotes/block.json
  var block_default116 = {
    $schema: "https://schemas.wp.org/trunk/block.json",
    apiVersion: 3,
    name: "core/footnotes",
    title: "Footnotes",
    category: "text",
    description: "Display footnotes added to the page.",
    keywords: ["references"],
    textdomain: "default",
    usesContext: ["postId", "postType"],
    supports: {
      anchor: true,
      background: {
        backgroundImage: true,
        backgroundSize: true,
        gradient: true,
        __experimentalDefaultControls: {
          backgroundImage: true,
          gradient: true
        }
      },
      __experimentalBorder: {
        radius: true,
        color: true,
        width: true,
        style: true,
        __experimentalDefaultControls: {
          radius: false,
          color: false,
          width: false,
          style: false
        }
      },
      color: {
        background: true,
        link: true,
        text: true,
        __experimentalDefaultControls: {
          link: true,
          text: true
        }
      },
      html: false,
      multiple: false,
      reusable: false,
      inserter: false,
      shadow: true,
      spacing: {
        margin: true,
        padding: true,
        __experimentalDefaultControls: {
          margin: false,
          padding: false
        }
      },
      typography: {
        fontSize: true,
        lineHeight: true,
        __experimentalFontFamily: true,
        __experimentalTextDecoration: true,
        __experimentalFontStyle: true,
        __experimentalFontWeight: true,
        __experimentalLetterSpacing: true,
        __experimentalTextTransform: true,
        __experimentalWritingMode: true,
        __experimentalDefaultControls: {
          fontSize: true
        }
      },
      interactivity: {
        clientNavigation: true
      }
    },
    style: "wp-block-footnotes"
  };

  // node_modules/uuid/dist/stringify.js
  var byteToHex = [];
  for (let i = 0; i < 256; ++i) {
    byteToHex.push((i + 256).toString(16).slice(1));
  }
  function unsafeStringify(arr, offset = 0) {
    return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
  }

  // node_modules/uuid/dist/rng.js
  var rnds8 = new Uint8Array(16);
  function rng() {
    return crypto.getRandomValues(rnds8);
  }

  // node_modules/uuid/dist/v4.js
  function v412(options2, buf, offset) {
    if (!buf && !options2 && crypto.randomUUID) {
      return crypto.randomUUID();
    }
    return _v4(options2, buf, offset);
  }
  function _v4(options2, buf, offset) {
    options2 = options2 || {};
    const rnds = options2.random ?? options2.rng?.() ?? rng();
    if (rnds.length < 16) {
      throw new Error("Random bytes length must be >= 16");
    }
    rnds[6] = rnds[6] & 15 | 64;
    rnds[8] = rnds[8] & 63 | 128;
    if (buf) {
      offset = offset || 0;
      if (offset < 0 || offset + 16 > buf.length) {
        throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
      }
      for (let i = 0; i < 16; ++i) {
        buf[offset + i] = rnds[i];
      }
      return buf;
    }
    return unsafeStringify(rnds);
  }
  var v4_default = v412;

  // packages/block-library/build-module/footnotes/format.mjs
  var import_i18n269 = __toESM(require_i18n(), 1);
  var import_rich_text9 = __toESM(require_rich_text(), 1);
  var import_block_editor291 = __toESM(require_block_editor(), 1);
  var import_data171 = __toESM(require_data(), 1);
  var import_core_data102 = __toESM(require_core_data(), 1);
  var import_blocks111 = __toESM(require_blocks(), 1);
  var import_jsx_runtime577 = __toESM(require_jsx_runtime(), 1);
  var formatName = "core/footnote";
  var { usesContextKey } = unlock(import_block_editor291.privateApis);
  var POST_CONTENT_BLOCK_NAME = "core/post-content";
  var SYNCED_PATTERN_BLOCK_NAME = "core/block";
  var format2 = {
    title: (0, import_i18n269.__)("Footnote"),
    tagName: "sup",
    className: "fn",
    attributes: {
      "data-fn": "data-fn"
    },
    interactive: true,
    contentEditable: false,
    [usesContextKey]: ["postType", "postId"],
    edit: function Edit20({
      value,
      onChange,
      isObjectActive,
      context: { postType, postId }
    }) {
      const registry = (0, import_data171.useRegistry)();
      const {
        getSelectedBlockClientId,
        getBlocks,
        getBlockRootClientId,
        getBlockName,
        getBlockParentsByBlockName
      } = registry.select(import_block_editor291.store);
      const isFootnotesSupported = (0, import_data171.useSelect)(
        (select10) => {
          if (!select10(import_blocks111.store).getBlockType("core/footnotes")) {
            return false;
          }
          const allowedBlocks = select10(import_block_editor291.store).getSettings().allowedBlockTypes;
          if (allowedBlocks === false || Array.isArray(allowedBlocks) && !allowedBlocks.includes("core/footnotes")) {
            return false;
          }
          const entityRecord = select10(import_core_data102.store).getEntityRecord(
            "postType",
            postType,
            postId
          );
          if ("string" !== typeof entityRecord?.meta?.footnotes) {
            return false;
          }
          const {
            getBlockParentsByBlockName: _getBlockParentsByBlockName,
            getSelectedBlockClientId: _getSelectedBlockClientId,
            getBlockName: _getBlockName
          } = select10(import_block_editor291.store);
          const selectedClientId = _getSelectedBlockClientId();
          if (!selectedClientId) {
            return false;
          }
          if (_getBlockName(selectedClientId) === name117) {
            return false;
          }
          const parentCoreBlocks = _getBlockParentsByBlockName(
            selectedClientId,
            SYNCED_PATTERN_BLOCK_NAME
          );
          return !parentCoreBlocks || parentCoreBlocks.length === 0;
        },
        [postType, postId]
      );
      const { selectionChange, insertBlock } = (0, import_data171.useDispatch)(import_block_editor291.store);
      if (!isFootnotesSupported) {
        return null;
      }
      function onClick() {
        registry.batch(() => {
          let id;
          if (isObjectActive) {
            const object = value.replacements[value.start];
            id = object?.attributes?.["data-fn"];
          } else {
            id = `fn-${v4_default()}`;
            const newValue = (0, import_rich_text9.insertObject)(
              value,
              {
                type: formatName,
                attributes: {
                  "data-fn": id
                },
                innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
              },
              value.end,
              value.end
            );
            newValue.start = newValue.end - 1;
            onChange(newValue);
          }
          const selectedClientId = getSelectedBlockClientId();
          const parentPostContent = getBlockParentsByBlockName(
            selectedClientId,
            POST_CONTENT_BLOCK_NAME
          );
          const blocks = parentPostContent.length ? getBlocks(parentPostContent[0]) : getBlocks();
          let fnBlock = null;
          {
            const queue = [...blocks];
            while (queue.length) {
              const block = queue.shift();
              if (block.name === "core/footnotes") {
                fnBlock = block;
                break;
              }
              queue.push(...block.innerBlocks);
            }
          }
          if (!fnBlock) {
            let rootClientId = getBlockRootClientId(selectedClientId);
            while (rootClientId && getBlockName(rootClientId) !== POST_CONTENT_BLOCK_NAME) {
              rootClientId = getBlockRootClientId(rootClientId);
            }
            fnBlock = (0, import_blocks111.createBlock)("core/footnotes");
            insertBlock(fnBlock, void 0, rootClientId);
          }
          selectionChange(fnBlock.clientId, id, 0, 0);
        });
      }
      return /* @__PURE__ */ (0, import_jsx_runtime577.jsx)(
        import_block_editor291.RichTextToolbarButton,
        {
          icon: format_list_numbered_default,
          title: (0, import_i18n269.__)("Footnote"),
          onClick,
          isActive: isObjectActive
        }
      );
    }
  };

  // packages/block-library/build-module/footnotes/index.mjs
  var { name: name117 } = block_default116;
  var settings116 = {
    icon: format_list_numbered_default,
    edit: FootnotesEdit
  };
  var init116 = () => {
    (0, import_rich_text10.registerFormatType)(formatName, format2);
    initBlock({ name: name117, metadata: block_default116, settings: settings116 });
  };

  // packages/block-library/build-module/utils/is-block-metadata-experimental.mjs
  function isBlockMetadataExperimental(metadata) {
    return metadata && "__experimental" in metadata && metadata.__experimental !== false;
  }

  // packages/block-library/build-module/private-apis.mjs
  var privateApis4 = {};
  lock(privateApis4, {
    NAVIGATION_OVERLAY_TEMPLATE_PART_AREA,
    NavigationLinkUI
  });

  // packages/block-library/build-module/index.mjs
  var import_jsx_runtime578 = __toESM(require_jsx_runtime(), 1);
  var getAllBlocks = () => {
    const blocks = [
      // Common blocks are grouped at the top to prioritize their display
      // in various contexts — like the inserter and auto-complete components.
      paragraph_exports,
      image_exports,
      heading_exports,
      gallery_exports,
      list_exports,
      list_item_exports,
      quote_exports,
      // Register all remaining core blocks.
      accordion_exports,
      accordion_item_exports,
      accordion_heading_exports,
      accordion_panel_exports,
      archives_exports,
      audio_exports,
      button_exports,
      buttons_exports,
      calendar_exports,
      categories_exports,
      code_exports,
      column_exports,
      columns_exports,
      comment_author_avatar_exports,
      cover_exports,
      details_exports,
      embed_exports,
      file_exports,
      group_exports,
      html_exports,
      math_exports,
      latest_comments_exports,
      latest_posts_exports,
      media_text_exports,
      missing_exports,
      more_exports,
      nextpage_exports,
      page_list_exports,
      page_list_item_exports,
      pattern_exports,
      playlist_exports,
      playlist_track_exports,
      preformatted_exports,
      pullquote_exports,
      block_exports,
      rss_exports,
      search_exports,
      separator_exports,
      shortcode_exports,
      social_link_exports,
      social_links_exports,
      spacer_exports,
      table_exports,
      tabs_exports2,
      tab_list_exports,
      tab_panels_exports,
      tab_panel_exports,
      tag_cloud_exports,
      text_columns_exports,
      verse_exports,
      video_exports,
      footnotes_exports,
      // theme blocks
      navigation_exports,
      navigation_link_exports,
      navigation_submenu_exports,
      site_logo_exports,
      site_title_exports,
      site_tagline_exports,
      query_exports,
      template_part_exports,
      avatar_exports,
      post_title_exports,
      post_excerpt_exports,
      post_featured_image_exports,
      post_content_exports,
      post_author_exports,
      post_author_name_exports,
      post_comment_exports,
      post_comments_count_exports,
      post_comments_link_exports,
      post_date_exports,
      post_terms_exports,
      post_navigation_link_exports,
      post_template_exports,
      post_time_to_read_exports,
      query_pagination_exports,
      query_pagination_next_exports,
      query_pagination_numbers_exports,
      query_pagination_previous_exports,
      query_no_results_exports,
      query_total_exports,
      read_more_exports,
      comments_exports,
      comment_author_name_exports,
      comment_content_exports,
      comment_date_exports,
      comment_edit_link_exports,
      comment_reply_link_exports,
      comment_template_exports,
      comments_title_exports,
      comments_pagination_exports,
      comments_pagination_next_exports,
      comments_pagination_numbers_exports,
      comments_pagination_previous_exports,
      post_comments_form_exports,
      table_of_contents_exports,
      home_link_exports,
      icon_exports,
      loginout_exports,
      navigation_overlay_close_exports,
      term_count_exports,
      term_description_exports,
      term_name_exports,
      terms_query_exports,
      term_template_exports,
      query_title_exports,
      post_author_biography_exports,
      breadcrumbs_exports
    ];
    if (window?.__experimentalEnableBlockExperiments) {
    }
    blocks.push(freeform_exports);
    return blocks.filter(Boolean);
  };
  var __experimentalGetCoreBlocks = () => getAllBlocks().filter(
    ({ metadata }) => !isBlockMetadataExperimental(metadata)
  );
  var registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
    blocks.forEach(({ init: init117 }) => init117());
    if (window.__unstableAutoRegisterBlocks) {
      window.__unstableAutoRegisterBlocks.forEach((blockName) => {
        const bootstrappedBlockType = unlock(
          (0, import_data172.select)(import_blocks112.store)
        ).getBootstrappedBlockType(blockName);
        (0, import_blocks112.registerBlockType)(blockName, {
          // Use all metadata from PHP registration,
          // but fall back title to block name if not provided,
          // ensure minimum apiVersion 3 for block wrapper support,
          // and override with a ServerSideRender-based edit function.
          ...bootstrappedBlockType,
          title: bootstrappedBlockType?.title || blockName,
          ...(bootstrappedBlockType?.apiVersion ?? 0) < 3 && {
            apiVersion: 3
          },
          // Always pass the postId context so the server-side render can
          // reproduce the same output as the front end, while preserving
          // any context declared in the block's PHP registration.
          usesContext: Array.from(
            /* @__PURE__ */ new Set([
              ...bootstrappedBlockType?.usesContext ?? [],
              "postId"
            ])
          ),
          // Inspector controls are rendered by the auto-register hook in block-editor
          edit: function Edit21({ attributes: attributes2, context }) {
            const disabledRef = (0, import_compose67.useDisabled)();
            const blockProps = (0, import_block_editor292.useBlockProps)({ ref: disabledRef });
            const { content, status, error: error2 } = (0, import_server_side_render7.useServerSideRender)({
              block: blockName,
              attributes: attributes2,
              urlQueryArgs: { post_id: context?.postId }
            });
            if (status === "loading") {
              return /* @__PURE__ */ (0, import_jsx_runtime578.jsx)("div", { ...blockProps, children: (0, import_i18n270.__)("Loading\u2026") });
            }
            if (status === "error") {
              return /* @__PURE__ */ (0, import_jsx_runtime578.jsx)("div", { ...blockProps, children: (0, import_i18n270.sprintf)(
                /* translators: %s: error message describing the problem */
                (0, import_i18n270.__)("Error loading block: %s"),
                error2
              ) });
            }
            return /* @__PURE__ */ (0, import_jsx_runtime578.jsx)(
              html_renderer_default,
              {
                wrapperProps: blockProps,
                html: content
              }
            );
          },
          save: () => null
        });
      });
    }
    (0, import_blocks112.setDefaultBlockName)(name59);
    if (window.wp && window.wp.oldEditor && blocks.some(({ name: name510 }) => name510 === name13)) {
      (0, import_blocks112.setFreeformContentHandlerName)(name13);
    }
    (0, import_blocks112.setUnregisteredTypeHandlerName)(name48);
    (0, import_blocks112.setGroupingBlockName)(name35);
  };
  var __experimentalRegisterExperimentalCoreBlocks = true ? ({ enableFSEBlocks } = {}) => {
    const enabledExperiments = [enableFSEBlocks ? "fse" : null];
    getAllBlocks().filter(
      ({ metadata }) => isBlockMetadataExperimental(metadata)
    ).filter(
      ({ metadata: { __experimental } }) => __experimental === true || enabledExperiments.includes(__experimental)
    ).forEach(({ init: init117 }) => init117());
  } : void 0;
  return __toCommonJS(index_exports);
})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
  (**
   * @license React
   * use-sync-external-store-shim.development.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

fast-average-color/dist/index.esm.js:
  (*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color *)
*/
(window.wp ||= {}).blockLibrary = wp.blockLibrary;
})();
//# sourceMappingURL=index.js.map

````
