import { __exports as s } from "../../../../../../_virtual/index15.js";
var h;
function c() {
  return h ? s : (h = 1, function(r) {
    r.__esModule = !0, r.LinesAndColumns = void 0;
    var i = `
`, l = "\r", o = function() {
      function u(t) {
        this.string = t;
        for (var e = [0], n = 0; n < t.length; )
          switch (t[n]) {
            case i:
              n += i.length, e.push(n);
              break;
            case l:
              n += l.length, t[n] === i && (n += i.length), e.push(n);
              break;
            default:
              n++;
              break;
          }
        this.offsets = e;
      }
      return u.prototype.locationForIndex = function(t) {
        if (t < 0 || t > this.string.length)
          return null;
        for (var e = 0, n = this.offsets; n[e + 1] <= t; )
          e++;
        var f = t - n[e];
        return { line: e, column: f };
      }, u.prototype.indexForLocation = function(t) {
        var e = t.line, n = t.column;
        return e < 0 || e >= this.offsets.length || n < 0 || n > this.lengthOfLine(e) ? null : this.offsets[e] + n;
      }, u.prototype.lengthOfLine = function(t) {
        var e = this.offsets[t], n = t === this.offsets.length - 1 ? this.string.length : this.offsets[t + 1];
        return n - e;
      }, u;
    }();
    r.LinesAndColumns = o, r.default = o;
  }(s), s);
}
export {
  c as __require
};
//# sourceMappingURL=index.js.map
