import {
  a as d
} from "./chunk-V3FAOLHJ.js";
import {
  a as l
} from "./chunk-PK4C6KGI.js";
import {
  a as s,
  c as i
} from "./chunk-IO47FP3U.js";

// ../node_modules/refractor/lang/javadoc.js
var p = i((v, o) => {
  var c = d(), g = l();
  o.exports = n;
  n.displayName = "javadoc";
  n.aliases = [];
  function n(a) {
    a.register(c), a.register(g), function(e) {
      var t = /(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m, r = /#\s*\w+(?:\s*\([^()]*\))?/.source, u = /(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(
        /<mem>/g,
        function() {
          return r;
        }
      );
      e.languages.javadoc = e.languages.extend("javadoclike", {}), e.languages.insertBefore("javadoc", "keyword", {
        reference: {
          pattern: RegExp(
            /(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source + "(?:" + u + ")"
          ),
          lookbehind: !0,
          inside: {
            function: {
              pattern: /(#\s*)\w+(?=\s*\()/,
              lookbehind: !0
            },
            field: {
              pattern: /(#\s*)\w+/,
              lookbehind: !0
            },
            namespace: {
              pattern: /\b(?:[a-z]\w*\s*\.\s*)+/,
              inside: {
                punctuation: /\./
              }
            },
            "class-name": /\b[A-Z]\w*/,
            keyword: e.languages.java.keyword,
            punctuation: /[#()[\],.]/
          }
        },
        "class-name": {
          // @param <T> the first generic type parameter
          pattern: /(@param\s+)<[A-Z]\w*>/,
          lookbehind: !0,
          inside: {
            punctuation: /[.<>]/
          }
        },
        "code-section": [
          {
            pattern: /(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,
            lookbehind: !0,
            inside: {
              code: {
                // there can't be any HTML inside of {@code} tags
                pattern: t,
                lookbehind: !0,
                inside: e.languages.java,
                alias: "language-java"
              }
            }
          },
          {
            pattern: /(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,
            lookbehind: !0,
            inside: {
              line: {
                pattern: t,
                lookbehind: !0,
                inside: {
                  // highlight HTML tags and entities
                  tag: e.languages.markup.tag,
                  entity: e.languages.markup.entity,
                  code: {
                    // everything else is Java code
                    pattern: /.+/,
                    inside: e.languages.java,
                    alias: "language-java"
                  }
                }
              }
            }
          }
        ],
        tag: e.languages.markup.tag,
        entity: e.languages.markup.entity
      }), e.languages.javadoclike.addSupport("java", e.languages.javadoc);
    }(a);
  }
  s(n, "javadoc");
});

export {
  p as a
};
