glassjar 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/glassjar.js CHANGED
@@ -1,12 +1,12 @@
1
- function JA(Q) {
1
+ function UA(Q) {
2
2
  return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
3
3
  }
4
- var l = { exports: {} }, BA;
5
- function UA() {
6
- if (BA) return l.exports;
4
+ var m = { exports: {} }, BA;
5
+ function JA() {
6
+ if (BA) return m.exports;
7
7
  BA = 1;
8
- var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, o, F) {
9
- return Function.prototype.apply.call(E, o, F);
8
+ var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, o, k) {
9
+ return Function.prototype.apply.call(E, o, k);
10
10
  }, g;
11
11
  Q && typeof Q.ownKeys == "function" ? g = Q.ownKeys : Object.getOwnPropertySymbols ? g = function(E) {
12
12
  return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E));
@@ -22,7 +22,7 @@ function UA() {
22
22
  function B() {
23
23
  B.init.call(this);
24
24
  }
25
- l.exports = B, l.exports.once = d, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
25
+ m.exports = B, m.exports.once = p, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
26
26
  var i = 10;
27
27
  function D(w) {
28
28
  if (typeof w != "function")
@@ -51,38 +51,38 @@ function UA() {
51
51
  B.prototype.getMaxListeners = function() {
52
52
  return N(this);
53
53
  }, B.prototype.emit = function(E) {
54
- for (var o = [], F = 1; F < arguments.length; F++) o.push(arguments[F]);
55
- var M = E === "error", R = this._events;
54
+ for (var o = [], k = 1; k < arguments.length; k++) o.push(arguments[k]);
55
+ var F = E === "error", R = this._events;
56
56
  if (R !== void 0)
57
- M = M && R.error === void 0;
58
- else if (!M)
57
+ F = F && R.error === void 0;
58
+ else if (!F)
59
59
  return !1;
60
- if (M) {
60
+ if (F) {
61
61
  var G;
62
62
  if (o.length > 0 && (G = o[0]), G instanceof Error)
63
63
  throw G;
64
64
  var a = new Error("Unhandled error." + (G ? " (" + G.message + ")" : ""));
65
65
  throw a.context = G, a;
66
66
  }
67
- var V = R[E];
68
- if (V === void 0)
67
+ var j = R[E];
68
+ if (j === void 0)
69
69
  return !1;
70
- if (typeof V == "function")
71
- A(V, this, o);
70
+ if (typeof j == "function")
71
+ A(j, this, o);
72
72
  else
73
- for (var QA = V.length, YA = H(V, QA), F = 0; F < QA; ++F)
74
- A(YA[F], this, o);
73
+ for (var QA = j.length, YA = H(j, QA), k = 0; k < QA; ++k)
74
+ A(YA[k], this, o);
75
75
  return !0;
76
76
  };
77
- function K(w, E, o, F) {
78
- var M, R, G;
77
+ function K(w, E, o, k) {
78
+ var F, R, G;
79
79
  if (D(o), R = w._events, R === void 0 ? (R = w._events = /* @__PURE__ */ Object.create(null), w._eventsCount = 0) : (R.newListener !== void 0 && (w.emit(
80
80
  "newListener",
81
81
  E,
82
82
  o.listener ? o.listener : o
83
83
  ), R = w._events), G = R[E]), G === void 0)
84
84
  G = R[E] = o, ++w._eventsCount;
85
- else if (typeof G == "function" ? G = R[E] = F ? [o, G] : [G, o] : F ? G.unshift(o) : G.push(o), M = N(w), M > 0 && G.length > M && !G.warned) {
85
+ else if (typeof G == "function" ? G = R[E] = k ? [o, G] : [G, o] : k ? G.unshift(o) : G.push(o), F = N(w), F > 0 && G.length > F && !G.warned) {
86
86
  G.warned = !0;
87
87
  var a = new Error("Possible EventEmitter memory leak detected. " + G.length + " " + String(E) + " listeners added. Use emitter.setMaxListeners() to increase limit");
88
88
  a.name = "MaxListenersExceededWarning", a.emitter = w, a.type = E, a.count = G.length, I(a);
@@ -94,62 +94,62 @@ function UA() {
94
94
  }, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(E, o) {
95
95
  return K(this, E, o, !0);
96
96
  };
97
- function J() {
97
+ function U() {
98
98
  if (!this.fired)
99
99
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
100
100
  }
101
- function L(w, E, o) {
102
- var F = { fired: !1, wrapFn: void 0, target: w, type: E, listener: o }, M = J.bind(F);
103
- return M.listener = o, F.wrapFn = M, M;
101
+ function h(w, E, o) {
102
+ var k = { fired: !1, wrapFn: void 0, target: w, type: E, listener: o }, F = U.bind(k);
103
+ return F.listener = o, k.wrapFn = F, F;
104
104
  }
105
105
  B.prototype.once = function(E, o) {
106
- return D(o), this.on(E, L(this, E, o)), this;
106
+ return D(o), this.on(E, h(this, E, o)), this;
107
107
  }, B.prototype.prependOnceListener = function(E, o) {
108
- return D(o), this.prependListener(E, L(this, E, o)), this;
108
+ return D(o), this.prependListener(E, h(this, E, o)), this;
109
109
  }, B.prototype.removeListener = function(E, o) {
110
- var F, M, R, G, a;
111
- if (D(o), M = this._events, M === void 0)
110
+ var k, F, R, G, a;
111
+ if (D(o), F = this._events, F === void 0)
112
112
  return this;
113
- if (F = M[E], F === void 0)
113
+ if (k = F[E], k === void 0)
114
114
  return this;
115
- if (F === o || F.listener === o)
116
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete M[E], M.removeListener && this.emit("removeListener", E, F.listener || o));
117
- else if (typeof F != "function") {
118
- for (R = -1, G = F.length - 1; G >= 0; G--)
119
- if (F[G] === o || F[G].listener === o) {
120
- a = F[G].listener, R = G;
115
+ if (k === o || k.listener === o)
116
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete F[E], F.removeListener && this.emit("removeListener", E, k.listener || o));
117
+ else if (typeof k != "function") {
118
+ for (R = -1, G = k.length - 1; G >= 0; G--)
119
+ if (k[G] === o || k[G].listener === o) {
120
+ a = k[G].listener, R = G;
121
121
  break;
122
122
  }
123
123
  if (R < 0)
124
124
  return this;
125
- R === 0 ? F.shift() : u(F, R), F.length === 1 && (M[E] = F[0]), M.removeListener !== void 0 && this.emit("removeListener", E, a || o);
125
+ R === 0 ? k.shift() : Z(k, R), k.length === 1 && (F[E] = k[0]), F.removeListener !== void 0 && this.emit("removeListener", E, a || o);
126
126
  }
127
127
  return this;
128
128
  }, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(E) {
129
- var o, F, M;
130
- if (F = this._events, F === void 0)
129
+ var o, k, F;
130
+ if (k = this._events, k === void 0)
131
131
  return this;
132
- if (F.removeListener === void 0)
133
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : F[E] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete F[E]), this;
132
+ if (k.removeListener === void 0)
133
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : k[E] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete k[E]), this;
134
134
  if (arguments.length === 0) {
135
- var R = Object.keys(F), G;
136
- for (M = 0; M < R.length; ++M)
137
- G = R[M], G !== "removeListener" && this.removeAllListeners(G);
135
+ var R = Object.keys(k), G;
136
+ for (F = 0; F < R.length; ++F)
137
+ G = R[F], G !== "removeListener" && this.removeAllListeners(G);
138
138
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
139
139
  }
140
- if (o = F[E], typeof o == "function")
140
+ if (o = k[E], typeof o == "function")
141
141
  this.removeListener(E, o);
142
142
  else if (o !== void 0)
143
- for (M = o.length - 1; M >= 0; M--)
144
- this.removeListener(E, o[M]);
143
+ for (F = o.length - 1; F >= 0; F--)
144
+ this.removeListener(E, o[F]);
145
145
  return this;
146
146
  };
147
147
  function Y(w, E, o) {
148
- var F = w._events;
149
- if (F === void 0)
148
+ var k = w._events;
149
+ if (k === void 0)
150
150
  return [];
151
- var M = F[E];
152
- return M === void 0 ? [] : typeof M == "function" ? o ? [M.listener || M] : [M] : o ? v(M) : H(M, M.length);
151
+ var F = k[E];
152
+ return F === void 0 ? [] : typeof F == "function" ? o ? [F.listener || F] : [F] : o ? e(F) : H(F, F.length);
153
153
  }
154
154
  B.prototype.listeners = function(E) {
155
155
  return Y(this, E, !0);
@@ -173,48 +173,48 @@ function UA() {
173
173
  return this._eventsCount > 0 ? g(this._events) : [];
174
174
  };
175
175
  function H(w, E) {
176
- for (var o = new Array(E), F = 0; F < E; ++F)
177
- o[F] = w[F];
176
+ for (var o = new Array(E), k = 0; k < E; ++k)
177
+ o[k] = w[k];
178
178
  return o;
179
179
  }
180
- function u(w, E) {
180
+ function Z(w, E) {
181
181
  for (; E + 1 < w.length; E++)
182
182
  w[E] = w[E + 1];
183
183
  w.pop();
184
184
  }
185
- function v(w) {
185
+ function e(w) {
186
186
  for (var E = new Array(w.length), o = 0; o < E.length; ++o)
187
187
  E[o] = w[o].listener || w[o];
188
188
  return E;
189
189
  }
190
- function d(w, E) {
191
- return new Promise(function(o, F) {
192
- function M(G) {
193
- w.removeListener(E, R), F(G);
190
+ function p(w, E) {
191
+ return new Promise(function(o, k) {
192
+ function F(G) {
193
+ w.removeListener(E, R), k(G);
194
194
  }
195
195
  function R() {
196
- typeof w.removeListener == "function" && w.removeListener("error", M), o([].slice.call(arguments));
196
+ typeof w.removeListener == "function" && w.removeListener("error", F), o([].slice.call(arguments));
197
197
  }
198
- CA(w, E, R, { once: !0 }), E !== "error" && RA(w, M, { once: !0 });
198
+ CA(w, E, R, { once: !0 }), E !== "error" && RA(w, F, { once: !0 });
199
199
  });
200
200
  }
201
201
  function RA(w, E, o) {
202
202
  typeof w.on == "function" && CA(w, "error", E, o);
203
203
  }
204
- function CA(w, E, o, F) {
204
+ function CA(w, E, o, k) {
205
205
  if (typeof w.on == "function")
206
- F.once ? w.once(E, o) : w.on(E, o);
206
+ k.once ? w.once(E, o) : w.on(E, o);
207
207
  else if (typeof w.addEventListener == "function")
208
- w.addEventListener(E, function M(R) {
209
- F.once && w.removeEventListener(E, M), o(R);
208
+ w.addEventListener(E, function F(R) {
209
+ k.once && w.removeEventListener(E, F), o(R);
210
210
  });
211
211
  else
212
212
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof w);
213
213
  }
214
- return l.exports;
214
+ return m.exports;
215
215
  }
216
- var SA = UA();
217
- const MA = /* @__PURE__ */ JA(SA);
216
+ var LA = JA();
217
+ const FA = /* @__PURE__ */ UA(LA);
218
218
  class $ {
219
219
  __destroy_into_raw() {
220
220
  const A = this.__wbg_ptr;
@@ -222,7 +222,7 @@ class $ {
222
222
  }
223
223
  free() {
224
224
  const A = this.__destroy_into_raw();
225
- k.__wbg_dapadapter_free(A, 0);
225
+ M.__wbg_dapadapter_free(A, 0);
226
226
  }
227
227
  /**
228
228
  * Attaches a worker to the adapter.
@@ -233,46 +233,46 @@ class $ {
233
233
  * @param {Worker} worker
234
234
  */
235
235
  attach(A) {
236
- k.dapadapter_attach(this.__wbg_ptr, A);
236
+ M.dapadapter_attach(this.__wbg_ptr, A);
237
237
  }
238
238
  /**
239
239
  * Retire the listener without borrowing session state (callbacks can synchronously Stop).
240
240
  */
241
241
  detach() {
242
- k.dapadapter_detach(this.__wbg_ptr);
242
+ M.dapadapter_detach(this.__wbg_ptr);
243
243
  }
244
244
  constructor() {
245
- const A = k.dapadapter_new();
245
+ const A = M.dapadapter_new();
246
246
  return this.__wbg_ptr = A >>> 0, wA.register(this, this.__wbg_ptr, this), this;
247
247
  }
248
248
  /**
249
249
  * @param {Function} callback
250
250
  */
251
251
  on(A) {
252
- k.dapadapter_on(this.__wbg_ptr, A);
252
+ M.dapadapter_on(this.__wbg_ptr, A);
253
253
  }
254
254
  resetRun() {
255
- k.dapadapter_resetRun(this.__wbg_ptr);
255
+ M.dapadapter_resetRun(this.__wbg_ptr);
256
256
  }
257
257
  /**
258
258
  * @param {any} msg
259
259
  * @returns {any}
260
260
  */
261
261
  sendMessage(A) {
262
- return k.dapadapter_sendMessage(this.__wbg_ptr, A);
262
+ return M.dapadapter_sendMessage(this.__wbg_ptr, A);
263
263
  }
264
264
  /**
265
265
  * @param {boolean} value
266
266
  */
267
267
  setFilterInternals(A) {
268
- k.dapadapter_setFilterInternals(this.__wbg_ptr, A);
268
+ M.dapadapter_setFilterInternals(this.__wbg_ptr, A);
269
269
  }
270
270
  }
271
271
  Symbol.dispose && ($.prototype[Symbol.dispose] = $.prototype.free);
272
- class X {
272
+ class b {
273
273
  static __wrap(A) {
274
274
  A = A >>> 0;
275
- const g = Object.create(X.prototype);
275
+ const g = Object.create(b.prototype);
276
276
  return g.__wbg_ptr = A, iA.register(g, g.__wbg_ptr, g), g;
277
277
  }
278
278
  __destroy_into_raw() {
@@ -281,32 +281,32 @@ class X {
281
281
  }
282
282
  free() {
283
283
  const A = this.__destroy_into_raw();
284
- k.__wbg_trap_free(A, 0);
284
+ M.__wbg_trap_free(A, 0);
285
285
  }
286
286
  /**
287
287
  * A marker method to indicate that an object is an instance of the `Trap`
288
288
  * class.
289
289
  */
290
290
  static __wbg_wasmer_trap() {
291
- k.trap___wbg_wasmer_trap();
291
+ M.trap___wbg_wasmer_trap();
292
292
  }
293
293
  }
294
- Symbol.dispose && (X.prototype[Symbol.dispose] = X.prototype.free);
295
- function hA() {
294
+ Symbol.dispose && (b.prototype[Symbol.dispose] = b.prototype.free);
295
+ function SA() {
296
296
  let Q, A;
297
297
  try {
298
- const g = k.cpp_exception_hash();
298
+ const g = M.cpp_exception_hash();
299
299
  return Q = g[0], A = g[1], c(g[0], g[1]);
300
300
  } finally {
301
- k.__wbindgen_free(Q, A, 1);
301
+ M.__wbindgen_free(Q, A, 1);
302
302
  }
303
303
  }
304
304
  function EA(Q) {
305
- const A = O(Q, k.__wbindgen_malloc, k.__wbindgen_realloc), g = x, I = k.prefetch_urls(A, g);
305
+ const A = W(Q, M.__wbindgen_malloc, M.__wbindgen_realloc), g = d, I = M.prefetch_urls(A, g);
306
306
  var C = GA(I[0], I[1]).slice();
307
- return k.__wbindgen_free(I[0], I[1] * 4, 4), C;
307
+ return M.__wbindgen_free(I[0], I[1] * 4, 4), C;
308
308
  }
309
- function LA() {
309
+ function hA() {
310
310
  return {
311
311
  __proto__: null,
312
312
  "./engine_bg.js": {
@@ -321,23 +321,23 @@ function LA() {
321
321
  return Number(A);
322
322
  },
323
323
  __wbg_String_8f0eb39a4a4c2f66: function(A, g) {
324
- const I = String(g), C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = x;
325
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
324
+ const I = String(g), C = W(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = d;
325
+ S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
326
326
  },
327
327
  __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, g) {
328
328
  const I = g, C = typeof I == "bigint" ? I : void 0;
329
- h().setBigInt64(A + 8, p(C) ? BigInt(0) : C, !0), h().setInt32(A + 0, !p(C), !0);
329
+ S().setBigInt64(A + 8, x(C) ? BigInt(0) : C, !0), S().setInt32(A + 0, !x(C), !0);
330
330
  },
331
331
  __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(A) {
332
332
  const g = A, I = typeof g == "boolean" ? g : void 0;
333
- return p(I) ? 16777215 : I ? 1 : 0;
333
+ return x(I) ? 16777215 : I ? 1 : 0;
334
334
  },
335
335
  __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, g) {
336
- const I = AA(g), C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = x;
337
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
336
+ const I = AA(g), C = W(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = d;
337
+ S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
338
338
  },
339
339
  __wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
340
- return k.__wbindgen_export;
340
+ return M.__wbindgen_export;
341
341
  },
342
342
  __wbg___wbindgen_in_47fa6863be6f2f25: function(A, g) {
343
343
  return A in g;
@@ -372,7 +372,7 @@ function LA() {
372
372
  },
373
373
  __wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, g) {
374
374
  const I = g, C = typeof I == "number" ? I : void 0;
375
- h().setFloat64(A + 8, p(C) ? 0 : C, !0), h().setInt32(A + 0, !p(C), !0);
375
+ S().setFloat64(A + 8, x(C) ? 0 : C, !0), S().setInt32(A + 0, !x(C), !0);
376
376
  },
377
377
  __wbg___wbindgen_rethrow_05525c567f154472: function(A) {
378
378
  throw A;
@@ -382,8 +382,8 @@ function LA() {
382
382
  },
383
383
  __wbg___wbindgen_string_get_72fb696202c56729: function(A, g) {
384
384
  const I = g, C = typeof I == "string" ? I : void 0;
385
- var B = p(C) ? 0 : O(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = x;
386
- h().setInt32(A + 4, i, !0), h().setInt32(A + 0, B, !0);
385
+ var B = x(C) ? 0 : W(C, M.__wbindgen_malloc, M.__wbindgen_realloc), i = d;
386
+ S().setInt32(A + 4, i, !0), S().setInt32(A + 0, B, !0);
387
387
  },
388
388
  __wbg___wbindgen_throw_be289d5034ed271b: function(A, g) {
389
389
  throw new Error(c(A, g));
@@ -464,7 +464,7 @@ function LA() {
464
464
  try {
465
465
  I = A, C = g, console.error(c(A, g));
466
466
  } finally {
467
- k.__wbindgen_free(I, C, 1);
467
+ M.__wbindgen_free(I, C, 1);
468
468
  }
469
469
  },
470
470
  __wbg_exports_794a42000dacd046: function(A) {
@@ -765,7 +765,7 @@ function LA() {
765
765
  return new Uint8Array(A);
766
766
  },
767
767
  __wbg_new_from_slice_a3d2629dc1826784: function(A, g) {
768
- return new Uint8Array(b(A, g));
768
+ return new Uint8Array(P(A, g));
769
769
  },
770
770
  __wbg_new_no_args_1c7c842f08d00ebb: function(A, g) {
771
771
  return new Function(c(A, g));
@@ -822,7 +822,7 @@ function LA() {
822
822
  return A.process;
823
823
  },
824
824
  __wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, g, I) {
825
- Uint8Array.prototype.set.call(b(A, g), I);
825
+ Uint8Array.prototype.set.call(P(A, g), I);
826
826
  },
827
827
  __wbg_push_8ffdcb2063340ba5: function(A, g) {
828
828
  return A.push(g);
@@ -879,7 +879,7 @@ function LA() {
879
879
  }, arguments);
880
880
  },
881
881
  __wbg_set_cc56eefd2dd91957: function(A, g, I) {
882
- A.set(b(g, I));
882
+ A.set(P(g, I));
883
883
  },
884
884
  __wbg_set_f43e577aea94465b: function(A, g, I) {
885
885
  A[g >>> 0] = I;
@@ -900,24 +900,24 @@ function LA() {
900
900
  return A.slice(g >>> 0, I >>> 0);
901
901
  },
902
902
  __wbg_stack_0ed75d68575b0f3c: function(A, g) {
903
- const I = g.stack, C = O(I, k.__wbindgen_malloc, k.__wbindgen_realloc), B = x;
904
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
903
+ const I = g.stack, C = W(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = d;
904
+ S().setInt32(A + 4, B, !0), S().setInt32(A + 0, C, !0);
905
905
  },
906
906
  __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
907
907
  const A = typeof global > "u" ? null : global;
908
- return p(A) ? 0 : j(A);
908
+ return x(A) ? 0 : O(A);
909
909
  },
910
910
  __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
911
911
  const A = typeof globalThis > "u" ? null : globalThis;
912
- return p(A) ? 0 : j(A);
912
+ return x(A) ? 0 : O(A);
913
913
  },
914
914
  __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
915
915
  const A = typeof self > "u" ? null : self;
916
- return p(A) ? 0 : j(A);
916
+ return x(A) ? 0 : O(A);
917
917
  },
918
918
  __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
919
919
  const A = typeof window > "u" ? null : window;
920
- return p(A) ? 0 : j(A);
920
+ return x(A) ? 0 : O(A);
921
921
  },
922
922
  __wbg_store_d1d951c98d9bed41: function() {
923
923
  return y(function(A, g, I) {
@@ -934,14 +934,14 @@ function LA() {
934
934
  return A.then(g);
935
935
  },
936
936
  __wbg_toString_56d946daff83867b: function(A, g, I) {
937
- const C = g.toString(I), B = O(C, k.__wbindgen_malloc, k.__wbindgen_realloc), i = x;
938
- h().setInt32(A + 4, i, !0), h().setInt32(A + 0, B, !0);
937
+ const C = g.toString(I), B = W(C, M.__wbindgen_malloc, M.__wbindgen_realloc), i = d;
938
+ S().setInt32(A + 4, i, !0), S().setInt32(A + 0, B, !0);
939
939
  },
940
940
  __wbg_toString_964ff7fe6eca8362: function(A) {
941
941
  return A.toString();
942
942
  },
943
943
  __wbg_trap_new: function(A) {
944
- return X.__wrap(A);
944
+ return b.__wrap(A);
945
945
  },
946
946
  __wbg_validate_71c2d02a71bda62f: function() {
947
947
  return y(function(A) {
@@ -966,22 +966,22 @@ function LA() {
966
966
  console.warn(A, g, I);
967
967
  },
968
968
  __wbindgen_cast_0000000000000001: function(A, g) {
969
- return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
969
+ return t(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
970
970
  },
971
971
  __wbindgen_cast_0000000000000002: function(A, g) {
972
- return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
972
+ return t(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
973
973
  },
974
974
  __wbindgen_cast_0000000000000003: function(A, g) {
975
- return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, aA);
975
+ return t(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, aA);
976
976
  },
977
977
  __wbindgen_cast_0000000000000004: function(A, g) {
978
- return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, sA);
978
+ return t(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, sA);
979
979
  },
980
980
  __wbindgen_cast_0000000000000005: function(A, g) {
981
- return pA(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, cA);
981
+ return pA(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, cA);
982
982
  },
983
983
  __wbindgen_cast_0000000000000006: function(A, g) {
984
- return W(A, g, k.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, HA);
984
+ return t(A, g, M.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, HA);
985
985
  },
986
986
  __wbindgen_cast_0000000000000007: function(A) {
987
987
  return A;
@@ -990,7 +990,7 @@ function LA() {
990
990
  return A;
991
991
  },
992
992
  __wbindgen_cast_0000000000000009: function(A, g) {
993
- return b(A, g);
993
+ return P(A, g);
994
994
  },
995
995
  __wbindgen_cast_000000000000000a: function(A, g) {
996
996
  return c(A, g);
@@ -1003,48 +1003,48 @@ function LA() {
1003
1003
  },
1004
1004
  __wbindgen_cast_000000000000000d: function(A, g) {
1005
1005
  var I = GA(A, g).slice();
1006
- return k.__wbindgen_free(A, g * 4, 4), I;
1006
+ return M.__wbindgen_free(A, g * 4, 4), I;
1007
1007
  },
1008
1008
  __wbindgen_init_externref_table: function() {
1009
- const A = k.__wbindgen_externrefs, g = A.grow(4);
1009
+ const A = M.__wbindgen_externrefs, g = A.grow(4);
1010
1010
  A.set(0, void 0), A.set(g + 0, void 0), A.set(g + 1, null), A.set(g + 2, !0), A.set(g + 3, !1);
1011
1011
  }
1012
1012
  }
1013
1013
  };
1014
1014
  }
1015
1015
  function sA(Q, A, g) {
1016
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g);
1016
+ M.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g);
1017
1017
  }
1018
1018
  function cA(Q, A, g) {
1019
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
1019
+ M.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
1020
1020
  }
1021
1021
  function HA(Q, A, g) {
1022
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
1022
+ M.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
1023
1023
  }
1024
1024
  function aA(Q, A, g) {
1025
- const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1025
+ const I = M.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1026
1026
  if (I[1])
1027
1027
  throw gA(I[0]);
1028
1028
  }
1029
1029
  function DA(Q, A, g) {
1030
- const I = k.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1030
+ const I = M.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1031
1031
  if (I[2])
1032
1032
  throw gA(I[1]);
1033
1033
  return gA(I[0]);
1034
1034
  }
1035
1035
  function qA(Q, A, g, I) {
1036
- k.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g, I);
1036
+ M.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g, I);
1037
1037
  }
1038
1038
  const wA = typeof FinalizationRegistry > "u" ? { register: () => {
1039
1039
  }, unregister: () => {
1040
- } } : new FinalizationRegistry((Q) => k.__wbg_dapadapter_free(Q >>> 0, 1)), iA = typeof FinalizationRegistry > "u" ? { register: () => {
1040
+ } } : new FinalizationRegistry((Q) => M.__wbg_dapadapter_free(Q >>> 0, 1)), iA = typeof FinalizationRegistry > "u" ? { register: () => {
1041
1041
  }, unregister: () => {
1042
- } } : new FinalizationRegistry((Q) => k.__wbg_trap_free(Q >>> 0, 1));
1043
- function j(Q) {
1044
- const A = k.__externref_table_alloc();
1045
- return k.__wbindgen_externrefs.set(A, Q), A;
1042
+ } } : new FinalizationRegistry((Q) => M.__wbg_trap_free(Q >>> 0, 1));
1043
+ function O(Q) {
1044
+ const A = M.__externref_table_alloc();
1045
+ return M.__wbindgen_externrefs.set(A, Q), A;
1046
1046
  }
1047
- const n = typeof FinalizationRegistry > "u" ? { register: () => {
1047
+ const r = typeof FinalizationRegistry > "u" ? { register: () => {
1048
1048
  }, unregister: () => {
1049
1049
  } } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
1050
1050
  function AA(Q) {
@@ -1086,34 +1086,34 @@ ${Q.stack}` : I;
1086
1086
  }
1087
1087
  function GA(Q, A) {
1088
1088
  Q = Q >>> 0;
1089
- const g = h(), I = [];
1089
+ const g = S(), I = [];
1090
1090
  for (let C = Q; C < Q + 4 * A; C += 4)
1091
- I.push(k.__wbindgen_externrefs.get(g.getUint32(C, !0)));
1092
- return k.__externref_drop_slice(Q, A), I;
1091
+ I.push(M.__wbindgen_externrefs.get(g.getUint32(C, !0)));
1092
+ return M.__externref_drop_slice(Q, A), I;
1093
1093
  }
1094
- function b(Q, A) {
1095
- return Q = Q >>> 0, T().subarray(Q / 1, Q / 1 + A);
1094
+ function P(Q, A) {
1095
+ return Q = Q >>> 0, V().subarray(Q / 1, Q / 1 + A);
1096
1096
  }
1097
- let Z = null;
1098
- function h() {
1099
- return (Z === null || Z.buffer.detached === !0 || Z.buffer.detached === void 0 && Z.buffer !== k.memory.buffer) && (Z = new DataView(k.memory.buffer)), Z;
1097
+ let z = null;
1098
+ function S() {
1099
+ return (z === null || z.buffer.detached === !0 || z.buffer.detached === void 0 && z.buffer !== M.memory.buffer) && (z = new DataView(M.memory.buffer)), z;
1100
1100
  }
1101
1101
  function c(Q, A) {
1102
- return Q = Q >>> 0, xA(Q, A);
1102
+ return Q = Q >>> 0, dA(Q, A);
1103
1103
  }
1104
- let t = null;
1105
- function T() {
1106
- return (t === null || t.byteLength === 0) && (t = new Uint8Array(k.memory.buffer)), t;
1104
+ let T = null;
1105
+ function V() {
1106
+ return (T === null || T.byteLength === 0) && (T = new Uint8Array(M.memory.buffer)), T;
1107
1107
  }
1108
1108
  function y(Q, A) {
1109
1109
  try {
1110
1110
  return Q.apply(this, A);
1111
1111
  } catch (g) {
1112
- const I = j(g);
1113
- k.__wbindgen_exn_store(I);
1112
+ const I = O(g);
1113
+ M.__wbindgen_exn_store(I);
1114
1114
  }
1115
1115
  }
1116
- function p(Q) {
1116
+ function x(Q) {
1117
1117
  return Q == null;
1118
1118
  }
1119
1119
  function pA(Q, A, g, I) {
@@ -1126,10 +1126,10 @@ function pA(Q, A, g, I) {
1126
1126
  }
1127
1127
  };
1128
1128
  return B._wbg_cb_unref = () => {
1129
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1130
- }, n.register(B, C, C), B;
1129
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, r.unregister(C));
1130
+ }, r.register(B, C, C), B;
1131
1131
  }
1132
- function W(Q, A, g, I) {
1132
+ function t(Q, A, g, I) {
1133
1133
  const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
1134
1134
  C.cnt++;
1135
1135
  const D = C.a;
@@ -1141,16 +1141,16 @@ function W(Q, A, g, I) {
1141
1141
  }
1142
1142
  };
1143
1143
  return B._wbg_cb_unref = () => {
1144
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1145
- }, n.register(B, C, C), B;
1144
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, r.unregister(C));
1145
+ }, r.register(B, C, C), B;
1146
1146
  }
1147
- function O(Q, A, g) {
1147
+ function W(Q, A, g) {
1148
1148
  if (g === void 0) {
1149
- const D = z.encode(Q), N = A(D.length, 1) >>> 0;
1150
- return T().subarray(N, N + D.length).set(D), x = D.length, N;
1149
+ const D = l.encode(Q), N = A(D.length, 1) >>> 0;
1150
+ return V().subarray(N, N + D.length).set(D), d = D.length, N;
1151
1151
  }
1152
1152
  let I = Q.length, C = A(I, 1) >>> 0;
1153
- const B = T();
1153
+ const B = V();
1154
1154
  let i = 0;
1155
1155
  for (; i < I; i++) {
1156
1156
  const D = Q.charCodeAt(i);
@@ -1159,35 +1159,35 @@ function O(Q, A, g) {
1159
1159
  }
1160
1160
  if (i !== I) {
1161
1161
  i !== 0 && (Q = Q.slice(i)), C = g(C, I, I = i + Q.length * 3, 1) >>> 0;
1162
- const D = T().subarray(C + i, C + I), N = z.encodeInto(Q, D);
1162
+ const D = V().subarray(C + i, C + I), N = l.encodeInto(Q, D);
1163
1163
  i += N.written, C = g(C, I, i, 1) >>> 0;
1164
1164
  }
1165
- return x = i, C;
1165
+ return d = i, C;
1166
1166
  }
1167
1167
  function gA(Q) {
1168
- const A = k.__wbindgen_externrefs.get(Q);
1169
- return k.__externref_table_dealloc(Q), A;
1168
+ const A = M.__wbindgen_externrefs.get(Q);
1169
+ return M.__externref_table_dealloc(Q), A;
1170
1170
  }
1171
- let P = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1172
- P.decode();
1173
- const dA = 2146435072;
1174
- let e = 0;
1175
- function xA(Q, A) {
1176
- return e += A, e >= dA && (P = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), P.decode(), e = A), P.decode(T().subarray(Q, Q + A));
1171
+ let n = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1172
+ n.decode();
1173
+ const xA = 2146435072;
1174
+ let v = 0;
1175
+ function dA(Q, A) {
1176
+ return v += A, v >= xA && (n = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), n.decode(), v = A), n.decode(V().subarray(Q, Q + A));
1177
1177
  }
1178
- const z = new TextEncoder();
1179
- "encodeInto" in z || (z.encodeInto = function(Q, A) {
1180
- const g = z.encode(Q);
1178
+ const l = new TextEncoder();
1179
+ "encodeInto" in l || (l.encodeInto = function(Q, A) {
1180
+ const g = l.encode(Q);
1181
1181
  return A.set(g), {
1182
1182
  read: Q.length,
1183
1183
  written: g.length
1184
1184
  };
1185
1185
  });
1186
- let x = 0, k;
1187
- function ZA(Q, A) {
1188
- return k = Q.exports, Z = null, t = null, k.__wbindgen_start(), k;
1186
+ let d = 0, M;
1187
+ function zA(Q, A) {
1188
+ return M = Q.exports, z = null, T = null, M.__wbindgen_start(), M;
1189
1189
  }
1190
- async function OA(Q, A) {
1190
+ async function WA(Q, A) {
1191
1191
  if (typeof Response == "function" && Q instanceof Response) {
1192
1192
  if (typeof WebAssembly.instantiateStreaming == "function")
1193
1193
  try {
@@ -1214,21 +1214,21 @@ async function OA(Q, A) {
1214
1214
  return !1;
1215
1215
  }
1216
1216
  }
1217
- async function VA(Q) {
1218
- if (k !== void 0) return k;
1217
+ async function ZA(Q) {
1218
+ if (M !== void 0) return M;
1219
1219
  Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("", import.meta.url));
1220
- const A = LA();
1220
+ const A = hA();
1221
1221
  (typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
1222
- const { instance: g, module: I } = await OA(await Q, A);
1223
- return ZA(g);
1222
+ const { instance: g, module: I } = await WA(await Q, A);
1223
+ return zA(g);
1224
1224
  }
1225
- const WA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.4.1/dist/engine_bg.wasm"), jA = Object.freeze({
1225
+ const jA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.5.0/dist/engine_bg.wasm"), tA = Object.freeze({
1226
1226
  maxObjectBytes: 128 * 1024 * 1024,
1227
1227
  maxEntries: 256,
1228
1228
  maxMetadataBytes: 8 * 1024 * 1024,
1229
1229
  maxEntryMetadataBytes: 1024 * 1024
1230
1230
  });
1231
- class tA {
1231
+ class OA {
1232
1232
  records = /* @__PURE__ */ new Map();
1233
1233
  staged = /* @__PURE__ */ new Map();
1234
1234
  stagingFailed = !1;
@@ -1238,7 +1238,7 @@ class tA {
1238
1238
  oversized = 0;
1239
1239
  limits;
1240
1240
  constructor(A = {}) {
1241
- this.limits = Object.freeze({ ...jA, ...A });
1241
+ this.limits = Object.freeze({ ...tA, ...A });
1242
1242
  for (const g of Object.values(this.limits))
1243
1243
  if (!Number.isSafeInteger(g) || g < 0)
1244
1244
  throw new RangeError("C++ cache limits must be nonnegative safe integers");
@@ -1396,8 +1396,8 @@ function TA(Q) {
1396
1396
  return !1;
1397
1397
  }
1398
1398
  }
1399
- const U = /* @__PURE__ */ Symbol();
1400
- function S(Q) {
1399
+ const J = /* @__PURE__ */ Symbol();
1400
+ function L(Q) {
1401
1401
  return Q instanceof Error ? {
1402
1402
  type: "error",
1403
1403
  error: { type: Q.constructor.name, message: Q.message }
@@ -1406,7 +1406,7 @@ function S(Q) {
1406
1406
  error: { type: typeof Q, message: String(Q) }
1407
1407
  };
1408
1408
  }
1409
- class zA {
1409
+ class VA {
1410
1410
  name;
1411
1411
  data;
1412
1412
  constructor(A, g) {
@@ -1417,13 +1417,13 @@ class zA {
1417
1417
  C.href = I, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(I);
1418
1418
  }
1419
1419
  }
1420
- class fA extends MA {
1420
+ class lA extends FA {
1421
1421
  /**
1422
1422
  * Access to internal properties of the debugger.
1423
1423
  * These are put under a special symbol so that they cannot be accessed by
1424
1424
  * clients of the library.
1425
1425
  */
1426
- [U];
1426
+ [J];
1427
1427
  dap;
1428
1428
  /**
1429
1429
  * Whether or not debugging is enabled.
@@ -1440,7 +1440,7 @@ class fA extends MA {
1440
1440
  this.dap.setFilterInternals(A);
1441
1441
  }
1442
1442
  constructor() {
1443
- super(), this[U] = {
1443
+ super(), this[J] = {
1444
1444
  attach: this.attach.bind(this),
1445
1445
  detach: this.detach.bind(this),
1446
1446
  beginRun: () => this.dap.resetRun()
@@ -1451,7 +1451,7 @@ class fA extends MA {
1451
1451
  }
1452
1452
  artifactListener = (A) => {
1453
1453
  if (A.data.type !== "artifact") return;
1454
- const g = new zA(A.data.name, new Uint8Array(A.data.data));
1454
+ const g = new VA(A.data.name, new Uint8Array(A.data.data));
1455
1455
  this.emit("artifact", g);
1456
1456
  };
1457
1457
  attach(A) {
@@ -1464,24 +1464,24 @@ class fA extends MA {
1464
1464
  this.emit("event", A);
1465
1465
  }
1466
1466
  }
1467
- const XA = "glassjar-wasm:";
1468
- function lA(Q, A) {
1467
+ const fA = "glassjar-wasm:";
1468
+ function bA(Q, A) {
1469
1469
  const g = new URL(String(Q), A);
1470
1470
  if (g.protocol !== "https:" && g.protocol !== "http:")
1471
1471
  throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);
1472
1472
  return g.href;
1473
1473
  }
1474
- function bA(Q) {
1474
+ function mA(Q) {
1475
1475
  return new Worker(
1476
- "" + new URL("assets/worker-CgVDPM2f.js", import.meta.url).href,
1476
+ "" + new URL("assets/worker-BMydG-4n.js", import.meta.url).href,
1477
1477
  {
1478
1478
  type: "module",
1479
1479
  name: Q?.name
1480
1480
  }
1481
1481
  );
1482
1482
  }
1483
- function mA(Q) {
1484
- return new bA(Q ? { name: XA + Q } : void 0);
1483
+ function PA(Q) {
1484
+ return new mA(Q ? { name: fA + Q } : void 0);
1485
1485
  }
1486
1486
  const rA = "/dev/debugger-sh-host";
1487
1487
  class oA {
@@ -1511,7 +1511,7 @@ function NA(Q) {
1511
1511
  return IA(A);
1512
1512
  }
1513
1513
  }
1514
- class PA {
1514
+ class XA {
1515
1515
  constructor(A) {
1516
1516
  this.onFailure = A;
1517
1517
  }
@@ -1607,15 +1607,15 @@ class PA {
1607
1607
  }
1608
1608
  const nA = [
1609
1609
  "4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
1610
- ], r = Object.freeze({
1611
- compiler: "24fbed474c7b5b4968fd73fc4827440b93fb351c1b6264516130300eff3e7bf5",
1610
+ ], u = Object.freeze({
1611
+ compiler: "2d2c6ae498b27592a3cec7a270f274a08848a834e762cc08818c78626c32053a",
1612
1612
  sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
1613
1613
  exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
1614
1614
  });
1615
1615
  function yA(Q = "legacy") {
1616
- if (Q === "legacy") return { profile: Q, digests: r };
1616
+ if (Q === "legacy") return { profile: Q, digests: u };
1617
1617
  if (Q === "stock-certified-v1" && nA.length > 0)
1618
- return { profile: Q, digests: r };
1618
+ return { profile: Q, digests: u };
1619
1619
  throw new Error(`The ${Q} toolchain is not available in this build`);
1620
1620
  }
1621
1621
  class f {
@@ -1625,27 +1625,29 @@ class f {
1625
1625
  constructor(A, g) {
1626
1626
  this.#A = A, this.hashMs = g;
1627
1627
  }
1628
- static async load(A, g, I, C = r.exceptions, B = "legacy") {
1628
+ static async load(A, g, I, C = u.exceptions, B = "legacy") {
1629
1629
  const i = yA(B);
1630
1630
  if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
1631
1631
  let D, N;
1632
1632
  const K = await Promise.allSettled(
1633
- A.map(async (u, v) => {
1633
+ A.map(async (Z, e) => {
1634
1634
  try {
1635
- const d = await fetch(u, { cache: "force-cache", signal: I });
1636
- if (!d.ok) throw new Error(`Cannot load C++ toolchain (${d.status})`);
1637
- return v === 0 && g && (N = WebAssembly.compileStreaming(d.clone()), N.catch(() => {
1638
- })), new Uint8Array(await d.arrayBuffer());
1639
- } catch (d) {
1640
- throw D ??= { error: d }, d;
1635
+ const p = await fetch(Z, { cache: "force-cache", signal: I });
1636
+ if (!p.ok) throw new Error(`Cannot load C++ toolchain (${p.status})`);
1637
+ return e === 0 && g && typeof WebAssembly.compileStreaming == "function" && typeof p.clone == "function" && (N = WebAssembly.compileStreaming(p.clone()).catch(() => {
1638
+ })), new Uint8Array(await p.arrayBuffer());
1639
+ } catch (p) {
1640
+ throw D ??= { error: p }, p;
1641
1641
  }
1642
1642
  })
1643
1643
  );
1644
1644
  if (K[0].status === "rejected" || K[1].status === "rejected")
1645
1645
  throw D?.error;
1646
- const [J, L] = [K[0].value, K[1].value], [Y, s] = await Promise.allSettled([
1647
- f.ingestOwned(J, L, !1, C),
1648
- g ? N ?? Promise.resolve().then(() => WebAssembly.compile(J)) : Promise.resolve(void 0)
1646
+ const [U, h] = [K[0].value, K[1].value], [Y, s] = await Promise.allSettled([
1647
+ f.ingestOwned(U, h, !1, C),
1648
+ g ? (N ?? Promise.resolve(void 0)).then(
1649
+ (Z) => Z ?? WebAssembly.compile(U)
1650
+ ) : Promise.resolve(void 0)
1649
1651
  ]);
1650
1652
  if (Y.status === "rejected") throw Y.reason;
1651
1653
  const H = Y.value;
@@ -1662,11 +1664,11 @@ class f {
1662
1664
  C,
1663
1665
  B,
1664
1666
  I,
1665
- r.exceptions
1667
+ u.exceptions
1666
1668
  );
1667
1669
  }
1668
1670
  static async ingestOwned(A, g, I, C) {
1669
- const B = performance.now(), i = await Promise.allSettled([kA(A), kA(g)]);
1671
+ const B = performance.now(), i = await Promise.allSettled([MA(A), MA(g)]);
1670
1672
  if (i[0].status === "rejected") throw i[0].reason;
1671
1673
  if (i[1].status === "rejected") throw i[1].reason;
1672
1674
  const [D, N] = [i[0].value, i[1].value], K = I ? await WebAssembly.compile(A) : void 0;
@@ -1698,14 +1700,14 @@ class f {
1698
1700
  }
1699
1701
  }
1700
1702
  }
1701
- async function kA(Q) {
1703
+ async function MA(Q) {
1702
1704
  const A = await crypto.subtle.digest("SHA-256", Q);
1703
1705
  return Array.from(new Uint8Array(A), (g) => g.toString(16).padStart(2, "0")).join("");
1704
1706
  }
1705
- let _, m;
1707
+ let _, X;
1706
1708
  class KA {
1707
- stdout = new FA(1);
1708
- stderr = new FA(2);
1709
+ stdout = new kA(1);
1710
+ stderr = new kA(2);
1709
1711
  stdin = new q();
1710
1712
  debugger;
1711
1713
  lang;
@@ -1745,16 +1747,16 @@ class KA {
1745
1747
  latest;
1746
1748
  cacheValidation;
1747
1749
  static async create(A, g = {}) {
1748
- const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 : lA(I, globalThis.location?.href), i = structuredClone(C), D = B ?? null;
1749
- if (m !== void 0 && m !== D)
1750
+ const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 : bA(I, globalThis.location?.href), i = structuredClone(C), D = B ?? null;
1751
+ if (X !== void 0 && X !== D)
1750
1752
  throw new Error("The engine Wasm is already loaded from a different wasmUrl");
1751
- m = D, _ ??= VA({ module_or_path: B ?? WA }).catch((K) => {
1752
- throw _ = void 0, m = void 0, K;
1753
+ X = D, _ ??= ZA({ module_or_path: B ?? jA }).catch((K) => {
1754
+ throw _ = void 0, X = void 0, K;
1753
1755
  }), await _;
1754
1756
  const N = new KA(A, i);
1755
1757
  if (N.wasmUrl = B, A !== "c" && typeof window < "u" && typeof fetch < "u")
1756
1758
  for (const K of EA(A))
1757
- fetch(K, { cache: "force-cache" }).then((J) => J.arrayBuffer()).catch(() => {
1759
+ fetch(K, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
1758
1760
  });
1759
1761
  return N;
1760
1762
  }
@@ -1772,7 +1774,7 @@ class KA {
1772
1774
  throw new TypeError("Invalid compiler lifetime");
1773
1775
  yA(I.toolchainProfile), this.scope = Object.freeze({ ...I.scope }), this.options = Object.freeze({ ...I, scope: this.scope, idleTimeoutMs: C });
1774
1776
  }
1775
- this.objects = new tA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new fA(), this.lang = A;
1777
+ this.objects = new OA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new lA(), this.lang = A;
1776
1778
  }
1777
1779
  /** A retained worker reuses clang, compiled once on this thread and cloned to it. */
1778
1780
  get cacheCompilerModule() {
@@ -1858,7 +1860,7 @@ class KA {
1858
1860
  /** Load compiler resources. Optional input validation never invokes Clang, links, or runs a guest. */
1859
1861
  prepareCompiler(A) {
1860
1862
  if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
1861
- return Promise.resolve(S(new TypeError("Invalid compiler preparation options")));
1863
+ return Promise.resolve(L(new TypeError("Invalid compiler preparation options")));
1862
1864
  const g = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
1863
1865
  return this.submit(!0, !0, g);
1864
1866
  }
@@ -1871,11 +1873,11 @@ class KA {
1871
1873
  return this.submit(!0);
1872
1874
  }
1873
1875
  submit(A, g = !1, I = !1) {
1874
- if (this.disposed) return Promise.resolve(S(new Error("Engine is disposed")));
1876
+ if (this.disposed) return Promise.resolve(L(new Error("Engine is disposed")));
1875
1877
  if (this.active || this.cancellationDraining)
1876
- return Promise.resolve(S(new Error("An engine job is already active")));
1878
+ return Promise.resolve(L(new Error("An engine job is already active")));
1877
1879
  if (A && this.lang !== "c")
1878
- return Promise.resolve(S(new Error("Compile-only is supported for C/C++")));
1880
+ return Promise.resolve(L(new Error("Compile-only is supported for C/C++")));
1879
1881
  this.cacheValidation = void 0;
1880
1882
  const C = g && !I;
1881
1883
  let B;
@@ -1896,19 +1898,19 @@ class KA {
1896
1898
  cpp_artifacts: structuredClone(Y)
1897
1899
  };
1898
1900
  } catch (Y) {
1899
- return Promise.resolve(S(Y));
1901
+ return Promise.resolve(L(Y));
1900
1902
  }
1901
1903
  const i = !A && this.debugger.enabled, D = A ? void 0 : this.hostDevice;
1902
1904
  if (D !== void 0 && (typeof D != "function" || !["c", "python"].includes(this.lang)))
1903
- return Promise.resolve(S(new TypeError("Invalid host device configuration")));
1904
- clearTimeout(this.idleTimer), this.stdin[U].clear();
1905
+ return Promise.resolve(L(new TypeError("Invalid host device configuration")));
1906
+ clearTimeout(this.idleTimer), this.stdin[J].clear();
1905
1907
  const N = !!this.slot;
1906
1908
  let K;
1907
- const J = new Promise((Y) => {
1909
+ const U = new Promise((Y) => {
1908
1910
  K = Y;
1909
1911
  });
1910
- this.promise = J;
1911
- const L = {
1912
+ this.promise = U;
1913
+ const h = {
1912
1914
  generation: this.generation,
1913
1915
  scopeEpoch: this.scopeEpoch,
1914
1916
  operationId: ++this.operationId,
@@ -1936,7 +1938,7 @@ class KA {
1936
1938
  cache_epoch: this.generation,
1937
1939
  is_debug: i,
1938
1940
  build_only: A,
1939
- stdin_buffer: this.stdin[U].buffer,
1941
+ stdin_buffer: this.stdin[J].buffer,
1940
1942
  cpp_cache: this.options?.objectCache && !i && !g ? {
1941
1943
  generation: this.generation,
1942
1944
  entries: this.objects.snapshot(),
@@ -1948,23 +1950,23 @@ class KA {
1948
1950
  } : null
1949
1951
  }
1950
1952
  };
1951
- this.objects.beginBatch(), this.active = L;
1953
+ this.objects.beginBatch(), this.active = h;
1952
1954
  try {
1953
- if (this.slot || this.makeWorker(), !this.current(L)) return J;
1955
+ if (this.slot || this.makeWorker(), !this.current(h)) return U;
1954
1956
  const Y = this.slot;
1955
1957
  this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((s) => {
1956
- this.current(L) && this.slot === Y && this.finish(L, S(s));
1957
- }), this.slot.ready && this.dispatch(L);
1958
+ this.current(h) && this.slot === Y && this.finish(h, L(s));
1959
+ }), this.slot.ready && this.dispatch(h);
1958
1960
  } catch (Y) {
1959
- this.finish(L, S(Y));
1961
+ this.finish(h, L(Y));
1960
1962
  }
1961
- return J;
1963
+ return U;
1962
1964
  }
1963
1965
  current(A) {
1964
1966
  return this.active === A && !A.settled;
1965
1967
  }
1966
1968
  makeWorker() {
1967
- const A = mA(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
1969
+ const A = PA(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
1968
1970
  } };
1969
1971
  this.slot = g;
1970
1972
  const I = (i) => {
@@ -1977,7 +1979,7 @@ class KA {
1977
1979
  }
1978
1980
  if (!(!N || !this.current(N))) {
1979
1981
  if (!g.ready && D.type === "error") {
1980
- this.finish(N, S(new Error(D.message)));
1982
+ this.finish(N, L(new Error(D.message)));
1981
1983
  return;
1982
1984
  }
1983
1985
  if (!(D.operationId !== N.operationId || D.scopeEpoch !== N.scopeEpoch))
@@ -1985,13 +1987,13 @@ class KA {
1985
1987
  if (D.type === "cpp_cache_eligibility") {
1986
1988
  if (this.options?.toolchainProfile !== "stock-certified-v1" || N.prepareOnly && !N.validateCacheInputs)
1987
1989
  return;
1988
- const K = (L) => typeof L == "string" && /^[0-9a-f]{64}$/.test(L), J = D.eligible === !0 && K(D.certificate_sha256) && K(D.snapshot);
1990
+ const K = (h) => typeof h == "string" && /^[0-9a-f]{64}$/.test(h), U = D.eligible === !0 && K(D.certificate_sha256) && K(D.snapshot);
1989
1991
  this.cacheValidation = {
1990
- eligible: J,
1992
+ eligible: U,
1991
1993
  certificate: K(D.certificate_sha256) ? D.certificate_sha256 : void 0,
1992
- snapshot: J ? D.snapshot : void 0,
1994
+ snapshot: U ? D.snapshot : void 0,
1993
1995
  operationId: N.operationId,
1994
- reason: J ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
1996
+ reason: U ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
1995
1997
  };
1996
1998
  } else if (D.type === "stop")
1997
1999
  this.finish(N, {
@@ -2004,7 +2006,7 @@ class KA {
2004
2006
  }
2005
2007
  });
2006
2008
  else if (D.type === "error")
2007
- this.finish(N, S(new Error(D.message)));
2009
+ this.finish(N, L(new Error(D.message)));
2008
2010
  else if (D.type === "cpp_cache_object" && D.generation === this.generation && N.generation === this.generation)
2009
2011
  try {
2010
2012
  this.objects.stage(D);
@@ -2013,14 +2015,14 @@ class KA {
2013
2015
  }
2014
2016
  else D.type === "cpp_cache_stats" && D.generation === N.generation ? N.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? N.publication ??= this.publishObjects(N, g) : D.type === "compiler_module_stats" && (N.stats.compilerModule = D);
2015
2017
  } catch (K) {
2016
- this.finish(N, S(K));
2018
+ this.finish(N, L(K));
2017
2019
  }
2018
2020
  }
2019
2021
  }, C = (i) => {
2020
- this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, S(i.error ?? new Error(i.message))) : this.retireWorker());
2022
+ this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, L(i.error ?? new Error(i.message))) : this.retireWorker());
2021
2023
  }, B = () => C({ message: "Unreadable execution worker message" });
2022
- this.debugger[U].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
2023
- A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[U].detach(A);
2024
+ this.debugger[J].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
2025
+ A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[J].detach(A);
2024
2026
  };
2025
2027
  }
2026
2028
  async publishObjects(A, g) {
@@ -2061,7 +2063,7 @@ class KA {
2061
2063
  EA("c"),
2062
2064
  this.cacheCompilerModule,
2063
2065
  this.toolchainController.signal,
2064
- hA(),
2066
+ SA(),
2065
2067
  this.options?.toolchainProfile
2066
2068
  );
2067
2069
  return this.toolchainLoading = A, this.initializing.add(A), A.then(
@@ -2098,52 +2100,52 @@ class KA {
2098
2100
  const I = g.worker;
2099
2101
  A.stats.workerReadyMs = performance.now() - A.startedAt;
2100
2102
  const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
2101
- if (this.stdout[U].attach(I, C), this.stderr[U].attach(I, C), A.prepareOnly || this.debugger[U].beginRun(), A.opener) {
2102
- if (A.device = new PA((B) => this.finish(A, S(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
2103
+ if (this.stdout[J].attach(I, C), this.stderr[J].attach(I, C), A.prepareOnly || this.debugger[J].beginRun(), A.opener) {
2104
+ if (A.device = new XA((B) => this.finish(A, L(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
2103
2105
  A.start.host_device = A.device.workerStart;
2104
2106
  }
2105
2107
  this.current(A) && (I.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
2106
2108
  } catch (I) {
2107
- this.current(A) && (this.toolchainLoading = void 0, this.finish(A, S(I)));
2109
+ this.current(A) && (this.toolchainLoading = void 0, this.finish(A, L(I)));
2108
2110
  }
2109
2111
  }
2110
2112
  finish(A, g) {
2111
2113
  if (!this.current(A)) return;
2112
2114
  (g.type !== "completed" || g.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
2113
2115
  const I = this.slot?.worker;
2114
- I && (this.stdout[U].detach(I), this.stderr[U].detach(I));
2116
+ I && (this.stdout[J].detach(I), this.stderr[J].detach(I));
2115
2117
  const C = A.device?.close();
2116
- C && (g = S(C));
2118
+ C && (g = L(C));
2117
2119
  const B = g.type === "completed" && A.generation === this.generation && !this.disposed, i = B && g.type === "completed" && g.exitCode === 0;
2118
2120
  if (A.generation === this.generation)
2119
2121
  for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
2120
2122
  if (i)
2121
2123
  for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
2122
- this.objects.discardBatch(), this.latest = A.stats, this.stdin[U].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2124
+ this.objects.discardBatch(), this.latest = A.stats, this.stdin[J].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2123
2125
  this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
2124
2126
  }, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(g);
2125
2127
  }
2126
2128
  retireWorker() {
2127
2129
  clearTimeout(this.idleTimer);
2128
2130
  const A = this.slot;
2129
- A && (this.slot = void 0, A.remove(), this.stdout[U].detach(A.worker), this.stderr[U].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
2131
+ A && (this.slot = void 0, A.remove(), this.stdout[J].detach(A.worker), this.stderr[J].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
2130
2132
  }
2131
2133
  }
2132
- class FA extends MA {
2134
+ class kA extends FA {
2133
2135
  constructor(A) {
2134
2136
  super(), this.mode = A, this.callback = ((g) => {
2135
2137
  const I = g.data;
2136
2138
  if (this.accepts && !this.accepts(I) || I.type !== "stdout" || I.mode !== this.mode) return;
2137
2139
  const C = I.data;
2138
2140
  this.emit("data", C);
2139
- }).bind(this), this[U] = {
2141
+ }).bind(this), this[J] = {
2140
2142
  attach: this.attach.bind(this),
2141
2143
  detach: this.detach.bind(this)
2142
2144
  };
2143
2145
  }
2144
2146
  callback;
2145
2147
  accepts;
2146
- [U];
2148
+ [J];
2147
2149
  attach(A, g) {
2148
2150
  this.accepts = g, A.addEventListener("message", this.callback);
2149
2151
  }
@@ -2169,11 +2171,11 @@ class q {
2169
2171
  generation = 0;
2170
2172
  indices;
2171
2173
  data;
2172
- [U];
2174
+ [J];
2173
2175
  constructor() {
2174
2176
  this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
2175
2177
  const A = () => this.buffer;
2176
- this[U] = {
2178
+ this[J] = {
2177
2179
  clear: this.clear.bind(this),
2178
2180
  get buffer() {
2179
2181
  return A();
@@ -2200,16 +2202,16 @@ class q {
2200
2202
  await Atomics.waitAsync(this.indices, I, D).value;
2201
2203
  continue;
2202
2204
  }
2203
- const J = Math.min(A.length - B, K);
2204
- this.data.set(A.subarray(B, B + J), N), Atomics.store(this.indices, C, (N + J) % g), Atomics.notify(this.indices, C), B += J;
2205
+ const U = Math.min(A.length - B, K);
2206
+ this.data.set(A.subarray(B, B + U), N), Atomics.store(this.indices, C, (N + U) % g), Atomics.notify(this.indices, C), B += U;
2205
2207
  }
2206
2208
  }
2207
2209
  }
2208
2210
  export {
2209
- zA as Artifact,
2210
- fA as Debugger,
2211
+ VA as Artifact,
2212
+ lA as Debugger,
2211
2213
  KA as Engine,
2212
2214
  rA as HOST_DEVICE_PATH,
2213
2215
  q as Stdin,
2214
- FA as Stdout
2216
+ kA as Stdout
2215
2217
  };