import { __require as m } from "./markup-templating.mjs";
var n, u;
function g() {
  if (u)
    return n;
  u = 1;
  var p = m();
  n = a, a.displayName = "soy", a.aliases = [];
  function a(l) {
    l.register(p), function(e) {
      var i = /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, o = /\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;
      e.languages.soy = {
        comment: [/\/\*[\s\S]*?\*\//, {
          pattern: /(\s)\/\/.*/,
          lookbehind: !0,
          greedy: !0
        }],
        "command-arg": {
          pattern: /(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,
          lookbehind: !0,
          alias: "string",
          inside: {
            punctuation: /\./
          }
        },
        parameter: {
          pattern: /(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,
          lookbehind: !0,
          alias: "variable"
        },
        keyword: [{
          pattern: /(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,
          lookbehind: !0
        }, /\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],
        delimiter: {
          pattern: /^\{+\/?|\/?\}+$/,
          alias: "punctuation"
        },
        property: /\w+(?==)/,
        variable: {
          pattern: /\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,
          inside: {
            string: {
              pattern: i,
              greedy: !0
            },
            number: o,
            punctuation: /[\[\].?]/
          }
        },
        string: {
          pattern: i,
          greedy: !0
        },
        function: [/\w+(?=\()/, {
          pattern: /(\|[^\S\r\n]*)\w+/,
          lookbehind: !0
        }],
        boolean: /\b(?:false|true)\b/,
        number: o,
        operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
        punctuation: /[{}()\[\]|.,:]/
      }, e.hooks.add("before-tokenize", function(t) {
        var d = /\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g, b = "{literal}", c = "{/literal}", r = !1;
        e.languages["markup-templating"].buildPlaceholders(t, "soy", d, function(s) {
          return s === c && (r = !1), r ? !1 : (s === b && (r = !0), !0);
        });
      }), e.hooks.add("after-tokenize", function(t) {
        e.languages["markup-templating"].tokenizePlaceholders(t, "soy");
      });
    }(l);
  }
  return n;
}
export {
  g as __require
};
