var E = Object.defineProperty;
var n = (O, e) => E(O, "name", { value: e, configurable: !0 });
import { ContextTracker as M, ExternalTokenizer as k, styleTags as y, tags as o, LRParser as Z, LRLanguage as C, indentNodeProp as N, delimitedIndent as q, foldNodeProp as j, foldInside as A, LanguageSupport as g, parseMixed as H } from "../../../editor.js";
const f = 63, Y = 64, F = 1, I = 2, z = 3, K = 4, V = 5, J = 6, OO = 7, G = 65, eO = 66, aO = 8, rO = 9, nO = 10, tO = 11, oO = 12, _ = 13, PO = 19, QO = 20, sO = 29, lO = 33, cO = 34, fO = 47, XO = 0, p = 1, m = 2, R = 3, x = 4, v = class v {
  constructor(e, a, r) {
    this.parent = e, this.depth = a, this.type = r, this.hash = (e ? e.hash + e.hash << 8 : 0) + a + (a << 4) + r;
  }
};
n(v, "Context");
let Q = v;
Q.top = new Q(null, -1, XO);
function d(O, e) {
  for (let a = 0, r = e - O.pos - 1; ; r--, a++) {
    let P = O.peek(r);
    if (s(P) || P == -1) return a;
  }
}
n(d, "findColumn");
function $(O) {
  return O == 32 || O == 9;
}
n($, "isNonBreakSpace");
function s(O) {
  return O == 10 || O == 13;
}
n(s, "isBreakSpace");
function w(O) {
  return $(O) || s(O);
}
n(w, "isSpace");
function c(O) {
  return O < 0 || w(O);
}
n(c, "isSep");
const dO = new M({
  start: Q.top,
  reduce(O, e) {
    return O.type == R && (e == QO || e == cO) ? O.parent : O;
  },
  shift(O, e, a, r) {
    if (e == z)
      return new Q(O, d(r, r.pos), p);
    if (e == G || e == V)
      return new Q(O, d(r, r.pos), m);
    if (e == f)
      return O.parent;
    if (e == PO || e == lO)
      return new Q(O, 0, R);
    if (e == _ && O.type == x)
      return O.parent;
    if (e == fO) {
      let P = /[1-9]/.exec(r.read(r.pos, a.pos));
      if (P) return new Q(O, O.depth + +P[0], x);
    }
    return O;
  },
  hash(O) {
    return O.hash;
  }
});
function X(O, e, a = 0) {
  return O.peek(a) == e && O.peek(a + 1) == e && O.peek(a + 2) == e && c(O.peek(a + 3));
}
n(X, "three");
const RO = new k((O, e) => {
  if (O.next == -1 && e.canShift(Y))
    return O.acceptToken(Y);
  let a = O.peek(-1);
  if ((s(a) || a < 0) && e.context.type != R) {
    if (X(
      O,
      45
      /* '-' */
    ))
      if (e.canShift(f)) O.acceptToken(f);
      else return O.acceptToken(F, 3);
    if (X(
      O,
      46
      /* '.' */
    ))
      if (e.canShift(f)) O.acceptToken(f);
      else return O.acceptToken(I, 3);
    let r = 0;
    for (; O.next == 32; )
      r++, O.advance();
    (r < e.context.depth || r == e.context.depth && e.context.type == p && (O.next != 45 || !c(O.peek(1)))) && // Not blank
    O.next != -1 && !s(O.next) && O.next != 35 && O.acceptToken(f, -r);
  }
}, { contextual: !0 }), SO = new k((O, e) => {
  if (e.context.type == R) {
    O.next == 63 && (O.advance(), c(O.next) && O.acceptToken(OO));
    return;
  }
  if (O.next == 45)
    O.advance(), c(O.next) && O.acceptToken(e.context.type == p && e.context.depth == d(O, O.pos - 1) ? K : z);
  else if (O.next == 63)
    O.advance(), c(O.next) && O.acceptToken(e.context.type == m && e.context.depth == d(O, O.pos - 1) ? J : V);
  else {
    let a = O.pos;
    for (; ; )
      if ($(O.next)) {
        if (O.pos == a) return;
        O.advance();
      } else if (O.next == 33)
        L(O);
      else if (O.next == 38)
        T(O);
      else if (O.next == 42) {
        T(O);
        break;
      } else if (O.next == 39 || O.next == 34) {
        if (h(O, !0)) break;
        return;
      } else if (O.next == 91 || O.next == 123) {
        if (!kO(O)) return;
        break;
      } else {
        B(O, !0, !1, 0);
        break;
      }
    for (; $(O.next); ) O.advance();
    if (O.next == 58) {
      if (O.pos == a && e.canShift(sO)) return;
      let r = O.peek(1);
      c(r) && O.acceptTokenTo(e.context.type == m && e.context.depth == d(O, a) ? eO : G, a);
    }
  }
}, { contextual: !0 });
function iO(O) {
  return O > 32 && O < 127 && O != 34 && O != 37 && O != 44 && O != 60 && O != 62 && O != 92 && O != 94 && O != 96 && O != 123 && O != 124 && O != 125;
}
n(iO, "uriChar");
function W(O) {
  return O >= 48 && O <= 57 || O >= 97 && O <= 102 || O >= 65 && O <= 70;
}
n(W, "hexChar");
function U(O, e) {
  return O.next == 37 ? (O.advance(), W(O.next) && O.advance(), W(O.next) && O.advance(), !0) : iO(O.next) || e && O.next == 44 ? (O.advance(), !0) : !1;
}
n(U, "readUriChar");
function L(O) {
  if (O.advance(), O.next == 60) {
    for (O.advance(); ; )
      if (!U(O, !0)) {
        O.next == 62 && O.advance();
        break;
      }
  } else
    for (; U(O, !1); )
      ;
}
n(L, "readTag");
function T(O) {
  for (O.advance(); !c(O.next) && i(O.tag) != "f"; ) O.advance();
}
n(T, "readAnchor");
function h(O, e) {
  let a = O.next, r = !1, P = O.pos;
  for (O.advance(); ; ) {
    let t = O.next;
    if (t < 0) break;
    if (O.advance(), t == a)
      if (t == 39)
        if (O.next == 39) O.advance();
        else break;
      else
        break;
    else if (t == 92 && a == 34)
      O.next >= 0 && O.advance();
    else if (s(t)) {
      if (e) return !1;
      r = !0;
    } else if (e && O.pos >= P + 1024)
      return !1;
  }
  return !r;
}
n(h, "readQuoted");
function kO(O) {
  for (let e = [], a = O.pos + 1024; ; )
    if (O.next == 91 || O.next == 123)
      e.push(O.next), O.advance();
    else if (O.next == 39 || O.next == 34) {
      if (!h(O, !0)) return !1;
    } else if (O.next == 93 || O.next == 125) {
      if (e[e.length - 1] != O.next - 2) return !1;
      if (e.pop(), O.advance(), !e.length) return !0;
    } else {
      if (O.next < 0 || O.pos > a || s(O.next))
        return !1;
      O.advance();
    }
}
n(kO, "scanBrackets");
const bO = "iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";
function i(O) {
  return O < 33 ? "u" : O > 125 ? "s" : bO[O - 33];
}
n(i, "charTag");
function b(O, e) {
  let a = i(O);
  return a != "u" && !(e && a == "f");
}
n(b, "isSafe");
function B(O, e, a, r) {
  if (i(O.next) == "s" || (O.next == 63 || O.next == 58 || O.next == 45) && b(O.peek(1), a))
    O.advance();
  else
    return !1;
  let P = O.pos;
  for (; ; ) {
    let t = O.next, l = 0, S = r + 1;
    for (; w(t); ) {
      if (s(t)) {
        if (e) return !1;
        S = 0;
      } else
        S++;
      t = O.peek(++l);
    }
    if (!(t >= 0 && (t == 58 ? b(O.peek(l + 1), a) : t == 35 ? O.peek(l - 1) != 32 : b(t, a))) || !a && S <= r || S == 0 && !a && (X(O, 45, l) || X(O, 46, l)))
      break;
    if (e && i(t) == "f") return !1;
    for (let D = l; D >= 0; D--) O.advance();
    if (e && O.pos > P + 1024) return !1;
  }
  return !0;
}
n(B, "readPlain");
const gO = new k((O, e) => {
  if (O.next == 33)
    L(O), O.acceptToken(oO);
  else if (O.next == 38 || O.next == 42) {
    let a = O.next == 38 ? nO : tO;
    T(O), O.acceptToken(a);
  } else O.next == 39 || O.next == 34 ? (h(O, !1), O.acceptToken(rO)) : B(O, !1, e.context.type == R, e.context.depth) && O.acceptToken(aO);
}), mO = new k((O, e) => {
  let a = e.context.type == x ? e.context.depth : -1, r = O.pos;
  O: for (; ; ) {
    let P = 0, t = O.next;
    for (; t == 32; ) t = O.peek(++P);
    if (!P && (X(O, 45, P) || X(O, 46, P)) || !s(t) && (a < 0 && (a = Math.max(e.context.depth + 1, P)), P < a))
      break;
    for (; ; ) {
      if (O.next < 0) break O;
      let l = s(O.next);
      if (O.advance(), l) continue O;
      r = O.pos;
    }
  }
  O.acceptTokenTo(_, r);
}), xO = y({
  DirectiveName: o.keyword,
  DirectiveContent: o.attributeValue,
  "DirectiveEnd DocEnd": o.meta,
  QuotedLiteral: o.string,
  BlockLiteralHeader: o.special(o.string),
  BlockLiteralContent: o.content,
  Literal: o.content,
  "Key/Literal Key/QuotedLiteral": o.definition(o.propertyName),
  "Anchor Alias": o.labelName,
  Tag: o.typeName,
  Comment: o.lineComment,
  ": , -": o.separator,
  "?": o.punctuation,
  "[ ]": o.squareBracket,
  "{ }": o.brace
}), $O = Z.deserialize({
  version: 14,
  states: "5lQ!ZQgOOO#PQfO'#C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$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",
  goto: ",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",
  nodeNames: "⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",
  maxTerm: 74,
  context: dO,
  nodeProps: [
    ["isolate", -3, 8, 9, 14, ""],
    ["openedBy", 18, "[", 32, "{"],
    ["closedBy", 19, "]", 33, "}"]
  ],
  propSources: [xO],
  skippedNodes: [0],
  repeatNodeCount: 6,
  tokenData: "-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",
  tokenizers: [RO, SO, gO, mO, 0, 1],
  topRules: { Stream: [0, 15] },
  tokenPrec: 0
}), TO = /* @__PURE__ */ Z.deserialize({
  version: 14,
  states: "!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",
  stateData: "!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",
  goto: "vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",
  nodeNames: "⚠ Document Frontmatter DashLine FrontmatterContent Body",
  maxTerm: 10,
  skippedNodes: [0],
  repeatNodeCount: 2,
  tokenData: "$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",
  tokenizers: [0],
  topRules: { Document: [0, 1] },
  tokenPrec: 67
}), u = /* @__PURE__ */ C.define({
  name: "yaml",
  parser: /* @__PURE__ */ $O.configure({
    props: [
      /* @__PURE__ */ N.add({
        Stream: /* @__PURE__ */ n((O) => {
          for (let e = O.node.resolve(O.pos, -1); e && e.to >= O.pos; e = e.parent) {
            if (e.name == "BlockLiteralContent" && e.from < e.to)
              return O.baseIndentFor(e);
            if (e.name == "BlockLiteral")
              return O.baseIndentFor(e) + O.unit;
            if (e.name == "BlockSequence" || e.name == "BlockMapping")
              return O.column(e.from, 1);
            if (e.name == "QuotedLiteral")
              return null;
            if (e.name == "Literal") {
              let a = O.column(e.from, 1);
              if (a == O.lineIndent(e.from, 1))
                return a;
              if (e.to > O.pos)
                return null;
            }
          }
          return null;
        }, "Stream"),
        FlowMapping: /* @__PURE__ */ q({ closing: "}" }),
        FlowSequence: /* @__PURE__ */ q({ closing: "]" })
      }),
      /* @__PURE__ */ j.add({
        "FlowMapping FlowSequence": A,
        "BlockSequence Pair BlockLiteral": /* @__PURE__ */ n((O, e) => ({ from: e.doc.lineAt(O.from).to, to: O.to }), "BlockSequence Pair BlockLiteral")
      })
    ]
  }),
  languageData: {
    commentTokens: { line: "#" },
    indentOnInput: /^\s*[\]\}]$/
  }
});
function qO() {
  return new g(u);
}
n(qO, "yaml");
const pO = /* @__PURE__ */ C.define({
  name: "yaml-frontmatter",
  parser: /* @__PURE__ */ TO.configure({
    props: [/* @__PURE__ */ y({ DashLine: o.meta })]
  })
});
function YO(O) {
  let { language: e, support: a } = O.content instanceof g ? O.content : { language: O.content, support: [] };
  return new g(pO.configure({
    wrap: H((r) => r.name == "FrontmatterContent" ? { parser: u.parser } : r.name == "Body" ? { parser: e.parser } : null)
  }), a);
}
n(YO, "yamlFrontmatter");
export {
  qO as yaml,
  YO as yamlFrontmatter,
  u as yamlLanguage
};
