import {
  a as o,
  c as u
} from "./chunk-IO47FP3U.js";

// ../node_modules/highlight.js/lib/languages/livescript.js
var f = u((R, c) => {
  var _ = [
    "as",
    // for exports
    "in",
    "of",
    "if",
    "for",
    "while",
    "finally",
    "var",
    "new",
    "function",
    "do",
    "return",
    "void",
    "else",
    "break",
    "catch",
    "instanceof",
    "with",
    "throw",
    "case",
    "default",
    "try",
    "switch",
    "continue",
    "typeof",
    "delete",
    "let",
    "yield",
    "const",
    "class",
    // JS handles these with a special rule
    // "get",
    // "set",
    "debugger",
    "async",
    "await",
    "static",
    "import",
    "from",
    "export",
    "extends"
  ], A = [
    "true",
    "false",
    "null",
    "undefined",
    "NaN",
    "Infinity"
  ], I = [
    "Intl",
    "DataView",
    "Number",
    "Math",
    "Date",
    "String",
    "RegExp",
    "Object",
    "Function",
    "Boolean",
    "Error",
    "Symbol",
    "Set",
    "Map",
    "WeakSet",
    "WeakMap",
    "Proxy",
    "Reflect",
    "JSON",
    "Promise",
    "Float64Array",
    "Int16Array",
    "Int32Array",
    "Int8Array",
    "Uint16Array",
    "Uint32Array",
    "Float32Array",
    "Array",
    "Uint8Array",
    "Uint8ClampedArray",
    "ArrayBuffer",
    "BigInt64Array",
    "BigUint64Array",
    "BigInt"
  ], b = [
    "EvalError",
    "InternalError",
    "RangeError",
    "ReferenceError",
    "SyntaxError",
    "TypeError",
    "URIError"
  ], y = [
    "setInterval",
    "setTimeout",
    "clearInterval",
    "clearTimeout",
    "require",
    "exports",
    "eval",
    "isFinite",
    "isNaN",
    "parseFloat",
    "parseInt",
    "decodeURI",
    "decodeURIComponent",
    "encodeURI",
    "encodeURIComponent",
    "escape",
    "unescape"
  ], m = [
    "arguments",
    "this",
    "super",
    "console",
    "window",
    "document",
    "localStorage",
    "module",
    "global"
    // Node.js
  ], p = [].concat(
    y,
    m,
    I,
    b
  );
  function B(e) {
    let d = [
      "npm",
      "print"
    ], l = [
      "yes",
      "no",
      "on",
      "off",
      "it",
      "that",
      "void"
    ], E = [
      "then",
      "unless",
      "until",
      "loop",
      "of",
      "by",
      "when",
      "and",
      "or",
      "is",
      "isnt",
      "not",
      "it",
      "that",
      "otherwise",
      "from",
      "to",
      "til",
      "fallthrough",
      "case",
      "enum",
      "native",
      "list",
      "map",
      "__hasProp",
      "__extends",
      "__slice",
      "__bind",
      "__indexOf"
    ], t = {
      keyword: _.concat(E),
      literal: A.concat(l),
      built_in: p.concat(d)
    }, n = "[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*", r = e.inherit(e.TITLE_MODE, {
      begin: n
    }), a = {
      className: "subst",
      begin: /#\{/,
      end: /\}/,
      keywords: t
    }, i = {
      className: "subst",
      begin: /#[A-Za-z$_]/,
      end: /(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
      keywords: t
    }, s = [
      e.BINARY_NUMBER_MODE,
      {
        className: "number",
        begin: "(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",
        relevance: 0,
        starts: {
          end: "(\\s*/)?",
          relevance: 0
        }
        // a number tries to eat the following slash to prevent treating it as a regexp
      },
      {
        className: "string",
        variants: [
          {
            begin: /'''/,
            end: /'''/,
            contains: [e.BACKSLASH_ESCAPE]
          },
          {
            begin: /'/,
            end: /'/,
            contains: [e.BACKSLASH_ESCAPE]
          },
          {
            begin: /"""/,
            end: /"""/,
            contains: [
              e.BACKSLASH_ESCAPE,
              a,
              i
            ]
          },
          {
            begin: /"/,
            end: /"/,
            contains: [
              e.BACKSLASH_ESCAPE,
              a,
              i
            ]
          },
          {
            begin: /\\/,
            end: /(\s|$)/,
            excludeEnd: !0
          }
        ]
      },
      {
        className: "regexp",
        variants: [
          {
            begin: "//",
            end: "//[gim]*",
            contains: [
              a,
              e.HASH_COMMENT_MODE
            ]
          },
          {
            // regex can't start with space to parse x / 2 / 3 as two divisions
            // regex can't start with *, and it supports an "illegal" in the main mode
            begin: /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/
          }
        ]
      },
      {
        begin: "@" + n
      },
      {
        begin: "``",
        end: "``",
        excludeBegin: !0,
        excludeEnd: !0,
        subLanguage: "javascript"
      }
    ];
    a.contains = s;
    let S = {
      className: "params",
      begin: "\\(",
      returnBegin: !0,
      /* We need another contained nameless mode to not have every nested
      pair of parens to be called "params" */
      contains: [
        {
          begin: /\(/,
          end: /\)/,
          keywords: t,
          contains: ["self"].concat(s)
        }
      ]
    }, g = {
      begin: "(#=>|=>|\\|>>|-?->|!->)"
    };
    return {
      name: "LiveScript",
      aliases: ["ls"],
      keywords: t,
      illegal: /\/\*/,
      contains: s.concat([
        e.COMMENT("\\/\\*", "\\*\\/"),
        e.HASH_COMMENT_MODE,
        g,
        // relevance booster
        {
          className: "function",
          contains: [
            r,
            S
          ],
          returnBegin: !0,
          variants: [
            {
              begin: "(" + n + "\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",
              end: "->\\*?"
            },
            {
              begin: "(" + n + "\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",
              end: "[-~]{1,2}>\\*?"
            },
            {
              begin: "(" + n + "\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",
              end: "!?[-~]{1,2}>\\*?"
            }
          ]
        },
        {
          className: "class",
          beginKeywords: "class",
          end: "$",
          illegal: /[:="\[\]]/,
          contains: [
            {
              beginKeywords: "extends",
              endsWithParent: !0,
              illegal: /[:="\[\]]/,
              contains: [r]
            },
            r
          ]
        },
        {
          begin: n + ":",
          end: ":",
          returnBegin: !0,
          returnEnd: !0,
          relevance: 0
        }
      ])
    };
  }
  o(B, "livescript");
  c.exports = B;
});

export {
  f as a
};
