import { E as h, r as b, u as v, a as y, b as k, v as u, k as T, c as _, d as W, i as R, f as Y, l as w, g as P, t } from "./index-BekwHUra.js";
const U = 1, X = 2, j = 3, G = 180, S = 4, z = 181, x = 5, Z = 182, E = 6;
function V(O) {
  return O >= 65 && O <= 90 || O >= 97 && O <= 122;
}
const D = /* @__PURE__ */ new P((O) => {
  let a = O.pos;
  for (; ; ) {
    let { next: e } = O;
    if (e < 0)
      break;
    if (e == 123) {
      let r = O.peek(1);
      if (r == 123) {
        if (O.pos > a)
          break;
        O.acceptToken(U, 2);
        return;
      } else if (r == 37) {
        if (O.pos > a)
          break;
        let $ = 2, i = 2;
        for (; ; ) {
          let n = O.peek($);
          if (n == 32 || n == 10)
            ++$;
          else if (n == 35)
            for (++$; ; ) {
              let Q = O.peek($);
              if (Q < 0 || Q == 10)
                break;
              $++;
            }
          else if (n == 45 && i == 2)
            i = ++$;
          else {
            let Q = n == 101 && O.peek($ + 1) == 110 && O.peek($ + 2) == 100;
            O.acceptToken(Q ? j : X, i);
            return;
          }
        }
      }
    }
    if (O.advance(), e == 10)
      break;
  }
  O.pos > a && O.acceptToken(G);
});
function f(O, a, e) {
  return new P((r) => {
    let $ = r.pos;
    for (; ; ) {
      let { next: i } = r;
      if (i == 123 && r.peek(1) == 37) {
        let n = 2;
        for (; ; n++) {
          let l = r.peek(n);
          if (l != 32 && l != 10)
            break;
        }
        let Q = "";
        for (; ; n++) {
          let l = r.peek(n);
          if (!V(l))
            break;
          Q += String.fromCharCode(l);
        }
        if (Q == O) {
          if (r.pos > $)
            break;
          r.acceptToken(e, 2);
          break;
        }
      } else if (i < 0)
        break;
      if (r.advance(), i == 10)
        break;
    }
    r.pos > $ && r.acceptToken(a);
  });
}
const F = /* @__PURE__ */ f("endcomment", Z, x), C = /* @__PURE__ */ f("endraw", z, S), N = /* @__PURE__ */ new P((O) => {
  if (O.next == 35) {
    for (O.advance(); !(O.next == 10 || O.next < 0 || (O.next == 37 || O.next == 125) && O.peek(1) == 125); )
      O.advance();
    O.acceptToken(E);
  }
}), I = { __proto__: null, contains: 32, or: 36, and: 36, true: 50, false: 50, empty: 52, forloop: 54, tablerowloop: 56, continue: 58, in: 128, with: 194, for: 196, as: 198, if: 234, endif: 238, unless: 244, endunless: 248, elsif: 252, else: 256, case: 262, endcase: 266, when: 270, endfor: 278, tablerow: 284, endtablerow: 288, break: 292, cycle: 298, echo: 302, render: 306, include: 312, assign: 316, capture: 322, endcapture: 326, increment: 330, decrement: 334 }, L = { __proto__: null, if: 82, endif: 86, elsif: 90, else: 94, unless: 100, endunless: 104, case: 110, endcase: 114, when: 118, for: 126, endfor: 136, tablerow: 142, endtablerow: 146, break: 150, continue: 154, cycle: 158, comment: 164, endcomment: 170, raw: 176, endraw: 182, echo: 186, render: 190, include: 202, assign: 206, capture: 212, endcapture: 216, increment: 220, decrement: 224, liquid: 228 }, A = /* @__PURE__ */ _.deserialize({
  version: 14,
  states: "HOQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DQO#{OPO'#DTO$ZOPO'#D^O$iOPO'#DcO$wOPO'#DkO%VOPO'#DsO%eOSO'#EOO%jOQO'#EUO%oOPO'#EhOOOP'#G`'#G`OOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&`Q!jO,59QO&gQ!jO'#G^OsQhO'#CsOOQW'#G^'#G^OOOP,59l,59lO)PQhO,59lOsQhO,59pOsQhO,59tO)ZQhO,59vOsQhO,59yOsQhO,5:OOsQhO,5:SO!]QhO,5:WO!]QhO,5:`O)`QhO,5:dO)eQhO,5:fO)jQhO,5:hO)oQhO,5:kO)tQhO,5:qOsQhO,5:vOsQhO,5:xOsQhO,5;OOsQhO,5;QOsQhO,5;TOsQhO,5;XOsQhO,5;ZO+TQhO,5;]O+[OPO'#CdOOOP,59o,59oO#{OPO,59oO+jQxO'#DWOOOP,59x,59xO$ZOPO,59xO+oQxO'#DaOOOP,59},59}O$iOPO,59}O+tQx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contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when , ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render RenderParameter Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement",
  maxTerm: 189,
  nodeProps: [
    ["closedBy", 1, "}}", -4, 2, 3, 4, 5, "%}", 22, ")"],
    ["openedBy", 9, "{{", 21, "(", 38, "{%"],
    ["group", -12, 11, 12, 15, 19, 23, 25, 26, 27, 28, 29, 30, 31, "Expression"]
  ],
  skippedNodes: [0, 6],
  repeatNodeCount: 11,
  tokenData: ")Q~RkXY!vYZ!v]^!vpq!vqr#Xrs#duv$Uwx$axy$|yz%R{|%W|}&r}!O&w!O!P'T!Q![&a![!]'e!^!_'j!_!`'r!`!a'j!c!}'z#R#S'z#T#o'z#p#q(p#q#r(u%W;'S'z;'S;:j(j<%lO'z~!{S%O~XY!vYZ!v]^!vpq!v~#[P!_!`#_~#dOa~~#gUOY#dZr#drs#ys;'S#d;'S;=`$O<%lO#d~$OOn~~$RP;=`<%l#d~$XP#q#r$[~$aOv~~$dUOY$aZw$awx#yx;'S$a;'S;=`$v<%lO$a~$yP;=`<%l$a~%ROf~~%WOe~P%ZQ!O!P%a!Q![&aP%dP!Q![%gP%lRoP!Q![%g!g!h%u#X#Y%uP%xR{|&R}!O&R!Q![&XP&UP!Q![&XP&^PoP!Q![&XP&fSoP!O!P%a!Q![&a!g!h%u#X#Y%u~&wO!^~~&zRuv$U!O!P%a!Q![&a~'YQ]S!O!P'`!Q![%g~'eOh~~'jOs~~'oPa~!_!`#_~'wPd~!_!`#__(TV^WuQ%RT!Q!['z!c!}'z#R#S'z#T#o'z%W;'S'z;'S;:j(j<%lO'z_(mP;=`<%l'z~(uOq~~(xP#q#r({~)QOX~",
  tokenizers: [D, C, F, N, 0, 1, 2, 3],
  topRules: { Template: [0, 7] },
  specialized: [{ term: 187, get: (O) => I[O] || -1 }, { term: 37, get: (O) => L[O] || -1 }],
  tokenPrec: 0
});
function o(O, a) {
  return O.split(" ").map((e) => ({ label: e, type: a }));
}
const q = /* @__PURE__ */ o("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where", "function"), p = /* @__PURE__ */ o("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include", "keyword"), d = /* @__PURE__ */ o("empty forloop tablerowloop in with as contains", "keyword"), B = /* @__PURE__ */ o("first index index0 last length rindex", "property"), H = /* @__PURE__ */ o("col col0 col_first col_last first index index0 last length rindex rindex0 row", "property");
function M(O) {
  var a;
  let { state: e, pos: r } = O, $ = T(e).resolveInner(r, -1).enterUnfinishedNodesBefore(r), i = ((a = $.childBefore(r)) === null || a === void 0 ? void 0 : a.name) || $.name;
  if ($.name == "FilterName")
    return { type: "filter", node: $ };
  if (O.explicit && i == "|")
    return { type: "filter" };
  if ($.name == "TagName")
    return { type: "tag", node: $ };
  if (O.explicit && i == "{%")
    return { type: "tag" };
  if ($.name == "PropertyName" && $.parent.name == "MemberExpression")
    return { type: "property", node: $, target: $.parent };
  if ($.name == "." && $.parent.name == "MemberExpression")
    return { type: "property", target: $.parent };
  if ($.name == "MemberExpression" && i == ".")
    return { type: "property", target: $ };
  if ($.name == "VariableName")
    return { type: "expression", from: $.from };
  let n = O.matchBefore(/[\w\u00c0-\uffff]+$/);
  return n ? { type: "expression", from: n.from } : O.explicit && $.name != "CommentText" && $.name != "StringLiteral" && $.name != "NumberLiteral" && $.name != "InlineComment" ? { type: "expression" } : null;
}
function K(O, a, e, r) {
  let $ = [];
  for (; ; ) {
    let i = a.getChild("Expression");
    if (!i)
      return [];
    if (i.name == "forloop")
      return $.length ? [] : B;
    if (i.name == "tablerowloop")
      return $.length ? [] : H;
    if (i.name == "VariableName") {
      $.unshift(O.sliceDoc(i.from, i.to));
      break;
    } else if (i.name == "MemberExpression") {
      let n = i.getChild("PropertyName");
      n && $.unshift(O.sliceDoc(n.from, n.to)), a = i;
    } else
      return [];
  }
  return r ? r($, O, e) : [];
}
function J(O = {}) {
  let a = O.filters ? O.filters.concat(q) : q, e = O.tags ? O.tags.concat(p) : p, r = O.variables ? O.variables.concat(d) : d, { properties: $ } = O;
  return (i) => {
    var n;
    let Q = M(i);
    if (!Q)
      return null;
    let l = (n = Q.from) !== null && n !== void 0 ? n : Q.node ? Q.node.from : i.pos, s;
    return Q.type == "filter" ? s = a : Q.type == "tag" ? s = e : Q.type == "expression" ? s = r : s = K(i.state, Q.target, i, $), s.length ? { options: s, from: l, validFor: /^[\w\u00c0-\uffff]*$/ } : null;
  };
}
const OO = /* @__PURE__ */ h.inputHandler.of((O, a, e, r) => r != "%" || a != e || O.state.doc.sliceString(a - 1, e + 1) != "{}" ? !1 : (O.dispatch(O.state.changeByRange(($) => ({
  changes: { from: $.from, to: $.to, insert: "%%" },
  range: b.cursor($.from + 1)
})), {
  scrollIntoView: !0,
  userEvent: "input.type"
}), !0));
function c(O) {
  return (a) => {
    let e = O.test(a.textAfter);
    return a.lineIndent(a.node.from) + (e ? 0 : a.unit);
  };
}
const $O = /* @__PURE__ */ k.define({
  name: "liquid",
  parser: /* @__PURE__ */ A.configure({
    props: [
      /* @__PURE__ */ W({
        "cycle comment endcomment raw endraw echo increment decrement liquid in with as": t.keyword,
        "empty forloop tablerowloop": t.atom,
        "if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue": t.controlKeyword,
        "assign capture endcapture": t.definitionKeyword,
        contains: t.operatorKeyword,
        "render include": t.moduleKeyword,
        VariableName: t.variableName,
        TagName: t.tagName,
        FilterName: /* @__PURE__ */ t.function(t.variableName),
        PropertyName: t.propertyName,
        CompareOp: t.compareOperator,
        AssignOp: t.definitionOperator,
        LogicOp: t.logicOperator,
        NumberLiteral: t.number,
        StringLiteral: t.string,
        BooleanLiteral: t.bool,
        InlineComment: t.lineComment,
        CommentText: t.blockComment,
        "{% %} {{ }}": t.brace,
        "( )": t.paren,
        ".": t.derefOperator,
        ", .. : |": t.punctuation
      }),
      /* @__PURE__ */ R.add({
        Tag: /* @__PURE__ */ w({ closing: "%}" }),
        "UnlessDirective ForDirective TablerowDirective CaptureDirective": /* @__PURE__ */ c(/^\s*(\{%-?\s*)?end\w/),
        IfDirective: /* @__PURE__ */ c(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),
        CaseDirective: /* @__PURE__ */ c(/^\s*(\{%-?\s*)?(endcase|when)\b/)
      }),
      /* @__PURE__ */ Y.add({
        "UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O) {
          let a = O.firstChild, e = O.lastChild;
          return !a || a.name != "Tag" ? null : { from: a.to, to: e.name == "EndTag" ? e.from : O.to };
        }
      })
    ]
  }),
  languageData: {
    commentTokens: { line: "#" },
    indentOnInput: /^\s*{%-?\s*(?:end|elsif|else|when|)$/
  }
}), m = /* @__PURE__ */ v();
function g(O) {
  return $O.configure({
    wrap: u((a) => a.type.isTop ? {
      parser: O.parser,
      overlay: (e) => e.name == "Text" || e.name == "RawText"
    } : null)
  }, "liquid");
}
const aO = /* @__PURE__ */ g(m.language);
function iO(O = {}) {
  let a = O.base || m, e = a.language == m.language ? aO : g(a.language);
  return new y(e, [
    a.support,
    e.data.of({ autocomplete: J(O) }),
    a.language.data.of({ closeBrackets: { brackets: ["{"] } }),
    OO
  ]);
}
export {
  OO as closePercentBrace,
  iO as liquid,
  J as liquidCompletionSource,
  aO as liquidLanguage
};
