@sourcegraph/amp 0.0.1749196899-g16ba82 → 0.0.1749225700-gc8788d

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.
Files changed (47) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/{client-D1Pmx669.js → client-D0gbNDFf.js} +2 -2
  3. package/dist/{client-D1Pmx669.js.map → client-D0gbNDFf.js.map} +1 -1
  4. package/dist/{console-DZmALLuA.js → console-CDi5rFHv.js} +55 -44
  5. package/dist/console-CDi5rFHv.js.map +1 -0
  6. package/dist/{create_file.node-CygrebBY.js → create_file.node-DL2WuEa4.js} +2 -2
  7. package/dist/{create_file.node-CygrebBY.js.map → create_file.node-DL2WuEa4.js.map} +1 -1
  8. package/dist/{edit_file.node-D_cMkiLI.js → edit_file.node-SSEQ1h3o.js} +3 -3
  9. package/dist/{edit_file.node-D_cMkiLI.js.map → edit_file.node-SSEQ1h3o.js.map} +1 -1
  10. package/dist/{executable-C8qYZU1W.js → executable-CxioKGk7.js} +2 -2
  11. package/dist/{executable-C8qYZU1W.js.map → executable-CxioKGk7.js.map} +1 -1
  12. package/dist/{files--h2VjD8F.js → files-BQmddBey.js} +2 -2
  13. package/dist/{files--h2VjD8F.js.map → files-BQmddBey.js.map} +1 -1
  14. package/dist/fuzzy-server.js +116 -113
  15. package/dist/fuzzy-server.js.map +1 -1
  16. package/dist/{glob.node-AB34HaNl.js → glob.node-C8xrYICA.js} +4 -4
  17. package/dist/{glob.node-AB34HaNl.js.map → glob.node-C8xrYICA.js.map} +1 -1
  18. package/dist/{index-nQBDDlvh.js → index-BY5vhogw.js} +2 -2
  19. package/dist/{index-nQBDDlvh.js.map → index-BY5vhogw.js.map} +1 -1
  20. package/dist/{list_directory.node-DZamBwOx.js → list_directory.node-p_ArdqyT.js} +2 -2
  21. package/dist/{list_directory.node-DZamBwOx.js.map → list_directory.node-p_ArdqyT.js.map} +1 -1
  22. package/dist/{load-profile-DzDzDOIq.js → load-profile-DxrviVkC.js} +2 -2
  23. package/dist/{load-profile-DzDzDOIq.js.map → load-profile-DxrviVkC.js.map} +1 -1
  24. package/dist/{main-WXbdYG4Z.js → main-DIn8dJ9L.js} +409 -398
  25. package/dist/{main-WXbdYG4Z.js.map → main-DIn8dJ9L.js.map} +1 -1
  26. package/dist/{node-CBRPqFin.js → node-C9D1REPh.js} +374 -320
  27. package/dist/node-C9D1REPh.js.map +1 -0
  28. package/dist/{node-D2Ho0W-v.js → node-CHCdepF2.js} +3 -3
  29. package/dist/{node-D2Ho0W-v.js.map → node-CHCdepF2.js.map} +1 -1
  30. package/dist/{node-B9XNCq_w.js → node-CU0lZEVr.js} +2 -2
  31. package/dist/{node-B9XNCq_w.js.map → node-CU0lZEVr.js.map} +1 -1
  32. package/dist/{node-CUCcBUhU.js → node-CrPwEb6e.js} +4 -4
  33. package/dist/{node-CUCcBUhU.js.map → node-CrPwEb6e.js.map} +1 -1
  34. package/dist/{node-Cs3K2AKs.js → node-D-xGtMhE.js} +3 -3
  35. package/dist/{node-Cs3K2AKs.js.map → node-D-xGtMhE.js.map} +1 -1
  36. package/dist/{node-SvjAOtkw.js → node-DQLcKPbG.js} +2 -2
  37. package/dist/{node-SvjAOtkw.js.map → node-DQLcKPbG.js.map} +1 -1
  38. package/dist/{read_file.node-CveQp78z.js → read_file.node-DTbjOJwN.js} +2 -2
  39. package/dist/{read_file.node-CveQp78z.js.map → read_file.node-DTbjOJwN.js.map} +1 -1
  40. package/dist/{stdio-CRvROLK4.js → stdio-DuUbi3RX.js} +3 -3
  41. package/dist/{stdio-CRvROLK4.js.map → stdio-DuUbi3RX.js.map} +1 -1
  42. package/dist/storybook.js +1 -1
  43. package/dist/{undo_edit.node-C3I02TEE.js → undo_edit.node-qujh3sgI.js} +2 -2
  44. package/dist/{undo_edit.node-C3I02TEE.js.map → undo_edit.node-qujh3sgI.js.map} +1 -1
  45. package/package.json +1 -1
  46. package/dist/console-DZmALLuA.js.map +0 -1
  47. package/dist/node-CBRPqFin.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import * as he from "node:readline";
2
+ import * as ae from "node:readline";
3
3
  function D(s) {
4
4
  return Array.isArray ? Array.isArray(s) : se(s) === "[object Array]";
5
5
  }
@@ -86,16 +86,16 @@ function Me(s, e) {
86
86
  t.push(i);
87
87
  else {
88
88
  let o = u[c];
89
- const a = i[o];
90
- if (!E(a))
89
+ const h = i[o];
90
+ if (!E(h))
91
91
  return;
92
- if (c === u.length - 1 && (M(a) || ee(a) || de(a)))
93
- t.push(fe(a));
94
- else if (D(a)) {
92
+ if (c === u.length - 1 && (M(h) || ee(h) || de(h)))
93
+ t.push(fe(h));
94
+ else if (D(h)) {
95
95
  r = !0;
96
- for (let h = 0, f = a.length; h < f; h += 1)
97
- n(a[h], u, c + 1);
98
- } else u.length && n(a, u, c + 1);
96
+ for (let a = 0, f = h.length; a < f; a += 1)
97
+ n(h[a], u, c + 1);
98
+ } else u.length && n(h, u, c + 1);
99
99
  }
100
100
  };
101
101
  return n(s, M(e) ? e.split(".") : e, 0), r ? t : t[0];
@@ -236,16 +236,16 @@ class J {
236
236
  let c = [];
237
237
  const o = [{ nestedArrIndex: -1, value: u }];
238
238
  for (; o.length; ) {
239
- const { nestedArrIndex: a, value: h } = o.pop();
240
- if (E(h))
241
- if (M(h) && !P(h)) {
239
+ const { nestedArrIndex: h, value: a } = o.pop();
240
+ if (E(a))
241
+ if (M(a) && !P(a)) {
242
242
  let f = {
243
- v: h,
244
- i: a,
245
- n: this.norm.get(h)
243
+ v: a,
244
+ i: h,
245
+ n: this.norm.get(a)
246
246
  };
247
247
  c.push(f);
248
- } else D(h) && h.forEach((f, d) => {
248
+ } else D(a) && a.forEach((f, d) => {
249
249
  o.push({
250
250
  nestedArrIndex: d,
251
251
  value: f
@@ -278,7 +278,7 @@ function Ie(s, { getFn: e = l.getFn, fieldNormWeight: t = l.fieldNormWeight } =
278
278
  const { keys: r, records: n } = s, i = new J({ getFn: e, fieldNormWeight: t });
279
279
  return i.setKeys(r), i.setIndexRecords(n), i;
280
280
  }
281
- function v(s, {
281
+ function k(s, {
282
282
  errors: e = 0,
283
283
  currentLocation: t = 0,
284
284
  expectedLocation: r = 0,
@@ -307,66 +307,66 @@ function Le(s, e, t, {
307
307
  findAllMatches: u = l.findAllMatches,
308
308
  minMatchCharLength: c = l.minMatchCharLength,
309
309
  includeMatches: o = l.includeMatches,
310
- ignoreLocation: a = l.ignoreLocation
310
+ ignoreLocation: h = l.ignoreLocation
311
311
  } = {}) {
312
312
  if (e.length > w)
313
313
  throw new Error(Ee(w));
314
- const h = e.length, f = s.length, d = Math.max(0, Math.min(r, f));
314
+ const a = e.length, f = s.length, d = Math.max(0, Math.min(r, f));
315
315
  let g = i, A = d;
316
316
  const p = c > 1 || o, F = p ? Array(f) : [];
317
317
  let y;
318
318
  for (; (y = s.indexOf(e, A)) > -1; ) {
319
- let C = v(e, {
319
+ let C = k(e, {
320
320
  currentLocation: y,
321
321
  expectedLocation: d,
322
322
  distance: n,
323
- ignoreLocation: a
323
+ ignoreLocation: h
324
324
  });
325
- if (g = Math.min(C, g), A = y + h, p) {
325
+ if (g = Math.min(C, g), A = y + a, p) {
326
326
  let x = 0;
327
- for (; x < h; )
327
+ for (; x < a; )
328
328
  F[y + x] = 1, x += 1;
329
329
  }
330
330
  }
331
331
  A = -1;
332
- let B = [], L = 1, I = h + f;
333
- const ae = 1 << h - 1;
334
- for (let C = 0; C < h; C += 1) {
332
+ let B = [], L = 1, I = a + f;
333
+ const he = 1 << a - 1;
334
+ for (let C = 0; C < a; C += 1) {
335
335
  let x = 0, _ = I;
336
336
  for (; x < _; )
337
- v(e, {
337
+ k(e, {
338
338
  errors: C,
339
339
  currentLocation: d + _,
340
340
  expectedLocation: d,
341
341
  distance: n,
342
- ignoreLocation: a
342
+ ignoreLocation: h
343
343
  }) <= g ? x = _ : I = _, _ = Math.floor((I - x) / 2 + x);
344
344
  I = _;
345
- let Y = Math.max(1, d - _ + 1), T = u ? f : Math.min(d + _, f) + h, b = Array(T + 2);
346
- b[T + 1] = (1 << C) - 1;
345
+ let Y = Math.max(1, d - _ + 1), T = u ? f : Math.min(d + _, f) + a, v = Array(T + 2);
346
+ v[T + 1] = (1 << C) - 1;
347
347
  for (let m = T; m >= Y; m -= 1) {
348
- let k = m - 1, V = t[s.charAt(k)];
349
- if (p && (F[k] = +!!V), b[m] = (b[m + 1] << 1 | 1) & V, C && (b[m] |= (B[m + 1] | B[m]) << 1 | 1 | B[m + 1]), b[m] & ae && (L = v(e, {
348
+ let R = m - 1, V = t[s.charAt(R)];
349
+ if (p && (F[R] = +!!V), v[m] = (v[m + 1] << 1 | 1) & V, C && (v[m] |= (B[m + 1] | B[m]) << 1 | 1 | B[m + 1]), v[m] & he && (L = k(e, {
350
350
  errors: C,
351
- currentLocation: k,
351
+ currentLocation: R,
352
352
  expectedLocation: d,
353
353
  distance: n,
354
- ignoreLocation: a
354
+ ignoreLocation: h
355
355
  }), L <= g)) {
356
- if (g = L, A = k, A <= d)
356
+ if (g = L, A = R, A <= d)
357
357
  break;
358
358
  Y = Math.max(1, 2 * d - A);
359
359
  }
360
360
  }
361
- if (v(e, {
361
+ if (k(e, {
362
362
  errors: C + 1,
363
363
  currentLocation: d,
364
364
  expectedLocation: d,
365
365
  distance: n,
366
- ignoreLocation: a
366
+ ignoreLocation: h
367
367
  }) > g)
368
368
  break;
369
- B = b;
369
+ B = v;
370
370
  }
371
371
  const N = {
372
372
  isMatch: A >= 0,
@@ -379,7 +379,7 @@ function Le(s, e, t, {
379
379
  }
380
380
  return N;
381
381
  }
382
- function be(s) {
382
+ function ve(s) {
383
383
  let e = {};
384
384
  for (let t = 0, r = s.length; t < r; t += 1) {
385
385
  const n = s.charAt(t);
@@ -397,8 +397,8 @@ class ie {
397
397
  findAllMatches: u = l.findAllMatches,
398
398
  minMatchCharLength: c = l.minMatchCharLength,
399
399
  isCaseSensitive: o = l.isCaseSensitive,
400
- ignoreDiacritics: a = l.ignoreDiacritics,
401
- ignoreLocation: h = l.ignoreLocation
400
+ ignoreDiacritics: h = l.ignoreDiacritics,
401
+ ignoreLocation: a = l.ignoreLocation
402
402
  } = {}) {
403
403
  if (this.options = {
404
404
  location: t,
@@ -408,14 +408,14 @@ class ie {
408
408
  findAllMatches: u,
409
409
  minMatchCharLength: c,
410
410
  isCaseSensitive: o,
411
- ignoreDiacritics: a,
412
- ignoreLocation: h
413
- }, e = o ? e : e.toLowerCase(), e = a ? O(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
411
+ ignoreDiacritics: h,
412
+ ignoreLocation: a
413
+ }, e = o ? e : e.toLowerCase(), e = h ? O(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
414
414
  return;
415
415
  const f = (g, A) => {
416
416
  this.chunks.push({
417
417
  pattern: g,
418
- alphabet: be(g),
418
+ alphabet: ve(g),
419
419
  startIndex: A
420
420
  });
421
421
  }, d = this.pattern.length;
@@ -445,8 +445,8 @@ class ie {
445
445
  distance: u,
446
446
  threshold: c,
447
447
  findAllMatches: o,
448
- minMatchCharLength: a,
449
- ignoreLocation: h
448
+ minMatchCharLength: h,
449
+ ignoreLocation: a
450
450
  } = this.options;
451
451
  let f = [], d = 0, g = !1;
452
452
  this.chunks.forEach(({ pattern: p, alphabet: F, startIndex: y }) => {
@@ -455,9 +455,9 @@ class ie {
455
455
  distance: u,
456
456
  threshold: c,
457
457
  findAllMatches: o,
458
- minMatchCharLength: a,
458
+ minMatchCharLength: h,
459
459
  includeMatches: n,
460
- ignoreLocation: h
460
+ ignoreLocation: a
461
461
  });
462
462
  B && (g = !0), d += L, B && I && (f = [...f, ...I]);
463
463
  });
@@ -485,7 +485,7 @@ function X(s, e) {
485
485
  const t = s.match(e);
486
486
  return t ? t[1] : null;
487
487
  }
488
- class Re extends S {
488
+ class be extends S {
489
489
  constructor(e) {
490
490
  super(e);
491
491
  }
@@ -507,7 +507,7 @@ class Re extends S {
507
507
  };
508
508
  }
509
509
  }
510
- class ke extends S {
510
+ class Re extends S {
511
511
  constructor(e) {
512
512
  super(e);
513
513
  }
@@ -529,7 +529,7 @@ class ke extends S {
529
529
  };
530
530
  }
531
531
  }
532
- class ve extends S {
532
+ class ke extends S {
533
533
  constructor(e) {
534
534
  super(e);
535
535
  }
@@ -626,8 +626,8 @@ class ue extends S {
626
626
  findAllMatches: u = l.findAllMatches,
627
627
  minMatchCharLength: c = l.minMatchCharLength,
628
628
  isCaseSensitive: o = l.isCaseSensitive,
629
- ignoreDiacritics: a = l.ignoreDiacritics,
630
- ignoreLocation: h = l.ignoreLocation
629
+ ignoreDiacritics: h = l.ignoreDiacritics,
630
+ ignoreLocation: a = l.ignoreLocation
631
631
  } = {}) {
632
632
  super(e), this._bitapSearch = new ie(e, {
633
633
  location: t,
@@ -637,8 +637,8 @@ class ue extends S {
637
637
  findAllMatches: u,
638
638
  minMatchCharLength: c,
639
639
  isCaseSensitive: o,
640
- ignoreDiacritics: a,
641
- ignoreLocation: h
640
+ ignoreDiacritics: h,
641
+ ignoreLocation: a
642
642
  });
643
643
  }
644
644
  static get type() {
@@ -681,13 +681,13 @@ class ce extends S {
681
681
  }
682
682
  }
683
683
  const K = [
684
- Re,
684
+ be,
685
685
  ce,
686
- ve,
686
+ ke,
687
687
  Oe,
688
688
  Ne,
689
689
  $e,
690
- ke,
690
+ Re,
691
691
  ue
692
692
  ], Z = K.length, Te = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Pe = "|";
693
693
  function je(s, e = {}) {
@@ -695,18 +695,18 @@ function je(s, e = {}) {
695
695
  let r = t.trim().split(Te).filter((i) => i && !!i.trim()), n = [];
696
696
  for (let i = 0, u = r.length; i < u; i += 1) {
697
697
  const c = r[i];
698
- let o = !1, a = -1;
699
- for (; !o && ++a < Z; ) {
700
- const h = K[a];
701
- let f = h.isMultiMatch(c);
702
- f && (n.push(new h(f, e)), o = !0);
698
+ let o = !1, h = -1;
699
+ for (; !o && ++h < Z; ) {
700
+ const a = K[h];
701
+ let f = a.isMultiMatch(c);
702
+ f && (n.push(new a(f, e)), o = !0);
703
703
  }
704
704
  if (!o)
705
- for (a = -1; ++a < Z; ) {
706
- const h = K[a];
707
- let f = h.isSingleMatch(c);
705
+ for (h = -1; ++h < Z; ) {
706
+ const a = K[h];
707
+ let f = a.isSingleMatch(c);
708
708
  if (f) {
709
- n.push(new h(f, e));
709
+ n.push(new a(f, e));
710
710
  break;
711
711
  }
712
712
  }
@@ -724,8 +724,8 @@ class ze {
724
724
  ignoreLocation: u = l.ignoreLocation,
725
725
  findAllMatches: c = l.findAllMatches,
726
726
  location: o = l.location,
727
- threshold: a = l.threshold,
728
- distance: h = l.distance
727
+ threshold: h = l.threshold,
728
+ distance: a = l.distance
729
729
  } = {}) {
730
730
  this.query = null, this.options = {
731
731
  isCaseSensitive: t,
@@ -735,8 +735,8 @@ class ze {
735
735
  findAllMatches: c,
736
736
  ignoreLocation: u,
737
737
  location: o,
738
- threshold: a,
739
- distance: h
738
+ threshold: h,
739
+ distance: a
740
740
  }, e = t ? e : e.toLowerCase(), e = r ? O(e) : e, this.pattern = e, this.query = je(this.pattern, this.options);
741
741
  }
742
742
  static condition(e, t) {
@@ -752,8 +752,8 @@ class ze {
752
752
  const { includeMatches: r, isCaseSensitive: n, ignoreDiacritics: i } = this.options;
753
753
  e = n ? e : e.toLowerCase(), e = i ? O(e) : e;
754
754
  let u = 0, c = [], o = 0;
755
- for (let a = 0, h = t.length; a < h; a += 1) {
756
- const f = t[a];
755
+ for (let h = 0, a = t.length; h < a; h += 1) {
756
+ const f = t[h];
757
757
  c.length = 0, u = 0;
758
758
  for (let d = 0, g = f.length; d < g; d += 1) {
759
759
  const A = f[d], { isMatch: p, indices: F, score: y } = A.search(e);
@@ -811,23 +811,23 @@ function oe(s, e, { auto: t = !0 } = {}) {
811
811
  if (!u && i.length > 1 && !H(n))
812
812
  return r(q(n));
813
813
  if (He(n)) {
814
- const o = u ? n[G.PATH] : i[0], a = u ? n[G.PATTERN] : n[o];
815
- if (!M(a))
814
+ const o = u ? n[G.PATH] : i[0], h = u ? n[G.PATTERN] : n[o];
815
+ if (!M(h))
816
816
  throw new Error(pe(o));
817
- const h = {
817
+ const a = {
818
818
  keyId: j(o),
819
- pattern: a
819
+ pattern: h
820
820
  };
821
- return t && (h.searcher = W(a, e)), h;
821
+ return t && (a.searcher = W(h, e)), a;
822
822
  }
823
823
  let c = {
824
824
  children: [],
825
825
  operator: i[0]
826
826
  };
827
827
  return i.forEach((o) => {
828
- const a = n[o];
829
- D(a) && a.forEach((h) => {
830
- c.children.push(r(h));
828
+ const h = n[o];
829
+ D(h) && h.forEach((a) => {
830
+ c.children.push(r(a));
831
831
  });
832
832
  }), c;
833
833
  };
@@ -876,7 +876,7 @@ function Qe(s, e, {
876
876
  }), c;
877
877
  });
878
878
  }
879
- class R {
879
+ class b {
880
880
  constructor(e, t = {}, r) {
881
881
  this.options = { ...l, ...t }, this.options.useExtendedSearch, this._keyStore = new me(this.options.keys), this.setCollection(e, r);
882
882
  }
@@ -924,16 +924,16 @@ class R {
924
924
  return r.forEach(({ v: i, i: u, n: c }) => {
925
925
  if (!E(i))
926
926
  return;
927
- const { isMatch: o, score: a, indices: h } = t.searchIn(i);
927
+ const { isMatch: o, score: h, indices: a } = t.searchIn(i);
928
928
  o && n.push({
929
929
  item: i,
930
930
  idx: u,
931
- matches: [{ score: a, value: i, norm: c, indices: h }]
931
+ matches: [{ score: h, value: i, norm: c, indices: a }]
932
932
  });
933
933
  }), n;
934
934
  }
935
935
  _searchLogical(e) {
936
- const t = oe(e, this.options), r = (c, o, a) => {
936
+ const t = oe(e, this.options), r = (c, o, h) => {
937
937
  if (!c.children) {
938
938
  const { keyId: f, searcher: d } = c, g = this._findMatches({
939
939
  key: this._keyStore.get(f),
@@ -942,27 +942,27 @@ class R {
942
942
  });
943
943
  return g && g.length ? [
944
944
  {
945
- idx: a,
945
+ idx: h,
946
946
  item: o,
947
947
  matches: g
948
948
  }
949
949
  ] : [];
950
950
  }
951
- const h = [];
951
+ const a = [];
952
952
  for (let f = 0, d = c.children.length; f < d; f += 1) {
953
- const g = c.children[f], A = r(g, o, a);
953
+ const g = c.children[f], A = r(g, o, h);
954
954
  if (A.length)
955
- h.push(...A);
955
+ a.push(...A);
956
956
  else if (c.operator === $.AND)
957
957
  return [];
958
958
  }
959
- return h;
959
+ return a;
960
960
  }, n = this._myIndex.records, i = {}, u = [];
961
961
  return n.forEach(({ $: c, i: o }) => {
962
962
  if (E(c)) {
963
- let a = r(t, c, o);
964
- a.length && (i[o] || (i[o] = { idx: o, item: c, matches: [] }, u.push(i[o])), a.forEach(({ matches: h }) => {
965
- i[o].matches.push(...h);
963
+ let h = r(t, c, o);
964
+ h.length && (i[o] || (i[o] = { idx: o, item: c, matches: [] }, u.push(i[o])), h.forEach(({ matches: a }) => {
965
+ i[o].matches.push(...a);
966
966
  }));
967
967
  }
968
968
  }), u;
@@ -973,11 +973,11 @@ class R {
973
973
  if (!E(u))
974
974
  return;
975
975
  let o = [];
976
- r.forEach((a, h) => {
976
+ r.forEach((h, a) => {
977
977
  o.push(
978
978
  ...this._findMatches({
979
- key: a,
980
- value: u[h],
979
+ key: h,
980
+ value: u[a],
981
981
  searcher: t
982
982
  })
983
983
  );
@@ -996,33 +996,34 @@ class R {
996
996
  t.forEach(({ v: i, i: u, n: c }) => {
997
997
  if (!E(i))
998
998
  return;
999
- const { isMatch: o, score: a, indices: h } = r.searchIn(i);
999
+ const { isMatch: o, score: h, indices: a } = r.searchIn(i);
1000
1000
  o && n.push({
1001
- score: a,
1001
+ score: h,
1002
1002
  key: e,
1003
1003
  value: i,
1004
1004
  idx: u,
1005
1005
  norm: c,
1006
- indices: h
1006
+ indices: a
1007
1007
  });
1008
1008
  });
1009
1009
  else {
1010
- const { v: i, n: u } = t, { isMatch: c, score: o, indices: a } = r.searchIn(i);
1011
- c && n.push({ score: o, key: e, value: i, norm: u, indices: a });
1010
+ const { v: i, n: u } = t, { isMatch: c, score: o, indices: h } = r.searchIn(i);
1011
+ c && n.push({ score: o, key: e, value: i, norm: u, indices: h });
1012
1012
  }
1013
1013
  return n;
1014
1014
  }
1015
1015
  }
1016
- R.version = "7.1.0";
1017
- R.createIndex = ne;
1018
- R.parseIndex = Ie;
1019
- R.config = l;
1020
- R.parseQuery = oe;
1016
+ b.version = "7.1.0";
1017
+ b.createIndex = ne;
1018
+ b.parseIndex = Ie;
1019
+ b.config = l;
1020
+ b.parseQuery = oe;
1021
1021
  We(ze);
1022
1022
  class Ue {
1023
1023
  fuse;
1024
+ rootLevelFiles = [];
1024
1025
  constructor() {
1025
- this.fuse = new R([], {
1026
+ this.fuse = new b([], {
1026
1027
  keys: ["value"],
1027
1028
  includeScore: !0,
1028
1029
  location: 0,
@@ -1034,15 +1035,17 @@ class Ue {
1034
1035
  });
1035
1036
  }
1036
1037
  addFiles(e) {
1037
- for (const t of e)
1038
- this.fuse.add({ value: t.toLowerCase(), original: t });
1038
+ for (const t of e) {
1039
+ const r = { value: t.toLowerCase(), original: t };
1040
+ this.fuse.add(r), t.includes("/") || this.rootLevelFiles.push(t);
1041
+ }
1039
1042
  }
1040
1043
  removeFiles(e) {
1041
1044
  for (const t of e)
1042
- this.fuse.remove((r) => r.value === t);
1045
+ this.fuse.remove((r) => r.value === t), t.includes("/") || (this.rootLevelFiles = this.rootLevelFiles.filter((r) => r !== t));
1043
1046
  }
1044
1047
  query(e, t = 50) {
1045
- return this.fuse.search(e, { limit: t }).map((n) => n.item.original);
1048
+ return e.trim() ? this.fuse.search(e, { limit: t }).map((n) => n.item.original) : this.rootLevelFiles.slice(0, t);
1046
1049
  }
1047
1050
  handleMessage(e) {
1048
1051
  try {
@@ -1068,7 +1071,7 @@ class Ue {
1068
1071
  }
1069
1072
  }
1070
1073
  start() {
1071
- const e = he.createInterface({
1074
+ const e = ae.createInterface({
1072
1075
  input: process.stdin,
1073
1076
  output: process.stdout,
1074
1077
  terminal: !1