import { n as d, o as g, a as v, p as m, q as u, g as x, L as G, s as b, t as a, i as Z, k as R, f as h, e as k, E as f, h as w } from "./index-BnQ896Ak.mjs";
const X = 1, T = 2, y = 3, U = 155, z = 4, j = 156;
function Y(O) {
  return O >= 65 && O <= 90 || O >= 97 && O <= 122;
}
const E = /* @__PURE__ */ new f((O) => {
  let i = O.pos;
  for (; ; ) {
    let { next: t } = O;
    if (t < 0)
      break;
    if (t == 123) {
      let r = O.peek(1);
      if (r == 123) {
        if (O.pos > i)
          break;
        O.acceptToken(X, 2);
        return;
      } else if (r == 35) {
        if (O.pos > i)
          break;
        O.acceptToken(T, 2);
        return;
      } else if (r == 37) {
        if (O.pos > i)
          break;
        let e = 2, P = 2;
        for (; ; ) {
          let Q = O.peek(e);
          if (Q == 32 || Q == 10)
            ++e;
          else if (Q == 35)
            for (++e; ; ) {
              let o = O.peek(e);
              if (o < 0 || o == 10)
                break;
              e++;
            }
          else if (Q == 45 && P == 2)
            P = ++e;
          else {
            O.acceptToken(y, P);
            return;
          }
        }
      }
    }
    if (O.advance(), t == 10)
      break;
  }
  O.pos > i && O.acceptToken(U);
});
function _(O, i, t) {
  return new f((r) => {
    let e = r.pos;
    for (; ; ) {
      let { next: P } = r;
      if (P == 123 && r.peek(1) == 37) {
        let Q = 2;
        for (; ; Q++) {
          let n = r.peek(Q);
          if (n != 32 && n != 10)
            break;
        }
        let o = "";
        for (; ; Q++) {
          let n = r.peek(Q);
          if (!Y(n))
            break;
          o += String.fromCharCode(n);
        }
        if (o == O) {
          if (r.pos > e)
            break;
          r.acceptToken(t, 2);
          break;
        }
      } else if (P < 0)
        break;
      if (r.advance(), P == 10)
        break;
    }
    r.pos > e && r.acceptToken(i);
  });
}
const W = /* @__PURE__ */ _("endraw", j, z), V = { __proto__: null, in: 38, is: 40, and: 46, or: 48, not: 52, if: 78, else: 80, true: 98, false: 98, self: 100, super: 102, loop: 104, recursive: 136, scoped: 160, required: 162, as: 256, import: 260, ignore: 268, missing: 270, with: 272, without: 274, context: 276 }, q = { __proto__: null, if: 112, elif: 118, else: 122, endif: 126, for: 132, endfor: 140, raw: 146, endraw: 152, block: 158, endblock: 166, macro: 172, endmacro: 182, call: 188, endcall: 192, filter: 198, endfilter: 202, set: 208, endset: 212, trans: 218, pluralize: 222, endtrans: 226, with: 232, endwith: 236, autoescape: 242, endautoescape: 246, import: 254, from: 258, include: 266 }, F = /* @__PURE__ */ k.deserialize({
  version: 14,
  states: "!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,5:gO#^OPO,5:gO*RQWO'#E|OOOP,5:n,5:nO#lOPO,5:nO*YQWO'#E|OOOP,5:v,5:vO#zOPO,5:vO*aQWO'#E|OOOP,5:{,5:{O$YOPO,5:{O*hQWO'#E|OOOP,5;Q,5;QO$hOPO,5;QO*oQWO'#E|OOOP,5;V,5;VO*vOPO,5;VO$vOPO,5;VO+UQWO'#E|OOOP,5;^,5;^O%UOPO,5;^O+`QWO'#E|OOOP,5;c,5;cO%dOPO,5;cO+gQWO'#E|O+nQSO,5;hOvQSO,5:OO+uQSO,5:ZO+zQSO,5:bO+uQSO,5:hO+uQSO,5:oO,PQSO,5:wO,XQpO,5:|O+uQSO,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bQ%a#kR%k#}SQOdSeQm!cmSTVWXYZ[]^oqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kS&c$u$wR'd&cQ%Q#WQ%S#YT&i%Q%SQ%W#]R&n%WQoSR#`oQ%s$YQ&S$dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",
  nodeNames: "⚠ {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",
  maxTerm: 173,
  nodeProps: [
    ["closedBy", 1, "}}", 2, "#}", -2, 3, 4, "%}", 32, ")"],
    ["openedBy", 7, "{{", 31, "(", 57, "{%", 140, "{#"],
    ["group", -18, 9, 10, 13, 14, 21, 22, 25, 27, 38, 41, 42, 43, 44, 45, 49, 50, 51, 52, "Expression", -11, 53, 64, 71, 77, 84, 92, 97, 102, 107, 114, 119, "Statement"]
  ],
  skippedNodes: [0],
  repeatNodeCount: 13,
  tokenData: ".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",
  tokenizers: [E, W, 1, 2, 3, 4, 5, /* @__PURE__ */ new w("b~RPstU~XP#q#r[~aO$Q~~", 17, 173)],
  topRules: { Template: [0, 5] },
  specialized: [{ term: 161, get: (O) => V[O] || -1 }, { term: 55, get: (O) => q[O] || -1 }],
  tokenPrec: 3602
});
function S(O, i) {
  return O.split(" ").map((t) => ({ label: t, type: i }));
}
const N = /* @__PURE__ */ S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr", "function"), C = /* @__PURE__ */ S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace", "function"), D = /* @__PURE__ */ S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller", "keyword"), l = /* @__PURE__ */ C.concat(D), $ = /* @__PURE__ */ S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends", "keyword");
function A(O) {
  var i;
  let { state: t, pos: r } = O, e = x(t).resolveInner(r, -1).enterUnfinishedNodesBefore(r), P = ((i = e.childBefore(r)) === null || i === void 0 ? void 0 : i.name) || e.name;
  if (e.name == "FilterName")
    return { type: "filter", node: e };
  if (O.explicit && (P == "FilterOp" || P == "filter"))
    return { type: "filter" };
  if (e.name == "TagName")
    return { type: "tag", node: e };
  if (O.explicit && P == "{%")
    return { type: "tag" };
  if (e.name == "PropertyName" && e.parent.name == "MemberExpression")
    return { type: "prop", node: e, target: e.parent };
  if (e.name == "." && e.parent.name == "MemberExpression")
    return { type: "prop", target: e.parent };
  if (e.name == "MemberExpression" && P == ".")
    return { type: "prop", target: e };
  if (e.name == "VariableName")
    return { type: "expr", from: e.from };
  if (e.name == "Comment" || e.name == "StringLiteral" || e.name == "NumberLiteral")
    return null;
  let Q = O.matchBefore(/[\w\u00c0-\uffff]+$/);
  return Q ? { type: "expr", from: Q.from } : O.explicit ? { type: "expr" } : null;
}
function L(O, i, t, r) {
  let e = [];
  for (; ; ) {
    let P = i.getChild("Expression");
    if (!P)
      return [];
    if (P.name == "VariableName") {
      e.unshift(O.sliceDoc(P.from, P.to));
      break;
    } else if (P.name == "MemberExpression") {
      let Q = P.getChild("PropertyName");
      Q && e.unshift(O.sliceDoc(Q.from, Q.to)), i = P;
    } else
      return [];
  }
  return r(e, O, t);
}
function I(O = {}) {
  let i = O.tags ? O.tags.concat($) : $, t = O.variables ? O.variables.concat(l) : l, { properties: r } = O;
  return (e) => {
    var P;
    let Q = A(e);
    if (!Q)
      return null;
    let o = (P = Q.from) !== null && P !== void 0 ? P : Q.node ? Q.node.from : e.pos, n;
    return Q.type == "filter" ? n = N : Q.type == "tag" ? n = i : Q.type == "expr" ? n = t : n = r ? L(e.state, Q.target, e, r) : [], n.length ? { options: n, from: o, validFor: /^[\w\u00c0-\uffff]*$/ } : null;
  };
}
const H = /* @__PURE__ */ d.inputHandler.of((O, i, t, r) => r != "%" || i != t || O.state.doc.sliceString(i - 1, t + 1) != "{}" ? !1 : (O.dispatch(O.state.changeByRange((e) => ({
  changes: { from: e.from, to: e.to, insert: "%%" },
  range: g.cursor(e.from + 1)
})), {
  scrollIntoView: !0,
  userEvent: "input.type"
}), !0));
function p(O) {
  return (i) => {
    let t = O.test(i.textAfter);
    return i.lineIndent(i.node.from) + (t ? 0 : i.unit);
  };
}
const B = /* @__PURE__ */ G.define({
  name: "jinja",
  parser: /* @__PURE__ */ F.configure({
    props: [
      /* @__PURE__ */ b({
        "TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape": a.keyword,
        "required scoped recursive with without context ignore missing": a.modifier,
        self: a.self,
        "loop super": /* @__PURE__ */ a.standard(a.variableName),
        "if elif else endif for endfor call endcall": a.controlKeyword,
        "block endblock set endset macro endmacro import from include": a.definitionKeyword,
        "Comment/...": a.blockComment,
        VariableName: a.variableName,
        Definition: /* @__PURE__ */ a.definition(a.variableName),
        PropertyName: a.propertyName,
        FilterName: /* @__PURE__ */ a.special(a.variableName),
        ArithOp: a.arithmeticOperator,
        AssignOp: a.definitionOperator,
        "not and or": a.logicOperator,
        CompareOp: a.compareOperator,
        "in is": a.operatorKeyword,
        "FilterOp ConcatOp": a.operator,
        StringLiteral: a.string,
        NumberLiteral: a.number,
        BooleanLiteral: a.bool,
        "{% %} {# #} {{ }} { }": a.brace,
        "( )": a.paren,
        ".": a.derefOperator,
        ": , .": a.punctuation
      }),
      /* @__PURE__ */ Z.add({
        Tag: /* @__PURE__ */ R({ closing: "%}" }),
        "IfStatement ForStatement": /* @__PURE__ */ p(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),
        Statement: /* @__PURE__ */ p(/^\s*(\{%-?\s*)?end\w/)
      }),
      /* @__PURE__ */ h.add({
        "Statement Comment"(O) {
          let i = O.firstChild, t = O.lastChild;
          return !i || i.name != "Tag" && i.name != "{#" ? null : { from: i.to, to: t.name == "EndTag" || t.name == "#}" ? t.from : O.to };
        }
      })
    ]
  }),
  languageData: {
    indentOnInput: /^\s*{%-?\s*(?:end|elif|else)$/
  }
}), s = /* @__PURE__ */ m();
function c(O) {
  return B.configure({
    wrap: u((i) => i.type.isTop ? {
      parser: O.parser,
      overlay: (t) => t.name == "Text" || t.name == "RawText"
    } : null)
  }, "jinja");
}
const J = /* @__PURE__ */ c(s.language);
function M(O = {}) {
  let i = O.base || s, t = i.language == s.language ? J : c(i.language);
  return new v(t, [
    i.support,
    t.data.of({ autocomplete: I(O) }),
    i.language.data.of({ closeBrackets: { brackets: ["{"] } }),
    H
  ]);
}
export {
  H as closePercentBrace,
  M as jinja,
  I as jinjaCompletionSource,
  J as jinjaLanguage
};
//# sourceMappingURL=index-BnR0SbVr.mjs.map
