@neuralsea/workspace-indexer 0.4.0 → 0.4.1

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.
package/dist/index.cjs CHANGED
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
8
  var __export = (target, all) => {
12
9
  for (var name in all)
13
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -30,2099 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
27
  ));
31
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
29
 
33
- // node_modules/sql.js/dist/sql-wasm.js
34
- var require_sql_wasm = __commonJS({
35
- "node_modules/sql.js/dist/sql-wasm.js"(exports2, module2) {
36
- "use strict";
37
- var initSqlJsPromise = void 0;
38
- var initSqlJs = function(moduleConfig) {
39
- if (initSqlJsPromise) {
40
- return initSqlJsPromise;
41
- }
42
- initSqlJsPromise = new Promise(function(resolveModule, reject) {
43
- var Module = typeof moduleConfig !== "undefined" ? moduleConfig : {};
44
- var originalOnAbortFunction = Module["onAbort"];
45
- Module["onAbort"] = function(errorThatCausedAbort) {
46
- reject(new Error(errorThatCausedAbort));
47
- if (originalOnAbortFunction) {
48
- originalOnAbortFunction(errorThatCausedAbort);
49
- }
50
- };
51
- Module["postRun"] = Module["postRun"] || [];
52
- Module["postRun"].push(function() {
53
- resolveModule(Module);
54
- });
55
- module2 = void 0;
56
- var f;
57
- f ||= typeof Module != "undefined" ? Module : {};
58
- var aa = "object" == typeof window, ba = "undefined" != typeof WorkerGlobalScope, ca = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node && "renderer" != process.type;
59
- "use strict";
60
- f.onRuntimeInitialized = function() {
61
- function a(g, l) {
62
- switch (typeof l) {
63
- case "boolean":
64
- dc(g, l ? 1 : 0);
65
- break;
66
- case "number":
67
- ec(g, l);
68
- break;
69
- case "string":
70
- fc(g, l, -1, -1);
71
- break;
72
- case "object":
73
- if (null === l) lb(g);
74
- else if (null != l.length) {
75
- var n = da(l, ea);
76
- gc(g, n, l.length, -1);
77
- fa(n);
78
- } else va(g, "Wrong API use : tried to return a value of an unknown type (" + l + ").", -1);
79
- break;
80
- default:
81
- lb(g);
82
- }
83
- }
84
- function b(g, l) {
85
- for (var n = [], r = 0; r < g; r += 1) {
86
- var t = m(l + 4 * r, "i32"), y = hc(t);
87
- if (1 === y || 2 === y) t = ic(t);
88
- else if (3 === y) t = jc(t);
89
- else if (4 === y) {
90
- y = t;
91
- t = kc(y);
92
- y = lc(y);
93
- for (var L = new Uint8Array(t), J = 0; J < t; J += 1) L[J] = p[y + J];
94
- t = L;
95
- } else t = null;
96
- n.push(t);
97
- }
98
- return n;
99
- }
100
- function c(g, l) {
101
- this.Qa = g;
102
- this.db = l;
103
- this.Oa = 1;
104
- this.lb = [];
105
- }
106
- function d(g, l) {
107
- this.db = l;
108
- l = ha(g) + 1;
109
- this.eb = ia(l);
110
- if (null === this.eb) throw Error("Unable to allocate memory for the SQL string");
111
- u(g, x, this.eb, l);
112
- this.kb = this.eb;
113
- this.Za = this.pb = null;
114
- }
115
- function e(g) {
116
- this.filename = "dbfile_" + (4294967295 * Math.random() >>> 0);
117
- if (null != g) {
118
- var l = this.filename, n = "/", r = l;
119
- n && (n = "string" == typeof n ? n : ja(n), r = l ? ka(n + "/" + l) : n);
120
- l = la(true, true);
121
- r = ma(r, l);
122
- if (g) {
123
- if ("string" == typeof g) {
124
- n = Array(g.length);
125
- for (var t = 0, y = g.length; t < y; ++t) n[t] = g.charCodeAt(t);
126
- g = n;
127
- }
128
- na(r, l | 146);
129
- n = oa(r, 577);
130
- pa(n, g, 0, g.length, 0);
131
- qa(n);
132
- na(r, l);
133
- }
134
- }
135
- this.handleError(q(this.filename, h));
136
- this.db = m(h, "i32");
137
- ob(this.db);
138
- this.fb = {};
139
- this.Sa = {};
140
- }
141
- var h = z(4), k = f.cwrap, q = k("sqlite3_open", "number", ["string", "number"]), w = k("sqlite3_close_v2", "number", ["number"]), v = k("sqlite3_exec", "number", ["number", "string", "number", "number", "number"]), C = k("sqlite3_changes", "number", ["number"]), G = k("sqlite3_prepare_v2", "number", ["number", "string", "number", "number", "number"]), pb = k("sqlite3_sql", "string", ["number"]), nc = k("sqlite3_normalized_sql", "string", ["number"]), qb = k("sqlite3_prepare_v2", "number", ["number", "number", "number", "number", "number"]), oc = k("sqlite3_bind_text", "number", ["number", "number", "number", "number", "number"]), rb = k("sqlite3_bind_blob", "number", ["number", "number", "number", "number", "number"]), pc = k("sqlite3_bind_double", "number", ["number", "number", "number"]), qc = k(
142
- "sqlite3_bind_int",
143
- "number",
144
- ["number", "number", "number"]
145
- ), rc = k("sqlite3_bind_parameter_index", "number", ["number", "string"]), sc = k("sqlite3_step", "number", ["number"]), tc = k("sqlite3_errmsg", "string", ["number"]), uc = k("sqlite3_column_count", "number", ["number"]), vc = k("sqlite3_data_count", "number", ["number"]), wc = k("sqlite3_column_double", "number", ["number", "number"]), sb = k("sqlite3_column_text", "string", ["number", "number"]), xc = k("sqlite3_column_blob", "number", ["number", "number"]), yc = k("sqlite3_column_bytes", "number", [
146
- "number",
147
- "number"
148
- ]), zc = k("sqlite3_column_type", "number", ["number", "number"]), Ac = k("sqlite3_column_name", "string", ["number", "number"]), Bc = k("sqlite3_reset", "number", ["number"]), Cc = k("sqlite3_clear_bindings", "number", ["number"]), Dc = k("sqlite3_finalize", "number", ["number"]), tb = k("sqlite3_create_function_v2", "number", "number string number number number number number number number".split(" ")), hc = k("sqlite3_value_type", "number", ["number"]), kc = k("sqlite3_value_bytes", "number", ["number"]), jc = k(
149
- "sqlite3_value_text",
150
- "string",
151
- ["number"]
152
- ), lc = k("sqlite3_value_blob", "number", ["number"]), ic = k("sqlite3_value_double", "number", ["number"]), ec = k("sqlite3_result_double", "", ["number", "number"]), lb = k("sqlite3_result_null", "", ["number"]), fc = k("sqlite3_result_text", "", ["number", "string", "number", "number"]), gc = k("sqlite3_result_blob", "", ["number", "number", "number", "number"]), dc = k("sqlite3_result_int", "", ["number", "number"]), va = k("sqlite3_result_error", "", ["number", "string", "number"]), ub = k(
153
- "sqlite3_aggregate_context",
154
- "number",
155
- ["number", "number"]
156
- ), ob = k("RegisterExtensionFunctions", "number", ["number"]), vb = k("sqlite3_update_hook", "number", ["number", "number", "number"]);
157
- c.prototype.bind = function(g) {
158
- if (!this.Qa) throw "Statement closed";
159
- this.reset();
160
- return Array.isArray(g) ? this.Cb(g) : null != g && "object" === typeof g ? this.Db(g) : true;
161
- };
162
- c.prototype.step = function() {
163
- if (!this.Qa) throw "Statement closed";
164
- this.Oa = 1;
165
- var g = sc(this.Qa);
166
- switch (g) {
167
- case 100:
168
- return true;
169
- case 101:
170
- return false;
171
- default:
172
- throw this.db.handleError(g);
173
- }
174
- };
175
- c.prototype.wb = function(g) {
176
- null == g && (g = this.Oa, this.Oa += 1);
177
- return wc(this.Qa, g);
178
- };
179
- c.prototype.Gb = function(g) {
180
- null == g && (g = this.Oa, this.Oa += 1);
181
- g = sb(this.Qa, g);
182
- if ("function" !== typeof BigInt) throw Error("BigInt is not supported");
183
- return BigInt(g);
184
- };
185
- c.prototype.Hb = function(g) {
186
- null == g && (g = this.Oa, this.Oa += 1);
187
- return sb(this.Qa, g);
188
- };
189
- c.prototype.getBlob = function(g) {
190
- null == g && (g = this.Oa, this.Oa += 1);
191
- var l = yc(this.Qa, g);
192
- g = xc(this.Qa, g);
193
- for (var n = new Uint8Array(l), r = 0; r < l; r += 1) n[r] = p[g + r];
194
- return n;
195
- };
196
- c.prototype.get = function(g, l) {
197
- l = l || {};
198
- null != g && this.bind(g) && this.step();
199
- g = [];
200
- for (var n = vc(this.Qa), r = 0; r < n; r += 1) switch (zc(this.Qa, r)) {
201
- case 1:
202
- var t = l.useBigInt ? this.Gb(r) : this.wb(r);
203
- g.push(t);
204
- break;
205
- case 2:
206
- g.push(this.wb(r));
207
- break;
208
- case 3:
209
- g.push(this.Hb(r));
210
- break;
211
- case 4:
212
- g.push(this.getBlob(r));
213
- break;
214
- default:
215
- g.push(null);
216
- }
217
- return g;
218
- };
219
- c.prototype.getColumnNames = function() {
220
- for (var g = [], l = uc(this.Qa), n = 0; n < l; n += 1) g.push(Ac(this.Qa, n));
221
- return g;
222
- };
223
- c.prototype.getAsObject = function(g, l) {
224
- g = this.get(g, l);
225
- l = this.getColumnNames();
226
- for (var n = {}, r = 0; r < l.length; r += 1) n[l[r]] = g[r];
227
- return n;
228
- };
229
- c.prototype.getSQL = function() {
230
- return pb(this.Qa);
231
- };
232
- c.prototype.getNormalizedSQL = function() {
233
- return nc(this.Qa);
234
- };
235
- c.prototype.run = function(g) {
236
- null != g && this.bind(g);
237
- this.step();
238
- return this.reset();
239
- };
240
- c.prototype.sb = function(g, l) {
241
- null == l && (l = this.Oa, this.Oa += 1);
242
- g = ra(g);
243
- var n = da(g, ea);
244
- this.lb.push(n);
245
- this.db.handleError(oc(this.Qa, l, n, g.length - 1, 0));
246
- };
247
- c.prototype.Bb = function(g, l) {
248
- null == l && (l = this.Oa, this.Oa += 1);
249
- var n = da(g, ea);
250
- this.lb.push(n);
251
- this.db.handleError(rb(
252
- this.Qa,
253
- l,
254
- n,
255
- g.length,
256
- 0
257
- ));
258
- };
259
- c.prototype.rb = function(g, l) {
260
- null == l && (l = this.Oa, this.Oa += 1);
261
- this.db.handleError((g === (g | 0) ? qc : pc)(this.Qa, l, g));
262
- };
263
- c.prototype.Eb = function(g) {
264
- null == g && (g = this.Oa, this.Oa += 1);
265
- rb(this.Qa, g, 0, 0, 0);
266
- };
267
- c.prototype.tb = function(g, l) {
268
- null == l && (l = this.Oa, this.Oa += 1);
269
- switch (typeof g) {
270
- case "string":
271
- this.sb(g, l);
272
- return;
273
- case "number":
274
- this.rb(g, l);
275
- return;
276
- case "bigint":
277
- this.sb(g.toString(), l);
278
- return;
279
- case "boolean":
280
- this.rb(g + 0, l);
281
- return;
282
- case "object":
283
- if (null === g) {
284
- this.Eb(l);
285
- return;
286
- }
287
- if (null != g.length) {
288
- this.Bb(
289
- g,
290
- l
291
- );
292
- return;
293
- }
294
- }
295
- throw "Wrong API use : tried to bind a value of an unknown type (" + g + ").";
296
- };
297
- c.prototype.Db = function(g) {
298
- var l = this;
299
- Object.keys(g).forEach(function(n) {
300
- var r = rc(l.Qa, n);
301
- 0 !== r && l.tb(g[n], r);
302
- });
303
- return true;
304
- };
305
- c.prototype.Cb = function(g) {
306
- for (var l = 0; l < g.length; l += 1) this.tb(g[l], l + 1);
307
- return true;
308
- };
309
- c.prototype.reset = function() {
310
- this.freemem();
311
- return 0 === Cc(this.Qa) && 0 === Bc(this.Qa);
312
- };
313
- c.prototype.freemem = function() {
314
- for (var g; void 0 !== (g = this.lb.pop()); ) fa(g);
315
- };
316
- c.prototype.free = function() {
317
- this.freemem();
318
- var g = 0 === Dc(this.Qa);
319
- delete this.db.fb[this.Qa];
320
- this.Qa = 0;
321
- return g;
322
- };
323
- d.prototype.next = function() {
324
- if (null === this.eb) return { done: true };
325
- null !== this.Za && (this.Za.free(), this.Za = null);
326
- if (!this.db.db) throw this.mb(), Error("Database closed");
327
- var g = sa(), l = z(4);
328
- ta(h);
329
- ta(l);
330
- try {
331
- this.db.handleError(qb(this.db.db, this.kb, -1, h, l));
332
- this.kb = m(l, "i32");
333
- var n = m(h, "i32");
334
- if (0 === n) return this.mb(), { done: true };
335
- this.Za = new c(n, this.db);
336
- this.db.fb[n] = this.Za;
337
- return { value: this.Za, done: false };
338
- } catch (r) {
339
- throw this.pb = ua(this.kb), this.mb(), r;
340
- } finally {
341
- wa(g);
342
- }
343
- };
344
- d.prototype.mb = function() {
345
- fa(this.eb);
346
- this.eb = null;
347
- };
348
- d.prototype.getRemainingSQL = function() {
349
- return null !== this.pb ? this.pb : ua(this.kb);
350
- };
351
- "function" === typeof Symbol && "symbol" === typeof Symbol.iterator && (d.prototype[Symbol.iterator] = function() {
352
- return this;
353
- });
354
- e.prototype.run = function(g, l) {
355
- if (!this.db) throw "Database closed";
356
- if (l) {
357
- g = this.prepare(g, l);
358
- try {
359
- g.step();
360
- } finally {
361
- g.free();
362
- }
363
- } else this.handleError(v(this.db, g, 0, 0, h));
364
- return this;
365
- };
366
- e.prototype.exec = function(g, l, n) {
367
- if (!this.db) throw "Database closed";
368
- var r = sa(), t = null;
369
- try {
370
- var y = xa(g), L = z(4);
371
- for (g = []; 0 !== m(y, "i8"); ) {
372
- ta(h);
373
- ta(L);
374
- this.handleError(qb(this.db, y, -1, h, L));
375
- var J = m(h, "i32");
376
- y = m(L, "i32");
377
- if (0 !== J) {
378
- var I = null;
379
- t = new c(J, this);
380
- for (null != l && t.bind(l); t.step(); ) null === I && (I = { columns: t.getColumnNames(), values: [] }, g.push(I)), I.values.push(t.get(null, n));
381
- t.free();
382
- }
383
- }
384
- return g;
385
- } catch (M) {
386
- throw t && t.free(), M;
387
- } finally {
388
- wa(r);
389
- }
390
- };
391
- e.prototype.each = function(g, l, n, r, t) {
392
- "function" === typeof l && (r = n, n = l, l = void 0);
393
- g = this.prepare(g, l);
394
- try {
395
- for (; g.step(); ) n(g.getAsObject(
396
- null,
397
- t
398
- ));
399
- } finally {
400
- g.free();
401
- }
402
- if ("function" === typeof r) return r();
403
- };
404
- e.prototype.prepare = function(g, l) {
405
- ta(h);
406
- this.handleError(G(this.db, g, -1, h, 0));
407
- g = m(h, "i32");
408
- if (0 === g) throw "Nothing to prepare";
409
- var n = new c(g, this);
410
- null != l && n.bind(l);
411
- return this.fb[g] = n;
412
- };
413
- e.prototype.iterateStatements = function(g) {
414
- return new d(g, this);
415
- };
416
- e.prototype["export"] = function() {
417
- Object.values(this.fb).forEach(function(l) {
418
- l.free();
419
- });
420
- Object.values(this.Sa).forEach(A);
421
- this.Sa = {};
422
- this.handleError(w(this.db));
423
- var g = ya(this.filename);
424
- this.handleError(q(
425
- this.filename,
426
- h
427
- ));
428
- this.db = m(h, "i32");
429
- ob(this.db);
430
- return g;
431
- };
432
- e.prototype.close = function() {
433
- null !== this.db && (Object.values(this.fb).forEach(function(g) {
434
- g.free();
435
- }), Object.values(this.Sa).forEach(A), this.Sa = {}, this.Ya && (A(this.Ya), this.Ya = void 0), this.handleError(w(this.db)), za("/" + this.filename), this.db = null);
436
- };
437
- e.prototype.handleError = function(g) {
438
- if (0 === g) return null;
439
- g = tc(this.db);
440
- throw Error(g);
441
- };
442
- e.prototype.getRowsModified = function() {
443
- return C(this.db);
444
- };
445
- e.prototype.create_function = function(g, l) {
446
- Object.prototype.hasOwnProperty.call(
447
- this.Sa,
448
- g
449
- ) && (A(this.Sa[g]), delete this.Sa[g]);
450
- var n = Aa(function(r, t, y) {
451
- t = b(t, y);
452
- try {
453
- var L = l.apply(null, t);
454
- } catch (J) {
455
- va(r, J, -1);
456
- return;
457
- }
458
- a(r, L);
459
- }, "viii");
460
- this.Sa[g] = n;
461
- this.handleError(tb(this.db, g, l.length, 1, 0, n, 0, 0, 0));
462
- return this;
463
- };
464
- e.prototype.create_aggregate = function(g, l) {
465
- var n = l.init || function() {
466
- return null;
467
- }, r = l.finalize || function(I) {
468
- return I;
469
- }, t = l.step;
470
- if (!t) throw "An aggregate function must have a step function in " + g;
471
- var y = {};
472
- Object.hasOwnProperty.call(this.Sa, g) && (A(this.Sa[g]), delete this.Sa[g]);
473
- l = g + "__finalize";
474
- Object.hasOwnProperty.call(this.Sa, l) && (A(this.Sa[l]), delete this.Sa[l]);
475
- var L = Aa(function(I, M, Ra) {
476
- var X = ub(I, 1);
477
- Object.hasOwnProperty.call(y, X) || (y[X] = n());
478
- M = b(M, Ra);
479
- M = [y[X]].concat(M);
480
- try {
481
- y[X] = t.apply(null, M);
482
- } catch (Fc) {
483
- delete y[X], va(I, Fc, -1);
484
- }
485
- }, "viii"), J = Aa(function(I) {
486
- var M = ub(I, 1);
487
- try {
488
- var Ra = r(y[M]);
489
- } catch (X) {
490
- delete y[M];
491
- va(I, X, -1);
492
- return;
493
- }
494
- a(I, Ra);
495
- delete y[M];
496
- }, "vi");
497
- this.Sa[g] = L;
498
- this.Sa[l] = J;
499
- this.handleError(tb(this.db, g, t.length - 1, 1, 0, 0, L, J, 0));
500
- return this;
501
- };
502
- e.prototype.updateHook = function(g) {
503
- this.Ya && (vb(this.db, 0, 0), A(this.Ya), this.Ya = void 0);
504
- g && (this.Ya = Aa(function(l, n, r, t, y) {
505
- switch (n) {
506
- case 18:
507
- l = "insert";
508
- break;
509
- case 23:
510
- l = "update";
511
- break;
512
- case 9:
513
- l = "delete";
514
- break;
515
- default:
516
- throw "unknown operationCode in updateHook callback: " + n;
517
- }
518
- r = r ? B(x, r) : "";
519
- t = t ? B(x, t) : "";
520
- if (y > Number.MAX_SAFE_INTEGER) throw "rowId too big to fit inside a Number";
521
- g(l, r, t, Number(y));
522
- }, "viiiij"), vb(this.db, this.Ya, 0));
523
- };
524
- f.Database = e;
525
- };
526
- var Ba = { ...f }, Ca = "./this.program", Da = (a, b) => {
527
- throw b;
528
- }, D = "", Ea, Fa;
529
- if (ca) {
530
- var fs17 = require("fs");
531
- require("path");
532
- D = __dirname + "/";
533
- Fa = (a) => {
534
- a = Ga(a) ? new URL(a) : a;
535
- return fs17.readFileSync(a);
536
- };
537
- Ea = async (a) => {
538
- a = Ga(a) ? new URL(a) : a;
539
- return fs17.readFileSync(a, void 0);
540
- };
541
- !f.thisProgram && 1 < process.argv.length && (Ca = process.argv[1].replace(/\\/g, "/"));
542
- process.argv.slice(2);
543
- "undefined" != typeof module2 && (module2.exports = f);
544
- Da = (a, b) => {
545
- process.exitCode = a;
546
- throw b;
547
- };
548
- } else if (aa || ba) ba ? D = self.location.href : "undefined" != typeof document && document.currentScript && (D = document.currentScript.src), D = D.startsWith("blob:") ? "" : D.slice(0, D.replace(/[?#].*/, "").lastIndexOf("/") + 1), ba && (Fa = (a) => {
549
- var b = new XMLHttpRequest();
550
- b.open("GET", a, false);
551
- b.responseType = "arraybuffer";
552
- b.send(null);
553
- return new Uint8Array(b.response);
554
- }), Ea = async (a) => {
555
- if (Ga(a)) return new Promise((c, d) => {
556
- var e = new XMLHttpRequest();
557
- e.open("GET", a, true);
558
- e.responseType = "arraybuffer";
559
- e.onload = () => {
560
- 200 == e.status || 0 == e.status && e.response ? c(e.response) : d(e.status);
561
- };
562
- e.onerror = d;
563
- e.send(null);
564
- });
565
- var b = await fetch(a, { credentials: "same-origin" });
566
- if (b.ok) return b.arrayBuffer();
567
- throw Error(b.status + " : " + b.url);
568
- };
569
- var Ha = f.print || console.log.bind(console), Ia = f.printErr || console.error.bind(console);
570
- Object.assign(f, Ba);
571
- Ba = null;
572
- f.thisProgram && (Ca = f.thisProgram);
573
- var Ja = f.wasmBinary, Ka, La = false, Ma, p, x, Na, E, F, Oa, H, Pa, Ga = (a) => a.startsWith("file://");
574
- function Qa() {
575
- var a = Ka.buffer;
576
- f.HEAP8 = p = new Int8Array(a);
577
- f.HEAP16 = Na = new Int16Array(a);
578
- f.HEAPU8 = x = new Uint8Array(a);
579
- f.HEAPU16 = new Uint16Array(a);
580
- f.HEAP32 = E = new Int32Array(a);
581
- f.HEAPU32 = F = new Uint32Array(a);
582
- f.HEAPF32 = Oa = new Float32Array(a);
583
- f.HEAPF64 = Pa = new Float64Array(a);
584
- f.HEAP64 = H = new BigInt64Array(a);
585
- f.HEAPU64 = new BigUint64Array(a);
586
- }
587
- var K = 0, Sa = null;
588
- function Ta(a) {
589
- f.onAbort?.(a);
590
- a = "Aborted(" + a + ")";
591
- Ia(a);
592
- La = true;
593
- throw new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info.");
594
- }
595
- var Ua;
596
- async function Va(a) {
597
- if (!Ja) try {
598
- var b = await Ea(a);
599
- return new Uint8Array(b);
600
- } catch {
601
- }
602
- if (a == Ua && Ja) a = new Uint8Array(Ja);
603
- else if (Fa) a = Fa(a);
604
- else throw "both async and sync fetching of the wasm failed";
605
- return a;
606
- }
607
- async function Wa(a, b) {
608
- try {
609
- var c = await Va(a);
610
- return await WebAssembly.instantiate(c, b);
611
- } catch (d) {
612
- Ia(`failed to asynchronously prepare wasm: ${d}`), Ta(d);
613
- }
614
- }
615
- async function Xa(a) {
616
- var b = Ua;
617
- if (!Ja && "function" == typeof WebAssembly.instantiateStreaming && !Ga(b) && !ca) try {
618
- var c = fetch(b, { credentials: "same-origin" });
619
- return await WebAssembly.instantiateStreaming(c, a);
620
- } catch (d) {
621
- Ia(`wasm streaming compile failed: ${d}`), Ia("falling back to ArrayBuffer instantiation");
622
- }
623
- return Wa(b, a);
624
- }
625
- class Ya {
626
- name = "ExitStatus";
627
- constructor(a) {
628
- this.message = `Program terminated with exit(${a})`;
629
- this.status = a;
630
- }
631
- }
632
- var Za = (a) => {
633
- for (; 0 < a.length; ) a.shift()(f);
634
- }, $a = [], ab = [], bb = () => {
635
- var a = f.preRun.shift();
636
- ab.unshift(a);
637
- };
638
- function m(a, b = "i8") {
639
- b.endsWith("*") && (b = "*");
640
- switch (b) {
641
- case "i1":
642
- return p[a];
643
- case "i8":
644
- return p[a];
645
- case "i16":
646
- return Na[a >> 1];
647
- case "i32":
648
- return E[a >> 2];
649
- case "i64":
650
- return H[a >> 3];
651
- case "float":
652
- return Oa[a >> 2];
653
- case "double":
654
- return Pa[a >> 3];
655
- case "*":
656
- return F[a >> 2];
657
- default:
658
- Ta(`invalid type for getValue: ${b}`);
659
- }
660
- }
661
- var cb = f.noExitRuntime || true;
662
- function ta(a) {
663
- var b = "i32";
664
- b.endsWith("*") && (b = "*");
665
- switch (b) {
666
- case "i1":
667
- p[a] = 0;
668
- break;
669
- case "i8":
670
- p[a] = 0;
671
- break;
672
- case "i16":
673
- Na[a >> 1] = 0;
674
- break;
675
- case "i32":
676
- E[a >> 2] = 0;
677
- break;
678
- case "i64":
679
- H[a >> 3] = BigInt(0);
680
- break;
681
- case "float":
682
- Oa[a >> 2] = 0;
683
- break;
684
- case "double":
685
- Pa[a >> 3] = 0;
686
- break;
687
- case "*":
688
- F[a >> 2] = 0;
689
- break;
690
- default:
691
- Ta(`invalid type for setValue: ${b}`);
692
- }
693
- }
694
- var db = "undefined" != typeof TextDecoder ? new TextDecoder() : void 0, B = (a, b = 0, c = NaN) => {
695
- var d = b + c;
696
- for (c = b; a[c] && !(c >= d); ) ++c;
697
- if (16 < c - b && a.buffer && db) return db.decode(a.subarray(b, c));
698
- for (d = ""; b < c; ) {
699
- var e = a[b++];
700
- if (e & 128) {
701
- var h = a[b++] & 63;
702
- if (192 == (e & 224)) d += String.fromCharCode((e & 31) << 6 | h);
703
- else {
704
- var k = a[b++] & 63;
705
- e = 224 == (e & 240) ? (e & 15) << 12 | h << 6 | k : (e & 7) << 18 | h << 12 | k << 6 | a[b++] & 63;
706
- 65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
707
- }
708
- } else d += String.fromCharCode(e);
709
- }
710
- return d;
711
- }, ua = (a, b) => a ? B(x, a, b) : "", eb = (a, b) => {
712
- for (var c = 0, d = a.length - 1; 0 <= d; d--) {
713
- var e = a[d];
714
- "." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
715
- }
716
- if (b) for (; c; c--) a.unshift("..");
717
- return a;
718
- }, ka = (a) => {
719
- var b = "/" === a.charAt(0), c = "/" === a.slice(-1);
720
- (a = eb(a.split("/").filter((d) => !!d), !b).join("/")) || b || (a = ".");
721
- a && c && (a += "/");
722
- return (b ? "/" : "") + a;
723
- }, fb = (a) => {
724
- var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
725
- a = b[0];
726
- b = b[1];
727
- if (!a && !b) return ".";
728
- b &&= b.slice(0, -1);
729
- return a + b;
730
- }, gb = (a) => a && a.match(/([^\/]+|\/)\/*$/)[1], hb = () => {
731
- if (ca) {
732
- var a = require("crypto");
733
- return (b) => a.randomFillSync(b);
734
- }
735
- return (b) => crypto.getRandomValues(b);
736
- }, ib = (a) => {
737
- (ib = hb())(a);
738
- }, jb = (...a) => {
739
- for (var b = "", c = false, d = a.length - 1; -1 <= d && !c; d--) {
740
- c = 0 <= d ? a[d] : "/";
741
- if ("string" != typeof c) throw new TypeError("Arguments to path.resolve must be strings");
742
- if (!c) return "";
743
- b = c + "/" + b;
744
- c = "/" === c.charAt(0);
745
- }
746
- b = eb(b.split("/").filter((e) => !!e), !c).join("/");
747
- return (c ? "/" : "") + b || ".";
748
- }, kb = [], ha = (a) => {
749
- for (var b = 0, c = 0; c < a.length; ++c) {
750
- var d = a.charCodeAt(c);
751
- 127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
752
- }
753
- return b;
754
- }, u = (a, b, c, d) => {
755
- if (!(0 < d)) return 0;
756
- var e = c;
757
- d = c + d - 1;
758
- for (var h = 0; h < a.length; ++h) {
759
- var k = a.charCodeAt(h);
760
- if (55296 <= k && 57343 >= k) {
761
- var q = a.charCodeAt(++h);
762
- k = 65536 + ((k & 1023) << 10) | q & 1023;
763
- }
764
- if (127 >= k) {
765
- if (c >= d) break;
766
- b[c++] = k;
767
- } else {
768
- if (2047 >= k) {
769
- if (c + 1 >= d) break;
770
- b[c++] = 192 | k >> 6;
771
- } else {
772
- if (65535 >= k) {
773
- if (c + 2 >= d) break;
774
- b[c++] = 224 | k >> 12;
775
- } else {
776
- if (c + 3 >= d) break;
777
- b[c++] = 240 | k >> 18;
778
- b[c++] = 128 | k >> 12 & 63;
779
- }
780
- b[c++] = 128 | k >> 6 & 63;
781
- }
782
- b[c++] = 128 | k & 63;
783
- }
784
- }
785
- b[c] = 0;
786
- return c - e;
787
- }, ra = (a, b) => {
788
- var c = Array(ha(a) + 1);
789
- a = u(a, c, 0, c.length);
790
- b && (c.length = a);
791
- return c;
792
- }, mb = [];
793
- function nb(a, b) {
794
- mb[a] = { input: [], output: [], cb: b };
795
- wb(a, xb);
796
- }
797
- var xb = { open(a) {
798
- var b = mb[a.node.rdev];
799
- if (!b) throw new N(43);
800
- a.tty = b;
801
- a.seekable = false;
802
- }, close(a) {
803
- a.tty.cb.fsync(a.tty);
804
- }, fsync(a) {
805
- a.tty.cb.fsync(a.tty);
806
- }, read(a, b, c, d) {
807
- if (!a.tty || !a.tty.cb.xb) throw new N(60);
808
- for (var e = 0, h = 0; h < d; h++) {
809
- try {
810
- var k = a.tty.cb.xb(a.tty);
811
- } catch (q) {
812
- throw new N(29);
813
- }
814
- if (void 0 === k && 0 === e) throw new N(6);
815
- if (null === k || void 0 === k) break;
816
- e++;
817
- b[c + h] = k;
818
- }
819
- e && (a.node.atime = Date.now());
820
- return e;
821
- }, write(a, b, c, d) {
822
- if (!a.tty || !a.tty.cb.qb) throw new N(60);
823
- try {
824
- for (var e = 0; e < d; e++) a.tty.cb.qb(a.tty, b[c + e]);
825
- } catch (h) {
826
- throw new N(29);
827
- }
828
- d && (a.node.mtime = a.node.ctime = Date.now());
829
- return e;
830
- } }, yb = { xb() {
831
- a: {
832
- if (!kb.length) {
833
- var a = null;
834
- if (ca) {
835
- var b = Buffer.alloc(256), c = 0, d = process.stdin.fd;
836
- try {
837
- c = fs17.readSync(d, b, 0, 256);
838
- } catch (e) {
839
- if (e.toString().includes("EOF")) c = 0;
840
- else throw e;
841
- }
842
- 0 < c && (a = b.slice(0, c).toString("utf-8"));
843
- } else "undefined" != typeof window && "function" == typeof window.prompt && (a = window.prompt("Input: "), null !== a && (a += "\n"));
844
- if (!a) {
845
- a = null;
846
- break a;
847
- }
848
- kb = ra(a, true);
849
- }
850
- a = kb.shift();
851
- }
852
- return a;
853
- }, qb(a, b) {
854
- null === b || 10 === b ? (Ha(B(a.output)), a.output = []) : 0 != b && a.output.push(b);
855
- }, fsync(a) {
856
- 0 < a.output?.length && (Ha(B(a.output)), a.output = []);
857
- }, Tb() {
858
- return { Ob: 25856, Qb: 5, Nb: 191, Pb: 35387, Mb: [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] };
859
- }, Ub() {
860
- return 0;
861
- }, Vb() {
862
- return [24, 80];
863
- } }, zb = { qb(a, b) {
864
- null === b || 10 === b ? (Ia(B(a.output)), a.output = []) : 0 != b && a.output.push(b);
865
- }, fsync(a) {
866
- 0 < a.output?.length && (Ia(B(a.output)), a.output = []);
867
- } }, O = { Wa: null, Xa() {
868
- return O.createNode(null, "/", 16895, 0);
869
- }, createNode(a, b, c, d) {
870
- if (24576 === (c & 61440) || 4096 === (c & 61440)) throw new N(63);
871
- O.Wa || (O.Wa = { dir: { node: { Ta: O.La.Ta, Ua: O.La.Ua, lookup: O.La.lookup, hb: O.La.hb, rename: O.La.rename, unlink: O.La.unlink, rmdir: O.La.rmdir, readdir: O.La.readdir, symlink: O.La.symlink }, stream: { Va: O.Ma.Va } }, file: { node: { Ta: O.La.Ta, Ua: O.La.Ua }, stream: { Va: O.Ma.Va, read: O.Ma.read, write: O.Ma.write, ib: O.Ma.ib, jb: O.Ma.jb } }, link: { node: { Ta: O.La.Ta, Ua: O.La.Ua, readlink: O.La.readlink }, stream: {} }, ub: { node: { Ta: O.La.Ta, Ua: O.La.Ua }, stream: Ab } });
872
- c = Bb(a, b, c, d);
873
- P(c.mode) ? (c.La = O.Wa.dir.node, c.Ma = O.Wa.dir.stream, c.Na = {}) : 32768 === (c.mode & 61440) ? (c.La = O.Wa.file.node, c.Ma = O.Wa.file.stream, c.Ra = 0, c.Na = null) : 40960 === (c.mode & 61440) ? (c.La = O.Wa.link.node, c.Ma = O.Wa.link.stream) : 8192 === (c.mode & 61440) && (c.La = O.Wa.ub.node, c.Ma = O.Wa.ub.stream);
874
- c.atime = c.mtime = c.ctime = Date.now();
875
- a && (a.Na[b] = c, a.atime = a.mtime = a.ctime = c.atime);
876
- return c;
877
- }, Sb(a) {
878
- return a.Na ? a.Na.subarray ? a.Na.subarray(0, a.Ra) : new Uint8Array(a.Na) : new Uint8Array(0);
879
- }, La: { Ta(a) {
880
- var b = {};
881
- b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
882
- b.ino = a.id;
883
- b.mode = a.mode;
884
- b.nlink = 1;
885
- b.uid = 0;
886
- b.gid = 0;
887
- b.rdev = a.rdev;
888
- P(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.Ra : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
889
- b.atime = new Date(a.atime);
890
- b.mtime = new Date(a.mtime);
891
- b.ctime = new Date(a.ctime);
892
- b.blksize = 4096;
893
- b.blocks = Math.ceil(b.size / b.blksize);
894
- return b;
895
- }, Ua(a, b) {
896
- for (var c of ["mode", "atime", "mtime", "ctime"]) null != b[c] && (a[c] = b[c]);
897
- void 0 !== b.size && (b = b.size, a.Ra != b && (0 == b ? (a.Na = null, a.Ra = 0) : (c = a.Na, a.Na = new Uint8Array(b), c && a.Na.set(c.subarray(0, Math.min(b, a.Ra))), a.Ra = b)));
898
- }, lookup() {
899
- throw O.vb;
900
- }, hb(a, b, c, d) {
901
- return O.createNode(a, b, c, d);
902
- }, rename(a, b, c) {
903
- try {
904
- var d = Q(b, c);
905
- } catch (h) {
906
- }
907
- if (d) {
908
- if (P(a.mode)) for (var e in d.Na) throw new N(55);
909
- Cb(d);
910
- }
911
- delete a.parent.Na[a.name];
912
- b.Na[c] = a;
913
- a.name = c;
914
- b.ctime = b.mtime = a.parent.ctime = a.parent.mtime = Date.now();
915
- }, unlink(a, b) {
916
- delete a.Na[b];
917
- a.ctime = a.mtime = Date.now();
918
- }, rmdir(a, b) {
919
- var c = Q(a, b), d;
920
- for (d in c.Na) throw new N(55);
921
- delete a.Na[b];
922
- a.ctime = a.mtime = Date.now();
923
- }, readdir(a) {
924
- return [".", "..", ...Object.keys(a.Na)];
925
- }, symlink(a, b, c) {
926
- a = O.createNode(a, b, 41471, 0);
927
- a.link = c;
928
- return a;
929
- }, readlink(a) {
930
- if (40960 !== (a.mode & 61440)) throw new N(28);
931
- return a.link;
932
- } }, Ma: { read(a, b, c, d, e) {
933
- var h = a.node.Na;
934
- if (e >= a.node.Ra) return 0;
935
- a = Math.min(a.node.Ra - e, d);
936
- if (8 < a && h.subarray) b.set(h.subarray(e, e + a), c);
937
- else for (d = 0; d < a; d++) b[c + d] = h[e + d];
938
- return a;
939
- }, write(a, b, c, d, e, h) {
940
- b.buffer === p.buffer && (h = false);
941
- if (!d) return 0;
942
- a = a.node;
943
- a.mtime = a.ctime = Date.now();
944
- if (b.subarray && (!a.Na || a.Na.subarray)) {
945
- if (h) return a.Na = b.subarray(c, c + d), a.Ra = d;
946
- if (0 === a.Ra && 0 === e) return a.Na = b.slice(c, c + d), a.Ra = d;
947
- if (e + d <= a.Ra) return a.Na.set(b.subarray(
948
- c,
949
- c + d
950
- ), e), d;
951
- }
952
- h = e + d;
953
- var k = a.Na ? a.Na.length : 0;
954
- k >= h || (h = Math.max(h, k * (1048576 > k ? 2 : 1.125) >>> 0), 0 != k && (h = Math.max(h, 256)), k = a.Na, a.Na = new Uint8Array(h), 0 < a.Ra && a.Na.set(k.subarray(0, a.Ra), 0));
955
- if (a.Na.subarray && b.subarray) a.Na.set(b.subarray(c, c + d), e);
956
- else for (h = 0; h < d; h++) a.Na[e + h] = b[c + h];
957
- a.Ra = Math.max(a.Ra, e + d);
958
- return d;
959
- }, Va(a, b, c) {
960
- 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.Ra);
961
- if (0 > b) throw new N(28);
962
- return b;
963
- }, ib(a, b, c, d, e) {
964
- if (32768 !== (a.node.mode & 61440)) throw new N(43);
965
- a = a.node.Na;
966
- if (e & 2 || !a || a.buffer !== p.buffer) {
967
- e = true;
968
- d = 65536 * Math.ceil(b / 65536);
969
- var h = Db(65536, d);
970
- h && x.fill(0, h, h + d);
971
- d = h;
972
- if (!d) throw new N(48);
973
- if (a) {
974
- if (0 < c || c + b < a.length) a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
975
- p.set(a, d);
976
- }
977
- } else e = false, d = a.byteOffset;
978
- return { Kb: d, Ab: e };
979
- }, jb(a, b, c, d) {
980
- O.Ma.write(a, b, 0, d, c, false);
981
- return 0;
982
- } } }, la = (a, b) => {
983
- var c = 0;
984
- a && (c |= 365);
985
- b && (c |= 146);
986
- return c;
987
- }, Eb = null, Fb = {}, Gb = [], Hb = 1, R = null, Ib = false, Jb = true, Kb = {}, N = class {
988
- name = "ErrnoError";
989
- constructor(a) {
990
- this.Pa = a;
991
- }
992
- }, Lb = class {
993
- gb = {};
994
- node = null;
995
- get flags() {
996
- return this.gb.flags;
997
- }
998
- set flags(a) {
999
- this.gb.flags = a;
1000
- }
1001
- get position() {
1002
- return this.gb.position;
1003
- }
1004
- set position(a) {
1005
- this.gb.position = a;
1006
- }
1007
- }, Mb = class {
1008
- La = {};
1009
- Ma = {};
1010
- ab = null;
1011
- constructor(a, b, c, d) {
1012
- a ||= this;
1013
- this.parent = a;
1014
- this.Xa = a.Xa;
1015
- this.id = Hb++;
1016
- this.name = b;
1017
- this.mode = c;
1018
- this.rdev = d;
1019
- this.atime = this.mtime = this.ctime = Date.now();
1020
- }
1021
- get read() {
1022
- return 365 === (this.mode & 365);
1023
- }
1024
- set read(a) {
1025
- a ? this.mode |= 365 : this.mode &= -366;
1026
- }
1027
- get write() {
1028
- return 146 === (this.mode & 146);
1029
- }
1030
- set write(a) {
1031
- a ? this.mode |= 146 : this.mode &= -147;
1032
- }
1033
- };
1034
- function S(a, b = {}) {
1035
- if (!a) throw new N(44);
1036
- b.nb ?? (b.nb = true);
1037
- "/" === a.charAt(0) || (a = "//" + a);
1038
- var c = 0;
1039
- a: for (; 40 > c; c++) {
1040
- a = a.split("/").filter((q) => !!q);
1041
- for (var d = Eb, e = "/", h = 0; h < a.length; h++) {
1042
- var k = h === a.length - 1;
1043
- if (k && b.parent) break;
1044
- if ("." !== a[h]) if (".." === a[h]) e = fb(e), d = d.parent;
1045
- else {
1046
- e = ka(e + "/" + a[h]);
1047
- try {
1048
- d = Q(d, a[h]);
1049
- } catch (q) {
1050
- if (44 === q?.Pa && k && b.Jb) return { path: e };
1051
- throw q;
1052
- }
1053
- !d.ab || k && !b.nb || (d = d.ab.root);
1054
- if (40960 === (d.mode & 61440) && (!k || b.$a)) {
1055
- if (!d.La.readlink) throw new N(52);
1056
- d = d.La.readlink(d);
1057
- "/" === d.charAt(0) || (d = fb(e) + "/" + d);
1058
- a = d + "/" + a.slice(h + 1).join("/");
1059
- continue a;
1060
- }
1061
- }
1062
- }
1063
- return { path: e, node: d };
1064
- }
1065
- throw new N(32);
1066
- }
1067
- function ja(a) {
1068
- for (var b; ; ) {
1069
- if (a === a.parent) return a = a.Xa.zb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
1070
- b = b ? `${a.name}/${b}` : a.name;
1071
- a = a.parent;
1072
- }
1073
- }
1074
- function Nb(a, b) {
1075
- for (var c = 0, d = 0; d < b.length; d++) c = (c << 5) - c + b.charCodeAt(d) | 0;
1076
- return (a + c >>> 0) % R.length;
1077
- }
1078
- function Cb(a) {
1079
- var b = Nb(a.parent.id, a.name);
1080
- if (R[b] === a) R[b] = a.bb;
1081
- else for (b = R[b]; b; ) {
1082
- if (b.bb === a) {
1083
- b.bb = a.bb;
1084
- break;
1085
- }
1086
- b = b.bb;
1087
- }
1088
- }
1089
- function Q(a, b) {
1090
- var c = P(a.mode) ? (c = Ob(a, "x")) ? c : a.La.lookup ? 0 : 2 : 54;
1091
- if (c) throw new N(c);
1092
- for (c = R[Nb(a.id, b)]; c; c = c.bb) {
1093
- var d = c.name;
1094
- if (c.parent.id === a.id && d === b) return c;
1095
- }
1096
- return a.La.lookup(a, b);
1097
- }
1098
- function Bb(a, b, c, d) {
1099
- a = new Mb(a, b, c, d);
1100
- b = Nb(a.parent.id, a.name);
1101
- a.bb = R[b];
1102
- return R[b] = a;
1103
- }
1104
- function P(a) {
1105
- return 16384 === (a & 61440);
1106
- }
1107
- function Pb(a) {
1108
- var b = ["r", "w", "rw"][a & 3];
1109
- a & 512 && (b += "w");
1110
- return b;
1111
- }
1112
- function Ob(a, b) {
1113
- if (Jb) return 0;
1114
- if (!b.includes("r") || a.mode & 292) {
1115
- if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) return 2;
1116
- } else return 2;
1117
- return 0;
1118
- }
1119
- function Qb(a, b) {
1120
- if (!P(a.mode)) return 54;
1121
- try {
1122
- return Q(a, b), 20;
1123
- } catch (c) {
1124
- }
1125
- return Ob(a, "wx");
1126
- }
1127
- function Rb(a, b, c) {
1128
- try {
1129
- var d = Q(a, b);
1130
- } catch (e) {
1131
- return e.Pa;
1132
- }
1133
- if (a = Ob(a, "wx")) return a;
1134
- if (c) {
1135
- if (!P(d.mode)) return 54;
1136
- if (d === d.parent || "/" === ja(d)) return 10;
1137
- } else if (P(d.mode)) return 31;
1138
- return 0;
1139
- }
1140
- function Sb(a) {
1141
- if (!a) throw new N(63);
1142
- return a;
1143
- }
1144
- function T(a) {
1145
- a = Gb[a];
1146
- if (!a) throw new N(8);
1147
- return a;
1148
- }
1149
- function Tb(a, b = -1) {
1150
- a = Object.assign(new Lb(), a);
1151
- if (-1 == b) a: {
1152
- for (b = 0; 4096 >= b; b++) if (!Gb[b]) break a;
1153
- throw new N(33);
1154
- }
1155
- a.fd = b;
1156
- return Gb[b] = a;
1157
- }
1158
- function Ub(a, b = -1) {
1159
- a = Tb(a, b);
1160
- a.Ma?.Rb?.(a);
1161
- return a;
1162
- }
1163
- function Vb(a, b, c) {
1164
- var d = a?.Ma.Ua;
1165
- a = d ? a : b;
1166
- d ??= b.La.Ua;
1167
- Sb(d);
1168
- d(a, c);
1169
- }
1170
- var Ab = { open(a) {
1171
- a.Ma = Fb[a.node.rdev].Ma;
1172
- a.Ma.open?.(a);
1173
- }, Va() {
1174
- throw new N(70);
1175
- } };
1176
- function wb(a, b) {
1177
- Fb[a] = { Ma: b };
1178
- }
1179
- function Wb(a, b) {
1180
- var c = "/" === b;
1181
- if (c && Eb) throw new N(10);
1182
- if (!c && b) {
1183
- var d = S(b, { nb: false });
1184
- b = d.path;
1185
- d = d.node;
1186
- if (d.ab) throw new N(10);
1187
- if (!P(d.mode)) throw new N(54);
1188
- }
1189
- b = { type: a, Wb: {}, zb: b, Ib: [] };
1190
- a = a.Xa(b);
1191
- a.Xa = b;
1192
- b.root = a;
1193
- c ? Eb = a : d && (d.ab = b, d.Xa && d.Xa.Ib.push(b));
1194
- }
1195
- function Xb(a, b, c) {
1196
- var d = S(a, { parent: true }).node;
1197
- a = gb(a);
1198
- if (!a) throw new N(28);
1199
- if ("." === a || ".." === a) throw new N(20);
1200
- var e = Qb(d, a);
1201
- if (e) throw new N(e);
1202
- if (!d.La.hb) throw new N(63);
1203
- return d.La.hb(d, a, b, c);
1204
- }
1205
- function ma(a, b = 438) {
1206
- return Xb(a, b & 4095 | 32768, 0);
1207
- }
1208
- function U(a, b = 511) {
1209
- return Xb(a, b & 1023 | 16384, 0);
1210
- }
1211
- function Yb(a, b, c) {
1212
- "undefined" == typeof c && (c = b, b = 438);
1213
- Xb(a, b | 8192, c);
1214
- }
1215
- function Zb(a, b) {
1216
- if (!jb(a)) throw new N(44);
1217
- var c = S(b, { parent: true }).node;
1218
- if (!c) throw new N(44);
1219
- b = gb(b);
1220
- var d = Qb(c, b);
1221
- if (d) throw new N(d);
1222
- if (!c.La.symlink) throw new N(63);
1223
- c.La.symlink(c, b, a);
1224
- }
1225
- function $b(a) {
1226
- var b = S(a, { parent: true }).node;
1227
- a = gb(a);
1228
- var c = Q(b, a), d = Rb(b, a, true);
1229
- if (d) throw new N(d);
1230
- if (!b.La.rmdir) throw new N(63);
1231
- if (c.ab) throw new N(10);
1232
- b.La.rmdir(b, a);
1233
- Cb(c);
1234
- }
1235
- function za(a) {
1236
- var b = S(a, { parent: true }).node;
1237
- if (!b) throw new N(44);
1238
- a = gb(a);
1239
- var c = Q(b, a), d = Rb(b, a, false);
1240
- if (d) throw new N(d);
1241
- if (!b.La.unlink) throw new N(63);
1242
- if (c.ab) throw new N(10);
1243
- b.La.unlink(b, a);
1244
- Cb(c);
1245
- }
1246
- function ac(a, b) {
1247
- a = S(a, { $a: !b }).node;
1248
- return Sb(a.La.Ta)(a);
1249
- }
1250
- function bc(a, b, c, d) {
1251
- Vb(a, b, { mode: c & 4095 | b.mode & -4096, ctime: Date.now(), Fb: d });
1252
- }
1253
- function na(a, b) {
1254
- a = "string" == typeof a ? S(a, { $a: true }).node : a;
1255
- bc(null, a, b);
1256
- }
1257
- function cc(a, b, c) {
1258
- if (P(b.mode)) throw new N(31);
1259
- if (32768 !== (b.mode & 61440)) throw new N(28);
1260
- var d = Ob(b, "w");
1261
- if (d) throw new N(d);
1262
- Vb(a, b, { size: c, timestamp: Date.now() });
1263
- }
1264
- function oa(a, b, c = 438) {
1265
- if ("" === a) throw new N(44);
1266
- if ("string" == typeof b) {
1267
- var d = { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }[b];
1268
- if ("undefined" == typeof d) throw Error(`Unknown file open mode: ${b}`);
1269
- b = d;
1270
- }
1271
- c = b & 64 ? c & 4095 | 32768 : 0;
1272
- if ("object" == typeof a) d = a;
1273
- else {
1274
- var e = a.endsWith("/");
1275
- a = S(a, { $a: !(b & 131072), Jb: true });
1276
- d = a.node;
1277
- a = a.path;
1278
- }
1279
- var h = false;
1280
- if (b & 64) if (d) {
1281
- if (b & 128) throw new N(20);
1282
- } else {
1283
- if (e) throw new N(31);
1284
- d = Xb(a, c | 511, 0);
1285
- h = true;
1286
- }
1287
- if (!d) throw new N(44);
1288
- 8192 === (d.mode & 61440) && (b &= -513);
1289
- if (b & 65536 && !P(d.mode)) throw new N(54);
1290
- if (!h && (e = d ? 40960 === (d.mode & 61440) ? 32 : P(d.mode) && ("r" !== Pb(b) || b & 576) ? 31 : Ob(d, Pb(b)) : 44)) throw new N(e);
1291
- b & 512 && !h && (e = d, e = "string" == typeof e ? S(e, { $a: true }).node : e, cc(null, e, 0));
1292
- b &= -131713;
1293
- e = Tb({ node: d, path: ja(d), flags: b, seekable: true, position: 0, Ma: d.Ma, Lb: [], error: false });
1294
- e.Ma.open && e.Ma.open(e);
1295
- h && na(d, c & 511);
1296
- !f.logReadFiles || b & 1 || a in Kb || (Kb[a] = 1);
1297
- return e;
1298
- }
1299
- function qa(a) {
1300
- if (null === a.fd) throw new N(8);
1301
- a.ob && (a.ob = null);
1302
- try {
1303
- a.Ma.close && a.Ma.close(a);
1304
- } catch (b) {
1305
- throw b;
1306
- } finally {
1307
- Gb[a.fd] = null;
1308
- }
1309
- a.fd = null;
1310
- }
1311
- function mc(a, b, c) {
1312
- if (null === a.fd) throw new N(8);
1313
- if (!a.seekable || !a.Ma.Va) throw new N(70);
1314
- if (0 != c && 1 != c && 2 != c) throw new N(28);
1315
- a.position = a.Ma.Va(a, b, c);
1316
- a.Lb = [];
1317
- }
1318
- function Ec(a, b, c, d, e) {
1319
- if (0 > d || 0 > e) throw new N(28);
1320
- if (null === a.fd) throw new N(8);
1321
- if (1 === (a.flags & 2097155)) throw new N(8);
1322
- if (P(a.node.mode)) throw new N(31);
1323
- if (!a.Ma.read) throw new N(28);
1324
- var h = "undefined" != typeof e;
1325
- if (!h) e = a.position;
1326
- else if (!a.seekable) throw new N(70);
1327
- b = a.Ma.read(a, b, c, d, e);
1328
- h || (a.position += b);
1329
- return b;
1330
- }
1331
- function pa(a, b, c, d, e) {
1332
- if (0 > d || 0 > e) throw new N(28);
1333
- if (null === a.fd) throw new N(8);
1334
- if (0 === (a.flags & 2097155)) throw new N(8);
1335
- if (P(a.node.mode)) throw new N(31);
1336
- if (!a.Ma.write) throw new N(28);
1337
- a.seekable && a.flags & 1024 && mc(a, 0, 2);
1338
- var h = "undefined" != typeof e;
1339
- if (!h) e = a.position;
1340
- else if (!a.seekable) throw new N(70);
1341
- b = a.Ma.write(a, b, c, d, e, void 0);
1342
- h || (a.position += b);
1343
- return b;
1344
- }
1345
- function ya(a) {
1346
- var b = "binary";
1347
- if ("utf8" !== b && "binary" !== b) throw Error(`Invalid encoding type "${b}"`);
1348
- var c;
1349
- var d = oa(a, d || 0);
1350
- a = ac(a).size;
1351
- var e = new Uint8Array(a);
1352
- Ec(d, e, 0, a, 0);
1353
- "utf8" === b ? c = B(e) : "binary" === b && (c = e);
1354
- qa(d);
1355
- return c;
1356
- }
1357
- function V(a, b, c) {
1358
- a = ka("/dev/" + a);
1359
- var d = la(!!b, !!c);
1360
- V.yb ?? (V.yb = 64);
1361
- var e = V.yb++ << 8 | 0;
1362
- wb(e, { open(h) {
1363
- h.seekable = false;
1364
- }, close() {
1365
- c?.buffer?.length && c(10);
1366
- }, read(h, k, q, w) {
1367
- for (var v = 0, C = 0; C < w; C++) {
1368
- try {
1369
- var G = b();
1370
- } catch (pb) {
1371
- throw new N(29);
1372
- }
1373
- if (void 0 === G && 0 === v) throw new N(6);
1374
- if (null === G || void 0 === G) break;
1375
- v++;
1376
- k[q + C] = G;
1377
- }
1378
- v && (h.node.atime = Date.now());
1379
- return v;
1380
- }, write(h, k, q, w) {
1381
- for (var v = 0; v < w; v++) try {
1382
- c(k[q + v]);
1383
- } catch (C) {
1384
- throw new N(29);
1385
- }
1386
- w && (h.node.mtime = h.node.ctime = Date.now());
1387
- return v;
1388
- } });
1389
- Yb(a, d, e);
1390
- }
1391
- var W = {};
1392
- function Gc(a, b, c) {
1393
- if ("/" === b.charAt(0)) return b;
1394
- a = -100 === a ? "/" : T(a).path;
1395
- if (0 == b.length) {
1396
- if (!c) throw new N(44);
1397
- return a;
1398
- }
1399
- return a + "/" + b;
1400
- }
1401
- function Hc(a, b) {
1402
- E[a >> 2] = b.dev;
1403
- E[a + 4 >> 2] = b.mode;
1404
- F[a + 8 >> 2] = b.nlink;
1405
- E[a + 12 >> 2] = b.uid;
1406
- E[a + 16 >> 2] = b.gid;
1407
- E[a + 20 >> 2] = b.rdev;
1408
- H[a + 24 >> 3] = BigInt(b.size);
1409
- E[a + 32 >> 2] = 4096;
1410
- E[a + 36 >> 2] = b.blocks;
1411
- var c = b.atime.getTime(), d = b.mtime.getTime(), e = b.ctime.getTime();
1412
- H[a + 40 >> 3] = BigInt(Math.floor(c / 1e3));
1413
- F[a + 48 >> 2] = c % 1e3 * 1e6;
1414
- H[a + 56 >> 3] = BigInt(Math.floor(d / 1e3));
1415
- F[a + 64 >> 2] = d % 1e3 * 1e6;
1416
- H[a + 72 >> 3] = BigInt(Math.floor(e / 1e3));
1417
- F[a + 80 >> 2] = e % 1e3 * 1e6;
1418
- H[a + 88 >> 3] = BigInt(b.ino);
1419
- return 0;
1420
- }
1421
- var Ic = void 0, Jc = () => {
1422
- var a = E[+Ic >> 2];
1423
- Ic += 4;
1424
- return a;
1425
- }, Kc = 0, Lc = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], Mc = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Nc = {}, Oc = (a) => {
1426
- Ma = a;
1427
- cb || 0 < Kc || (f.onExit?.(a), La = true);
1428
- Da(a, new Ya(a));
1429
- }, Pc = (a) => {
1430
- if (!La) try {
1431
- if (a(), !(cb || 0 < Kc)) try {
1432
- Ma = a = Ma, Oc(a);
1433
- } catch (b) {
1434
- b instanceof Ya || "unwind" == b || Da(1, b);
1435
- }
1436
- } catch (b) {
1437
- b instanceof Ya || "unwind" == b || Da(1, b);
1438
- }
1439
- }, Qc = {}, Sc = () => {
1440
- if (!Rc) {
1441
- var a = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: ("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _: Ca || "./this.program" }, b;
1442
- for (b in Qc) void 0 === Qc[b] ? delete a[b] : a[b] = Qc[b];
1443
- var c = [];
1444
- for (b in a) c.push(`${b}=${a[b]}`);
1445
- Rc = c;
1446
- }
1447
- return Rc;
1448
- }, Rc, xa = (a) => {
1449
- var b = ha(a) + 1, c = z(b);
1450
- u(a, x, c, b);
1451
- return c;
1452
- }, Tc = (a, b, c, d) => {
1453
- var e = { string: (v) => {
1454
- var C = 0;
1455
- null !== v && void 0 !== v && 0 !== v && (C = xa(v));
1456
- return C;
1457
- }, array: (v) => {
1458
- var C = z(v.length);
1459
- p.set(v, C);
1460
- return C;
1461
- } };
1462
- a = f["_" + a];
1463
- var h = [], k = 0;
1464
- if (d) for (var q = 0; q < d.length; q++) {
1465
- var w = e[c[q]];
1466
- w ? (0 === k && (k = sa()), h[q] = w(d[q])) : h[q] = d[q];
1467
- }
1468
- c = a(...h);
1469
- return c = (function(v) {
1470
- 0 !== k && wa(k);
1471
- return "string" === b ? v ? B(x, v) : "" : "boolean" === b ? !!v : v;
1472
- })(c);
1473
- }, ea = 0, da = (a, b) => {
1474
- b = 1 == b ? z(a.length) : ia(a.length);
1475
- a.subarray || a.slice || (a = new Uint8Array(a));
1476
- x.set(a, b);
1477
- return b;
1478
- }, Uc, Vc = [], Y, A = (a) => {
1479
- Uc.delete(Y.get(a));
1480
- Y.set(a, null);
1481
- Vc.push(a);
1482
- }, Aa = (a, b) => {
1483
- if (!Uc) {
1484
- Uc = /* @__PURE__ */ new WeakMap();
1485
- var c = Y.length;
1486
- if (Uc) for (var d = 0; d < 0 + c; d++) {
1487
- var e = Y.get(d);
1488
- e && Uc.set(e, d);
1489
- }
1490
- }
1491
- if (c = Uc.get(a) || 0) return c;
1492
- if (Vc.length) c = Vc.pop();
1493
- else {
1494
- try {
1495
- Y.grow(1);
1496
- } catch (w) {
1497
- if (!(w instanceof RangeError)) throw w;
1498
- throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";
1499
- }
1500
- c = Y.length - 1;
1501
- }
1502
- try {
1503
- Y.set(c, a);
1504
- } catch (w) {
1505
- if (!(w instanceof TypeError)) throw w;
1506
- if ("function" == typeof WebAssembly.Function) {
1507
- var h = WebAssembly.Function;
1508
- d = { i: "i32", j: "i64", f: "f32", d: "f64", e: "externref", p: "i32" };
1509
- e = { parameters: [], results: "v" == b[0] ? [] : [d[b[0]]] };
1510
- for (var k = 1; k < b.length; ++k) e.parameters.push(d[b[k]]);
1511
- b = new h(e, a);
1512
- } else {
1513
- d = [1];
1514
- e = b.slice(0, 1);
1515
- b = b.slice(1);
1516
- k = { i: 127, p: 127, j: 126, f: 125, d: 124, e: 111 };
1517
- d.push(96);
1518
- var q = b.length;
1519
- 128 > q ? d.push(q) : d.push(q % 128 | 128, q >> 7);
1520
- for (h of b) d.push(k[h]);
1521
- "v" == e ? d.push(0) : d.push(1, k[e]);
1522
- b = [0, 97, 115, 109, 1, 0, 0, 0, 1];
1523
- h = d.length;
1524
- 128 > h ? b.push(h) : b.push(h % 128 | 128, h >> 7);
1525
- b.push(...d);
1526
- b.push(2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0);
1527
- b = new WebAssembly.Module(new Uint8Array(b));
1528
- b = new WebAssembly.Instance(b, { e: { f: a } }).exports.f;
1529
- }
1530
- Y.set(c, b);
1531
- }
1532
- Uc.set(a, c);
1533
- return c;
1534
- };
1535
- R = Array(4096);
1536
- Wb(O, "/");
1537
- U("/tmp");
1538
- U("/home");
1539
- U("/home/web_user");
1540
- (function() {
1541
- U("/dev");
1542
- wb(259, { read: () => 0, write: (d, e, h, k) => k, Va: () => 0 });
1543
- Yb("/dev/null", 259);
1544
- nb(1280, yb);
1545
- nb(1536, zb);
1546
- Yb("/dev/tty", 1280);
1547
- Yb("/dev/tty1", 1536);
1548
- var a = new Uint8Array(1024), b = 0, c = () => {
1549
- 0 === b && (ib(a), b = a.byteLength);
1550
- return a[--b];
1551
- };
1552
- V("random", c);
1553
- V("urandom", c);
1554
- U("/dev/shm");
1555
- U("/dev/shm/tmp");
1556
- })();
1557
- (function() {
1558
- U("/proc");
1559
- var a = U("/proc/self");
1560
- U("/proc/self/fd");
1561
- Wb({ Xa() {
1562
- var b = Bb(a, "fd", 16895, 73);
1563
- b.Ma = { Va: O.Ma.Va };
1564
- b.La = { lookup(c, d) {
1565
- c = +d;
1566
- var e = T(c);
1567
- c = { parent: null, Xa: { zb: "fake" }, La: { readlink: () => e.path }, id: c + 1 };
1568
- return c.parent = c;
1569
- }, readdir() {
1570
- return Array.from(Gb.entries()).filter(([, c]) => c).map(([c]) => c.toString());
1571
- } };
1572
- return b;
1573
- } }, "/proc/self/fd");
1574
- })();
1575
- O.vb = new N(44);
1576
- O.vb.stack = "<generic error, no stack>";
1577
- var Xc = { a: (a, b, c, d) => Ta(`Assertion failed: ${a ? B(x, a) : ""}, at: ` + [b ? b ? B(x, b) : "" : "unknown filename", c, d ? d ? B(x, d) : "" : "unknown function"]), i: function(a, b) {
1578
- try {
1579
- return a = a ? B(x, a) : "", na(a, b), 0;
1580
- } catch (c) {
1581
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1582
- return -c.Pa;
1583
- }
1584
- }, L: function(a, b, c) {
1585
- try {
1586
- b = b ? B(x, b) : "";
1587
- b = Gc(a, b);
1588
- if (c & -8) return -28;
1589
- var d = S(b, { $a: true }).node;
1590
- if (!d) return -44;
1591
- a = "";
1592
- c & 4 && (a += "r");
1593
- c & 2 && (a += "w");
1594
- c & 1 && (a += "x");
1595
- return a && Ob(d, a) ? -2 : 0;
1596
- } catch (e) {
1597
- if ("undefined" == typeof W || "ErrnoError" !== e.name) throw e;
1598
- return -e.Pa;
1599
- }
1600
- }, j: function(a, b) {
1601
- try {
1602
- var c = T(a);
1603
- bc(c, c.node, b, false);
1604
- return 0;
1605
- } catch (d) {
1606
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1607
- return -d.Pa;
1608
- }
1609
- }, h: function(a) {
1610
- try {
1611
- var b = T(a);
1612
- Vb(b, b.node, { timestamp: Date.now(), Fb: false });
1613
- return 0;
1614
- } catch (c) {
1615
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1616
- return -c.Pa;
1617
- }
1618
- }, b: function(a, b, c) {
1619
- Ic = c;
1620
- try {
1621
- var d = T(a);
1622
- switch (b) {
1623
- case 0:
1624
- var e = Jc();
1625
- if (0 > e) break;
1626
- for (; Gb[e]; ) e++;
1627
- return Ub(d, e).fd;
1628
- case 1:
1629
- case 2:
1630
- return 0;
1631
- case 3:
1632
- return d.flags;
1633
- case 4:
1634
- return e = Jc(), d.flags |= e, 0;
1635
- case 12:
1636
- return e = Jc(), Na[e + 0 >> 1] = 2, 0;
1637
- case 13:
1638
- case 14:
1639
- return 0;
1640
- }
1641
- return -28;
1642
- } catch (h) {
1643
- if ("undefined" == typeof W || "ErrnoError" !== h.name) throw h;
1644
- return -h.Pa;
1645
- }
1646
- }, g: function(a, b) {
1647
- try {
1648
- var c = T(a), d = c.node, e = c.Ma.Ta;
1649
- a = e ? c : d;
1650
- e ??= d.La.Ta;
1651
- Sb(e);
1652
- var h = e(a);
1653
- return Hc(b, h);
1654
- } catch (k) {
1655
- if ("undefined" == typeof W || "ErrnoError" !== k.name) throw k;
1656
- return -k.Pa;
1657
- }
1658
- }, H: function(a, b) {
1659
- b = -9007199254740992 > b || 9007199254740992 < b ? NaN : Number(b);
1660
- try {
1661
- if (isNaN(b)) return 61;
1662
- var c = T(a);
1663
- if (0 > b || 0 === (c.flags & 2097155)) throw new N(28);
1664
- cc(c, c.node, b);
1665
- return 0;
1666
- } catch (d) {
1667
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1668
- return -d.Pa;
1669
- }
1670
- }, G: function(a, b) {
1671
- try {
1672
- if (0 === b) return -28;
1673
- var c = ha("/") + 1;
1674
- if (b < c) return -68;
1675
- u("/", x, a, b);
1676
- return c;
1677
- } catch (d) {
1678
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1679
- return -d.Pa;
1680
- }
1681
- }, K: function(a, b) {
1682
- try {
1683
- return a = a ? B(x, a) : "", Hc(b, ac(a, true));
1684
- } catch (c) {
1685
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1686
- return -c.Pa;
1687
- }
1688
- }, C: function(a, b, c) {
1689
- try {
1690
- return b = b ? B(x, b) : "", b = Gc(a, b), U(b, c), 0;
1691
- } catch (d) {
1692
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1693
- return -d.Pa;
1694
- }
1695
- }, J: function(a, b, c, d) {
1696
- try {
1697
- b = b ? B(x, b) : "";
1698
- var e = d & 256;
1699
- b = Gc(a, b, d & 4096);
1700
- return Hc(c, e ? ac(b, true) : ac(b));
1701
- } catch (h) {
1702
- if ("undefined" == typeof W || "ErrnoError" !== h.name) throw h;
1703
- return -h.Pa;
1704
- }
1705
- }, x: function(a, b, c, d) {
1706
- Ic = d;
1707
- try {
1708
- b = b ? B(x, b) : "";
1709
- b = Gc(a, b);
1710
- var e = d ? Jc() : 0;
1711
- return oa(b, c, e).fd;
1712
- } catch (h) {
1713
- if ("undefined" == typeof W || "ErrnoError" !== h.name) throw h;
1714
- return -h.Pa;
1715
- }
1716
- }, v: function(a, b, c, d) {
1717
- try {
1718
- b = b ? B(x, b) : "";
1719
- b = Gc(a, b);
1720
- if (0 >= d) return -28;
1721
- var e = S(b).node;
1722
- if (!e) throw new N(44);
1723
- if (!e.La.readlink) throw new N(28);
1724
- var h = e.La.readlink(e);
1725
- var k = Math.min(d, ha(h)), q = p[c + k];
1726
- u(h, x, c, d + 1);
1727
- p[c + k] = q;
1728
- return k;
1729
- } catch (w) {
1730
- if ("undefined" == typeof W || "ErrnoError" !== w.name) throw w;
1731
- return -w.Pa;
1732
- }
1733
- }, u: function(a) {
1734
- try {
1735
- return a = a ? B(x, a) : "", $b(a), 0;
1736
- } catch (b) {
1737
- if ("undefined" == typeof W || "ErrnoError" !== b.name) throw b;
1738
- return -b.Pa;
1739
- }
1740
- }, f: function(a, b) {
1741
- try {
1742
- return a = a ? B(x, a) : "", Hc(b, ac(a));
1743
- } catch (c) {
1744
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1745
- return -c.Pa;
1746
- }
1747
- }, r: function(a, b, c) {
1748
- try {
1749
- return b = b ? B(x, b) : "", b = Gc(a, b), 0 === c ? za(b) : 512 === c ? $b(b) : Ta("Invalid flags passed to unlinkat"), 0;
1750
- } catch (d) {
1751
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1752
- return -d.Pa;
1753
- }
1754
- }, q: function(a, b, c) {
1755
- try {
1756
- b = b ? B(x, b) : "";
1757
- b = Gc(a, b, true);
1758
- var d = Date.now(), e, h;
1759
- if (c) {
1760
- var k = F[c >> 2] + 4294967296 * E[c + 4 >> 2], q = E[c + 8 >> 2];
1761
- 1073741823 == q ? e = d : 1073741822 == q ? e = null : e = 1e3 * k + q / 1e6;
1762
- c += 16;
1763
- k = F[c >> 2] + 4294967296 * E[c + 4 >> 2];
1764
- q = E[c + 8 >> 2];
1765
- 1073741823 == q ? h = d : 1073741822 == q ? h = null : h = 1e3 * k + q / 1e6;
1766
- } else h = e = d;
1767
- if (null !== (h ?? e)) {
1768
- a = e;
1769
- var w = S(b, { $a: true }).node;
1770
- Sb(w.La.Ua)(w, { atime: a, mtime: h });
1771
- }
1772
- return 0;
1773
- } catch (v) {
1774
- if ("undefined" == typeof W || "ErrnoError" !== v.name) throw v;
1775
- return -v.Pa;
1776
- }
1777
- }, m: () => Ta(""), l: () => {
1778
- cb = false;
1779
- Kc = 0;
1780
- }, A: function(a, b) {
1781
- a = -9007199254740992 > a || 9007199254740992 < a ? NaN : Number(a);
1782
- a = new Date(1e3 * a);
1783
- E[b >> 2] = a.getSeconds();
1784
- E[b + 4 >> 2] = a.getMinutes();
1785
- E[b + 8 >> 2] = a.getHours();
1786
- E[b + 12 >> 2] = a.getDate();
1787
- E[b + 16 >> 2] = a.getMonth();
1788
- E[b + 20 >> 2] = a.getFullYear() - 1900;
1789
- E[b + 24 >> 2] = a.getDay();
1790
- var c = a.getFullYear();
1791
- E[b + 28 >> 2] = (0 !== c % 4 || 0 === c % 100 && 0 !== c % 400 ? Mc : Lc)[a.getMonth()] + a.getDate() - 1 | 0;
1792
- E[b + 36 >> 2] = -(60 * a.getTimezoneOffset());
1793
- c = new Date(
1794
- a.getFullYear(),
1795
- 6,
1796
- 1
1797
- ).getTimezoneOffset();
1798
- var d = new Date(a.getFullYear(), 0, 1).getTimezoneOffset();
1799
- E[b + 32 >> 2] = (c != d && a.getTimezoneOffset() == Math.min(d, c)) | 0;
1800
- }, y: function(a, b, c, d, e, h, k) {
1801
- e = -9007199254740992 > e || 9007199254740992 < e ? NaN : Number(e);
1802
- try {
1803
- if (isNaN(e)) return 61;
1804
- var q = T(d);
1805
- if (0 !== (b & 2) && 0 === (c & 2) && 2 !== (q.flags & 2097155)) throw new N(2);
1806
- if (1 === (q.flags & 2097155)) throw new N(2);
1807
- if (!q.Ma.ib) throw new N(43);
1808
- if (!a) throw new N(28);
1809
- var w = q.Ma.ib(q, a, e, b, c);
1810
- var v = w.Kb;
1811
- E[h >> 2] = w.Ab;
1812
- F[k >> 2] = v;
1813
- return 0;
1814
- } catch (C) {
1815
- if ("undefined" == typeof W || "ErrnoError" !== C.name) throw C;
1816
- return -C.Pa;
1817
- }
1818
- }, z: function(a, b, c, d, e, h) {
1819
- h = -9007199254740992 > h || 9007199254740992 < h ? NaN : Number(h);
1820
- try {
1821
- var k = T(e);
1822
- if (c & 2) {
1823
- c = h;
1824
- if (32768 !== (k.node.mode & 61440)) throw new N(43);
1825
- if (!(d & 2)) {
1826
- var q = x.slice(a, a + b);
1827
- k.Ma.jb && k.Ma.jb(k, q, c, b, d);
1828
- }
1829
- }
1830
- } catch (w) {
1831
- if ("undefined" == typeof W || "ErrnoError" !== w.name) throw w;
1832
- return -w.Pa;
1833
- }
1834
- }, n: (a, b) => {
1835
- Nc[a] && (clearTimeout(Nc[a].id), delete Nc[a]);
1836
- if (!b) return 0;
1837
- var c = setTimeout(() => {
1838
- delete Nc[a];
1839
- Pc(() => Wc(a, performance.now()));
1840
- }, b);
1841
- Nc[a] = {
1842
- id: c,
1843
- Xb: b
1844
- };
1845
- return 0;
1846
- }, B: (a, b, c, d) => {
1847
- var e = (/* @__PURE__ */ new Date()).getFullYear(), h = new Date(e, 0, 1).getTimezoneOffset();
1848
- e = new Date(e, 6, 1).getTimezoneOffset();
1849
- F[a >> 2] = 60 * Math.max(h, e);
1850
- E[b >> 2] = Number(h != e);
1851
- b = (k) => {
1852
- var q = Math.abs(k);
1853
- return `UTC${0 <= k ? "-" : "+"}${String(Math.floor(q / 60)).padStart(2, "0")}${String(q % 60).padStart(2, "0")}`;
1854
- };
1855
- a = b(h);
1856
- b = b(e);
1857
- e < h ? (u(a, x, c, 17), u(b, x, d, 17)) : (u(a, x, d, 17), u(b, x, c, 17));
1858
- }, d: () => Date.now(), s: () => 2147483648, c: () => performance.now(), o: (a) => {
1859
- var b = x.length;
1860
- a >>>= 0;
1861
- if (2147483648 < a) return false;
1862
- for (var c = 1; 4 >= c; c *= 2) {
1863
- var d = b * (1 + 0.2 / c);
1864
- d = Math.min(d, a + 100663296);
1865
- a: {
1866
- d = (Math.min(2147483648, 65536 * Math.ceil(Math.max(a, d) / 65536)) - Ka.buffer.byteLength + 65535) / 65536 | 0;
1867
- try {
1868
- Ka.grow(d);
1869
- Qa();
1870
- var e = 1;
1871
- break a;
1872
- } catch (h) {
1873
- }
1874
- e = void 0;
1875
- }
1876
- if (e) return true;
1877
- }
1878
- return false;
1879
- }, E: (a, b) => {
1880
- var c = 0;
1881
- Sc().forEach((d, e) => {
1882
- var h = b + c;
1883
- e = F[a + 4 * e >> 2] = h;
1884
- for (h = 0; h < d.length; ++h) p[e++] = d.charCodeAt(h);
1885
- p[e] = 0;
1886
- c += d.length + 1;
1887
- });
1888
- return 0;
1889
- }, F: (a, b) => {
1890
- var c = Sc();
1891
- F[a >> 2] = c.length;
1892
- var d = 0;
1893
- c.forEach((e) => d += e.length + 1);
1894
- F[b >> 2] = d;
1895
- return 0;
1896
- }, e: function(a) {
1897
- try {
1898
- var b = T(a);
1899
- qa(b);
1900
- return 0;
1901
- } catch (c) {
1902
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1903
- return c.Pa;
1904
- }
1905
- }, p: function(a, b) {
1906
- try {
1907
- var c = T(a);
1908
- p[b] = c.tty ? 2 : P(c.mode) ? 3 : 40960 === (c.mode & 61440) ? 7 : 4;
1909
- Na[b + 2 >> 1] = 0;
1910
- H[b + 8 >> 3] = BigInt(0);
1911
- H[b + 16 >> 3] = BigInt(0);
1912
- return 0;
1913
- } catch (d) {
1914
- if ("undefined" == typeof W || "ErrnoError" !== d.name) throw d;
1915
- return d.Pa;
1916
- }
1917
- }, w: function(a, b, c, d) {
1918
- try {
1919
- a: {
1920
- var e = T(a);
1921
- a = b;
1922
- for (var h, k = b = 0; k < c; k++) {
1923
- var q = F[a >> 2], w = F[a + 4 >> 2];
1924
- a += 8;
1925
- var v = Ec(e, p, q, w, h);
1926
- if (0 > v) {
1927
- var C = -1;
1928
- break a;
1929
- }
1930
- b += v;
1931
- if (v < w) break;
1932
- "undefined" != typeof h && (h += v);
1933
- }
1934
- C = b;
1935
- }
1936
- F[d >> 2] = C;
1937
- return 0;
1938
- } catch (G) {
1939
- if ("undefined" == typeof W || "ErrnoError" !== G.name) throw G;
1940
- return G.Pa;
1941
- }
1942
- }, D: function(a, b, c, d) {
1943
- b = -9007199254740992 > b || 9007199254740992 < b ? NaN : Number(b);
1944
- try {
1945
- if (isNaN(b)) return 61;
1946
- var e = T(a);
1947
- mc(e, b, c);
1948
- H[d >> 3] = BigInt(e.position);
1949
- e.ob && 0 === b && 0 === c && (e.ob = null);
1950
- return 0;
1951
- } catch (h) {
1952
- if ("undefined" == typeof W || "ErrnoError" !== h.name) throw h;
1953
- return h.Pa;
1954
- }
1955
- }, I: function(a) {
1956
- try {
1957
- var b = T(a);
1958
- return b.Ma?.fsync ? b.Ma.fsync(b) : 0;
1959
- } catch (c) {
1960
- if ("undefined" == typeof W || "ErrnoError" !== c.name) throw c;
1961
- return c.Pa;
1962
- }
1963
- }, t: function(a, b, c, d) {
1964
- try {
1965
- a: {
1966
- var e = T(a);
1967
- a = b;
1968
- for (var h, k = b = 0; k < c; k++) {
1969
- var q = F[a >> 2], w = F[a + 4 >> 2];
1970
- a += 8;
1971
- var v = pa(e, p, q, w, h);
1972
- if (0 > v) {
1973
- var C = -1;
1974
- break a;
1975
- }
1976
- b += v;
1977
- if (v < w) break;
1978
- "undefined" != typeof h && (h += v);
1979
- }
1980
- C = b;
1981
- }
1982
- F[d >> 2] = C;
1983
- return 0;
1984
- } catch (G) {
1985
- if ("undefined" == typeof W || "ErrnoError" !== G.name) throw G;
1986
- return G.Pa;
1987
- }
1988
- }, k: Oc }, Z;
1989
- (async function() {
1990
- function a(c) {
1991
- Z = c.exports;
1992
- Ka = Z.M;
1993
- Qa();
1994
- Y = Z.O;
1995
- K--;
1996
- f.monitorRunDependencies?.(K);
1997
- 0 == K && Sa && (c = Sa, Sa = null, c());
1998
- return Z;
1999
- }
2000
- K++;
2001
- f.monitorRunDependencies?.(K);
2002
- var b = { a: Xc };
2003
- if (f.instantiateWasm) return new Promise((c) => {
2004
- f.instantiateWasm(b, (d, e) => {
2005
- a(d, e);
2006
- c(d.exports);
2007
- });
2008
- });
2009
- Ua ??= f.locateFile ? f.locateFile("sql-wasm.wasm", D) : D + "sql-wasm.wasm";
2010
- return a((await Xa(b)).instance);
2011
- })();
2012
- f._sqlite3_free = (a) => (f._sqlite3_free = Z.P)(a);
2013
- f._sqlite3_value_text = (a) => (f._sqlite3_value_text = Z.Q)(a);
2014
- f._sqlite3_prepare_v2 = (a, b, c, d, e) => (f._sqlite3_prepare_v2 = Z.R)(a, b, c, d, e);
2015
- f._sqlite3_step = (a) => (f._sqlite3_step = Z.S)(a);
2016
- f._sqlite3_reset = (a) => (f._sqlite3_reset = Z.T)(a);
2017
- f._sqlite3_exec = (a, b, c, d, e) => (f._sqlite3_exec = Z.U)(a, b, c, d, e);
2018
- f._sqlite3_finalize = (a) => (f._sqlite3_finalize = Z.V)(a);
2019
- f._sqlite3_column_name = (a, b) => (f._sqlite3_column_name = Z.W)(a, b);
2020
- f._sqlite3_column_text = (a, b) => (f._sqlite3_column_text = Z.X)(a, b);
2021
- f._sqlite3_column_type = (a, b) => (f._sqlite3_column_type = Z.Y)(a, b);
2022
- f._sqlite3_errmsg = (a) => (f._sqlite3_errmsg = Z.Z)(a);
2023
- f._sqlite3_clear_bindings = (a) => (f._sqlite3_clear_bindings = Z._)(a);
2024
- f._sqlite3_value_blob = (a) => (f._sqlite3_value_blob = Z.$)(a);
2025
- f._sqlite3_value_bytes = (a) => (f._sqlite3_value_bytes = Z.aa)(a);
2026
- f._sqlite3_value_double = (a) => (f._sqlite3_value_double = Z.ba)(a);
2027
- f._sqlite3_value_int = (a) => (f._sqlite3_value_int = Z.ca)(a);
2028
- f._sqlite3_value_type = (a) => (f._sqlite3_value_type = Z.da)(a);
2029
- f._sqlite3_result_blob = (a, b, c, d) => (f._sqlite3_result_blob = Z.ea)(a, b, c, d);
2030
- f._sqlite3_result_double = (a, b) => (f._sqlite3_result_double = Z.fa)(a, b);
2031
- f._sqlite3_result_error = (a, b, c) => (f._sqlite3_result_error = Z.ga)(a, b, c);
2032
- f._sqlite3_result_int = (a, b) => (f._sqlite3_result_int = Z.ha)(a, b);
2033
- f._sqlite3_result_int64 = (a, b) => (f._sqlite3_result_int64 = Z.ia)(a, b);
2034
- f._sqlite3_result_null = (a) => (f._sqlite3_result_null = Z.ja)(a);
2035
- f._sqlite3_result_text = (a, b, c, d) => (f._sqlite3_result_text = Z.ka)(a, b, c, d);
2036
- f._sqlite3_aggregate_context = (a, b) => (f._sqlite3_aggregate_context = Z.la)(a, b);
2037
- f._sqlite3_column_count = (a) => (f._sqlite3_column_count = Z.ma)(a);
2038
- f._sqlite3_data_count = (a) => (f._sqlite3_data_count = Z.na)(a);
2039
- f._sqlite3_column_blob = (a, b) => (f._sqlite3_column_blob = Z.oa)(a, b);
2040
- f._sqlite3_column_bytes = (a, b) => (f._sqlite3_column_bytes = Z.pa)(a, b);
2041
- f._sqlite3_column_double = (a, b) => (f._sqlite3_column_double = Z.qa)(a, b);
2042
- f._sqlite3_bind_blob = (a, b, c, d, e) => (f._sqlite3_bind_blob = Z.ra)(a, b, c, d, e);
2043
- f._sqlite3_bind_double = (a, b, c) => (f._sqlite3_bind_double = Z.sa)(a, b, c);
2044
- f._sqlite3_bind_int = (a, b, c) => (f._sqlite3_bind_int = Z.ta)(a, b, c);
2045
- f._sqlite3_bind_text = (a, b, c, d, e) => (f._sqlite3_bind_text = Z.ua)(a, b, c, d, e);
2046
- f._sqlite3_bind_parameter_index = (a, b) => (f._sqlite3_bind_parameter_index = Z.va)(a, b);
2047
- f._sqlite3_sql = (a) => (f._sqlite3_sql = Z.wa)(a);
2048
- f._sqlite3_normalized_sql = (a) => (f._sqlite3_normalized_sql = Z.xa)(a);
2049
- f._sqlite3_changes = (a) => (f._sqlite3_changes = Z.ya)(a);
2050
- f._sqlite3_close_v2 = (a) => (f._sqlite3_close_v2 = Z.za)(a);
2051
- f._sqlite3_create_function_v2 = (a, b, c, d, e, h, k, q, w) => (f._sqlite3_create_function_v2 = Z.Aa)(a, b, c, d, e, h, k, q, w);
2052
- f._sqlite3_update_hook = (a, b, c) => (f._sqlite3_update_hook = Z.Ba)(a, b, c);
2053
- f._sqlite3_open = (a, b) => (f._sqlite3_open = Z.Ca)(a, b);
2054
- var ia = f._malloc = (a) => (ia = f._malloc = Z.Da)(a), fa = f._free = (a) => (fa = f._free = Z.Ea)(a);
2055
- f._RegisterExtensionFunctions = (a) => (f._RegisterExtensionFunctions = Z.Fa)(a);
2056
- var Db = (a, b) => (Db = Z.Ga)(a, b), Wc = (a, b) => (Wc = Z.Ha)(a, b), wa = (a) => (wa = Z.Ia)(a), z = (a) => (z = Z.Ja)(a), sa = () => (sa = Z.Ka)();
2057
- f.stackSave = () => sa();
2058
- f.stackRestore = (a) => wa(a);
2059
- f.stackAlloc = (a) => z(a);
2060
- f.cwrap = (a, b, c, d) => {
2061
- var e = !c || c.every((h) => "number" === h || "boolean" === h);
2062
- return "string" !== b && e && !d ? f["_" + a] : (...h) => Tc(a, b, c, h);
2063
- };
2064
- f.addFunction = Aa;
2065
- f.removeFunction = A;
2066
- f.UTF8ToString = ua;
2067
- f.ALLOC_NORMAL = ea;
2068
- f.allocate = da;
2069
- f.allocateUTF8OnStack = xa;
2070
- function Yc() {
2071
- function a() {
2072
- f.calledRun = true;
2073
- if (!La) {
2074
- if (!f.noFSInit && !Ib) {
2075
- var b, c;
2076
- Ib = true;
2077
- d ??= f.stdin;
2078
- b ??= f.stdout;
2079
- c ??= f.stderr;
2080
- d ? V("stdin", d) : Zb("/dev/tty", "/dev/stdin");
2081
- b ? V("stdout", null, b) : Zb("/dev/tty", "/dev/stdout");
2082
- c ? V("stderr", null, c) : Zb("/dev/tty1", "/dev/stderr");
2083
- oa("/dev/stdin", 0);
2084
- oa("/dev/stdout", 1);
2085
- oa("/dev/stderr", 1);
2086
- }
2087
- Z.N();
2088
- Jb = false;
2089
- f.onRuntimeInitialized?.();
2090
- if (f.postRun) for ("function" == typeof f.postRun && (f.postRun = [f.postRun]); f.postRun.length; ) {
2091
- var d = f.postRun.shift();
2092
- $a.unshift(d);
2093
- }
2094
- Za($a);
2095
- }
2096
- }
2097
- if (0 < K) Sa = Yc;
2098
- else {
2099
- if (f.preRun) for ("function" == typeof f.preRun && (f.preRun = [f.preRun]); f.preRun.length; ) bb();
2100
- Za(ab);
2101
- 0 < K ? Sa = Yc : f.setStatus ? (f.setStatus("Running..."), setTimeout(() => {
2102
- setTimeout(() => f.setStatus(""), 1);
2103
- a();
2104
- }, 1)) : a();
2105
- }
2106
- }
2107
- if (f.preInit) for ("function" == typeof f.preInit && (f.preInit = [f.preInit]); 0 < f.preInit.length; ) f.preInit.pop()();
2108
- Yc();
2109
- return Module;
2110
- });
2111
- return initSqlJsPromise;
2112
- };
2113
- if (typeof exports2 === "object" && typeof module2 === "object") {
2114
- module2.exports = initSqlJs;
2115
- module2.exports.default = initSqlJs;
2116
- } else if (typeof define === "function" && define["amd"]) {
2117
- define([], function() {
2118
- return initSqlJs;
2119
- });
2120
- } else if (typeof exports2 === "object") {
2121
- exports2["Module"] = initSqlJs;
2122
- }
2123
- }
2124
- });
2125
-
2126
30
  // src/index.ts
2127
31
  var index_exports = {};
2128
32
  __export(index_exports, {
@@ -3785,7 +1689,9 @@ function migrateWorkspaceDb(db, meta) {
3785
1689
 
3786
1690
  // src/store/workspace/sqlJsAdapter.ts
3787
1691
  var import_node_fs6 = __toESM(require("fs"), 1);
1692
+ var import_node_module2 = require("module");
3788
1693
  var import_node_path8 = __toESM(require("path"), 1);
1694
+ var import_meta2 = {};
3789
1695
  function detectFts5Support2(db) {
3790
1696
  try {
3791
1697
  db.exec(`
@@ -3865,20 +1771,37 @@ var SqlJsDbAdapter = class {
3865
1771
  this.db.close();
3866
1772
  }
3867
1773
  };
1774
+ function defaultLocateFile(file) {
1775
+ const spec = `sql.js/dist/${file}`;
1776
+ try {
1777
+ if (typeof require === "function" && typeof require.resolve === "function") {
1778
+ return require.resolve(spec);
1779
+ }
1780
+ } catch {
1781
+ }
1782
+ try {
1783
+ const req = (0, import_node_module2.createRequire)(import_meta2.url);
1784
+ return req.resolve(spec);
1785
+ } catch {
1786
+ return file;
1787
+ }
1788
+ }
3868
1789
  async function sqlJsAdapter(opts = {}) {
3869
1790
  let init;
3870
1791
  try {
3871
- const mod = await Promise.resolve().then(() => __toESM(require_sql_wasm(), 1));
1792
+ const mod = await import("sql.js");
3872
1793
  init = mod?.default ?? mod;
3873
1794
  } catch (e) {
3874
1795
  throw new Error(`sqlJsAdapter requires optional dependency 'sql.js' (install it to use this adapter): ${String(e?.message ?? e)}`);
3875
1796
  }
3876
- const SQL = await init({ locateFile: opts.locateFile, wasmBinary: opts.wasmBinary });
1797
+ const SQL = await init({
1798
+ locateFile: opts.locateFile ?? defaultLocateFile,
1799
+ wasmBinary: opts.wasmBinary
1800
+ });
3877
1801
  return {
3878
1802
  open(dbPath) {
3879
- const abs = import_node_path8.default.resolve(dbPath);
3880
- const exists = import_node_fs6.default.existsSync(abs);
3881
- const bytes = exists ? new Uint8Array(import_node_fs6.default.readFileSync(abs)) : void 0;
1803
+ const abs = dbPath === ":memory:" ? ":memory:" : import_node_path8.default.resolve(dbPath);
1804
+ const bytes = abs !== ":memory:" && import_node_fs6.default.existsSync(abs) ? new Uint8Array(import_node_fs6.default.readFileSync(abs)) : void 0;
3882
1805
  const db = bytes ? new SQL.Database(bytes) : new SQL.Database();
3883
1806
  return new SqlJsDbAdapter(db, abs);
3884
1807
  }
@@ -4045,7 +1968,7 @@ range:${r.startLine}:${r.startCharacter}-${r.endLine}:${r.endCharacter}`;
4045
1968
 
4046
1969
  // src/symbolGraph/vscodeProvider.ts
4047
1970
  var import_node_path11 = __toESM(require("path"), 1);
4048
- var import_node_module2 = require("module");
1971
+ var import_node_module3 = require("module");
4049
1972
 
4050
1973
  // src/symbolGraph/strategies.ts
4051
1974
  var import_node_path10 = __toESM(require("path"), 1);
@@ -4275,7 +2198,7 @@ function findSymbolAt(syms, pos) {
4275
2198
  }
4276
2199
 
4277
2200
  // src/symbolGraph/vscodeProvider.ts
4278
- var import_meta3 = {};
2201
+ var import_meta4 = {};
4279
2202
  function fromPosixPath2(posixRelPath) {
4280
2203
  return posixRelPath.split("/").join(import_node_path11.default.sep);
4281
2204
  }
@@ -4383,7 +2306,7 @@ function makeVscodeFacade(vscode) {
4383
2306
  async function createVSCodeSymbolGraphProvider(opts) {
4384
2307
  let vscode;
4385
2308
  try {
4386
- const require2 = (0, import_node_module2.createRequire)(import_meta3.url);
2309
+ const require2 = (0, import_node_module3.createRequire)(import_meta4.url);
4387
2310
  vscode = require2("vscode");
4388
2311
  } catch {
4389
2312
  return null;
@@ -4410,8 +2333,8 @@ async function createVSCodeSymbolGraphProvider(opts) {
4410
2333
  }
4411
2334
 
4412
2335
  // src/graph/neo4j.ts
4413
- var import_node_module3 = require("module");
4414
- var import_meta4 = {};
2336
+ var import_node_module4 = require("module");
2337
+ var import_meta5 = {};
4415
2338
  async function runSession(driver, database, fn) {
4416
2339
  const session = driver.session(database ? { database } : void 0);
4417
2340
  try {
@@ -4852,7 +2775,7 @@ var Neo4jGraphStore = class {
4852
2775
  };
4853
2776
  async function createNeo4jGraphStore(cfg) {
4854
2777
  try {
4855
- const require2 = (0, import_node_module3.createRequire)(import_meta4.url);
2778
+ const require2 = (0, import_node_module4.createRequire)(import_meta5.url);
4856
2779
  const neo4j = require2("neo4j-driver");
4857
2780
  const driver = neo4j.driver(cfg.uri, neo4j.auth.basic(cfg.user, cfg.password));
4858
2781
  const store = new Neo4jGraphStore(driver, cfg);