import { u as v } from "../../../../../../../_virtual/unesc.js";
(function(i, o) {
  o.__esModule = !0, o.default = c;
  function l(n) {
    for (var t = n.toLowerCase(), r = "", e = !1, a = 0; a < 6 && t[a] !== void 0; a++) {
      var u = t.charCodeAt(a), d = u >= 97 && u <= 102 || u >= 48 && u <= 57;
      if (e = u === 32, !d)
        break;
      r += t[a];
    }
    if (r.length !== 0) {
      var f = parseInt(r, 16), h = f >= 55296 && f <= 57343;
      return h || f === 0 || f > 1114111 ? ["\uFFFD", r.length + (e ? 1 : 0)] : [String.fromCodePoint(f), r.length + (e ? 1 : 0)];
    }
  }
  var F = /\\/;
  function c(n) {
    var t = F.test(n);
    if (!t)
      return n;
    for (var r = "", e = 0; e < n.length; e++) {
      if (n[e] === "\\") {
        var a = l(n.slice(e + 1, e + 7));
        if (a !== void 0) {
          r += a[0], e += a[1];
          continue;
        }
        if (n[e + 1] === "\\") {
          r += "\\", e++;
          continue;
        }
        n.length === e + 1 && (r += n[e]);
        continue;
      }
      r += n[e];
    }
    return r;
  }
  i.exports = o.default;
})(v, v.exports);
//# sourceMappingURL=unesc.js.map
