@genome-spy/app 0.69.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { A as J } from "./AbortablePromiseCache-CcuMrnn7.js";
2
- import { u as E, Q as U, a as K } from "./unzip-NywezaRR.js";
3
- import { LocalFile as F, RemoteFile as M } from "./browser-BRemItdO.js";
1
+ import { A as J } from "./AbortablePromiseCache-Dj0vzLnp.js";
2
+ import { u as q, Q as U, a as K } from "./unzip-Bac01w6X.js";
3
+ import { LocalFile as R, RemoteFile as F } from "./browser-0iNU5Wit.js";
4
4
  class L {
5
5
  constructor(e, t, n, i) {
6
6
  this.minv = e, this.maxv = t, this.bin = n, this._fetchedSize = i;
@@ -35,8 +35,7 @@ class j {
35
35
  })), this.parseP;
36
36
  }
37
37
  async hasRefSeq(e, t = {}) {
38
- var i;
39
- return !!((i = (await this.parse(t)).indices[e]) != null && i.binIndex);
38
+ return !!(await this.parse(t)).indices[e]?.binIndex;
40
39
  }
41
40
  _parseNameBytes(e) {
42
41
  let t = 0, n = 0;
@@ -76,7 +75,7 @@ function X(a, e) {
76
75
  (!e || i.maxv.compareTo(e) > 0) && (n === void 0 ? (t.push(i), n = i) : ee(n, i) ? i.maxv.compareTo(n.maxv) > 0 && (n.maxv = i.maxv) : (t.push(i), n = i));
77
76
  return t;
78
77
  }
79
- class O {
78
+ class E {
80
79
  constructor(e, t) {
81
80
  this.blockPosition = e, this.dataPosition = t;
82
81
  }
@@ -88,7 +87,7 @@ class O {
88
87
  }
89
88
  }
90
89
  function A(a, e = 0) {
91
- return new O(a[e + 7] * 1099511627776 + a[e + 6] * 4294967296 + a[e + 5] * 16777216 + a[e + 4] * 65536 + a[e + 3] * 256 + a[e + 2], a[e + 1] << 8 | a[e]);
90
+ return new E(a[e + 7] * 1099511627776 + a[e + 6] * 4294967296 + a[e + 5] * 16777216 + a[e + 4] * 65536 + a[e + 3] * 256 + a[e + 2], a[e + 1] << 8 | a[e]);
92
91
  }
93
92
  const te = 21582659, ne = 38359875, ie = {
94
93
  0: "generic",
@@ -101,7 +100,7 @@ function se(a, e) {
101
100
  function W(a, e) {
102
101
  return Math.floor(a / 2 ** e);
103
102
  }
104
- class q extends j {
103
+ class V extends j {
105
104
  constructor(e) {
106
105
  super(e), this.maxBinNumber = 0, this.depth = 0, this.minShift = 0;
107
106
  }
@@ -123,19 +122,19 @@ class q extends j {
123
122
  ref: n.getInt32(t + 4, !0),
124
123
  start: n.getInt32(t + 8, !0),
125
124
  end: n.getInt32(t + 12, !0)
126
- }, c = n.getInt32(t + 16, !0), m = c ? String.fromCharCode(c) : void 0, f = n.getInt32(t + 20, !0), x = n.getInt32(t + 24, !0), { refIdToName: d, refNameToId: l } = this._parseNameBytes(e.subarray(t + 28, t + 28 + x));
125
+ }, c = n.getInt32(t + 16, !0), u = c ? String.fromCharCode(c) : void 0, f = n.getInt32(t + 20, !0), m = n.getInt32(t + 24, !0), { refIdToName: d, refNameToId: l } = this._parseNameBytes(e.subarray(t + 28, t + 28 + m));
127
126
  return {
128
127
  refIdToName: d,
129
128
  refNameToId: l,
130
129
  skipLines: f,
131
- metaChar: m,
130
+ metaChar: u,
132
131
  columnNumbers: s,
133
132
  format: r,
134
133
  coordinateType: o
135
134
  };
136
135
  }
137
136
  async _parse(e = {}) {
138
- const t = await E(await this.filehandle.readFile(e)), n = new DataView(t.buffer);
137
+ const t = await q(await this.filehandle.readFile(e)), n = new DataView(t.buffer);
139
138
  let i;
140
139
  if (n.getUint32(0, !0) === te)
141
140
  i = 1;
@@ -152,27 +151,27 @@ class q extends j {
152
151
  coordinateType: "zero-based-half-open",
153
152
  format: "generic"
154
153
  }, c = n.getInt32(16 + r, !0);
155
- let m, f = 16 + r + 4;
156
- const x = new Array(c).fill(0).map(() => {
154
+ let u, f = 16 + r + 4;
155
+ const m = new Array(c).fill(0).map(() => {
157
156
  const d = n.getInt32(f, !0);
158
157
  f += 4;
159
158
  const l = {};
160
159
  let h;
161
- for (let b = 0; b < d; b += 1) {
162
- const k = n.getUint32(f, !0);
163
- if (k > this.maxBinNumber)
160
+ for (let S = 0; S < d; S += 1) {
161
+ const C = n.getUint32(f, !0);
162
+ if (C > this.maxBinNumber)
164
163
  h = this.parsePseudoBin(t, f + 4), f += 48;
165
164
  else {
166
- const w = A(t, f + 4);
167
- m = this._findFirstData(m, w);
168
- const p = n.getInt32(f + 12, !0);
165
+ const I = A(t, f + 4);
166
+ u = this._findFirstData(u, I);
167
+ const k = n.getInt32(f + 12, !0);
169
168
  f += 16;
170
- const I = new Array(p);
171
- for (let g = 0; g < p; g += 1) {
172
- const u = A(t, f), S = A(t, f + 8);
173
- f += 16, I[g] = new L(u, S, k);
169
+ const w = new Array(k);
170
+ for (let b = 0; b < k; b += 1) {
171
+ const x = A(t, f), g = A(t, f + 8);
172
+ f += 16, w[b] = new L(x, g, C);
174
173
  }
175
- l[k] = I;
174
+ l[C] = w;
176
175
  }
177
176
  }
178
177
  return { binIndex: l, stats: h };
@@ -182,9 +181,9 @@ class q extends j {
182
181
  csi: !0,
183
182
  refCount: c,
184
183
  maxBlockSize: 65536,
185
- firstDataLine: m,
184
+ firstDataLine: u,
186
185
  csiVersion: i,
187
- indices: x,
186
+ indices: m,
188
187
  depth: this.depth,
189
188
  maxBinNumber: this.maxBinNumber,
190
189
  maxRefLength: o
@@ -203,13 +202,13 @@ class q extends j {
203
202
  const s = o.indices[r];
204
203
  if (!s)
205
204
  return [];
206
- const c = this.reg2bins(t, n), m = [];
207
- for (const [f, x] of c)
208
- for (let d = f; d <= x; d++)
205
+ const c = this.reg2bins(t, n), u = [];
206
+ for (const [f, m] of c)
207
+ for (let d = f; d <= m; d++)
209
208
  if (s.binIndex[d])
210
209
  for (const l of s.binIndex[d])
211
- m.push(new L(l.minv, l.maxv, d));
212
- return X(m, new O(0, 0));
210
+ u.push(new L(l.minv, l.maxv, d));
211
+ return X(u, new E(0, 0));
213
212
  }
214
213
  /**
215
214
  * calculate the list of bins that may overlap with region [beg,end) (zero-based half-open)
@@ -238,15 +237,14 @@ function ae(a, e) {
238
237
  [4681 + (a >> 14), 4681 + (e >> 14)]
239
238
  ];
240
239
  }
241
- class R extends j {
240
+ class D extends j {
242
241
  async lineCount(e, t = {}) {
243
- var r;
244
242
  const n = await this.parse(t), i = n.refNameToId[e];
245
- return i === void 0 || !n.indices[i] ? -1 : ((r = n.indices[i].stats) == null ? void 0 : r.lineCount) ?? -1;
243
+ return i === void 0 || !n.indices[i] ? -1 : n.indices[i].stats?.lineCount ?? -1;
246
244
  }
247
245
  // fetch and parse the index
248
246
  async _parse(e = {}) {
249
- const t = await this.filehandle.readFile(e), n = await E(t), i = new DataView(n.buffer);
247
+ const t = await this.filehandle.readFile(e), n = await q(t), i = new DataView(n.buffer);
250
248
  if (i.getUint32(0, !0) !== re)
251
249
  throw new Error("Not a TBI file");
252
250
  const r = i.getUint32(4, !0), s = i.getUint32(8, !0), c = s & 65536 ? "zero-based-half-open" : "1-based-closed", f = {
@@ -256,57 +254,57 @@ class R extends j {
256
254
  }[s & 15];
257
255
  if (!f)
258
256
  throw new Error(`invalid Tabix preset format flags ${s}`);
259
- const x = {
257
+ const m = {
260
258
  ref: i.getInt32(12, !0),
261
259
  start: i.getInt32(16, !0),
262
260
  end: i.getInt32(20, !0)
263
- }, d = i.getInt32(24, !0), l = 5, h = ((1 << (l + 1) * 3) - 1) / 7, b = 2 ** (14 + l * 3), k = d ? String.fromCharCode(d) : void 0, w = i.getInt32(28, !0), p = i.getInt32(32, !0), { refNameToId: I, refIdToName: g } = this._parseNameBytes(n.slice(36, 36 + p));
264
- let u = 36 + p, S;
261
+ }, d = i.getInt32(24, !0), l = 5, h = ((1 << (l + 1) * 3) - 1) / 7, S = 2 ** (14 + l * 3), C = d ? String.fromCharCode(d) : void 0, I = i.getInt32(28, !0), k = i.getInt32(32, !0), { refNameToId: w, refIdToName: b } = this._parseNameBytes(n.slice(36, 36 + k));
262
+ let x = 36 + k, g;
265
263
  return {
266
264
  indices: new Array(r).fill(0).map(() => {
267
- const T = i.getInt32(u, !0);
268
- u += 4;
269
- const N = {};
270
- let _;
271
- for (let v = 0; v < T; v += 1) {
272
- const y = i.getUint32(u, !0);
273
- if (u += 4, y > h + 1)
265
+ const y = i.getInt32(x, !0);
266
+ x += 4;
267
+ const B = {};
268
+ let M;
269
+ for (let T = 0; T < y; T += 1) {
270
+ const v = i.getUint32(x, !0);
271
+ if (x += 4, v > h + 1)
274
272
  throw new Error("tabix index contains too many bins, please use a CSI index");
275
- if (y === h + 1) {
276
- const P = i.getInt32(u, !0);
277
- u += 4, P === 2 && (_ = this.parsePseudoBin(n, u)), u += 16 * P;
273
+ if (v === h + 1) {
274
+ const _ = i.getInt32(x, !0);
275
+ x += 4, _ === 2 && (M = this.parsePseudoBin(n, x)), x += 16 * _;
278
276
  } else {
279
- const P = i.getInt32(u, !0);
280
- u += 4;
281
- const D = new Array(P);
282
- for (let V = 0; V < P; V += 1) {
283
- const $ = A(n, u), Y = A(n, u + 8);
284
- u += 16, S = this._findFirstData(S, $), D[V] = new L($, Y, y);
277
+ const _ = i.getInt32(x, !0);
278
+ x += 4;
279
+ const O = new Array(_);
280
+ for (let z = 0; z < _; z += 1) {
281
+ const $ = A(n, x), Y = A(n, x + 8);
282
+ x += 16, g = this._findFirstData(g, $), O[z] = new L($, Y, v);
285
283
  }
286
- N[y] = D;
284
+ B[v] = O;
287
285
  }
288
286
  }
289
- const z = i.getInt32(u, !0);
290
- u += 4;
291
- const B = new Array(z);
292
- for (let v = 0; v < z; v += 1)
293
- B[v] = A(n, u), u += 8, S = this._findFirstData(S, B[v]);
287
+ const P = i.getInt32(x, !0);
288
+ x += 4;
289
+ const N = new Array(P);
290
+ for (let T = 0; T < P; T += 1)
291
+ N[T] = A(n, x), x += 8, g = this._findFirstData(g, N[T]);
294
292
  return {
295
- binIndex: N,
296
- linearIndex: B,
297
- stats: _
293
+ binIndex: B,
294
+ linearIndex: N,
295
+ stats: M
298
296
  };
299
297
  }),
300
- metaChar: k,
298
+ metaChar: C,
301
299
  maxBinNumber: h,
302
- maxRefLength: b,
303
- skipLines: w,
304
- firstDataLine: S,
305
- columnNumbers: x,
300
+ maxRefLength: S,
301
+ skipLines: I,
302
+ firstDataLine: g,
303
+ columnNumbers: m,
306
304
  coordinateType: c,
307
305
  format: f,
308
- refIdToName: g,
309
- refNameToId: I,
306
+ refIdToName: b,
307
+ refNameToId: w,
310
308
  maxBlockSize: 65536
311
309
  };
312
310
  }
@@ -323,19 +321,19 @@ class R extends j {
323
321
  const s = o.indices[r];
324
322
  if (!s)
325
323
  return [];
326
- (s.linearIndex.length > 0 ? s.linearIndex[t >> G >= s.linearIndex.length ? s.linearIndex.length - 1 : t >> G] : new O(0, 0)) || console.warn("querying outside of possible tabix range");
327
- const m = ae(t, n), f = [];
328
- for (const [b, k] of m)
329
- for (let w = b; w <= k; w++)
330
- if (s.binIndex[w])
331
- for (const p of s.binIndex[w])
332
- f.push(new L(p.minv, p.maxv, w));
333
- const x = s.linearIndex.length;
324
+ (s.linearIndex.length > 0 ? s.linearIndex[t >> G >= s.linearIndex.length ? s.linearIndex.length - 1 : t >> G] : new E(0, 0)) || console.warn("querying outside of possible tabix range");
325
+ const u = ae(t, n), f = [];
326
+ for (const [S, C] of u)
327
+ for (let I = S; I <= C; I++)
328
+ if (s.binIndex[I])
329
+ for (const k of s.binIndex[I])
330
+ f.push(new L(k.minv, k.maxv, I));
331
+ const m = s.linearIndex.length;
334
332
  let d;
335
- const l = Math.min(t >> 14, x - 1), h = Math.min(n >> 14, x - 1);
336
- for (let b = l; b <= h; ++b) {
337
- const k = s.linearIndex[b];
338
- k && (!d || k.compareTo(d) < 0) && (d = k);
333
+ const l = Math.min(t >> 14, m - 1), h = Math.min(n >> 14, m - 1);
334
+ for (let S = l; S <= h; ++S) {
335
+ const C = s.linearIndex[S];
336
+ C && (!d || C.compareTo(d) < 0) && (d = C);
339
337
  }
340
338
  return X(f, d);
341
339
  }
@@ -367,7 +365,7 @@ class he {
367
365
  * indexing and querying. note that the data that is returned is not altered,
368
366
  * just the names of the reference sequences that are used for querying.
369
367
  */
370
- constructor({ path: e, filehandle: t, url: n, tbiPath: i, tbiUrl: o, tbiFilehandle: r, csiPath: s, csiUrl: c, csiFilehandle: m, renameRefSeqs: f, chunkCacheSize: x = 5 * 2 ** 20 }) {
368
+ constructor({ path: e, filehandle: t, url: n, tbiPath: i, tbiUrl: o, tbiFilehandle: r, csiPath: s, csiUrl: c, csiFilehandle: u, renameRefSeqs: f, chunkCacheSize: m = 5 * 2 ** 20 }) {
371
369
  this.cache = new U({
372
370
  maxSize: 1e3
373
371
  });
@@ -375,52 +373,52 @@ class he {
375
373
  if (t)
376
374
  this.filehandle = t;
377
375
  else if (e)
378
- this.filehandle = new F(e);
376
+ this.filehandle = new R(e);
379
377
  else if (n)
380
- this.filehandle = new M(n);
378
+ this.filehandle = new F(n);
381
379
  else
382
380
  throw new TypeError("must provide either filehandle or path");
383
381
  if (r)
384
- this.index = new R({
382
+ this.index = new D({
385
383
  filehandle: r,
386
384
  renameRefSeqs: d
387
385
  });
388
- else if (m)
389
- this.index = new q({
390
- filehandle: m,
386
+ else if (u)
387
+ this.index = new V({
388
+ filehandle: u,
391
389
  renameRefSeqs: d
392
390
  });
393
391
  else if (i)
394
- this.index = new R({
395
- filehandle: new F(i),
392
+ this.index = new D({
393
+ filehandle: new R(i),
396
394
  renameRefSeqs: d
397
395
  });
398
396
  else if (s)
399
- this.index = new q({
400
- filehandle: new F(s),
397
+ this.index = new V({
398
+ filehandle: new R(s),
401
399
  renameRefSeqs: d
402
400
  });
403
401
  else if (e)
404
- this.index = new R({
405
- filehandle: new F(`${e}.tbi`),
402
+ this.index = new D({
403
+ filehandle: new R(`${e}.tbi`),
406
404
  renameRefSeqs: d
407
405
  });
408
406
  else if (c)
409
- this.index = new q({
410
- filehandle: new M(c)
407
+ this.index = new V({
408
+ filehandle: new F(c)
411
409
  });
412
410
  else if (o)
413
- this.index = new R({
414
- filehandle: new M(o)
411
+ this.index = new D({
412
+ filehandle: new F(o)
415
413
  });
416
414
  else if (n)
417
- this.index = new R({
418
- filehandle: new M(`${n}.tbi`)
415
+ this.index = new D({
416
+ filehandle: new F(`${n}.tbi`)
419
417
  });
420
418
  else
421
419
  throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");
422
420
  this.renameRefSeq = d, this.hasCustomRenameRefSeq = f !== void 0, this.chunkCache = new J({
423
- cache: new U({ maxSize: Math.floor(x / 65536) }),
421
+ cache: new U({ maxSize: Math.floor(m / 65536) }),
424
422
  fill: (l, h) => this.readChunk(l, { signal: h })
425
423
  });
426
424
  }
@@ -441,55 +439,54 @@ class he {
441
439
  return e[n] * 256 + (i - t[n]) + o + 1;
442
440
  }
443
441
  async getLines(e, t, n, i) {
444
- var I;
445
442
  let o, r = {}, s;
446
443
  typeof i == "function" ? s = i : (r = i, s = i.lineCallback, o = i.signal);
447
- const c = await this.index.getMetadata(r), m = t ?? 0, f = n ?? c.maxRefLength;
448
- if (!(m <= f))
444
+ const c = await this.index.getMetadata(r), u = t ?? 0, f = n ?? c.maxRefLength;
445
+ if (!(u <= f))
449
446
  throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");
450
- if (m === f)
447
+ if (u === f)
451
448
  return;
452
- const x = await this.index.blocksForRange(e, m, f, r), d = new TextDecoder("utf8"), l = c.format === "VCF", h = {
449
+ const m = await this.index.blocksForRange(e, u, f, r), d = new TextDecoder("utf8"), l = c.format === "VCF", h = {
453
450
  ref: c.columnNumbers.ref || 0,
454
451
  start: c.columnNumbers.start || 0,
455
452
  end: l ? 8 : c.columnNumbers.end || 0
456
- }, b = Math.max(h.ref, h.start, h.end), k = (I = c.metaChar) == null ? void 0 : I.charCodeAt(0), w = c.coordinateType === "1-based-closed" ? -1 : 0, p = !this.hasCustomRenameRefSeq;
457
- for (const g of x) {
458
- const { buffer: u, cpositions: S, dpositions: C } = await this.chunkCache.get(g.toString(), g, o);
459
- let T = 0, N = 0;
460
- const _ = d.decode(u);
461
- if (u.length == _.length)
462
- for (; T < _.length; ) {
463
- const B = _.indexOf(`
464
- `, T);
465
- if (B === -1)
453
+ }, S = Math.max(h.ref, h.start, h.end), C = c.metaChar?.charCodeAt(0), I = c.coordinateType === "1-based-closed" ? -1 : 0, k = !this.hasCustomRenameRefSeq;
454
+ for (const w of m) {
455
+ const { buffer: b, cpositions: x, dpositions: g } = await this.chunkCache.get(w.toString(), w, o);
456
+ let p = 0, y = 0;
457
+ const B = d.decode(b);
458
+ if (b.length == B.length)
459
+ for (; p < B.length; ) {
460
+ const P = B.indexOf(`
461
+ `, p);
462
+ if (P === -1)
466
463
  break;
467
- const v = _.slice(T, B);
468
- if (C) {
469
- const P = T + g.minv.dataPosition;
470
- for (; N < C.length && P >= C[N]; )
471
- N++;
464
+ const N = B.slice(p, P);
465
+ if (g) {
466
+ const v = p + w.minv.dataPosition;
467
+ for (; y < g.length && v >= g[y]; )
468
+ y++;
472
469
  }
473
- const y = this.checkLine(e, m, f, v, h.ref, h.start, h.end, b, k, w, l, p);
474
- if (y === null)
470
+ const T = this.checkLine(e, u, f, N, h.ref, h.start, h.end, S, C, I, l, k);
471
+ if (T === null)
475
472
  return;
476
- y !== void 0 && s(v, this.calculateFileOffset(S, C, N, T, g.minv.dataPosition), y.start, y.end), T = B + 1;
473
+ T !== void 0 && s(N, this.calculateFileOffset(x, g, y, p, w.minv.dataPosition), T.start, T.end), p = P + 1;
477
474
  }
478
475
  else
479
- for (; T < u.length; ) {
480
- const B = u.indexOf(10, T);
481
- if (B === -1)
476
+ for (; p < b.length; ) {
477
+ const P = b.indexOf(10, p);
478
+ if (P === -1)
482
479
  break;
483
- const v = u.slice(T, B), y = d.decode(v);
484
- if (C) {
485
- const D = T + g.minv.dataPosition;
486
- for (; N < C.length && D >= C[N]; )
487
- N++;
480
+ const N = b.slice(p, P), T = d.decode(N);
481
+ if (g) {
482
+ const _ = p + w.minv.dataPosition;
483
+ for (; y < g.length && _ >= g[y]; )
484
+ y++;
488
485
  }
489
- const P = this.checkLine(e, m, f, y, h.ref, h.start, h.end, b, k, w, l, p);
490
- if (P === null)
486
+ const v = this.checkLine(e, u, f, T, h.ref, h.start, h.end, S, C, I, l, k);
487
+ if (v === null)
491
488
  return;
492
- P !== void 0 && s(y, this.calculateFileOffset(S, C, N, T, g.minv.dataPosition), P.start, P.end), T = B + 1;
489
+ v !== void 0 && s(T, this.calculateFileOffset(x, g, y, p, w.minv.dataPosition), v.start, v.end), p = P + 1;
493
490
  }
494
491
  }
495
492
  }
@@ -501,15 +498,15 @@ class he {
501
498
  * bytes up to the first non-meta line
502
499
  */
503
500
  async getHeaderBuffer(e = {}) {
504
- const { firstDataLine: t, metaChar: n, maxBlockSize: i } = await this.getMetadata(e), o = ((t == null ? void 0 : t.blockPosition) || 0) + i, r = await this.filehandle.read(o, 0, e), s = await E(r);
501
+ const { firstDataLine: t, metaChar: n, maxBlockSize: i } = await this.getMetadata(e), o = (t?.blockPosition || 0) + i, r = await this.filehandle.read(o, 0, e), s = await q(r);
505
502
  if (n) {
506
503
  let c = -1;
507
- const m = 10, f = n.charCodeAt(0);
508
- for (let x = 0, d = s.length; x < d; x++) {
509
- const l = s[x];
510
- if (x === c + 1 && l !== f)
504
+ const u = 10, f = n.charCodeAt(0);
505
+ for (let m = 0, d = s.length; m < d; m++) {
506
+ const l = s[m];
507
+ if (m === c + 1 && l !== f)
511
508
  break;
512
- l === m && (c = x);
509
+ l === u && (c = m);
513
510
  }
514
511
  return s.subarray(0, c + 1);
515
512
  }
@@ -557,38 +554,38 @@ class he {
557
554
  *
558
555
  * @returns {{ start: number, end: number } | null | undefined} coordinates if overlapping, null if should stop processing, undefined otherwise
559
556
  */
560
- checkLine(e, t, n, i, o, r, s, c, m, f, x, d) {
561
- if (m !== void 0 && i.charCodeAt(0) === m)
557
+ checkLine(e, t, n, i, o, r, s, c, u, f, m, d) {
558
+ if (u !== void 0 && i.charCodeAt(0) === u)
562
559
  return;
563
560
  if (i.length < 500) {
564
- const I = i.split(" "), g = I[o - 1];
565
- if (!(d ? g === e : this.renameRefSeq(g) === e))
561
+ const w = i.split(" "), b = w[o - 1];
562
+ if (!(d ? b === e : this.renameRefSeq(b) === e))
566
563
  return;
567
- const S = +I[r - 1] + f;
568
- if (S >= n)
564
+ const g = +w[r - 1] + f;
565
+ if (g >= n)
569
566
  return null;
570
- let C;
571
- return s === 0 || s === r ? C = S + 1 : x ? C = this._getVcfEnd(S, I[3], I[s - 1]) : C = +I[s - 1], C <= t ? void 0 : { start: S, end: C };
567
+ let p;
568
+ return s === 0 || s === r ? p = g + 1 : m ? p = this._getVcfEnd(g, w[3], w[s - 1]) : p = +w[s - 1], p <= t ? void 0 : { start: g, end: p };
572
569
  }
573
570
  let l = -1;
574
571
  const h = [-1];
575
- for (let I = 0; I < c; I++) {
576
- const g = i.indexOf(" ", l + 1);
577
- if (g === -1) {
572
+ for (let w = 0; w < c; w++) {
573
+ const b = i.indexOf(" ", l + 1);
574
+ if (b === -1) {
578
575
  h.push(i.length);
579
576
  break;
580
577
  }
581
- h.push(g), l = g;
578
+ h.push(b), l = b;
582
579
  }
583
- const b = i.slice(h[o - 1] + 1, h[o]);
584
- if (!(d ? b === e : this.renameRefSeq(b) === e))
580
+ const S = i.slice(h[o - 1] + 1, h[o]);
581
+ if (!(d ? S === e : this.renameRefSeq(S) === e))
585
582
  return;
586
- const w = +i.slice(h[r - 1] + 1, h[r]) + f;
587
- if (w >= n)
583
+ const I = +i.slice(h[r - 1] + 1, h[r]) + f;
584
+ if (I >= n)
588
585
  return null;
589
- let p;
590
- if (s === 0 || s === r ? p = w + 1 : x ? p = this._getVcfEnd(w, i.slice(h[3] + 1, h[4]), i.slice(h[s - 1] + 1, h[s])) : p = +i.slice(h[s - 1] + 1, h[s]), !(p <= t))
591
- return { start: w, end: p };
586
+ let k;
587
+ if (s === 0 || s === r ? k = I + 1 : m ? k = this._getVcfEnd(I, i.slice(h[3] + 1, h[4]), i.slice(h[s - 1] + 1, h[s])) : k = +i.slice(h[s - 1] + 1, h[s]), !(k <= t))
588
+ return { start: I, end: k };
592
589
  }
593
590
  _getVcfEnd(e, t, n) {
594
591
  let i = e + t.length;
@@ -625,7 +622,7 @@ class he {
625
622
  }
626
623
  }
627
624
  export {
628
- q as CSI,
629
- R as TBI,
625
+ V as CSI,
626
+ D as TBI,
630
627
  he as TabixIndexedFile
631
628
  };