glassjar 0.8.0 → 0.10.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/README.md +30 -2
- package/dist/assets/{worker-DKKpKTP_.js → worker-D45G03b3.js} +365 -360
- package/dist/engine_bg.wasm +0 -0
- package/dist/glassjar.js +992 -885
- package/dist/glassjar.umd.cjs +5 -5
- package/dist/index.d.ts +40 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/python-packages.d.ts +7 -0
- package/dist/python-packages.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/glassjar.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
function
|
|
1
|
+
function dA(Q) {
|
|
2
2
|
return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(i, F,
|
|
9
|
-
return Function.prototype.apply.call(i, F,
|
|
10
|
-
},
|
|
11
|
-
Q && typeof Q.ownKeys == "function" ?
|
|
4
|
+
var v = { exports: {} }, FA;
|
|
5
|
+
function jA() {
|
|
6
|
+
if (FA) return v.exports;
|
|
7
|
+
FA = 1;
|
|
8
|
+
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(i, F, k) {
|
|
9
|
+
return Function.prototype.apply.call(i, F, k);
|
|
10
|
+
}, g;
|
|
11
|
+
Q && typeof Q.ownKeys == "function" ? g = Q.ownKeys : Object.getOwnPropertySymbols ? g = function(i) {
|
|
12
12
|
return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
|
|
13
|
-
} :
|
|
13
|
+
} : g = function(i) {
|
|
14
14
|
return Object.getOwnPropertyNames(i);
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function I(o) {
|
|
17
17
|
console && console.warn && console.warn(o);
|
|
18
18
|
}
|
|
19
19
|
var C = Number.isNaN || function(i) {
|
|
@@ -22,7 +22,7 @@ function OA() {
|
|
|
22
22
|
function B() {
|
|
23
23
|
B.init.call(this);
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
v.exports = B, v.exports.once = s, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
|
|
26
26
|
var E = 10;
|
|
27
27
|
function D(o) {
|
|
28
28
|
if (typeof o != "function")
|
|
@@ -51,18 +51,18 @@ function OA() {
|
|
|
51
51
|
B.prototype.getMaxListeners = function() {
|
|
52
52
|
return w(this);
|
|
53
53
|
}, B.prototype.emit = function(i) {
|
|
54
|
-
for (var F = [],
|
|
55
|
-
var
|
|
54
|
+
for (var F = [], k = 1; k < arguments.length; k++) F.push(arguments[k]);
|
|
55
|
+
var K = i === "error", S = this._events;
|
|
56
56
|
if (S !== void 0)
|
|
57
|
-
|
|
58
|
-
else if (!
|
|
57
|
+
K = K && S.error === void 0;
|
|
58
|
+
else if (!K)
|
|
59
59
|
return !1;
|
|
60
|
-
if (
|
|
60
|
+
if (K) {
|
|
61
61
|
var Y;
|
|
62
62
|
if (F.length > 0 && (Y = F[0]), Y instanceof Error)
|
|
63
63
|
throw Y;
|
|
64
|
-
var
|
|
65
|
-
throw
|
|
64
|
+
var d = new Error("Unhandled error." + (Y ? " (" + Y.message + ")" : ""));
|
|
65
|
+
throw d.context = Y, d;
|
|
66
66
|
}
|
|
67
67
|
var t = S[i];
|
|
68
68
|
if (t === void 0)
|
|
@@ -70,22 +70,22 @@ function OA() {
|
|
|
70
70
|
if (typeof t == "function")
|
|
71
71
|
A(t, this, F);
|
|
72
72
|
else
|
|
73
|
-
for (var
|
|
74
|
-
A(
|
|
73
|
+
for (var NA = t.length, pA = U(t, NA), k = 0; k < NA; ++k)
|
|
74
|
+
A(pA[k], this, F);
|
|
75
75
|
return !0;
|
|
76
76
|
};
|
|
77
|
-
function N(o, i, F,
|
|
78
|
-
var
|
|
77
|
+
function N(o, i, F, k) {
|
|
78
|
+
var K, S, Y;
|
|
79
79
|
if (D(F), S = o._events, S === void 0 ? (S = o._events = /* @__PURE__ */ Object.create(null), o._eventsCount = 0) : (S.newListener !== void 0 && (o.emit(
|
|
80
80
|
"newListener",
|
|
81
81
|
i,
|
|
82
82
|
F.listener ? F.listener : F
|
|
83
83
|
), S = o._events), Y = S[i]), Y === void 0)
|
|
84
84
|
Y = S[i] = F, ++o._eventsCount;
|
|
85
|
-
else if (typeof Y == "function" ? Y = S[i] =
|
|
85
|
+
else if (typeof Y == "function" ? Y = S[i] = k ? [F, Y] : [Y, F] : k ? Y.unshift(F) : Y.push(F), K = w(o), K > 0 && Y.length > K && !Y.warned) {
|
|
86
86
|
Y.warned = !0;
|
|
87
|
-
var
|
|
88
|
-
|
|
87
|
+
var d = new Error("Possible EventEmitter memory leak detected. " + Y.length + " " + String(i) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
88
|
+
d.name = "MaxListenersExceededWarning", d.emitter = o, d.type = i, d.count = Y.length, I(d);
|
|
89
89
|
}
|
|
90
90
|
return o;
|
|
91
91
|
}
|
|
@@ -94,71 +94,71 @@ function OA() {
|
|
|
94
94
|
}, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(i, F) {
|
|
95
95
|
return N(this, i, F, !0);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function G() {
|
|
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
|
|
102
|
-
var
|
|
103
|
-
return
|
|
101
|
+
function R(o, i, F) {
|
|
102
|
+
var k = { fired: !1, wrapFn: void 0, target: o, type: i, listener: F }, K = G.bind(k);
|
|
103
|
+
return K.listener = F, k.wrapFn = K, K;
|
|
104
104
|
}
|
|
105
105
|
B.prototype.once = function(i, F) {
|
|
106
|
-
return D(F), this.on(i,
|
|
106
|
+
return D(F), this.on(i, R(this, i, F)), this;
|
|
107
107
|
}, B.prototype.prependOnceListener = function(i, F) {
|
|
108
|
-
return D(F), this.prependListener(i,
|
|
108
|
+
return D(F), this.prependListener(i, R(this, i, F)), this;
|
|
109
109
|
}, B.prototype.removeListener = function(i, F) {
|
|
110
|
-
var
|
|
111
|
-
if (D(F),
|
|
110
|
+
var k, K, S, Y, d;
|
|
111
|
+
if (D(F), K = this._events, K === void 0)
|
|
112
112
|
return this;
|
|
113
|
-
if (
|
|
113
|
+
if (k = K[i], k === void 0)
|
|
114
114
|
return this;
|
|
115
|
-
if (
|
|
116
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete
|
|
117
|
-
else if (typeof
|
|
118
|
-
for (S = -1, Y =
|
|
119
|
-
if (
|
|
120
|
-
|
|
115
|
+
if (k === F || k.listener === F)
|
|
116
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete K[i], K.removeListener && this.emit("removeListener", i, k.listener || F));
|
|
117
|
+
else if (typeof k != "function") {
|
|
118
|
+
for (S = -1, Y = k.length - 1; Y >= 0; Y--)
|
|
119
|
+
if (k[Y] === F || k[Y].listener === F) {
|
|
120
|
+
d = k[Y].listener, S = Y;
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
if (S < 0)
|
|
124
124
|
return this;
|
|
125
|
-
S === 0 ?
|
|
125
|
+
S === 0 ? k.shift() : a(k, S), k.length === 1 && (K[i] = k[0]), K.removeListener !== void 0 && this.emit("removeListener", i, d || F);
|
|
126
126
|
}
|
|
127
127
|
return this;
|
|
128
128
|
}, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(i) {
|
|
129
|
-
var F,
|
|
130
|
-
if (
|
|
129
|
+
var F, k, K;
|
|
130
|
+
if (k = this._events, k === void 0)
|
|
131
131
|
return this;
|
|
132
|
-
if (
|
|
133
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
132
|
+
if (k.removeListener === void 0)
|
|
133
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : k[i] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete k[i]), this;
|
|
134
134
|
if (arguments.length === 0) {
|
|
135
|
-
var S = Object.keys(
|
|
136
|
-
for (
|
|
137
|
-
Y = S[
|
|
135
|
+
var S = Object.keys(k), Y;
|
|
136
|
+
for (K = 0; K < S.length; ++K)
|
|
137
|
+
Y = S[K], Y !== "removeListener" && this.removeAllListeners(Y);
|
|
138
138
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
139
139
|
}
|
|
140
|
-
if (F =
|
|
140
|
+
if (F = k[i], typeof F == "function")
|
|
141
141
|
this.removeListener(i, F);
|
|
142
142
|
else if (F !== void 0)
|
|
143
|
-
for (
|
|
144
|
-
this.removeListener(i, F[
|
|
143
|
+
for (K = F.length - 1; K >= 0; K--)
|
|
144
|
+
this.removeListener(i, F[K]);
|
|
145
145
|
return this;
|
|
146
146
|
};
|
|
147
147
|
function h(o, i, F) {
|
|
148
|
-
var
|
|
149
|
-
if (
|
|
148
|
+
var k = o._events;
|
|
149
|
+
if (k === void 0)
|
|
150
150
|
return [];
|
|
151
|
-
var
|
|
152
|
-
return
|
|
151
|
+
var K = k[i];
|
|
152
|
+
return K === void 0 ? [] : typeof K == "function" ? F ? [K.listener || K] : [K] : F ? O(K) : U(K, K.length);
|
|
153
153
|
}
|
|
154
154
|
B.prototype.listeners = function(i) {
|
|
155
155
|
return h(this, i, !0);
|
|
156
156
|
}, B.prototype.rawListeners = function(i) {
|
|
157
157
|
return h(this, i, !1);
|
|
158
158
|
}, B.listenerCount = function(o, i) {
|
|
159
|
-
return typeof o.listenerCount == "function" ? o.listenerCount(i) :
|
|
160
|
-
}, B.prototype.listenerCount =
|
|
161
|
-
function
|
|
159
|
+
return typeof o.listenerCount == "function" ? o.listenerCount(i) : y.call(o, i);
|
|
160
|
+
}, B.prototype.listenerCount = y;
|
|
161
|
+
function y(o) {
|
|
162
162
|
var i = this._events;
|
|
163
163
|
if (i !== void 0) {
|
|
164
164
|
var F = i[o];
|
|
@@ -170,59 +170,59 @@ function OA() {
|
|
|
170
170
|
return 0;
|
|
171
171
|
}
|
|
172
172
|
B.prototype.eventNames = function() {
|
|
173
|
-
return this._eventsCount > 0 ?
|
|
173
|
+
return this._eventsCount > 0 ? g(this._events) : [];
|
|
174
174
|
};
|
|
175
|
-
function
|
|
176
|
-
for (var F = new Array(i),
|
|
177
|
-
F[
|
|
175
|
+
function U(o, i) {
|
|
176
|
+
for (var F = new Array(i), k = 0; k < i; ++k)
|
|
177
|
+
F[k] = o[k];
|
|
178
178
|
return F;
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function a(o, i) {
|
|
181
181
|
for (; i + 1 < o.length; i++)
|
|
182
182
|
o[i] = o[i + 1];
|
|
183
183
|
o.pop();
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function O(o) {
|
|
186
186
|
for (var i = new Array(o.length), F = 0; F < i.length; ++F)
|
|
187
187
|
i[F] = o[F].listener || o[F];
|
|
188
188
|
return i;
|
|
189
189
|
}
|
|
190
190
|
function s(o, i) {
|
|
191
|
-
return new Promise(function(F,
|
|
192
|
-
function
|
|
193
|
-
o.removeListener(i, S),
|
|
191
|
+
return new Promise(function(F, k) {
|
|
192
|
+
function K(Y) {
|
|
193
|
+
o.removeListener(i, S), k(Y);
|
|
194
194
|
}
|
|
195
195
|
function S() {
|
|
196
|
-
typeof o.removeListener == "function" && o.removeListener("error",
|
|
196
|
+
typeof o.removeListener == "function" && o.removeListener("error", K), F([].slice.call(arguments));
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
T(o, i, S, { once: !0 }), i !== "error" && u(o, K, { once: !0 });
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
typeof o.on == "function" &&
|
|
201
|
+
function u(o, i, F) {
|
|
202
|
+
typeof o.on == "function" && T(o, "error", i, F);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function T(o, i, F, k) {
|
|
205
205
|
if (typeof o.on == "function")
|
|
206
|
-
|
|
206
|
+
k.once ? o.once(i, F) : o.on(i, F);
|
|
207
207
|
else if (typeof o.addEventListener == "function")
|
|
208
|
-
o.addEventListener(i, function
|
|
209
|
-
|
|
208
|
+
o.addEventListener(i, function K(S) {
|
|
209
|
+
k.once && o.removeEventListener(i, K), F(S);
|
|
210
210
|
});
|
|
211
211
|
else
|
|
212
212
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return v.exports;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
const
|
|
218
|
-
class
|
|
216
|
+
var OA = jA();
|
|
217
|
+
const cA = /* @__PURE__ */ dA(OA);
|
|
218
|
+
class EA {
|
|
219
219
|
__destroy_into_raw() {
|
|
220
220
|
const A = this.__wbg_ptr;
|
|
221
|
-
return this.__wbg_ptr = 0,
|
|
221
|
+
return this.__wbg_ptr = 0, GA.unregister(this), A;
|
|
222
222
|
}
|
|
223
223
|
free() {
|
|
224
224
|
const A = this.__destroy_into_raw();
|
|
225
|
-
|
|
225
|
+
M.__wbg_dapadapter_free(A, 0);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Attaches a worker to the adapter.
|
|
@@ -233,80 +233,80 @@ class BA {
|
|
|
233
233
|
* @param {Worker} worker
|
|
234
234
|
*/
|
|
235
235
|
attach(A) {
|
|
236
|
-
|
|
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
|
-
|
|
242
|
+
M.dapadapter_detach(this.__wbg_ptr);
|
|
243
243
|
}
|
|
244
244
|
constructor() {
|
|
245
|
-
const A =
|
|
246
|
-
return this.__wbg_ptr = A >>> 0,
|
|
245
|
+
const A = M.dapadapter_new();
|
|
246
|
+
return this.__wbg_ptr = A >>> 0, GA.register(this, this.__wbg_ptr, this), this;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* @param {Function} callback
|
|
250
250
|
*/
|
|
251
251
|
on(A) {
|
|
252
|
-
|
|
252
|
+
M.dapadapter_on(this.__wbg_ptr, A);
|
|
253
253
|
}
|
|
254
254
|
resetRun() {
|
|
255
|
-
|
|
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
|
|
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
|
-
|
|
268
|
+
M.dapadapter_setFilterInternals(this.__wbg_ptr, A);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
Symbol.dispose && (
|
|
272
|
-
class
|
|
271
|
+
Symbol.dispose && (EA.prototype[Symbol.dispose] = EA.prototype.free);
|
|
272
|
+
class n {
|
|
273
273
|
static __wrap(A) {
|
|
274
274
|
A = A >>> 0;
|
|
275
|
-
const
|
|
276
|
-
return
|
|
275
|
+
const g = Object.create(n.prototype);
|
|
276
|
+
return g.__wbg_ptr = A, yA.register(g, g.__wbg_ptr, g), g;
|
|
277
277
|
}
|
|
278
278
|
__destroy_into_raw() {
|
|
279
279
|
const A = this.__wbg_ptr;
|
|
280
|
-
return this.__wbg_ptr = 0,
|
|
280
|
+
return this.__wbg_ptr = 0, yA.unregister(this), A;
|
|
281
281
|
}
|
|
282
282
|
free() {
|
|
283
283
|
const A = this.__destroy_into_raw();
|
|
284
|
-
|
|
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
|
-
|
|
291
|
+
M.trap___wbg_wasmer_trap();
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
Symbol.dispose && (
|
|
295
|
-
function
|
|
294
|
+
Symbol.dispose && (n.prototype[Symbol.dispose] = n.prototype.free);
|
|
295
|
+
function xA() {
|
|
296
296
|
let Q, A;
|
|
297
297
|
try {
|
|
298
|
-
const
|
|
299
|
-
return Q =
|
|
298
|
+
const g = M.cpp_exception_hash();
|
|
299
|
+
return Q = g[0], A = g[1], p(g[0], g[1]);
|
|
300
300
|
} finally {
|
|
301
|
-
|
|
301
|
+
M.__wbindgen_free(Q, A, 1);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const A =
|
|
306
|
-
var C =
|
|
307
|
-
return
|
|
304
|
+
function MA(Q) {
|
|
305
|
+
const A = Z(Q, M.__wbindgen_malloc, M.__wbindgen_realloc), g = x, I = M.prefetch_urls(A, g);
|
|
306
|
+
var C = lA(I[0], I[1]).slice();
|
|
307
|
+
return M.__wbindgen_free(I[0], I[1] * 4, 4), C;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function VA() {
|
|
310
310
|
return {
|
|
311
311
|
__proto__: null,
|
|
312
312
|
"./engine_bg.js": {
|
|
@@ -314,33 +314,33 @@ function dA() {
|
|
|
314
314
|
__wbg_BigInt_b7bbccdff258c9f2: function(A) {
|
|
315
315
|
return BigInt(A);
|
|
316
316
|
},
|
|
317
|
-
__wbg_Error_8c4e43fe74559d73: function(A,
|
|
318
|
-
return Error(
|
|
317
|
+
__wbg_Error_8c4e43fe74559d73: function(A, g) {
|
|
318
|
+
return Error(p(A, g));
|
|
319
319
|
},
|
|
320
320
|
__wbg_Number_04624de7d0e8332d: function(A) {
|
|
321
321
|
return Number(A);
|
|
322
322
|
},
|
|
323
|
-
__wbg_String_8f0eb39a4a4c2f66: function(A,
|
|
324
|
-
const
|
|
325
|
-
|
|
323
|
+
__wbg_String_8f0eb39a4a4c2f66: function(A, g) {
|
|
324
|
+
const I = String(g), C = Z(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = x;
|
|
325
|
+
H().setInt32(A + 4, B, !0), H().setInt32(A + 0, C, !0);
|
|
326
326
|
},
|
|
327
|
-
__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A,
|
|
328
|
-
const
|
|
329
|
-
|
|
327
|
+
__wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, g) {
|
|
328
|
+
const I = g, C = typeof I == "bigint" ? I : void 0;
|
|
329
|
+
H().setBigInt64(A + 8, j(C) ? BigInt(0) : C, !0), H().setInt32(A + 0, !j(C), !0);
|
|
330
330
|
},
|
|
331
331
|
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(A) {
|
|
332
|
-
const
|
|
333
|
-
return
|
|
332
|
+
const g = A, I = typeof g == "boolean" ? g : void 0;
|
|
333
|
+
return j(I) ? 16777215 : I ? 1 : 0;
|
|
334
334
|
},
|
|
335
|
-
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A,
|
|
336
|
-
const
|
|
337
|
-
|
|
335
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, g) {
|
|
336
|
+
const I = DA(g), C = Z(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = x;
|
|
337
|
+
H().setInt32(A + 4, B, !0), H().setInt32(A + 0, C, !0);
|
|
338
338
|
},
|
|
339
339
|
__wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
|
|
340
|
-
return
|
|
340
|
+
return M.__wbindgen_export;
|
|
341
341
|
},
|
|
342
|
-
__wbg___wbindgen_in_47fa6863be6f2f25: function(A,
|
|
343
|
-
return A in
|
|
342
|
+
__wbg___wbindgen_in_47fa6863be6f2f25: function(A, g) {
|
|
343
|
+
return A in g;
|
|
344
344
|
},
|
|
345
345
|
__wbg___wbindgen_is_bigint_31b12575b56f32fc: function(A) {
|
|
346
346
|
return typeof A == "bigint";
|
|
@@ -349,8 +349,8 @@ function dA() {
|
|
|
349
349
|
return typeof A == "function";
|
|
350
350
|
},
|
|
351
351
|
__wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(A) {
|
|
352
|
-
const
|
|
353
|
-
return typeof
|
|
352
|
+
const g = A;
|
|
353
|
+
return typeof g == "object" && g !== null;
|
|
354
354
|
},
|
|
355
355
|
__wbg___wbindgen_is_string_cd444516edc5b180: function(A) {
|
|
356
356
|
return typeof A == "string";
|
|
@@ -358,52 +358,52 @@ function dA() {
|
|
|
358
358
|
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(A) {
|
|
359
359
|
return A === void 0;
|
|
360
360
|
},
|
|
361
|
-
__wbg___wbindgen_jsval_eq_11888390b0186270: function(A,
|
|
362
|
-
return A ===
|
|
361
|
+
__wbg___wbindgen_jsval_eq_11888390b0186270: function(A, g) {
|
|
362
|
+
return A === g;
|
|
363
363
|
},
|
|
364
|
-
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A,
|
|
365
|
-
return A ==
|
|
364
|
+
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, g) {
|
|
365
|
+
return A == g;
|
|
366
366
|
},
|
|
367
|
-
__wbg___wbindgen_lt_bb59cc3d23526e0d: function(A,
|
|
368
|
-
return A <
|
|
367
|
+
__wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, g) {
|
|
368
|
+
return A < g;
|
|
369
369
|
},
|
|
370
370
|
__wbg___wbindgen_neg_6b4d356dff49dcc6: function(A) {
|
|
371
371
|
return -A;
|
|
372
372
|
},
|
|
373
|
-
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(A,
|
|
374
|
-
const
|
|
375
|
-
|
|
373
|
+
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, g) {
|
|
374
|
+
const I = g, C = typeof I == "number" ? I : void 0;
|
|
375
|
+
H().setFloat64(A + 8, j(C) ? 0 : C, !0), H().setInt32(A + 0, !j(C), !0);
|
|
376
376
|
},
|
|
377
377
|
__wbg___wbindgen_rethrow_05525c567f154472: function(A) {
|
|
378
378
|
throw A;
|
|
379
379
|
},
|
|
380
|
-
__wbg___wbindgen_shr_ef8e07cce709eb54: function(A,
|
|
381
|
-
return A >>
|
|
380
|
+
__wbg___wbindgen_shr_ef8e07cce709eb54: function(A, g) {
|
|
381
|
+
return A >> g;
|
|
382
382
|
},
|
|
383
|
-
__wbg___wbindgen_string_get_72fb696202c56729: function(A,
|
|
384
|
-
const
|
|
385
|
-
var B =
|
|
386
|
-
|
|
383
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(A, g) {
|
|
384
|
+
const I = g, C = typeof I == "string" ? I : void 0;
|
|
385
|
+
var B = j(C) ? 0 : Z(C, M.__wbindgen_malloc, M.__wbindgen_realloc), E = x;
|
|
386
|
+
H().setInt32(A + 4, E, !0), H().setInt32(A + 0, B, !0);
|
|
387
387
|
},
|
|
388
|
-
__wbg___wbindgen_throw_be289d5034ed271b: function(A,
|
|
389
|
-
throw new Error(
|
|
388
|
+
__wbg___wbindgen_throw_be289d5034ed271b: function(A, g) {
|
|
389
|
+
throw new Error(p(A, g));
|
|
390
390
|
},
|
|
391
391
|
__wbg__wbg_cb_unref_d9b87ff7982e3b21: function(A) {
|
|
392
392
|
A._wbg_cb_unref();
|
|
393
393
|
},
|
|
394
394
|
__wbg_addEventListener_3acb0aad4483804c: function() {
|
|
395
|
-
return J(function(A,
|
|
396
|
-
A.addEventListener(
|
|
395
|
+
return J(function(A, g, I, C) {
|
|
396
|
+
A.addEventListener(p(g, I), C);
|
|
397
397
|
}, arguments);
|
|
398
398
|
},
|
|
399
399
|
__wbg_apply_2e22c45cb4f12415: function() {
|
|
400
|
-
return J(function(A,
|
|
401
|
-
return Reflect.apply(A,
|
|
400
|
+
return J(function(A, g, I) {
|
|
401
|
+
return Reflect.apply(A, g, I);
|
|
402
402
|
}, arguments);
|
|
403
403
|
},
|
|
404
404
|
__wbg_apply_ada2ee1a60ac7b3c: function() {
|
|
405
|
-
return J(function(A,
|
|
406
|
-
return A.apply(
|
|
405
|
+
return J(function(A, g, I) {
|
|
406
|
+
return A.apply(g, I);
|
|
407
407
|
}, arguments);
|
|
408
408
|
},
|
|
409
409
|
__wbg_arrayBuffer_bb54076166006c39: function() {
|
|
@@ -411,11 +411,11 @@ function dA() {
|
|
|
411
411
|
return A.arrayBuffer();
|
|
412
412
|
}, arguments);
|
|
413
413
|
},
|
|
414
|
-
__wbg_bind_1dc37de2b9939128: function(A,
|
|
415
|
-
return A.bind(
|
|
414
|
+
__wbg_bind_1dc37de2b9939128: function(A, g, I, C) {
|
|
415
|
+
return A.bind(g, I, C);
|
|
416
416
|
},
|
|
417
|
-
__wbg_bind_29ba380591735d8c: function(A,
|
|
418
|
-
return A.bind(
|
|
417
|
+
__wbg_bind_29ba380591735d8c: function(A, g, I) {
|
|
418
|
+
return A.bind(g, I);
|
|
419
419
|
},
|
|
420
420
|
__wbg_buffer_7b5f53e46557d8f1: function(A) {
|
|
421
421
|
return A.buffer;
|
|
@@ -427,18 +427,18 @@ function dA() {
|
|
|
427
427
|
return A.byteLength;
|
|
428
428
|
},
|
|
429
429
|
__wbg_call_389efe28435a9388: function() {
|
|
430
|
-
return J(function(A,
|
|
431
|
-
return A.call(
|
|
430
|
+
return J(function(A, g) {
|
|
431
|
+
return A.call(g);
|
|
432
432
|
}, arguments);
|
|
433
433
|
},
|
|
434
434
|
__wbg_call_4708e0c13bdc8e95: function() {
|
|
435
|
-
return J(function(A,
|
|
436
|
-
return A.call(
|
|
435
|
+
return J(function(A, g, I) {
|
|
436
|
+
return A.call(g, I);
|
|
437
437
|
}, arguments);
|
|
438
438
|
},
|
|
439
439
|
__wbg_compareExchange_b578410c358e695e: function() {
|
|
440
|
-
return J(function(A,
|
|
441
|
-
return Atomics.compareExchange(A,
|
|
440
|
+
return J(function(A, g, I, C) {
|
|
441
|
+
return Atomics.compareExchange(A, g >>> 0, I, C);
|
|
442
442
|
}, arguments);
|
|
443
443
|
},
|
|
444
444
|
__wbg_constructor_ad6c0ed428f55d34: function(A) {
|
|
@@ -447,8 +447,8 @@ function dA() {
|
|
|
447
447
|
__wbg_crypto_86f2631e91b51511: function(A) {
|
|
448
448
|
return A.crypto;
|
|
449
449
|
},
|
|
450
|
-
__wbg_customSections_193491b069139fb1: function(A,
|
|
451
|
-
return WebAssembly.Module.customSections(A,
|
|
450
|
+
__wbg_customSections_193491b069139fb1: function(A, g, I) {
|
|
451
|
+
return WebAssembly.Module.customSections(A, p(g, I));
|
|
452
452
|
},
|
|
453
453
|
__wbg_data_5330da50312d0bc1: function(A) {
|
|
454
454
|
return A.data;
|
|
@@ -459,12 +459,12 @@ function dA() {
|
|
|
459
459
|
__wbg_entries_58c7934c745daac7: function(A) {
|
|
460
460
|
return Object.entries(A);
|
|
461
461
|
},
|
|
462
|
-
__wbg_error_7534b8e9a36f1ab4: function(A,
|
|
463
|
-
let
|
|
462
|
+
__wbg_error_7534b8e9a36f1ab4: function(A, g) {
|
|
463
|
+
let I, C;
|
|
464
464
|
try {
|
|
465
|
-
|
|
465
|
+
I = A, C = g, console.error(p(A, g));
|
|
466
466
|
} finally {
|
|
467
|
-
|
|
467
|
+
M.__wbindgen_free(I, C, 1);
|
|
468
468
|
}
|
|
469
469
|
},
|
|
470
470
|
__wbg_exports_794a42000dacd046: function(A) {
|
|
@@ -473,8 +473,8 @@ function dA() {
|
|
|
473
473
|
__wbg_exports_86b4926134c40288: function(A) {
|
|
474
474
|
return A.exports;
|
|
475
475
|
},
|
|
476
|
-
__wbg_fetch_d1488f40cef1e210: function(A,
|
|
477
|
-
return A.fetch(
|
|
476
|
+
__wbg_fetch_d1488f40cef1e210: function(A, g, I) {
|
|
477
|
+
return A.fetch(p(g, I));
|
|
478
478
|
},
|
|
479
479
|
__wbg_from_bddd64e7d5ff6941: function(A) {
|
|
480
480
|
return Array.from(A);
|
|
@@ -485,8 +485,8 @@ function dA() {
|
|
|
485
485
|
}, arguments);
|
|
486
486
|
},
|
|
487
487
|
__wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
|
|
488
|
-
return J(function(A,
|
|
489
|
-
A.getRandomValues(
|
|
488
|
+
return J(function(A, g) {
|
|
489
|
+
A.getRandomValues(g);
|
|
490
490
|
}, arguments);
|
|
491
491
|
},
|
|
492
492
|
__wbg_getTime_1e3cd1391c5c3995: function(A) {
|
|
@@ -495,169 +495,169 @@ function dA() {
|
|
|
495
495
|
__wbg_getTimezoneOffset_81776d10a4ec18a8: function(A) {
|
|
496
496
|
return A.getTimezoneOffset();
|
|
497
497
|
},
|
|
498
|
-
__wbg_getUint32_bb6f5a401408e7fa: function(A,
|
|
499
|
-
return A.getUint32(
|
|
498
|
+
__wbg_getUint32_bb6f5a401408e7fa: function(A, g, I) {
|
|
499
|
+
return A.getUint32(g >>> 0, I !== 0);
|
|
500
500
|
},
|
|
501
501
|
__wbg_get_7efbcc3819719b0f: function() {
|
|
502
|
-
return J(function(A,
|
|
503
|
-
return A.get(
|
|
502
|
+
return J(function(A, g) {
|
|
503
|
+
return A.get(g >>> 0);
|
|
504
504
|
}, arguments);
|
|
505
505
|
},
|
|
506
|
-
__wbg_get_9b94d73e6221f75c: function(A,
|
|
507
|
-
return A[
|
|
506
|
+
__wbg_get_9b94d73e6221f75c: function(A, g) {
|
|
507
|
+
return A[g >>> 0];
|
|
508
508
|
},
|
|
509
509
|
__wbg_get_b3ed3ad4be2bc8ac: function() {
|
|
510
|
-
return J(function(A,
|
|
511
|
-
return Reflect.get(A,
|
|
510
|
+
return J(function(A, g) {
|
|
511
|
+
return Reflect.get(A, g);
|
|
512
512
|
}, arguments);
|
|
513
513
|
},
|
|
514
|
-
__wbg_get_index_253dd2a9e007656d: function(A,
|
|
515
|
-
return A[
|
|
514
|
+
__wbg_get_index_253dd2a9e007656d: function(A, g) {
|
|
515
|
+
return A[g >>> 0];
|
|
516
516
|
},
|
|
517
|
-
__wbg_get_index_9a5bfdd2ca49c65f: function(A,
|
|
518
|
-
return A[
|
|
517
|
+
__wbg_get_index_9a5bfdd2ca49c65f: function(A, g) {
|
|
518
|
+
return A[g >>> 0];
|
|
519
519
|
},
|
|
520
|
-
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A,
|
|
521
|
-
return A[
|
|
520
|
+
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A, g) {
|
|
521
|
+
return A[g];
|
|
522
522
|
},
|
|
523
523
|
__wbg_grow_5d42bf28c2da22cb: function() {
|
|
524
|
-
return J(function(A,
|
|
525
|
-
return A.grow(
|
|
524
|
+
return J(function(A, g) {
|
|
525
|
+
return A.grow(g >>> 0);
|
|
526
526
|
}, arguments);
|
|
527
527
|
},
|
|
528
528
|
__wbg_grow_d034989fce14cc8e: function() {
|
|
529
|
-
return J(function(A,
|
|
530
|
-
return A.grow(
|
|
529
|
+
return J(function(A, g) {
|
|
530
|
+
return A.grow(g >>> 0);
|
|
531
531
|
}, arguments);
|
|
532
532
|
},
|
|
533
533
|
__wbg_imports_8333d40ab24779ad: function(A) {
|
|
534
534
|
return WebAssembly.Module.imports(A);
|
|
535
535
|
},
|
|
536
536
|
__wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(A) {
|
|
537
|
-
let
|
|
537
|
+
let g;
|
|
538
538
|
try {
|
|
539
|
-
|
|
539
|
+
g = A instanceof ArrayBuffer;
|
|
540
540
|
} catch {
|
|
541
|
-
|
|
541
|
+
g = !1;
|
|
542
542
|
}
|
|
543
|
-
return
|
|
543
|
+
return g;
|
|
544
544
|
},
|
|
545
545
|
__wbg_instanceof_Error_8573fe0b0b480f46: function(A) {
|
|
546
|
-
let
|
|
546
|
+
let g;
|
|
547
547
|
try {
|
|
548
|
-
|
|
548
|
+
g = A instanceof Error;
|
|
549
549
|
} catch {
|
|
550
|
-
|
|
550
|
+
g = !1;
|
|
551
551
|
}
|
|
552
|
-
return
|
|
552
|
+
return g;
|
|
553
553
|
},
|
|
554
554
|
__wbg_instanceof_Function_2a29eec978bb3b11: function(A) {
|
|
555
|
-
let
|
|
555
|
+
let g;
|
|
556
556
|
try {
|
|
557
|
-
|
|
557
|
+
g = A instanceof Function;
|
|
558
558
|
} catch {
|
|
559
|
-
|
|
559
|
+
g = !1;
|
|
560
560
|
}
|
|
561
|
-
return
|
|
561
|
+
return g;
|
|
562
562
|
},
|
|
563
563
|
__wbg_instanceof_Global_2db767b6b2347f01: function(A) {
|
|
564
|
-
let
|
|
564
|
+
let g;
|
|
565
565
|
try {
|
|
566
|
-
|
|
566
|
+
g = A instanceof WebAssembly.Global;
|
|
567
567
|
} catch {
|
|
568
|
-
|
|
568
|
+
g = !1;
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return g;
|
|
571
571
|
},
|
|
572
572
|
__wbg_instanceof_Map_53af74335dec57f4: function(A) {
|
|
573
|
-
let
|
|
573
|
+
let g;
|
|
574
574
|
try {
|
|
575
|
-
|
|
575
|
+
g = A instanceof Map;
|
|
576
576
|
} catch {
|
|
577
|
-
|
|
577
|
+
g = !1;
|
|
578
578
|
}
|
|
579
|
-
return
|
|
579
|
+
return g;
|
|
580
580
|
},
|
|
581
581
|
__wbg_instanceof_Memory_dc8c61e3f831ee37: function(A) {
|
|
582
|
-
let
|
|
582
|
+
let g;
|
|
583
583
|
try {
|
|
584
|
-
|
|
584
|
+
g = A instanceof WebAssembly.Memory;
|
|
585
585
|
} catch {
|
|
586
|
-
|
|
586
|
+
g = !1;
|
|
587
587
|
}
|
|
588
|
-
return
|
|
588
|
+
return g;
|
|
589
589
|
},
|
|
590
590
|
__wbg_instanceof_Module_d0d412b14363ba9a: function(A) {
|
|
591
|
-
let
|
|
591
|
+
let g;
|
|
592
592
|
try {
|
|
593
|
-
|
|
593
|
+
g = A instanceof WebAssembly.Module;
|
|
594
594
|
} catch {
|
|
595
|
-
|
|
595
|
+
g = !1;
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return g;
|
|
598
598
|
},
|
|
599
599
|
__wbg_instanceof_Object_1c6af87502b733ed: function(A) {
|
|
600
|
-
let
|
|
600
|
+
let g;
|
|
601
601
|
try {
|
|
602
|
-
|
|
602
|
+
g = A instanceof Object;
|
|
603
603
|
} catch {
|
|
604
|
-
|
|
604
|
+
g = !1;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return g;
|
|
607
607
|
},
|
|
608
608
|
__wbg_instanceof_RangeError_0b0dd056bc557b89: function(A) {
|
|
609
|
-
let
|
|
609
|
+
let g;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
g = A instanceof RangeError;
|
|
612
612
|
} catch {
|
|
613
|
-
|
|
613
|
+
g = !1;
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return g;
|
|
616
616
|
},
|
|
617
617
|
__wbg_instanceof_Response_ee1d54d79ae41977: function(A) {
|
|
618
|
-
let
|
|
618
|
+
let g;
|
|
619
619
|
try {
|
|
620
|
-
|
|
620
|
+
g = A instanceof Response;
|
|
621
621
|
} catch {
|
|
622
|
-
|
|
622
|
+
g = !1;
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return g;
|
|
625
625
|
},
|
|
626
626
|
__wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26: function(A) {
|
|
627
|
-
let
|
|
627
|
+
let g;
|
|
628
628
|
try {
|
|
629
|
-
|
|
629
|
+
g = A instanceof SharedArrayBuffer;
|
|
630
630
|
} catch {
|
|
631
|
-
|
|
631
|
+
g = !1;
|
|
632
632
|
}
|
|
633
|
-
return
|
|
633
|
+
return g;
|
|
634
634
|
},
|
|
635
635
|
__wbg_instanceof_Table_127f216e592f4159: function(A) {
|
|
636
|
-
let
|
|
636
|
+
let g;
|
|
637
637
|
try {
|
|
638
|
-
|
|
638
|
+
g = A instanceof WebAssembly.Table;
|
|
639
639
|
} catch {
|
|
640
|
-
|
|
640
|
+
g = !1;
|
|
641
641
|
}
|
|
642
|
-
return
|
|
642
|
+
return g;
|
|
643
643
|
},
|
|
644
644
|
__wbg_instanceof_Tag_f1d6b24a98b95210: function(A) {
|
|
645
|
-
let
|
|
645
|
+
let g;
|
|
646
646
|
try {
|
|
647
|
-
|
|
647
|
+
g = A instanceof WebAssembly.Tag;
|
|
648
648
|
} catch {
|
|
649
|
-
|
|
649
|
+
g = !1;
|
|
650
650
|
}
|
|
651
|
-
return
|
|
651
|
+
return g;
|
|
652
652
|
},
|
|
653
653
|
__wbg_instanceof_Uint8Array_9b9075935c74707c: function(A) {
|
|
654
|
-
let
|
|
654
|
+
let g;
|
|
655
655
|
try {
|
|
656
|
-
|
|
656
|
+
g = A instanceof Uint8Array;
|
|
657
657
|
} catch {
|
|
658
|
-
|
|
658
|
+
g = !1;
|
|
659
659
|
}
|
|
660
|
-
return
|
|
660
|
+
return g;
|
|
661
661
|
},
|
|
662
662
|
__wbg_isArray_d314bb98fcf08331: function(A) {
|
|
663
663
|
return Array.isArray(A);
|
|
@@ -665,8 +665,8 @@ function dA() {
|
|
|
665
665
|
__wbg_isSafeInteger_bfbc7332a9768d2a: function(A) {
|
|
666
666
|
return Number.isSafeInteger(A);
|
|
667
667
|
},
|
|
668
|
-
__wbg_is_f29129f676e5410c: function(A,
|
|
669
|
-
return Object.is(A,
|
|
668
|
+
__wbg_is_f29129f676e5410c: function(A, g) {
|
|
669
|
+
return Object.is(A, g);
|
|
670
670
|
},
|
|
671
671
|
__wbg_iterator_6ff6560ca1568e55: function() {
|
|
672
672
|
return Symbol.iterator;
|
|
@@ -681,8 +681,8 @@ function dA() {
|
|
|
681
681
|
return A.length;
|
|
682
682
|
},
|
|
683
683
|
__wbg_load_eff64ff5e429a422: function() {
|
|
684
|
-
return J(function(A,
|
|
685
|
-
return Atomics.load(A,
|
|
684
|
+
return J(function(A, g) {
|
|
685
|
+
return Atomics.load(A, g >>> 0);
|
|
686
686
|
}, arguments);
|
|
687
687
|
},
|
|
688
688
|
__wbg_message_9ddc4b9a62a7c379: function(A) {
|
|
@@ -697,8 +697,8 @@ function dA() {
|
|
|
697
697
|
__wbg_new_245cd5c49157e602: function(A) {
|
|
698
698
|
return new Date(A);
|
|
699
699
|
},
|
|
700
|
-
__wbg_new_2ac7fa8be584d280: function(A,
|
|
701
|
-
return new DataView(A,
|
|
700
|
+
__wbg_new_2ac7fa8be584d280: function(A, g, I) {
|
|
701
|
+
return new DataView(A, g >>> 0, I >>> 0);
|
|
702
702
|
},
|
|
703
703
|
__wbg_new_361308b2356cecd0: function() {
|
|
704
704
|
return new Object();
|
|
@@ -707,8 +707,8 @@ function dA() {
|
|
|
707
707
|
return new Array();
|
|
708
708
|
},
|
|
709
709
|
__wbg_new_4a996a46a82782b6: function() {
|
|
710
|
-
return J(function(A,
|
|
711
|
-
return new WebAssembly.Global(A,
|
|
710
|
+
return J(function(A, g) {
|
|
711
|
+
return new WebAssembly.Global(A, g);
|
|
712
712
|
}, arguments);
|
|
713
713
|
},
|
|
714
714
|
__wbg_new_57c27ff3ddf5b62c: function() {
|
|
@@ -720,8 +720,8 @@ function dA() {
|
|
|
720
720
|
return new Error();
|
|
721
721
|
},
|
|
722
722
|
__wbg_new_a4e3cab1cdd635ba: function() {
|
|
723
|
-
return J(function(A,
|
|
724
|
-
return new WebAssembly.Instance(A,
|
|
723
|
+
return J(function(A, g) {
|
|
724
|
+
return new WebAssembly.Instance(A, g);
|
|
725
725
|
}, arguments);
|
|
726
726
|
},
|
|
727
727
|
__wbg_new_b061c0550d9f3281: function() {
|
|
@@ -729,20 +729,20 @@ function dA() {
|
|
|
729
729
|
return new WebAssembly.Memory(A);
|
|
730
730
|
}, arguments);
|
|
731
731
|
},
|
|
732
|
-
__wbg_new_b5d9e2fb389fef91: function(A,
|
|
732
|
+
__wbg_new_b5d9e2fb389fef91: function(A, g) {
|
|
733
733
|
try {
|
|
734
|
-
var
|
|
735
|
-
const w =
|
|
736
|
-
|
|
734
|
+
var I = { a: A, b: g }, C = (E, D) => {
|
|
735
|
+
const w = I.a;
|
|
736
|
+
I.a = 0;
|
|
737
737
|
try {
|
|
738
|
-
return
|
|
738
|
+
return zA(w, I.b, E, D);
|
|
739
739
|
} finally {
|
|
740
|
-
|
|
740
|
+
I.a = w;
|
|
741
741
|
}
|
|
742
742
|
};
|
|
743
743
|
return new Promise(C);
|
|
744
744
|
} finally {
|
|
745
|
-
|
|
745
|
+
I.a = I.b = 0;
|
|
746
746
|
}
|
|
747
747
|
},
|
|
748
748
|
__wbg_new_ca409f861989e0c5: function(A) {
|
|
@@ -754,23 +754,23 @@ function dA() {
|
|
|
754
754
|
__wbg_new_dd2b680c8bf6ae29: function(A) {
|
|
755
755
|
return new Uint8Array(A);
|
|
756
756
|
},
|
|
757
|
-
__wbg_new_from_slice_a3d2629dc1826784: function(A,
|
|
758
|
-
return new Uint8Array(
|
|
757
|
+
__wbg_new_from_slice_a3d2629dc1826784: function(A, g) {
|
|
758
|
+
return new Uint8Array(_(A, g));
|
|
759
759
|
},
|
|
760
|
-
__wbg_new_no_args_1c7c842f08d00ebb: function(A,
|
|
761
|
-
return new Function(
|
|
760
|
+
__wbg_new_no_args_1c7c842f08d00ebb: function(A, g) {
|
|
761
|
+
return new Function(p(A, g));
|
|
762
762
|
},
|
|
763
|
-
__wbg_new_with_args_7bba34e94b1cfa40: function(A,
|
|
764
|
-
return new Function(
|
|
763
|
+
__wbg_new_with_args_7bba34e94b1cfa40: function(A, g, I, C) {
|
|
764
|
+
return new Function(p(A, g), p(I, C));
|
|
765
765
|
},
|
|
766
|
-
__wbg_new_with_byte_offset_9120ba79e057895b: function(A,
|
|
767
|
-
return new Uint8Array(A,
|
|
766
|
+
__wbg_new_with_byte_offset_9120ba79e057895b: function(A, g) {
|
|
767
|
+
return new Uint8Array(A, g >>> 0);
|
|
768
768
|
},
|
|
769
|
-
__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A,
|
|
770
|
-
return new Uint8Array(A,
|
|
769
|
+
__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, g, I) {
|
|
770
|
+
return new Uint8Array(A, g >>> 0, I >>> 0);
|
|
771
771
|
},
|
|
772
|
-
__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A,
|
|
773
|
-
return new Int32Array(A,
|
|
772
|
+
__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, g, I) {
|
|
773
|
+
return new Int32Array(A, g >>> 0, I >>> 0);
|
|
774
774
|
},
|
|
775
775
|
__wbg_new_with_length_1763c527b2923202: function(A) {
|
|
776
776
|
return new Array(A >>> 0);
|
|
@@ -790,8 +790,8 @@ function dA() {
|
|
|
790
790
|
return A.node;
|
|
791
791
|
},
|
|
792
792
|
__wbg_notify_78a90977fab74963: function() {
|
|
793
|
-
return J(function(A,
|
|
794
|
-
return Atomics.notify(A,
|
|
793
|
+
return J(function(A, g) {
|
|
794
|
+
return Atomics.notify(A, g >>> 0);
|
|
795
795
|
}, arguments);
|
|
796
796
|
},
|
|
797
797
|
__wbg_now_a3af9a2f4bbaa4d1: function() {
|
|
@@ -804,18 +804,18 @@ function dA() {
|
|
|
804
804
|
return A.ok;
|
|
805
805
|
},
|
|
806
806
|
__wbg_postMessage_2041f4e90af61318: function() {
|
|
807
|
-
return J(function(A,
|
|
808
|
-
A.postMessage(
|
|
807
|
+
return J(function(A, g) {
|
|
808
|
+
A.postMessage(g);
|
|
809
809
|
}, arguments);
|
|
810
810
|
},
|
|
811
811
|
__wbg_process_3975fd6c72f520aa: function(A) {
|
|
812
812
|
return A.process;
|
|
813
813
|
},
|
|
814
|
-
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(A,
|
|
815
|
-
Uint8Array.prototype.set.call(
|
|
814
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, g, I) {
|
|
815
|
+
Uint8Array.prototype.set.call(_(A, g), I);
|
|
816
816
|
},
|
|
817
|
-
__wbg_push_8ffdcb2063340ba5: function(A,
|
|
818
|
-
return A.push(
|
|
817
|
+
__wbg_push_8ffdcb2063340ba5: function(A, g) {
|
|
818
|
+
return A.push(g);
|
|
819
819
|
},
|
|
820
820
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(A) {
|
|
821
821
|
return A.queueMicrotask;
|
|
@@ -824,13 +824,13 @@ function dA() {
|
|
|
824
824
|
queueMicrotask(A);
|
|
825
825
|
},
|
|
826
826
|
__wbg_randomFillSync_f8c153b79f285817: function() {
|
|
827
|
-
return J(function(A,
|
|
828
|
-
A.randomFillSync(
|
|
827
|
+
return J(function(A, g) {
|
|
828
|
+
A.randomFillSync(g);
|
|
829
829
|
}, arguments);
|
|
830
830
|
},
|
|
831
831
|
__wbg_removeEventListener_e63328781a5b9af9: function() {
|
|
832
|
-
return J(function(A,
|
|
833
|
-
A.removeEventListener(
|
|
832
|
+
return J(function(A, g, I, C) {
|
|
833
|
+
A.removeEventListener(p(g, I), C);
|
|
834
834
|
}, arguments);
|
|
835
835
|
},
|
|
836
836
|
__wbg_require_b74f47fc2d022fd6: function() {
|
|
@@ -842,96 +842,96 @@ function dA() {
|
|
|
842
842
|
return Promise.resolve(A);
|
|
843
843
|
},
|
|
844
844
|
__wbg_setTimeout_e0aacd5a637418a6: function() {
|
|
845
|
-
return J(function(A,
|
|
846
|
-
return A.setTimeout(
|
|
845
|
+
return J(function(A, g, I) {
|
|
846
|
+
return A.setTimeout(g, I);
|
|
847
847
|
}, arguments);
|
|
848
848
|
},
|
|
849
|
-
__wbg_setUint32_d168af7751a8557e: function(A,
|
|
850
|
-
A.setUint32(
|
|
849
|
+
__wbg_setUint32_d168af7751a8557e: function(A, g, I, C) {
|
|
850
|
+
A.setUint32(g >>> 0, I >>> 0, C !== 0);
|
|
851
851
|
},
|
|
852
852
|
__wbg_set_0af2522656c2a71b: function() {
|
|
853
|
-
return J(function(A,
|
|
854
|
-
A.set(
|
|
853
|
+
return J(function(A, g, I) {
|
|
854
|
+
A.set(g >>> 0, I);
|
|
855
855
|
}, arguments);
|
|
856
856
|
},
|
|
857
|
-
__wbg_set_1eb0999cf5d27fc8: function(A,
|
|
858
|
-
return A.set(
|
|
857
|
+
__wbg_set_1eb0999cf5d27fc8: function(A, g, I) {
|
|
858
|
+
return A.set(g, I);
|
|
859
859
|
},
|
|
860
|
-
__wbg_set_25cf9deff6bf0ea8: function(A,
|
|
861
|
-
A.set(
|
|
860
|
+
__wbg_set_25cf9deff6bf0ea8: function(A, g, I) {
|
|
861
|
+
A.set(g, I >>> 0);
|
|
862
862
|
},
|
|
863
|
-
__wbg_set_3f1d0b984ed272ed: function(A,
|
|
864
|
-
A[
|
|
863
|
+
__wbg_set_3f1d0b984ed272ed: function(A, g, I) {
|
|
864
|
+
A[g] = I;
|
|
865
865
|
},
|
|
866
866
|
__wbg_set_6cb8631f80447a67: function() {
|
|
867
|
-
return J(function(A,
|
|
868
|
-
return Reflect.set(A,
|
|
867
|
+
return J(function(A, g, I) {
|
|
868
|
+
return Reflect.set(A, g, I);
|
|
869
869
|
}, arguments);
|
|
870
870
|
},
|
|
871
|
-
__wbg_set_cc56eefd2dd91957: function(A,
|
|
872
|
-
A.set(
|
|
871
|
+
__wbg_set_cc56eefd2dd91957: function(A, g, I) {
|
|
872
|
+
A.set(_(g, I));
|
|
873
873
|
},
|
|
874
|
-
__wbg_set_f43e577aea94465b: function(A,
|
|
875
|
-
A[
|
|
874
|
+
__wbg_set_f43e577aea94465b: function(A, g, I) {
|
|
875
|
+
A[g >>> 0] = I;
|
|
876
876
|
},
|
|
877
|
-
__wbg_set_index_b3244a6c458021e4: function(A,
|
|
878
|
-
A[
|
|
877
|
+
__wbg_set_index_b3244a6c458021e4: function(A, g, I) {
|
|
878
|
+
A[g >>> 0] = I;
|
|
879
879
|
},
|
|
880
|
-
__wbg_set_index_f259b54e97f7b177: function(A,
|
|
881
|
-
A[
|
|
880
|
+
__wbg_set_index_f259b54e97f7b177: function(A, g, I) {
|
|
881
|
+
A[g >>> 0] = I;
|
|
882
882
|
},
|
|
883
|
-
__wbg_set_onmessage_ea7cc2ba099021cd: function(A,
|
|
884
|
-
A.onmessage =
|
|
883
|
+
__wbg_set_onmessage_ea7cc2ba099021cd: function(A, g) {
|
|
884
|
+
A.onmessage = g;
|
|
885
885
|
},
|
|
886
|
-
__wbg_set_value_fc06e541de098215: function(A,
|
|
887
|
-
A.value =
|
|
886
|
+
__wbg_set_value_fc06e541de098215: function(A, g) {
|
|
887
|
+
A.value = g;
|
|
888
888
|
},
|
|
889
|
-
__wbg_slice_8bbd46adb2100583: function(A,
|
|
890
|
-
return A.slice(
|
|
889
|
+
__wbg_slice_8bbd46adb2100583: function(A, g, I) {
|
|
890
|
+
return A.slice(g >>> 0, I >>> 0);
|
|
891
891
|
},
|
|
892
|
-
__wbg_stack_0ed75d68575b0f3c: function(A,
|
|
893
|
-
const
|
|
894
|
-
|
|
892
|
+
__wbg_stack_0ed75d68575b0f3c: function(A, g) {
|
|
893
|
+
const I = g.stack, C = Z(I, M.__wbindgen_malloc, M.__wbindgen_realloc), B = x;
|
|
894
|
+
H().setInt32(A + 4, B, !0), H().setInt32(A + 0, C, !0);
|
|
895
895
|
},
|
|
896
896
|
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
897
897
|
const A = typeof global > "u" ? null : global;
|
|
898
|
-
return
|
|
898
|
+
return j(A) ? 0 : X(A);
|
|
899
899
|
},
|
|
900
900
|
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
901
901
|
const A = typeof globalThis > "u" ? null : globalThis;
|
|
902
|
-
return
|
|
902
|
+
return j(A) ? 0 : X(A);
|
|
903
903
|
},
|
|
904
904
|
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
905
905
|
const A = typeof self > "u" ? null : self;
|
|
906
|
-
return
|
|
906
|
+
return j(A) ? 0 : X(A);
|
|
907
907
|
},
|
|
908
908
|
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
909
909
|
const A = typeof window > "u" ? null : window;
|
|
910
|
-
return
|
|
910
|
+
return j(A) ? 0 : X(A);
|
|
911
911
|
},
|
|
912
912
|
__wbg_store_d1d951c98d9bed41: function() {
|
|
913
|
-
return J(function(A,
|
|
914
|
-
return Atomics.store(A,
|
|
913
|
+
return J(function(A, g, I) {
|
|
914
|
+
return Atomics.store(A, g >>> 0, I);
|
|
915
915
|
}, arguments);
|
|
916
916
|
},
|
|
917
|
-
__wbg_subarray_a96e1fef17ed23cb: function(A,
|
|
918
|
-
return A.subarray(
|
|
917
|
+
__wbg_subarray_a96e1fef17ed23cb: function(A, g, I) {
|
|
918
|
+
return A.subarray(g >>> 0, I >>> 0);
|
|
919
919
|
},
|
|
920
|
-
__wbg_then_0d9fe2c7b1857d32: function(A,
|
|
921
|
-
return A.then(
|
|
920
|
+
__wbg_then_0d9fe2c7b1857d32: function(A, g, I) {
|
|
921
|
+
return A.then(g, I);
|
|
922
922
|
},
|
|
923
|
-
__wbg_then_b9e7b3b5f1a9e1b5: function(A,
|
|
924
|
-
return A.then(
|
|
923
|
+
__wbg_then_b9e7b3b5f1a9e1b5: function(A, g) {
|
|
924
|
+
return A.then(g);
|
|
925
925
|
},
|
|
926
|
-
__wbg_toString_56d946daff83867b: function(A,
|
|
927
|
-
const C =
|
|
928
|
-
|
|
926
|
+
__wbg_toString_56d946daff83867b: function(A, g, I) {
|
|
927
|
+
const C = g.toString(I), B = Z(C, M.__wbindgen_malloc, M.__wbindgen_realloc), E = x;
|
|
928
|
+
H().setInt32(A + 4, E, !0), H().setInt32(A + 0, B, !0);
|
|
929
929
|
},
|
|
930
930
|
__wbg_toString_964ff7fe6eca8362: function(A) {
|
|
931
931
|
return A.toString();
|
|
932
932
|
},
|
|
933
933
|
__wbg_trap_new: function(A) {
|
|
934
|
-
return
|
|
934
|
+
return n.__wrap(A);
|
|
935
935
|
},
|
|
936
936
|
__wbg_validate_71c2d02a71bda62f: function() {
|
|
937
937
|
return J(function(A) {
|
|
@@ -947,31 +947,36 @@ function dA() {
|
|
|
947
947
|
__wbg_versions_4e31226f5e8dc909: function(A) {
|
|
948
948
|
return A.versions;
|
|
949
949
|
},
|
|
950
|
+
__wbg_wait_5404654a64e22842: function() {
|
|
951
|
+
return J(function(A, g, I, C) {
|
|
952
|
+
return Atomics.wait(A, g >>> 0, I, C);
|
|
953
|
+
}, arguments);
|
|
954
|
+
},
|
|
950
955
|
__wbg_wait_be5dae1e53f590f1: function() {
|
|
951
|
-
return J(function(A,
|
|
952
|
-
return Atomics.wait(A,
|
|
956
|
+
return J(function(A, g, I) {
|
|
957
|
+
return Atomics.wait(A, g >>> 0, I);
|
|
953
958
|
}, arguments);
|
|
954
959
|
},
|
|
955
|
-
__wbg_warn_81ab00e6e16e886d: function(A,
|
|
956
|
-
console.warn(A,
|
|
960
|
+
__wbg_warn_81ab00e6e16e886d: function(A, g, I) {
|
|
961
|
+
console.warn(A, g, I);
|
|
957
962
|
},
|
|
958
|
-
__wbindgen_cast_0000000000000001: function(A,
|
|
959
|
-
return
|
|
963
|
+
__wbindgen_cast_0000000000000001: function(A, g) {
|
|
964
|
+
return fA(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__Fn__web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent____Output_______, WA);
|
|
960
965
|
},
|
|
961
|
-
__wbindgen_cast_0000000000000002: function(A,
|
|
962
|
-
return z(A,
|
|
966
|
+
__wbindgen_cast_0000000000000002: function(A, g) {
|
|
967
|
+
return z(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__Fn__web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent____Output_______, ZA);
|
|
963
968
|
},
|
|
964
|
-
__wbindgen_cast_0000000000000003: function(A,
|
|
965
|
-
return z(A,
|
|
969
|
+
__wbindgen_cast_0000000000000003: function(A, g) {
|
|
970
|
+
return z(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___, kA);
|
|
966
971
|
},
|
|
967
|
-
__wbindgen_cast_0000000000000004: function(A,
|
|
968
|
-
return z(A,
|
|
972
|
+
__wbindgen_cast_0000000000000004: function(A, g) {
|
|
973
|
+
return z(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___, kA);
|
|
969
974
|
},
|
|
970
|
-
__wbindgen_cast_0000000000000005: function(A,
|
|
971
|
-
return z(A,
|
|
975
|
+
__wbindgen_cast_0000000000000005: function(A, g) {
|
|
976
|
+
return z(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_for__a__core_d941ad8722425d2e___ops__function__FnMut____a_js_sys_662c4dd2f34eb95c___Array____Output___core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue___, tA);
|
|
972
977
|
},
|
|
973
|
-
__wbindgen_cast_0000000000000006: function(A,
|
|
974
|
-
return z(A,
|
|
978
|
+
__wbindgen_cast_0000000000000006: function(A, g) {
|
|
979
|
+
return z(A, g, M.wasm_bindgen_8243b1be48d1cf33___closure__destroy___dyn_core_d941ad8722425d2e___ops__function__FnMut__wasm_bindgen_8243b1be48d1cf33___JsValue____Output_______, TA);
|
|
975
980
|
},
|
|
976
981
|
__wbindgen_cast_0000000000000007: function(A) {
|
|
977
982
|
return A;
|
|
@@ -979,61 +984,61 @@ function dA() {
|
|
|
979
984
|
__wbindgen_cast_0000000000000008: function(A) {
|
|
980
985
|
return A;
|
|
981
986
|
},
|
|
982
|
-
__wbindgen_cast_0000000000000009: function(A,
|
|
983
|
-
return
|
|
987
|
+
__wbindgen_cast_0000000000000009: function(A, g) {
|
|
988
|
+
return _(A, g);
|
|
984
989
|
},
|
|
985
|
-
__wbindgen_cast_000000000000000a: function(A,
|
|
986
|
-
return
|
|
990
|
+
__wbindgen_cast_000000000000000a: function(A, g) {
|
|
991
|
+
return p(A, g);
|
|
987
992
|
},
|
|
988
|
-
__wbindgen_cast_000000000000000b: function(A,
|
|
989
|
-
return BigInt.asUintN(64, A) | BigInt.asUintN(64,
|
|
993
|
+
__wbindgen_cast_000000000000000b: function(A, g) {
|
|
994
|
+
return BigInt.asUintN(64, A) | BigInt.asUintN(64, g) << BigInt(64);
|
|
990
995
|
},
|
|
991
996
|
__wbindgen_cast_000000000000000c: function(A) {
|
|
992
997
|
return BigInt.asUintN(64, A);
|
|
993
998
|
},
|
|
994
999
|
__wbindgen_init_externref_table: function() {
|
|
995
|
-
const A =
|
|
996
|
-
A.set(0, void 0), A.set(
|
|
1000
|
+
const A = M.__wbindgen_externrefs, g = A.grow(4);
|
|
1001
|
+
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);
|
|
997
1002
|
}
|
|
998
1003
|
}
|
|
999
1004
|
};
|
|
1000
1005
|
}
|
|
1001
|
-
function WA(Q, A,
|
|
1002
|
-
|
|
1006
|
+
function WA(Q, A, g) {
|
|
1007
|
+
M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
|
|
1003
1008
|
}
|
|
1004
|
-
function ZA(Q, A,
|
|
1005
|
-
|
|
1009
|
+
function ZA(Q, A, g) {
|
|
1010
|
+
M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___web_sys_9db025406f626889___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
|
|
1006
1011
|
}
|
|
1007
|
-
function TA(Q, A,
|
|
1008
|
-
|
|
1012
|
+
function TA(Q, A, g) {
|
|
1013
|
+
M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___wasm_bindgen_8243b1be48d1cf33___JsValue_____(Q, A, g);
|
|
1009
1014
|
}
|
|
1010
|
-
function
|
|
1011
|
-
const
|
|
1012
|
-
if (
|
|
1013
|
-
throw
|
|
1015
|
+
function tA(Q, A, g) {
|
|
1016
|
+
const I = M.wasm_bindgen_8243b1be48d1cf33___convert__closures________invoke___js_sys_662c4dd2f34eb95c___Array__core_d941ad8722425d2e___result__Result_____wasm_bindgen_8243b1be48d1cf33___JsValue__(Q, A, g);
|
|
1017
|
+
if (I[1])
|
|
1018
|
+
throw wA(I[0]);
|
|
1014
1019
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const
|
|
1017
|
-
if (
|
|
1018
|
-
throw
|
|
1019
|
-
return
|
|
1020
|
+
function kA(Q, A, g) {
|
|
1021
|
+
const I = M.wasm_bindgen_8243b1be48d1cf33___convert__closures________invoke___js_sys_662c4dd2f34eb95c___Array__core_d941ad8722425d2e___result__Result_js_sys_662c4dd2f34eb95c___Array__wasm_bindgen_8243b1be48d1cf33___JsValue__(Q, A, g);
|
|
1022
|
+
if (I[2])
|
|
1023
|
+
throw wA(I[1]);
|
|
1024
|
+
return wA(I[0]);
|
|
1020
1025
|
}
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1026
|
+
function zA(Q, A, g, I) {
|
|
1027
|
+
M.wasm_bindgen_8243b1be48d1cf33___convert__closures_____invoke___wasm_bindgen_8243b1be48d1cf33___JsValue__wasm_bindgen_8243b1be48d1cf33___JsValue_____(Q, A, g, I);
|
|
1023
1028
|
}
|
|
1024
|
-
const
|
|
1029
|
+
const GA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1025
1030
|
}, unregister: () => {
|
|
1026
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1031
|
+
} } : new FinalizationRegistry((Q) => M.__wbg_dapadapter_free(Q >>> 0, 1)), yA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1027
1032
|
}, unregister: () => {
|
|
1028
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1029
|
-
function
|
|
1030
|
-
const A =
|
|
1031
|
-
return
|
|
1033
|
+
} } : new FinalizationRegistry((Q) => M.__wbg_trap_free(Q >>> 0, 1));
|
|
1034
|
+
function X(Q) {
|
|
1035
|
+
const A = M.__externref_table_alloc();
|
|
1036
|
+
return M.__wbindgen_externrefs.set(A, Q), A;
|
|
1032
1037
|
}
|
|
1033
1038
|
const IA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1034
1039
|
}, unregister: () => {
|
|
1035
1040
|
} } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
|
|
1036
|
-
function
|
|
1041
|
+
function DA(Q) {
|
|
1037
1042
|
const A = typeof Q;
|
|
1038
1043
|
if (A == "number" || A == "boolean" || Q == null)
|
|
1039
1044
|
return `${Q}`;
|
|
@@ -1050,63 +1055,63 @@ function EA(Q) {
|
|
|
1050
1055
|
if (Array.isArray(Q)) {
|
|
1051
1056
|
const C = Q.length;
|
|
1052
1057
|
let B = "[";
|
|
1053
|
-
C > 0 && (B +=
|
|
1058
|
+
C > 0 && (B += DA(Q[0]));
|
|
1054
1059
|
for (let E = 1; E < C; E++)
|
|
1055
|
-
B += ", " +
|
|
1060
|
+
B += ", " + DA(Q[E]);
|
|
1056
1061
|
return B += "]", B;
|
|
1057
1062
|
}
|
|
1058
|
-
const
|
|
1059
|
-
let
|
|
1060
|
-
if (
|
|
1061
|
-
|
|
1063
|
+
const g = /\[object ([^\]]+)\]/.exec(toString.call(Q));
|
|
1064
|
+
let I;
|
|
1065
|
+
if (g && g.length > 1)
|
|
1066
|
+
I = g[1];
|
|
1062
1067
|
else
|
|
1063
1068
|
return toString.call(Q);
|
|
1064
|
-
if (
|
|
1069
|
+
if (I == "Object")
|
|
1065
1070
|
try {
|
|
1066
1071
|
return "Object(" + JSON.stringify(Q) + ")";
|
|
1067
1072
|
} catch {
|
|
1068
1073
|
return "Object";
|
|
1069
1074
|
}
|
|
1070
1075
|
return Q instanceof Error ? `${Q.name}: ${Q.message}
|
|
1071
|
-
${Q.stack}` :
|
|
1076
|
+
${Q.stack}` : I;
|
|
1072
1077
|
}
|
|
1073
|
-
function
|
|
1078
|
+
function lA(Q, A) {
|
|
1074
1079
|
Q = Q >>> 0;
|
|
1075
|
-
const
|
|
1080
|
+
const g = H(), I = [];
|
|
1076
1081
|
for (let C = Q; C < Q + 4 * A; C += 4)
|
|
1077
|
-
|
|
1078
|
-
return
|
|
1082
|
+
I.push(M.__wbindgen_externrefs.get(g.getUint32(C, !0)));
|
|
1083
|
+
return M.__externref_drop_slice(Q, A), I;
|
|
1079
1084
|
}
|
|
1080
|
-
function
|
|
1081
|
-
return Q = Q >>> 0,
|
|
1085
|
+
function _(Q, A) {
|
|
1086
|
+
return Q = Q >>> 0, m().subarray(Q / 1, Q / 1 + A);
|
|
1082
1087
|
}
|
|
1083
|
-
let
|
|
1084
|
-
function
|
|
1085
|
-
return (
|
|
1088
|
+
let W = null;
|
|
1089
|
+
function H() {
|
|
1090
|
+
return (W === null || W.buffer.detached === !0 || W.buffer.detached === void 0 && W.buffer !== M.memory.buffer) && (W = new DataView(M.memory.buffer)), W;
|
|
1086
1091
|
}
|
|
1087
|
-
function
|
|
1088
|
-
return Q = Q >>> 0,
|
|
1092
|
+
function p(Q, A) {
|
|
1093
|
+
return Q = Q >>> 0, bA(Q, A);
|
|
1089
1094
|
}
|
|
1090
|
-
let
|
|
1091
|
-
function
|
|
1092
|
-
return (
|
|
1095
|
+
let b = null;
|
|
1096
|
+
function m() {
|
|
1097
|
+
return (b === null || b.byteLength === 0) && (b = new Uint8Array(M.memory.buffer)), b;
|
|
1093
1098
|
}
|
|
1094
1099
|
function J(Q, A) {
|
|
1095
1100
|
try {
|
|
1096
1101
|
return Q.apply(this, A);
|
|
1097
|
-
} catch (
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1102
|
+
} catch (g) {
|
|
1103
|
+
const I = X(g);
|
|
1104
|
+
M.__wbindgen_exn_store(I);
|
|
1100
1105
|
}
|
|
1101
1106
|
}
|
|
1102
|
-
function
|
|
1107
|
+
function j(Q) {
|
|
1103
1108
|
return Q == null;
|
|
1104
1109
|
}
|
|
1105
|
-
function
|
|
1106
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
1110
|
+
function fA(Q, A, g, I) {
|
|
1111
|
+
const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...E) => {
|
|
1107
1112
|
C.cnt++;
|
|
1108
1113
|
try {
|
|
1109
|
-
return
|
|
1114
|
+
return I(C.a, C.b, ...E);
|
|
1110
1115
|
} finally {
|
|
1111
1116
|
B._wbg_cb_unref();
|
|
1112
1117
|
}
|
|
@@ -1115,13 +1120,13 @@ function lA(Q, A, I, g) {
|
|
|
1115
1120
|
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
|
|
1116
1121
|
}, IA.register(B, C, C), B;
|
|
1117
1122
|
}
|
|
1118
|
-
function z(Q, A,
|
|
1119
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
1123
|
+
function z(Q, A, g, I) {
|
|
1124
|
+
const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...E) => {
|
|
1120
1125
|
C.cnt++;
|
|
1121
1126
|
const D = C.a;
|
|
1122
1127
|
C.a = 0;
|
|
1123
1128
|
try {
|
|
1124
|
-
return
|
|
1129
|
+
return I(D, C.b, ...E);
|
|
1125
1130
|
} finally {
|
|
1126
1131
|
C.a = D, B._wbg_cb_unref();
|
|
1127
1132
|
}
|
|
@@ -1130,68 +1135,68 @@ function z(Q, A, I, g) {
|
|
|
1130
1135
|
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
|
|
1131
1136
|
}, IA.register(B, C, C), B;
|
|
1132
1137
|
}
|
|
1133
|
-
function
|
|
1134
|
-
if (
|
|
1135
|
-
const D =
|
|
1136
|
-
return
|
|
1138
|
+
function Z(Q, A, g) {
|
|
1139
|
+
if (g === void 0) {
|
|
1140
|
+
const D = P.encode(Q), w = A(D.length, 1) >>> 0;
|
|
1141
|
+
return m().subarray(w, w + D.length).set(D), x = D.length, w;
|
|
1137
1142
|
}
|
|
1138
|
-
let
|
|
1139
|
-
const B =
|
|
1143
|
+
let I = Q.length, C = A(I, 1) >>> 0;
|
|
1144
|
+
const B = m();
|
|
1140
1145
|
let E = 0;
|
|
1141
|
-
for (; E <
|
|
1146
|
+
for (; E < I; E++) {
|
|
1142
1147
|
const D = Q.charCodeAt(E);
|
|
1143
1148
|
if (D > 127) break;
|
|
1144
1149
|
B[C + E] = D;
|
|
1145
1150
|
}
|
|
1146
|
-
if (E !==
|
|
1147
|
-
E !== 0 && (Q = Q.slice(E)), C =
|
|
1148
|
-
const D =
|
|
1149
|
-
E += w.written, C =
|
|
1151
|
+
if (E !== I) {
|
|
1152
|
+
E !== 0 && (Q = Q.slice(E)), C = g(C, I, I = E + Q.length * 3, 1) >>> 0;
|
|
1153
|
+
const D = m().subarray(C + E, C + I), w = P.encodeInto(Q, D);
|
|
1154
|
+
E += w.written, C = g(C, I, E, 1) >>> 0;
|
|
1150
1155
|
}
|
|
1151
|
-
return
|
|
1156
|
+
return x = E, C;
|
|
1152
1157
|
}
|
|
1153
|
-
function
|
|
1154
|
-
const A =
|
|
1155
|
-
return
|
|
1158
|
+
function wA(Q) {
|
|
1159
|
+
const A = M.__wbindgen_externrefs.get(Q);
|
|
1160
|
+
return M.__externref_table_dealloc(Q), A;
|
|
1156
1161
|
}
|
|
1157
|
-
let
|
|
1158
|
-
|
|
1159
|
-
const
|
|
1160
|
-
let
|
|
1161
|
-
function
|
|
1162
|
-
return
|
|
1162
|
+
let AA = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1163
|
+
AA.decode();
|
|
1164
|
+
const XA = 2146435072;
|
|
1165
|
+
let QA = 0;
|
|
1166
|
+
function bA(Q, A) {
|
|
1167
|
+
return QA += A, QA >= XA && (AA = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), AA.decode(), QA = A), AA.decode(m().subarray(Q, Q + A));
|
|
1163
1168
|
}
|
|
1164
|
-
const
|
|
1165
|
-
"encodeInto" in
|
|
1166
|
-
const
|
|
1167
|
-
return A.set(
|
|
1169
|
+
const P = new TextEncoder();
|
|
1170
|
+
"encodeInto" in P || (P.encodeInto = function(Q, A) {
|
|
1171
|
+
const g = P.encode(Q);
|
|
1172
|
+
return A.set(g), {
|
|
1168
1173
|
read: Q.length,
|
|
1169
|
-
written:
|
|
1174
|
+
written: g.length
|
|
1170
1175
|
};
|
|
1171
1176
|
});
|
|
1172
|
-
let
|
|
1173
|
-
function
|
|
1174
|
-
return
|
|
1177
|
+
let x = 0, M;
|
|
1178
|
+
function mA(Q, A) {
|
|
1179
|
+
return M = Q.exports, W = null, b = null, M.__wbindgen_start(), M;
|
|
1175
1180
|
}
|
|
1176
|
-
async function
|
|
1181
|
+
async function PA(Q, A) {
|
|
1177
1182
|
if (typeof Response == "function" && Q instanceof Response) {
|
|
1178
1183
|
if (typeof WebAssembly.instantiateStreaming == "function")
|
|
1179
1184
|
try {
|
|
1180
1185
|
return await WebAssembly.instantiateStreaming(Q, A);
|
|
1181
1186
|
} catch (C) {
|
|
1182
|
-
if (Q.ok &&
|
|
1187
|
+
if (Q.ok && g(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
|
|
1183
1188
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", C);
|
|
1184
1189
|
else
|
|
1185
1190
|
throw C;
|
|
1186
1191
|
}
|
|
1187
|
-
const
|
|
1188
|
-
return await WebAssembly.instantiate(
|
|
1192
|
+
const I = await Q.arrayBuffer();
|
|
1193
|
+
return await WebAssembly.instantiate(I, A);
|
|
1189
1194
|
} else {
|
|
1190
|
-
const
|
|
1191
|
-
return
|
|
1195
|
+
const I = await WebAssembly.instantiate(Q, A);
|
|
1196
|
+
return I instanceof WebAssembly.Instance ? { instance: I, module: Q } : I;
|
|
1192
1197
|
}
|
|
1193
|
-
function I
|
|
1194
|
-
switch (
|
|
1198
|
+
function g(I) {
|
|
1199
|
+
switch (I) {
|
|
1195
1200
|
case "basic":
|
|
1196
1201
|
case "cors":
|
|
1197
1202
|
case "default":
|
|
@@ -1200,21 +1205,21 @@ async function mA(Q, A) {
|
|
|
1200
1205
|
return !1;
|
|
1201
1206
|
}
|
|
1202
1207
|
}
|
|
1203
|
-
async function
|
|
1204
|
-
if (
|
|
1208
|
+
async function rA(Q) {
|
|
1209
|
+
if (M !== void 0) return M;
|
|
1205
1210
|
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));
|
|
1206
|
-
const A =
|
|
1211
|
+
const A = VA();
|
|
1207
1212
|
(typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
|
|
1208
|
-
const { instance:
|
|
1209
|
-
return
|
|
1213
|
+
const { instance: g, module: I } = await PA(await Q, A);
|
|
1214
|
+
return mA(g);
|
|
1210
1215
|
}
|
|
1211
|
-
const
|
|
1216
|
+
const nA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.10.0/dist/engine_bg.wasm"), eA = Object.freeze({
|
|
1212
1217
|
maxObjectBytes: 128 * 1024 * 1024,
|
|
1213
1218
|
maxEntries: 256,
|
|
1214
1219
|
maxMetadataBytes: 8 * 1024 * 1024,
|
|
1215
1220
|
maxEntryMetadataBytes: 1024 * 1024
|
|
1216
1221
|
});
|
|
1217
|
-
class
|
|
1222
|
+
class uA {
|
|
1218
1223
|
records = /* @__PURE__ */ new Map();
|
|
1219
1224
|
staged = /* @__PURE__ */ new Map();
|
|
1220
1225
|
stagingFailed = !1;
|
|
@@ -1224,9 +1229,9 @@ class vA {
|
|
|
1224
1229
|
oversized = 0;
|
|
1225
1230
|
limits;
|
|
1226
1231
|
constructor(A = {}) {
|
|
1227
|
-
this.limits = Object.freeze({ ...
|
|
1228
|
-
for (const
|
|
1229
|
-
if (!Number.isSafeInteger(
|
|
1232
|
+
this.limits = Object.freeze({ ...eA, ...A });
|
|
1233
|
+
for (const g of Object.values(this.limits))
|
|
1234
|
+
if (!Number.isSafeInteger(g) || g < 0)
|
|
1230
1235
|
throw new RangeError("C++ cache limits must be nonnegative safe integers");
|
|
1231
1236
|
}
|
|
1232
1237
|
beginBatch() {
|
|
@@ -1235,23 +1240,23 @@ class vA {
|
|
|
1235
1240
|
/** Stage against the same storage budget, before copying any optional object. */
|
|
1236
1241
|
stage(A) {
|
|
1237
1242
|
if (this.stagingFailed) return;
|
|
1238
|
-
const
|
|
1239
|
-
if (
|
|
1243
|
+
const g = this.recordSize(A);
|
|
1244
|
+
if (g === void 0 || this.staged.has(A.source)) {
|
|
1240
1245
|
this.failBatch();
|
|
1241
1246
|
return;
|
|
1242
1247
|
}
|
|
1243
|
-
const
|
|
1244
|
-
for (; this.records.size && (this.records.size + this.staged.size >=
|
|
1248
|
+
const I = this.limits;
|
|
1249
|
+
for (; this.records.size && (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes); )
|
|
1245
1250
|
this.remove(this.records.keys().next().value), this.evictions++;
|
|
1246
|
-
if (this.records.size + this.staged.size >=
|
|
1251
|
+
if (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
|
|
1247
1252
|
this.oversized++, this.failBatch();
|
|
1248
1253
|
return;
|
|
1249
1254
|
}
|
|
1250
1255
|
this.staged.set(A.source, {
|
|
1251
1256
|
...A,
|
|
1252
1257
|
object: new Uint8Array(A.object),
|
|
1253
|
-
metadataBytes:
|
|
1254
|
-
}), this.objectBytes += A.object.byteLength, this.metadataBytes +=
|
|
1258
|
+
metadataBytes: g
|
|
1259
|
+
}), this.objectBytes += A.object.byteLength, this.metadataBytes += g;
|
|
1255
1260
|
}
|
|
1256
1261
|
abandonBatch() {
|
|
1257
1262
|
this.failBatch();
|
|
@@ -1260,7 +1265,7 @@ class vA {
|
|
|
1260
1265
|
this.discardBatch(), this.stagingFailed = !0;
|
|
1261
1266
|
}
|
|
1262
1267
|
recordSize(A) {
|
|
1263
|
-
if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((
|
|
1268
|
+
if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((g) => !g || g === "." || g === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.key) || !/^[a-f0-9]{64}$/.test(A.object_hash) || A.receipt != null && typeof A.receipt != "string" || !(A.object instanceof Uint8Array)))
|
|
1264
1269
|
return new TextEncoder().encode(
|
|
1265
1270
|
JSON.stringify({
|
|
1266
1271
|
source: A.source,
|
|
@@ -1273,19 +1278,19 @@ class vA {
|
|
|
1273
1278
|
async validateBatch() {
|
|
1274
1279
|
if (this.stagingFailed) return !1;
|
|
1275
1280
|
const A = [...this.staged.values()];
|
|
1276
|
-
for (const
|
|
1277
|
-
if (!
|
|
1278
|
-
const
|
|
1281
|
+
for (const g of A) {
|
|
1282
|
+
if (!vA(g.object)) return !1;
|
|
1283
|
+
const I = await crypto.subtle.digest("SHA-256", g.object);
|
|
1279
1284
|
if (Array.from(
|
|
1280
|
-
new Uint8Array(
|
|
1285
|
+
new Uint8Array(I),
|
|
1281
1286
|
(B) => B.toString(16).padStart(2, "0")
|
|
1282
|
-
).join("") !==
|
|
1287
|
+
).join("") !== g.object_hash) return !1;
|
|
1283
1288
|
}
|
|
1284
1289
|
return !0;
|
|
1285
1290
|
}
|
|
1286
1291
|
commitBatch() {
|
|
1287
|
-
for (const [A,
|
|
1288
|
-
this.remove(A), this.records.set(A,
|
|
1292
|
+
for (const [A, g] of this.staged)
|
|
1293
|
+
this.remove(A), this.records.set(A, g);
|
|
1289
1294
|
this.staged.clear(), this.stagingFailed = !1;
|
|
1290
1295
|
}
|
|
1291
1296
|
discardBatch() {
|
|
@@ -1294,40 +1299,40 @@ class vA {
|
|
|
1294
1299
|
this.staged.clear();
|
|
1295
1300
|
}
|
|
1296
1301
|
snapshot() {
|
|
1297
|
-
return [...this.records.values()].map(({ source: A, key:
|
|
1302
|
+
return [...this.records.values()].map(({ source: A, key: g, object_hash: I, object: C, receipt: B }) => ({
|
|
1298
1303
|
source: A,
|
|
1299
|
-
key:
|
|
1300
|
-
object_hash:
|
|
1304
|
+
key: g,
|
|
1305
|
+
object_hash: I,
|
|
1301
1306
|
...B == null ? {} : { receipt: B },
|
|
1302
1307
|
object: C.slice()
|
|
1303
1308
|
}));
|
|
1304
1309
|
}
|
|
1305
1310
|
/** Worker hits are the only accesses that move an entry to the LRU tail. */
|
|
1306
1311
|
touch(A) {
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1312
|
+
const g = this.records.get(A);
|
|
1313
|
+
g && (this.records.delete(A), this.records.set(A, g));
|
|
1309
1314
|
}
|
|
1310
1315
|
put(A) {
|
|
1311
1316
|
if (typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((B) => !B || B === "." || B === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.object_hash) || !/^[a-f0-9]{64}$/.test(A.key) || !(A.object instanceof Uint8Array))
|
|
1312
1317
|
return;
|
|
1313
|
-
const
|
|
1314
|
-
if (
|
|
1315
|
-
const
|
|
1316
|
-
if (this.remove(A.source),
|
|
1318
|
+
const g = this.recordSize(A);
|
|
1319
|
+
if (g === void 0) return;
|
|
1320
|
+
const I = this.limits;
|
|
1321
|
+
if (this.remove(A.source), I.maxEntries === 0 || A.object.byteLength > I.maxObjectBytes || g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
|
|
1317
1322
|
this.oversized++;
|
|
1318
1323
|
return;
|
|
1319
1324
|
}
|
|
1320
|
-
for (; this.records.size >=
|
|
1325
|
+
for (; this.records.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes; )
|
|
1321
1326
|
this.remove(this.records.keys().next().value), this.evictions++;
|
|
1322
|
-
const C = { ...A, object: new Uint8Array(A.object), metadataBytes:
|
|
1323
|
-
this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes +=
|
|
1327
|
+
const C = { ...A, object: new Uint8Array(A.object), metadataBytes: g };
|
|
1328
|
+
this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += g;
|
|
1324
1329
|
}
|
|
1325
1330
|
delete(A) {
|
|
1326
1331
|
this.remove(A);
|
|
1327
1332
|
}
|
|
1328
1333
|
remove(A) {
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1334
|
+
const g = this.records.get(A);
|
|
1335
|
+
g && (this.objectBytes -= g.object.byteLength, this.metadataBytes -= g.metadataBytes, this.records.delete(A));
|
|
1331
1336
|
}
|
|
1332
1337
|
clear() {
|
|
1333
1338
|
this.records.clear(), this.staged.clear(), this.stagingFailed = !1, this.objectBytes = this.metadataBytes = 0;
|
|
@@ -1339,11 +1344,11 @@ class vA {
|
|
|
1339
1344
|
entries: this.records.size,
|
|
1340
1345
|
stagingEntries: this.staged.size,
|
|
1341
1346
|
stagingObjectBytes: [...this.staged.values()].reduce(
|
|
1342
|
-
(A,
|
|
1347
|
+
(A, g) => A + g.object.byteLength,
|
|
1343
1348
|
0
|
|
1344
1349
|
),
|
|
1345
1350
|
stagingMetadataBytes: [...this.staged.values()].reduce(
|
|
1346
|
-
(A,
|
|
1351
|
+
(A, g) => A + g.metadataBytes,
|
|
1347
1352
|
0
|
|
1348
1353
|
),
|
|
1349
1354
|
evictions: this.evictions,
|
|
@@ -1351,10 +1356,10 @@ class vA {
|
|
|
1351
1356
|
};
|
|
1352
1357
|
}
|
|
1353
1358
|
}
|
|
1354
|
-
function
|
|
1359
|
+
function vA(Q) {
|
|
1355
1360
|
if (!WebAssembly.validate(Q) || Q.length < 8) return !1;
|
|
1356
|
-
let A = 8,
|
|
1357
|
-
const
|
|
1361
|
+
let A = 8, g = !1;
|
|
1362
|
+
const I = () => {
|
|
1358
1363
|
let C = 0, B = 0;
|
|
1359
1364
|
for (let E = 0; E < 5 && A < Q.length; E++, B += 7) {
|
|
1360
1365
|
const D = Q[A++];
|
|
@@ -1364,20 +1369,20 @@ function uA(Q) {
|
|
|
1364
1369
|
};
|
|
1365
1370
|
try {
|
|
1366
1371
|
for (; A < Q.length; ) {
|
|
1367
|
-
const C = Q[A++], B =
|
|
1372
|
+
const C = Q[A++], B = I(), E = A + B;
|
|
1368
1373
|
if (E > Q.length || C === 8) return !1;
|
|
1369
1374
|
if (C === 0) {
|
|
1370
|
-
const D =
|
|
1375
|
+
const D = I();
|
|
1371
1376
|
if (A + D > E) return !1;
|
|
1372
1377
|
const w = new TextDecoder().decode(Q.subarray(A, A + D));
|
|
1373
1378
|
if (A += D, w === "linking") {
|
|
1374
|
-
if (
|
|
1375
|
-
|
|
1379
|
+
if (g || I() !== 2) return !1;
|
|
1380
|
+
g = !0;
|
|
1376
1381
|
}
|
|
1377
1382
|
}
|
|
1378
1383
|
A = E;
|
|
1379
1384
|
}
|
|
1380
|
-
return
|
|
1385
|
+
return g;
|
|
1381
1386
|
} catch {
|
|
1382
1387
|
return !1;
|
|
1383
1388
|
}
|
|
@@ -1392,18 +1397,18 @@ function c(Q) {
|
|
|
1392
1397
|
error: { type: typeof Q, message: String(Q) }
|
|
1393
1398
|
};
|
|
1394
1399
|
}
|
|
1395
|
-
class
|
|
1400
|
+
class _A {
|
|
1396
1401
|
name;
|
|
1397
1402
|
data;
|
|
1398
|
-
constructor(A,
|
|
1399
|
-
this.name = A, this.data =
|
|
1403
|
+
constructor(A, g) {
|
|
1404
|
+
this.name = A, this.data = g;
|
|
1400
1405
|
}
|
|
1401
1406
|
download() {
|
|
1402
|
-
const A = new Uint8Array(this.data),
|
|
1403
|
-
C.href =
|
|
1407
|
+
const A = new Uint8Array(this.data), g = new Blob([A]), I = URL.createObjectURL(g), C = document.createElement("a");
|
|
1408
|
+
C.href = I, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(I);
|
|
1404
1409
|
}
|
|
1405
1410
|
}
|
|
1406
|
-
class
|
|
1411
|
+
class $A extends cA {
|
|
1407
1412
|
/**
|
|
1408
1413
|
* Access to internal properties of the debugger.
|
|
1409
1414
|
* These are put under a special symbol so that they cannot be accessed by
|
|
@@ -1430,15 +1435,15 @@ class _A extends sA {
|
|
|
1430
1435
|
attach: this.attach.bind(this),
|
|
1431
1436
|
detach: this.detach.bind(this),
|
|
1432
1437
|
beginRun: () => this.dap.resetRun()
|
|
1433
|
-
}, this.onMessage = this.onMessage.bind(this), this.dap = new
|
|
1438
|
+
}, this.onMessage = this.onMessage.bind(this), this.dap = new EA(), this.dap.on(this.onMessage);
|
|
1434
1439
|
}
|
|
1435
1440
|
send(A) {
|
|
1436
1441
|
return this.dap.sendMessage(A);
|
|
1437
1442
|
}
|
|
1438
1443
|
artifactListener = (A) => {
|
|
1439
1444
|
if (A.data.type !== "artifact") return;
|
|
1440
|
-
const
|
|
1441
|
-
this.emit("artifact",
|
|
1445
|
+
const g = new _A(A.data.name, new Uint8Array(A.data.data));
|
|
1446
|
+
this.emit("artifact", g);
|
|
1442
1447
|
};
|
|
1443
1448
|
attach(A) {
|
|
1444
1449
|
A.addEventListener("message", this.artifactListener), this.dap.attach(A);
|
|
@@ -1450,26 +1455,26 @@ class _A extends sA {
|
|
|
1450
1455
|
this.emit("event", A);
|
|
1451
1456
|
}
|
|
1452
1457
|
}
|
|
1453
|
-
const
|
|
1454
|
-
function
|
|
1455
|
-
const
|
|
1456
|
-
if (
|
|
1457
|
-
throw new TypeError(`Engine Wasm must be served over http(s), not ${
|
|
1458
|
-
return
|
|
1458
|
+
const Ag = "glassjar-wasm:";
|
|
1459
|
+
function gg(Q, A) {
|
|
1460
|
+
const g = new URL(String(Q), A);
|
|
1461
|
+
if (g.protocol !== "https:" && g.protocol !== "http:")
|
|
1462
|
+
throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);
|
|
1463
|
+
return g.href;
|
|
1459
1464
|
}
|
|
1460
|
-
function
|
|
1465
|
+
function Ig(Q) {
|
|
1461
1466
|
return new Worker(
|
|
1462
|
-
"" + new URL("assets/worker-
|
|
1467
|
+
"" + new URL("assets/worker-D45G03b3.js", import.meta.url).href,
|
|
1463
1468
|
{
|
|
1464
1469
|
type: "module",
|
|
1465
1470
|
name: Q?.name
|
|
1466
1471
|
}
|
|
1467
1472
|
);
|
|
1468
1473
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return new
|
|
1474
|
+
function Cg(Q) {
|
|
1475
|
+
return new Ig(Q ? { name: Ag + Q } : void 0);
|
|
1471
1476
|
}
|
|
1472
|
-
const
|
|
1477
|
+
const Jg = "/dev/debugger-sh-host";
|
|
1473
1478
|
class KA {
|
|
1474
1479
|
buffer = new SharedArrayBuffer(4 + 64 * 1024);
|
|
1475
1480
|
length = new Int32Array(this.buffer, 0, 1);
|
|
@@ -1478,7 +1483,7 @@ class KA {
|
|
|
1478
1483
|
Atomics.store(this.length, 0, A), Atomics.notify(this.length, 0);
|
|
1479
1484
|
}
|
|
1480
1485
|
}
|
|
1481
|
-
function
|
|
1486
|
+
function iA(Q) {
|
|
1482
1487
|
try {
|
|
1483
1488
|
return new Error(
|
|
1484
1489
|
`Host device callback failed: ${Q instanceof Error ? Q.message : String(Q)}`
|
|
@@ -1487,17 +1492,17 @@ function wA(Q) {
|
|
|
1487
1492
|
return new Error("Host device callback failed");
|
|
1488
1493
|
}
|
|
1489
1494
|
}
|
|
1490
|
-
function
|
|
1495
|
+
function RA(Q) {
|
|
1491
1496
|
try {
|
|
1492
1497
|
const A = Q?.();
|
|
1493
1498
|
if (A && typeof A.then == "function")
|
|
1494
1499
|
return Promise.resolve(A).catch(() => {
|
|
1495
1500
|
}), new TypeError("Host device cleanup must be synchronous");
|
|
1496
1501
|
} catch (A) {
|
|
1497
|
-
return
|
|
1502
|
+
return iA(A);
|
|
1498
1503
|
}
|
|
1499
1504
|
}
|
|
1500
|
-
class
|
|
1505
|
+
class Qg {
|
|
1501
1506
|
constructor(A) {
|
|
1502
1507
|
this.onFailure = A;
|
|
1503
1508
|
}
|
|
@@ -1513,30 +1518,30 @@ class CI {
|
|
|
1513
1518
|
worker;
|
|
1514
1519
|
writing = !1;
|
|
1515
1520
|
open(A) {
|
|
1516
|
-
let
|
|
1521
|
+
let g;
|
|
1517
1522
|
try {
|
|
1518
|
-
|
|
1523
|
+
g = A({
|
|
1519
1524
|
signal: this.abort.signal,
|
|
1520
|
-
onData: (
|
|
1521
|
-
if (this.assertOpen(), typeof
|
|
1525
|
+
onData: (I) => {
|
|
1526
|
+
if (this.assertOpen(), typeof I != "function")
|
|
1522
1527
|
throw new TypeError("Host device listener must be a function");
|
|
1523
|
-
return this.listeners.add(
|
|
1524
|
-
this.listeners.delete(
|
|
1528
|
+
return this.listeners.add(I), () => {
|
|
1529
|
+
this.listeners.delete(I);
|
|
1525
1530
|
};
|
|
1526
1531
|
},
|
|
1527
|
-
write: (
|
|
1532
|
+
write: (I) => this.write(I)
|
|
1528
1533
|
});
|
|
1529
|
-
} catch (
|
|
1530
|
-
throw
|
|
1534
|
+
} catch (I) {
|
|
1535
|
+
throw iA(I);
|
|
1531
1536
|
}
|
|
1532
|
-
if (
|
|
1533
|
-
throw Promise.resolve(
|
|
1537
|
+
if (g !== void 0 && typeof g != "function")
|
|
1538
|
+
throw Promise.resolve(g).catch(() => {
|
|
1534
1539
|
}), new TypeError("Host device opener must return a cleanup function or undefined");
|
|
1535
|
-
if (typeof
|
|
1540
|
+
if (typeof g == "function")
|
|
1536
1541
|
if (this.abort.signal.aborted) {
|
|
1537
|
-
const
|
|
1538
|
-
if (
|
|
1539
|
-
} else this.cleanup =
|
|
1542
|
+
const I = RA(g);
|
|
1543
|
+
if (I) throw I;
|
|
1544
|
+
} else this.cleanup = g;
|
|
1540
1545
|
}
|
|
1541
1546
|
attach(A) {
|
|
1542
1547
|
this.assertOpen(), this.worker = A, A.addEventListener("message", this.onMessage);
|
|
@@ -1550,17 +1555,17 @@ class CI {
|
|
|
1550
1555
|
if (this.writing) throw new Error("Await the previous host device write before writing again");
|
|
1551
1556
|
this.writing = !0;
|
|
1552
1557
|
try {
|
|
1553
|
-
const
|
|
1558
|
+
const g = new Uint8Array(A), I = this.outgoing;
|
|
1554
1559
|
let C = 0;
|
|
1555
|
-
for (; C <
|
|
1560
|
+
for (; C < g.length; ) {
|
|
1556
1561
|
this.assertOpen();
|
|
1557
|
-
const B = Atomics.load(
|
|
1562
|
+
const B = Atomics.load(I.length, 0);
|
|
1558
1563
|
if (B !== 0) {
|
|
1559
|
-
await Atomics.waitAsync(
|
|
1564
|
+
await Atomics.waitAsync(I.length, 0, B).value;
|
|
1560
1565
|
continue;
|
|
1561
1566
|
}
|
|
1562
|
-
const E =
|
|
1563
|
-
|
|
1567
|
+
const E = g.subarray(C, C + I.bytes.length);
|
|
1568
|
+
I.bytes.set(E), I.publish(E.length), C += E.length;
|
|
1564
1569
|
}
|
|
1565
1570
|
} finally {
|
|
1566
1571
|
this.writing = !1;
|
|
@@ -1569,29 +1574,29 @@ class CI {
|
|
|
1569
1574
|
onMessage = (A) => {
|
|
1570
1575
|
if (!(this.abort.signal.aborted || A.data?.type !== "host_wake"))
|
|
1571
1576
|
try {
|
|
1572
|
-
const
|
|
1573
|
-
if (
|
|
1574
|
-
const
|
|
1577
|
+
const g = Atomics.load(this.incoming.length, 0);
|
|
1578
|
+
if (g <= 0) return;
|
|
1579
|
+
const I = this.incoming.bytes.slice(0, g);
|
|
1575
1580
|
this.incoming.publish(0);
|
|
1576
1581
|
for (const C of this.listeners) {
|
|
1577
1582
|
if (this.abort.signal.aborted) break;
|
|
1578
|
-
Promise.resolve(C(
|
|
1583
|
+
Promise.resolve(C(I)).catch((B) => this.fail(B));
|
|
1579
1584
|
}
|
|
1580
|
-
} catch (
|
|
1581
|
-
this.fail(
|
|
1585
|
+
} catch (g) {
|
|
1586
|
+
this.fail(g);
|
|
1582
1587
|
}
|
|
1583
1588
|
};
|
|
1584
1589
|
fail(A) {
|
|
1585
|
-
this.abort.signal.aborted || (this.close(), this.onFailure(
|
|
1590
|
+
this.abort.signal.aborted || (this.close(), this.onFailure(iA(A)));
|
|
1586
1591
|
}
|
|
1587
1592
|
close() {
|
|
1588
1593
|
if (this.abort.signal.aborted) return;
|
|
1589
1594
|
this.worker?.removeEventListener("message", this.onMessage), this.worker = void 0, this.incoming.publish(-1), this.outgoing.publish(-1), this.abort.abort(), this.listeners.clear();
|
|
1590
1595
|
const A = this.cleanup;
|
|
1591
|
-
return this.cleanup = void 0,
|
|
1596
|
+
return this.cleanup = void 0, RA(A);
|
|
1592
1597
|
}
|
|
1593
1598
|
}
|
|
1594
|
-
const
|
|
1599
|
+
const Bg = [
|
|
1595
1600
|
"__future__",
|
|
1596
1601
|
"_abc",
|
|
1597
1602
|
"_aix_support",
|
|
@@ -1896,11 +1901,16 @@ const QI = [
|
|
|
1896
1901
|
"zipimport",
|
|
1897
1902
|
"zlib",
|
|
1898
1903
|
"zoneinfo"
|
|
1899
|
-
],
|
|
1900
|
-
|
|
1901
|
-
|
|
1904
|
+
], gA = "3.15.2", Eg = "/usr/local/lib/python3.15/site-packages", UA = "https://pypi.org/pypi", Dg = "files.pythonhosted.org", l = {
|
|
1905
|
+
packages: 50,
|
|
1906
|
+
downloadBytes: 60 * 1024 * 1024,
|
|
1907
|
+
files: 5e3,
|
|
1908
|
+
unpackedBytes: 200 * 1024 * 1024
|
|
1909
|
+
}, wg = {
|
|
1910
|
+
python_version: gA.split(".").slice(0, 2).join("."),
|
|
1911
|
+
python_full_version: gA,
|
|
1902
1912
|
implementation_name: "cpython",
|
|
1903
|
-
implementation_version:
|
|
1913
|
+
implementation_version: gA,
|
|
1904
1914
|
platform_python_implementation: "CPython",
|
|
1905
1915
|
os_name: "posix",
|
|
1906
1916
|
sys_platform: "wasi",
|
|
@@ -1908,7 +1918,7 @@ const QI = [
|
|
|
1908
1918
|
platform_machine: "wasm32",
|
|
1909
1919
|
platform_release: "0.0.0",
|
|
1910
1920
|
platform_version: "0.0.0"
|
|
1911
|
-
},
|
|
1921
|
+
}, YA = {
|
|
1912
1922
|
yaml: "PyYAML",
|
|
1913
1923
|
bs4: "beautifulsoup4",
|
|
1914
1924
|
dateutil: "python-dateutil",
|
|
@@ -1926,16 +1936,16 @@ const QI = [
|
|
|
1926
1936
|
skimage: "scikit-image",
|
|
1927
1937
|
google: "protobuf",
|
|
1928
1938
|
_pytest: "pytest"
|
|
1929
|
-
},
|
|
1930
|
-
function
|
|
1939
|
+
}, ig = new Set(Bg), JA = /^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;
|
|
1940
|
+
function V(Q) {
|
|
1931
1941
|
return Q.toLowerCase().replace(/[-_.]+/g, "-");
|
|
1932
1942
|
}
|
|
1933
|
-
function
|
|
1943
|
+
function og(Q) {
|
|
1934
1944
|
const A = /* @__PURE__ */ new Set();
|
|
1935
|
-
for (const
|
|
1945
|
+
for (const g of Q.split(`
|
|
1936
1946
|
`)) {
|
|
1937
|
-
const
|
|
1938
|
-
let C = /^import\s+(.+)$/.exec(
|
|
1947
|
+
const I = g.replace(/#.*/, "").trim();
|
|
1948
|
+
let C = /^import\s+(.+)$/.exec(I);
|
|
1939
1949
|
if (C) {
|
|
1940
1950
|
for (const B of C[1].split(",")) {
|
|
1941
1951
|
const E = B.trim().split(/\s+/)[0]?.split(".")[0];
|
|
@@ -1943,127 +1953,132 @@ function iI(Q) {
|
|
|
1943
1953
|
}
|
|
1944
1954
|
continue;
|
|
1945
1955
|
}
|
|
1946
|
-
C = /^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(
|
|
1956
|
+
C = /^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(I), C && A.add(C[1].split(".")[0]);
|
|
1947
1957
|
}
|
|
1948
1958
|
return A;
|
|
1949
1959
|
}
|
|
1950
|
-
function
|
|
1951
|
-
const A = /* @__PURE__ */ new Set(),
|
|
1952
|
-
let
|
|
1960
|
+
function Ng(Q) {
|
|
1961
|
+
const A = /* @__PURE__ */ new Set(), g = [];
|
|
1962
|
+
let I = "";
|
|
1953
1963
|
const C = (E, D) => {
|
|
1954
1964
|
for (const [w, N] of Object.entries(E))
|
|
1955
|
-
typeof N == "string" ? (w.endsWith(".py") && (
|
|
1965
|
+
typeof N == "string" ? (w.endsWith(".py") && (g.push(N), D || A.add(w.slice(0, -3))), !D && w === "requirements.txt" && (I = N)) : (D || A.add(w), C(N, `${D}/${w}`));
|
|
1956
1966
|
};
|
|
1957
1967
|
C(Q, "");
|
|
1958
1968
|
const B = /* @__PURE__ */ new Map();
|
|
1959
|
-
for (const E of
|
|
1960
|
-
for (const D of
|
|
1961
|
-
if (
|
|
1962
|
-
|
|
1963
|
-
|
|
1969
|
+
for (const E of g)
|
|
1970
|
+
for (const D of og(E)) {
|
|
1971
|
+
if (ig.has(D) || A.has(D) || D.startsWith("_") && !(D in YA))
|
|
1972
|
+
continue;
|
|
1973
|
+
const w = YA[D] ?? D;
|
|
1974
|
+
B.set(V(w), w);
|
|
1964
1975
|
}
|
|
1965
|
-
for (const E of
|
|
1976
|
+
for (const E of I.split(`
|
|
1966
1977
|
`)) {
|
|
1967
1978
|
const D = E.replace(/#.*/, "").trim();
|
|
1968
1979
|
if (!D || D.startsWith("-")) continue;
|
|
1969
1980
|
const w = /^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];
|
|
1970
|
-
w && B.set(
|
|
1981
|
+
w && B.set(V(w), D);
|
|
1971
1982
|
}
|
|
1972
1983
|
return [...B.values()].sort();
|
|
1973
1984
|
}
|
|
1974
|
-
function
|
|
1985
|
+
function e(Q) {
|
|
1975
1986
|
const A = /^v?(?:\d+!)?(\d+(?:\.\d+)*)(?:[-_.]?(a|b|c|rc|alpha|beta|pre|preview)[-_.]?(\d*))?(?:-(\d+)|[-_.]?(?:post|rev|r)[-_.]?(\d*))?(?:[-_.]?dev[-_.]?(\d*))?(?:\+[a-z0-9.]+)?$/i.exec(
|
|
1976
1987
|
Q.trim()
|
|
1977
1988
|
);
|
|
1978
1989
|
if (!A) return null;
|
|
1979
|
-
const
|
|
1990
|
+
const g = A[2]?.toLowerCase(), I = g ? { a: 0, alpha: 0, b: 1, beta: 1, c: 2, rc: 2, pre: 2, preview: 2 }[g] : void 0;
|
|
1980
1991
|
return {
|
|
1981
1992
|
release: A[1].split(".").map(Number),
|
|
1982
|
-
pre:
|
|
1993
|
+
pre: I === void 0 ? void 0 : [I, Number(A[3] || 0)],
|
|
1983
1994
|
post: A[4] !== void 0 ? Number(A[4]) : A[5] !== void 0 ? Number(A[5] || 0) : void 0,
|
|
1984
1995
|
dev: A[6] !== void 0 ? Number(A[6] || 0) : void 0,
|
|
1985
1996
|
text: Q
|
|
1986
1997
|
};
|
|
1987
1998
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const
|
|
1990
|
-
for (let E = 0; E <
|
|
1999
|
+
function HA(Q, A) {
|
|
2000
|
+
const g = Math.max(Q.release.length, A.release.length);
|
|
2001
|
+
for (let E = 0; E < g; E++) {
|
|
1991
2002
|
const D = (Q.release[E] ?? 0) - (A.release[E] ?? 0);
|
|
1992
2003
|
if (D) return Math.sign(D);
|
|
1993
2004
|
}
|
|
1994
|
-
const
|
|
2005
|
+
const I = (E) => [
|
|
1995
2006
|
E.pre ? 0 : E.dev !== void 0 && E.post === void 0 ? -1 : 1,
|
|
1996
2007
|
E.pre?.[0] ?? 0,
|
|
1997
2008
|
E.pre?.[1] ?? 0,
|
|
1998
2009
|
E.post ?? -1,
|
|
1999
2010
|
E.dev ?? Number.POSITIVE_INFINITY
|
|
2000
|
-
], C =
|
|
2011
|
+
], C = I(Q), B = I(A);
|
|
2001
2012
|
for (let E = 0; E < C.length; E++) if (C[E] !== B[E]) return Math.sign(C[E] - B[E]);
|
|
2002
2013
|
return 0;
|
|
2003
2014
|
}
|
|
2004
|
-
const
|
|
2005
|
-
function
|
|
2006
|
-
for (const
|
|
2007
|
-
const
|
|
2008
|
-
if (!
|
|
2009
|
-
const C = /^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(
|
|
2015
|
+
const hA = (Q) => Q.pre !== void 0 || Q.dev !== void 0;
|
|
2016
|
+
function oA(Q, A) {
|
|
2017
|
+
for (const g of A.split(",")) {
|
|
2018
|
+
const I = g.trim();
|
|
2019
|
+
if (!I) continue;
|
|
2020
|
+
const C = /^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(I);
|
|
2010
2021
|
if (!C) return !1;
|
|
2011
2022
|
const [, B, E] = C;
|
|
2012
2023
|
if ((B === "==" || B === "!=") && E.endsWith(".*")) {
|
|
2013
|
-
if (E.slice(0, -2).split(".").map(Number).every((
|
|
2024
|
+
if (E.slice(0, -2).split(".").map(Number).every((R, h) => (Q.release[h] ?? 0) === R) !== (B === "==")) return !1;
|
|
2014
2025
|
continue;
|
|
2015
2026
|
}
|
|
2016
|
-
const D =
|
|
2027
|
+
const D = e(E);
|
|
2017
2028
|
if (!D) return !1;
|
|
2018
|
-
const w =
|
|
2029
|
+
const w = HA(Q, D);
|
|
2019
2030
|
if (B === "~=") {
|
|
2020
2031
|
const N = D.release.slice(0, Math.max(1, D.release.length - 1));
|
|
2021
|
-
if (w < 0 || !N.every((
|
|
2032
|
+
if (w < 0 || !N.every((G, R) => (Q.release[R] ?? 0) === G)) return !1;
|
|
2022
2033
|
} else if (!(B === "==" || B === "===" ? w === 0 : B === "!=" ? w !== 0 : B === "<=" ? w <= 0 : B === ">=" ? w >= 0 : B === "<" ? w < 0 : w > 0))
|
|
2023
2034
|
return !1;
|
|
2024
2035
|
}
|
|
2025
2036
|
return !0;
|
|
2026
2037
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const [A,
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2038
|
+
function SA(Q) {
|
|
2039
|
+
const [A, g] = Q.split(";", 2).map((C) => C.trim()), I = /^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(
|
|
2040
|
+
A
|
|
2041
|
+
);
|
|
2042
|
+
return !I || I[3].includes("@") ? null : {
|
|
2043
|
+
name: I[1],
|
|
2044
|
+
extras: (I[2] ?? "").split(",").map((C) => C.trim()).filter(Boolean),
|
|
2045
|
+
specifiers: I[3].replace(/\s+/g, ""),
|
|
2046
|
+
marker: g || void 0
|
|
2034
2047
|
};
|
|
2035
2048
|
}
|
|
2036
|
-
function
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2049
|
+
function Fg(Q, A = []) {
|
|
2050
|
+
const g = Q.match(
|
|
2051
|
+
/\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g
|
|
2052
|
+
) ?? [];
|
|
2053
|
+
let I = 0;
|
|
2054
|
+
const C = (N) => /^['"]/.test(N) ? { text: N.slice(1, -1) } : N === "extra" ? { text: "", variable: "extra" } : { text: wg[N] ?? "", variable: N }, B = (N, G, R) => {
|
|
2055
|
+
if (N.variable === "extra" || R.variable === "extra") {
|
|
2056
|
+
const U = V((N.variable === "extra" ? R : N).text), a = A.some((O) => V(O) === U);
|
|
2057
|
+
return G === "!=" ? !a : a;
|
|
2043
2058
|
}
|
|
2044
|
-
if (
|
|
2045
|
-
if (/^not\s+in$/.test(
|
|
2046
|
-
if (!N.variable &&
|
|
2047
|
-
return B(
|
|
2048
|
-
const h =
|
|
2049
|
-
return h &&
|
|
2059
|
+
if (G === "in") return R.text.includes(N.text);
|
|
2060
|
+
if (/^not\s+in$/.test(G)) return !R.text.includes(N.text);
|
|
2061
|
+
if (!N.variable && R.variable)
|
|
2062
|
+
return B(R, { "<": ">", ">": "<", "<=": ">=", ">=": "<=" }[G] ?? G, N);
|
|
2063
|
+
const h = e(N.text), y = e(R.text);
|
|
2064
|
+
return h && y && /version/.test(N.variable ?? "") ? oA(h, `${G}${R.text}`) : G === "==" || G === "===" ? N.text === R.text : G === "!=" ? N.text !== R.text : !1;
|
|
2050
2065
|
}, E = () => {
|
|
2051
|
-
if (I
|
|
2052
|
-
|
|
2066
|
+
if (g[I] === "(") {
|
|
2067
|
+
I++;
|
|
2053
2068
|
const h = w();
|
|
2054
|
-
return
|
|
2069
|
+
return I++, h;
|
|
2055
2070
|
}
|
|
2056
|
-
const N = C(I
|
|
2057
|
-
return B(N,
|
|
2071
|
+
const N = C(g[I++]), G = g[I++], R = C(g[I++]);
|
|
2072
|
+
return B(N, G, R);
|
|
2058
2073
|
}, D = () => {
|
|
2059
2074
|
let N = E();
|
|
2060
|
-
for (; I
|
|
2061
|
-
|
|
2075
|
+
for (; g[I] === "and"; )
|
|
2076
|
+
I++, N = E() && N;
|
|
2062
2077
|
return N;
|
|
2063
2078
|
}, w = () => {
|
|
2064
2079
|
let N = D();
|
|
2065
|
-
for (; I
|
|
2066
|
-
|
|
2080
|
+
for (; g[I] === "or"; )
|
|
2081
|
+
I++, N = D() || N;
|
|
2067
2082
|
return N;
|
|
2068
2083
|
};
|
|
2069
2084
|
try {
|
|
@@ -2072,35 +2087,37 @@ function NI(Q, A = []) {
|
|
|
2072
2087
|
return !1;
|
|
2073
2088
|
}
|
|
2074
2089
|
}
|
|
2075
|
-
function
|
|
2090
|
+
function Mg(Q) {
|
|
2076
2091
|
if (Q.packagetype !== "bdist_wheel" || Q.yanked) return !1;
|
|
2077
2092
|
const A = Q.filename.replace(/\.whl$/, "").split("-").slice(-3);
|
|
2078
|
-
return A.length === 3 && A[1] === "none" && A[2] === "any" && A[0].split(".").some((
|
|
2093
|
+
return A.length === 3 && A[1] === "none" && A[2] === "any" && A[0].split(".").some((g) => g === "py3" || g.startsWith("py3"));
|
|
2079
2094
|
}
|
|
2080
|
-
function
|
|
2081
|
-
return Q ?
|
|
2095
|
+
function kg(Q) {
|
|
2096
|
+
return Q ? oA(e(gA), Q.replace(/\s+/g, "")) : !0;
|
|
2082
2097
|
}
|
|
2083
|
-
class
|
|
2084
|
-
constructor(A = (
|
|
2098
|
+
class Gg {
|
|
2099
|
+
constructor(A = (g, I) => fetch(g, I)) {
|
|
2085
2100
|
this.fetchImpl = A;
|
|
2086
2101
|
}
|
|
2087
2102
|
projects = /* @__PURE__ */ new Map();
|
|
2088
2103
|
metadata = /* @__PURE__ */ new Map();
|
|
2089
2104
|
wheels = /* @__PURE__ */ new Map();
|
|
2090
2105
|
project(A) {
|
|
2091
|
-
const
|
|
2092
|
-
let
|
|
2093
|
-
return
|
|
2106
|
+
const g = V(A);
|
|
2107
|
+
let I = this.projects.get(g);
|
|
2108
|
+
return I || (I = this.fetchImpl(`${UA}/${encodeURIComponent(g)}/json`).then(
|
|
2094
2109
|
async (C) => C.ok ? await C.json() : null,
|
|
2095
2110
|
() => null
|
|
2096
|
-
), this.projects.set(
|
|
2111
|
+
), this.projects.set(g, I)), I;
|
|
2097
2112
|
}
|
|
2098
2113
|
/** requires_dist of one release (the project JSON only carries the latest's). */
|
|
2099
|
-
requiresDist(A,
|
|
2100
|
-
if (
|
|
2101
|
-
const C = `${
|
|
2114
|
+
requiresDist(A, g, I) {
|
|
2115
|
+
if (I.info.version === g) return Promise.resolve(I.info.requires_dist ?? []);
|
|
2116
|
+
const C = `${V(A)}@${g}`;
|
|
2102
2117
|
let B = this.metadata.get(C);
|
|
2103
|
-
return B || (B = this.fetchImpl(
|
|
2118
|
+
return B || (B = this.fetchImpl(
|
|
2119
|
+
`${UA}/${encodeURIComponent(V(A))}/${encodeURIComponent(g)}/json`
|
|
2120
|
+
).then(
|
|
2104
2121
|
async (E) => E.ok ? (await E.json()).info.requires_dist ?? [] : [],
|
|
2105
2122
|
() => []
|
|
2106
2123
|
), this.metadata.set(C, B)), B;
|
|
@@ -2109,148 +2126,198 @@ class MI {
|
|
|
2109
2126
|
* Resolves requirements and their dependencies to pure-Python wheels. Greedy: the newest
|
|
2110
2127
|
* release that fits every constraint seen so far for that project.
|
|
2111
2128
|
*/
|
|
2112
|
-
async resolve(A,
|
|
2129
|
+
async resolve(A, g = () => {
|
|
2113
2130
|
}) {
|
|
2114
|
-
const
|
|
2131
|
+
const I = /* @__PURE__ */ new Map(), C = [];
|
|
2115
2132
|
for (const B of A) {
|
|
2116
|
-
const E =
|
|
2117
|
-
E &&
|
|
2133
|
+
const E = SA(B);
|
|
2134
|
+
E && JA.test(E.name) && C.push({ requirement: E, top: !0 });
|
|
2118
2135
|
}
|
|
2119
2136
|
for (; C.length; ) {
|
|
2120
|
-
const { requirement: B, top: E } = C.shift(), D =
|
|
2121
|
-
if (
|
|
2122
|
-
if (
|
|
2137
|
+
const { requirement: B, top: E } = C.shift(), D = V(B.name);
|
|
2138
|
+
if (I.has(D)) continue;
|
|
2139
|
+
if (I.size >= l.packages) break;
|
|
2123
2140
|
const w = await this.project(B.name);
|
|
2124
2141
|
if (!w) {
|
|
2125
|
-
E &&
|
|
2142
|
+
E && g({ kind: "skipped", message: `${B.name}: not found on PyPI` });
|
|
2126
2143
|
continue;
|
|
2127
2144
|
}
|
|
2128
|
-
const N = Object.entries(w.releases).map(([
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2145
|
+
const N = Object.entries(w.releases).map(([y, U]) => ({ version: e(y), files: U })).filter(
|
|
2146
|
+
(y) => y.version !== null && oA(y.version, B.specifiers)
|
|
2147
|
+
).sort((y, U) => HA(U.version, y.version)), R = [...N.filter((y) => !hA(y.version)), ...N.filter((y) => hA(y.version))].map((y) => ({
|
|
2148
|
+
version: y.version,
|
|
2149
|
+
wheel: y.files.find((U) => Mg(U) && kg(U.requires_python))
|
|
2150
|
+
})).find((y) => y.wheel);
|
|
2151
|
+
if (!R?.wheel) {
|
|
2152
|
+
const y = N.some(
|
|
2153
|
+
(U) => U.files.some((a) => a.packagetype === "bdist_wheel")
|
|
2154
|
+
);
|
|
2155
|
+
g({
|
|
2132
2156
|
kind: "skipped",
|
|
2133
|
-
message:
|
|
2157
|
+
message: y ? `${w.info.name} has compiled code, which can't run in the browser` : `${w.info.name}: no Python 3.15 wheel on PyPI`
|
|
2134
2158
|
});
|
|
2135
2159
|
continue;
|
|
2136
2160
|
}
|
|
2137
|
-
const h = new URL(
|
|
2138
|
-
if (!(h.protocol !== "https:" || h.hostname !==
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2161
|
+
const h = new URL(R.wheel.url);
|
|
2162
|
+
if (!(h.protocol !== "https:" || h.hostname !== Dg)) {
|
|
2163
|
+
I.set(D, {
|
|
2164
|
+
name: w.info.name,
|
|
2165
|
+
version: R.version.text,
|
|
2166
|
+
url: R.wheel.url,
|
|
2167
|
+
sha256: R.wheel.digests.sha256,
|
|
2168
|
+
size: R.wheel.size
|
|
2169
|
+
});
|
|
2170
|
+
for (const y of await this.requiresDist(
|
|
2171
|
+
B.name,
|
|
2172
|
+
R.version.text,
|
|
2173
|
+
w
|
|
2174
|
+
)) {
|
|
2175
|
+
const U = SA(y);
|
|
2176
|
+
!U || !JA.test(U.name) || U.marker && !Fg(U.marker, B.extras) || C.push({ requirement: U, top: !1 });
|
|
2143
2177
|
}
|
|
2144
2178
|
}
|
|
2145
2179
|
}
|
|
2146
|
-
return [...
|
|
2180
|
+
return [...I.values()];
|
|
2147
2181
|
}
|
|
2148
2182
|
/** Files to mount, by absolute path in the run, for these resolved packages. */
|
|
2149
|
-
async install(A,
|
|
2183
|
+
async install(A, g = () => {
|
|
2150
2184
|
}) {
|
|
2151
|
-
const
|
|
2185
|
+
const I = {};
|
|
2152
2186
|
let C = 0, B = 0;
|
|
2153
2187
|
for (const E of A) {
|
|
2154
2188
|
if (C += E.size, C > l.downloadBytes) {
|
|
2155
|
-
|
|
2189
|
+
g({
|
|
2190
|
+
kind: "skipped",
|
|
2191
|
+
message: `${E.name}: over the ${l.downloadBytes >> 20}MB package limit`
|
|
2192
|
+
});
|
|
2156
2193
|
break;
|
|
2157
2194
|
}
|
|
2158
2195
|
const D = `${E.url}#${E.sha256}`;
|
|
2159
2196
|
let w = this.wheels.get(D);
|
|
2160
|
-
w || (
|
|
2197
|
+
w || (g({ kind: "installing", message: `Installing ${E.name} ${E.version}` }), w = this.download(E), this.wheels.set(D, w), w.catch(() => this.wheels.delete(D)));
|
|
2161
2198
|
let N;
|
|
2162
2199
|
try {
|
|
2163
2200
|
N = await w;
|
|
2164
|
-
} catch (
|
|
2165
|
-
|
|
2201
|
+
} catch (G) {
|
|
2202
|
+
g({
|
|
2203
|
+
kind: "skipped",
|
|
2204
|
+
message: `${E.name}: ${G instanceof Error ? G.message : String(G)}`
|
|
2205
|
+
});
|
|
2166
2206
|
continue;
|
|
2167
2207
|
}
|
|
2168
|
-
for (const [
|
|
2208
|
+
for (const [G, R] of N) {
|
|
2169
2209
|
if (++B > l.files) break;
|
|
2170
|
-
|
|
2210
|
+
I[`${Eg}/${G}`] = R;
|
|
2171
2211
|
}
|
|
2172
2212
|
}
|
|
2173
|
-
return
|
|
2213
|
+
return I;
|
|
2174
2214
|
}
|
|
2175
2215
|
async download(A) {
|
|
2176
|
-
const
|
|
2177
|
-
if (!
|
|
2178
|
-
const
|
|
2179
|
-
if ([...new Uint8Array(await crypto.subtle.digest("SHA-256",
|
|
2180
|
-
return
|
|
2216
|
+
const g = await this.fetchImpl(A.url, { cache: "force-cache" });
|
|
2217
|
+
if (!g.ok) throw new Error(`download failed (${g.status})`);
|
|
2218
|
+
const I = new Uint8Array(await g.arrayBuffer());
|
|
2219
|
+
if ([...new Uint8Array(await crypto.subtle.digest("SHA-256", I))].map((B) => B.toString(16).padStart(2, "0")).join("") !== A.sha256) throw new Error("download did not match PyPI's checksum");
|
|
2220
|
+
return yg(await Rg(I, l.unpackedBytes));
|
|
2181
2221
|
}
|
|
2182
2222
|
}
|
|
2183
|
-
function
|
|
2223
|
+
function yg(Q) {
|
|
2184
2224
|
const A = /* @__PURE__ */ new Map();
|
|
2185
|
-
for (const [
|
|
2186
|
-
const C = /^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(
|
|
2187
|
-
C ? A.set(C[2],
|
|
2225
|
+
for (const [g, I] of Q) {
|
|
2226
|
+
const C = /^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(g);
|
|
2227
|
+
C ? A.set(C[2], I) : /^[^/]+\.data\//.test(g) || A.set(g, I);
|
|
2188
2228
|
}
|
|
2189
2229
|
return A;
|
|
2190
2230
|
}
|
|
2191
|
-
function
|
|
2231
|
+
function Kg(Q) {
|
|
2192
2232
|
return Q.length > 0 && !Q.startsWith("/") && !Q.includes("\\") && !Q.includes("\0") && !Q.split("/").some((A) => A === ".." || A === ".");
|
|
2193
2233
|
}
|
|
2194
|
-
async function
|
|
2195
|
-
const
|
|
2196
|
-
let
|
|
2234
|
+
async function Rg(Q, A) {
|
|
2235
|
+
const g = new DataView(Q.buffer, Q.byteOffset, Q.byteLength);
|
|
2236
|
+
let I = -1;
|
|
2197
2237
|
for (let N = Q.length - 22; N >= Math.max(0, Q.length - 22 - 65535); N--)
|
|
2198
|
-
if (
|
|
2199
|
-
|
|
2238
|
+
if (g.getUint32(N, !0) === 101010256) {
|
|
2239
|
+
I = N;
|
|
2200
2240
|
break;
|
|
2201
2241
|
}
|
|
2202
|
-
if (
|
|
2203
|
-
const C =
|
|
2204
|
-
let B =
|
|
2242
|
+
if (I < 0) throw new Error("not a zip archive");
|
|
2243
|
+
const C = g.getUint16(I + 10, !0);
|
|
2244
|
+
let B = g.getUint32(I + 16, !0);
|
|
2205
2245
|
const E = /* @__PURE__ */ new Map();
|
|
2206
2246
|
let D = 0;
|
|
2207
2247
|
const w = new TextDecoder();
|
|
2208
2248
|
for (let N = 0; N < C; N++) {
|
|
2209
|
-
if (
|
|
2210
|
-
const
|
|
2211
|
-
if (B += 46 +
|
|
2212
|
-
if (!
|
|
2249
|
+
if (g.getUint32(B, !0) !== 33639248) throw new Error("corrupt zip directory");
|
|
2250
|
+
const G = g.getUint16(B + 10, !0), R = g.getUint32(B + 20, !0), h = g.getUint32(B + 24, !0), y = g.getUint16(B + 28, !0), U = g.getUint16(B + 30, !0), a = g.getUint16(B + 32, !0), O = g.getUint32(B + 42, !0), s = w.decode(Q.subarray(B + 46, B + 46 + y));
|
|
2251
|
+
if (B += 46 + y + U + a, s.endsWith("/")) continue;
|
|
2252
|
+
if (!Kg(s)) throw new Error(`unsafe path in package: ${s}`);
|
|
2213
2253
|
if (D += h, D > A) throw new Error("package too large");
|
|
2214
|
-
const
|
|
2254
|
+
const u = O + 30 + g.getUint16(O + 26, !0) + g.getUint16(O + 28, !0), T = Q.subarray(u, u + R);
|
|
2215
2255
|
let o;
|
|
2216
|
-
if (
|
|
2217
|
-
else if (
|
|
2256
|
+
if (G === 0) o = T.slice();
|
|
2257
|
+
else if (G === 8)
|
|
2258
|
+
o = new Uint8Array(
|
|
2259
|
+
await new Response(
|
|
2260
|
+
new Blob([T.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))
|
|
2261
|
+
).arrayBuffer()
|
|
2262
|
+
);
|
|
2218
2263
|
else throw new Error(`unsupported compression in package: ${s}`);
|
|
2219
2264
|
if (o.length !== h) throw new Error(`corrupt entry in package: ${s}`);
|
|
2220
2265
|
E.set(s, o);
|
|
2221
2266
|
}
|
|
2222
2267
|
return E;
|
|
2223
2268
|
}
|
|
2224
|
-
const
|
|
2269
|
+
const f = {
|
|
2270
|
+
installer: void 0,
|
|
2271
|
+
sets: /* @__PURE__ */ new Map()
|
|
2272
|
+
};
|
|
2273
|
+
async function Ug(Q, A = () => {
|
|
2274
|
+
}) {
|
|
2275
|
+
const g = Ng(Q);
|
|
2276
|
+
if (!g.length) return {};
|
|
2277
|
+
const I = g.join(`
|
|
2278
|
+
`);
|
|
2279
|
+
let C = f.sets.get(I);
|
|
2280
|
+
if (!C) {
|
|
2281
|
+
f.installer ??= new Gg();
|
|
2282
|
+
const D = f.installer, w = [], N = (G) => {
|
|
2283
|
+
G.kind === "skipped" ? w.push(G) : A(G);
|
|
2284
|
+
};
|
|
2285
|
+
C = D.resolve(g, N).then(async (G) => ({ files: await D.install(G, N), notes: w })), f.sets.set(I, C), C.catch(() => f.sets.delete(I));
|
|
2286
|
+
}
|
|
2287
|
+
const { files: B, notes: E } = await C;
|
|
2288
|
+
for (const D of E) A(D);
|
|
2289
|
+
return B;
|
|
2290
|
+
}
|
|
2291
|
+
const Yg = [
|
|
2225
2292
|
"4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
|
|
2226
|
-
],
|
|
2293
|
+
], CA = Object.freeze({
|
|
2227
2294
|
compiler: "d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",
|
|
2228
2295
|
sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
|
|
2229
2296
|
exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
|
|
2230
2297
|
});
|
|
2231
2298
|
function aA(Q = "legacy") {
|
|
2232
|
-
if (Q === "legacy") return { profile: Q, digests:
|
|
2233
|
-
if (Q === "stock-certified-v1" &&
|
|
2234
|
-
return { profile: Q, digests:
|
|
2299
|
+
if (Q === "legacy") return { profile: Q, digests: CA };
|
|
2300
|
+
if (Q === "stock-certified-v1" && Yg.length > 0)
|
|
2301
|
+
return { profile: Q, digests: CA };
|
|
2235
2302
|
throw new Error(`The ${Q} toolchain is not available in this build`);
|
|
2236
2303
|
}
|
|
2237
|
-
class
|
|
2304
|
+
class r {
|
|
2238
2305
|
#A;
|
|
2239
2306
|
hashCount = 3;
|
|
2240
2307
|
hashMs;
|
|
2241
|
-
constructor(A,
|
|
2242
|
-
this.#A = A, this.hashMs =
|
|
2308
|
+
constructor(A, g) {
|
|
2309
|
+
this.#A = A, this.hashMs = g;
|
|
2243
2310
|
}
|
|
2244
|
-
static async load(A,
|
|
2311
|
+
static async load(A, g, I, C = CA.exceptions, B = "legacy") {
|
|
2245
2312
|
const E = aA(B);
|
|
2246
2313
|
if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
|
|
2247
2314
|
let D, w;
|
|
2248
2315
|
const N = await Promise.allSettled(
|
|
2249
|
-
A.map(async (
|
|
2316
|
+
A.map(async (a, O) => {
|
|
2250
2317
|
try {
|
|
2251
|
-
const s = await fetch(
|
|
2318
|
+
const s = await fetch(a, { cache: "force-cache", signal: I });
|
|
2252
2319
|
if (!s.ok) throw new Error(`Cannot load C++ toolchain (${s.status})`);
|
|
2253
|
-
return
|
|
2320
|
+
return O === 0 && g && typeof WebAssembly.compileStreaming == "function" && typeof s.clone == "function" && (w = WebAssembly.compileStreaming(s.clone()).catch(() => {
|
|
2254
2321
|
})), new Uint8Array(await s.arrayBuffer());
|
|
2255
2322
|
} catch (s) {
|
|
2256
2323
|
throw D ??= { error: s }, s;
|
|
@@ -2259,37 +2326,37 @@ class X {
|
|
|
2259
2326
|
);
|
|
2260
2327
|
if (N[0].status === "rejected" || N[1].status === "rejected")
|
|
2261
2328
|
throw D?.error;
|
|
2262
|
-
const [
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
(
|
|
2329
|
+
const [G, R] = [N[0].value, N[1].value], [h, y] = await Promise.allSettled([
|
|
2330
|
+
r.ingestOwned(G, R, !1, C),
|
|
2331
|
+
g ? (w ?? Promise.resolve(void 0)).then(
|
|
2332
|
+
(a) => a ?? WebAssembly.compile(G)
|
|
2266
2333
|
) : Promise.resolve(void 0)
|
|
2267
2334
|
]);
|
|
2268
2335
|
if (h.status === "rejected") throw h.reason;
|
|
2269
|
-
const
|
|
2270
|
-
if (
|
|
2336
|
+
const U = h.value;
|
|
2337
|
+
if (U.#A.compilerHash !== E.digests.compiler || U.#A.sysrootHash !== E.digests.sysroot || U.#A.exceptionsHash !== E.digests.exceptions)
|
|
2271
2338
|
throw new Error("C++ toolchain integrity mismatch");
|
|
2272
|
-
if (
|
|
2273
|
-
if (
|
|
2274
|
-
return
|
|
2339
|
+
if (I?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
|
|
2340
|
+
if (y.status === "rejected") throw y.reason;
|
|
2341
|
+
return U.#A.stockProfile = E.profile === "stock-certified-v1", U.#A.module = y.value, U;
|
|
2275
2342
|
}
|
|
2276
2343
|
/** Captures even Buffer/subclass inputs before the first asynchronous boundary. */
|
|
2277
|
-
static async fromBytes(A,
|
|
2278
|
-
const C = new Uint8Array(A), B = new Uint8Array(
|
|
2279
|
-
return
|
|
2344
|
+
static async fromBytes(A, g, I) {
|
|
2345
|
+
const C = new Uint8Array(A), B = new Uint8Array(g);
|
|
2346
|
+
return r.ingestOwned(
|
|
2280
2347
|
C,
|
|
2281
2348
|
B,
|
|
2282
|
-
|
|
2283
|
-
|
|
2349
|
+
I,
|
|
2350
|
+
CA.exceptions
|
|
2284
2351
|
);
|
|
2285
2352
|
}
|
|
2286
|
-
static async ingestOwned(A,
|
|
2287
|
-
const B = performance.now(), E = await Promise.allSettled([
|
|
2353
|
+
static async ingestOwned(A, g, I, C) {
|
|
2354
|
+
const B = performance.now(), E = await Promise.allSettled([LA(A), LA(g)]);
|
|
2288
2355
|
if (E[0].status === "rejected") throw E[0].reason;
|
|
2289
2356
|
if (E[1].status === "rejected") throw E[1].reason;
|
|
2290
|
-
const [D, w] = [E[0].value, E[1].value], N =
|
|
2291
|
-
return new
|
|
2292
|
-
{ compiler: A, sysroot:
|
|
2357
|
+
const [D, w] = [E[0].value, E[1].value], N = I ? await WebAssembly.compile(A) : void 0;
|
|
2358
|
+
return new r(
|
|
2359
|
+
{ compiler: A, sysroot: g, compilerHash: D, sysrootHash: w, exceptionsHash: C, module: N },
|
|
2293
2360
|
performance.now() - B
|
|
2294
2361
|
);
|
|
2295
2362
|
}
|
|
@@ -2306,25 +2373,25 @@ class X {
|
|
|
2306
2373
|
return this.#A.compiler.byteLength;
|
|
2307
2374
|
}
|
|
2308
2375
|
/** postMessage clones the private seed; never transfer/detach the restart owner. */
|
|
2309
|
-
configure(A,
|
|
2376
|
+
configure(A, g) {
|
|
2310
2377
|
try {
|
|
2311
|
-
return A.postMessage({ ...
|
|
2312
|
-
} catch (
|
|
2313
|
-
if (!(
|
|
2314
|
-
throw
|
|
2315
|
-
return A.postMessage({ ...
|
|
2378
|
+
return A.postMessage({ ...g, toolchain: this.#A }), !!this.#A.module;
|
|
2379
|
+
} catch (I) {
|
|
2380
|
+
if (!(I instanceof DOMException) || I.name !== "DataCloneError" || !this.#A.module)
|
|
2381
|
+
throw I;
|
|
2382
|
+
return A.postMessage({ ...g, toolchain: { ...this.#A, module: void 0 } }), !1;
|
|
2316
2383
|
}
|
|
2317
2384
|
}
|
|
2318
2385
|
}
|
|
2319
|
-
async function
|
|
2386
|
+
async function LA(Q) {
|
|
2320
2387
|
const A = await crypto.subtle.digest("SHA-256", Q);
|
|
2321
|
-
return Array.from(new Uint8Array(A), (
|
|
2388
|
+
return Array.from(new Uint8Array(A), (g) => g.toString(16).padStart(2, "0")).join("");
|
|
2322
2389
|
}
|
|
2323
|
-
let
|
|
2324
|
-
class
|
|
2325
|
-
stdout = new
|
|
2326
|
-
stderr = new
|
|
2327
|
-
stdin = new
|
|
2390
|
+
let BA, $;
|
|
2391
|
+
class qA {
|
|
2392
|
+
stdout = new sA(1);
|
|
2393
|
+
stderr = new sA(2);
|
|
2394
|
+
stdin = new q();
|
|
2328
2395
|
debugger;
|
|
2329
2396
|
lang;
|
|
2330
2397
|
scope;
|
|
@@ -2332,10 +2399,10 @@ class HA {
|
|
|
2332
2399
|
binaryFiles = {};
|
|
2333
2400
|
cppArtifacts;
|
|
2334
2401
|
hostDevice;
|
|
2402
|
+
/** How the next run starts the program: arguments, directory, entry file, environment. */
|
|
2403
|
+
program = {};
|
|
2335
2404
|
options;
|
|
2336
2405
|
python;
|
|
2337
|
-
installer;
|
|
2338
|
-
installed;
|
|
2339
2406
|
retain;
|
|
2340
2407
|
idleTimeoutMs;
|
|
2341
2408
|
/** Absolute `EngineOptions.wasmUrl`, handed to each worker; unset uses the default. */
|
|
@@ -2365,44 +2432,44 @@ class HA {
|
|
|
2365
2432
|
retirements = 0;
|
|
2366
2433
|
latest;
|
|
2367
2434
|
cacheValidation;
|
|
2368
|
-
static async create(A,
|
|
2369
|
-
const { wasmUrl:
|
|
2435
|
+
static async create(A, g = {}) {
|
|
2436
|
+
const { wasmUrl: I, python: C, ...B } = g, E = I === void 0 ? void 0 : gg(I, globalThis.location?.href), D = structuredClone(B);
|
|
2370
2437
|
C && (D.python = {
|
|
2371
2438
|
packages: !!C.packages,
|
|
2372
2439
|
onPackageStatus: typeof C.onPackageStatus == "function" ? C.onPackageStatus : void 0
|
|
2373
2440
|
});
|
|
2374
2441
|
const w = E ?? null;
|
|
2375
|
-
if (
|
|
2442
|
+
if ($ !== void 0 && $ !== w)
|
|
2376
2443
|
throw new Error("The engine Wasm is already loaded from a different wasmUrl");
|
|
2377
|
-
|
|
2378
|
-
throw
|
|
2379
|
-
}), await
|
|
2380
|
-
const N = new
|
|
2444
|
+
$ = w, BA ??= rA({ module_or_path: E ?? nA }).catch((G) => {
|
|
2445
|
+
throw BA = void 0, $ = void 0, G;
|
|
2446
|
+
}), await BA;
|
|
2447
|
+
const N = new qA(A, D);
|
|
2381
2448
|
if (N.wasmUrl = E, A !== "c" && typeof window < "u" && typeof fetch < "u")
|
|
2382
|
-
for (const
|
|
2383
|
-
fetch(
|
|
2449
|
+
for (const G of MA(A))
|
|
2450
|
+
fetch(G, { cache: "force-cache" }).then((R) => R.arrayBuffer()).catch(() => {
|
|
2384
2451
|
});
|
|
2385
2452
|
return N;
|
|
2386
2453
|
}
|
|
2387
|
-
constructor(A,
|
|
2388
|
-
const
|
|
2389
|
-
this.retain =
|
|
2390
|
-
const C =
|
|
2454
|
+
constructor(A, g) {
|
|
2455
|
+
const I = g.cpp;
|
|
2456
|
+
this.retain = g.retainWorker ?? I?.retainWorker ?? !0;
|
|
2457
|
+
const C = g.idleTimeoutMs ?? I?.idleTimeoutMs ?? 3e4;
|
|
2391
2458
|
if (!Number.isSafeInteger(C) || C < 1 || C > 3e5)
|
|
2392
2459
|
throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");
|
|
2393
|
-
if (this.idleTimeoutMs = C,
|
|
2460
|
+
if (this.idleTimeoutMs = C, I) {
|
|
2394
2461
|
if (A !== "c") throw new TypeError("C++ performance options require C/C++");
|
|
2395
|
-
if (!
|
|
2462
|
+
if (!I.scope?.projectId || !I.scope.accountId)
|
|
2396
2463
|
throw new TypeError("C++ performance options require project and account identity");
|
|
2397
|
-
if (
|
|
2464
|
+
if (I.compilerLifetime !== void 0 && !["idle", "project"].includes(I.compilerLifetime))
|
|
2398
2465
|
throw new TypeError("Invalid compiler lifetime");
|
|
2399
|
-
aA(
|
|
2466
|
+
aA(I.toolchainProfile), this.scope = Object.freeze({ ...I.scope }), this.options = Object.freeze({ ...I, scope: this.scope, idleTimeoutMs: C });
|
|
2400
2467
|
}
|
|
2401
|
-
if (
|
|
2468
|
+
if (g.python) {
|
|
2402
2469
|
if (A !== "python") throw new TypeError("Python options require Python");
|
|
2403
|
-
this.python = Object.freeze({ ...
|
|
2470
|
+
this.python = Object.freeze({ ...g.python });
|
|
2404
2471
|
}
|
|
2405
|
-
this.objects = new
|
|
2472
|
+
this.objects = new uA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new $A(), this.lang = A;
|
|
2406
2473
|
}
|
|
2407
2474
|
/** A retained worker reuses clang, compiled once on this thread and cloned to it. */
|
|
2408
2475
|
get cacheCompilerModule() {
|
|
@@ -2444,23 +2511,23 @@ class HA {
|
|
|
2444
2511
|
cancelCurrentOperation() {
|
|
2445
2512
|
if (this.cancellationDraining) return this.cancellationDraining;
|
|
2446
2513
|
this.operationId++;
|
|
2447
|
-
const A = this.promise,
|
|
2514
|
+
const A = this.promise, g = this.active?.publication;
|
|
2448
2515
|
this.retireWorker(), this.objects.discardBatch(), this.active && this.finish(this.active, { type: "stopped" });
|
|
2449
|
-
const
|
|
2450
|
-
this.cancellationDraining ===
|
|
2516
|
+
const I = Promise.allSettled([A, g]).then(() => {
|
|
2517
|
+
this.cancellationDraining === I && (this.cancellationDraining = void 0);
|
|
2451
2518
|
});
|
|
2452
|
-
return this.cancellationDraining =
|
|
2519
|
+
return this.cancellationDraining = I, I;
|
|
2453
2520
|
}
|
|
2454
2521
|
/** Release idle compiler resources, or defer behind an active guest without stopping it. */
|
|
2455
2522
|
releaseCompilerResources(A = {}) {
|
|
2456
|
-
const
|
|
2457
|
-
return
|
|
2458
|
-
const C = { resolve:
|
|
2459
|
-
this.releases.add(C),
|
|
2523
|
+
const g = A.signal;
|
|
2524
|
+
return g?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((I) => {
|
|
2525
|
+
const C = { resolve: I, signal: g, abort: () => this.settleRelease(C, "cancelled") };
|
|
2526
|
+
this.releases.add(C), g?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
|
|
2460
2527
|
});
|
|
2461
2528
|
}
|
|
2462
|
-
settleRelease(A,
|
|
2463
|
-
this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(
|
|
2529
|
+
settleRelease(A, g) {
|
|
2530
|
+
this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(g));
|
|
2464
2531
|
}
|
|
2465
2532
|
flushReleases() {
|
|
2466
2533
|
if (!(this.active || !this.releases.size || this.releaseDrain)) {
|
|
@@ -2489,8 +2556,8 @@ class HA {
|
|
|
2489
2556
|
prepareCompiler(A) {
|
|
2490
2557
|
if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
|
|
2491
2558
|
return Promise.resolve(c(new TypeError("Invalid compiler preparation options")));
|
|
2492
|
-
const
|
|
2493
|
-
return this.submit(!0, !0,
|
|
2559
|
+
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;
|
|
2560
|
+
return this.submit(!0, !0, g);
|
|
2494
2561
|
}
|
|
2495
2562
|
/** Every Run links current objects and starts a fresh student runtime. */
|
|
2496
2563
|
run() {
|
|
@@ -2498,94 +2565,106 @@ class HA {
|
|
|
2498
2565
|
}
|
|
2499
2566
|
/** Installs what the program imports from PyPI, then runs it with those files mounted. */
|
|
2500
2567
|
async runWithPackages() {
|
|
2501
|
-
const A = (
|
|
2568
|
+
const A = (I) => {
|
|
2502
2569
|
try {
|
|
2503
|
-
this.python?.onPackageStatus?.(
|
|
2570
|
+
this.python?.onPackageStatus?.(I);
|
|
2504
2571
|
} catch {
|
|
2505
2572
|
}
|
|
2506
2573
|
};
|
|
2507
|
-
let
|
|
2574
|
+
let g = {};
|
|
2508
2575
|
try {
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2576
|
+
g = await Ug(this.fs, A);
|
|
2577
|
+
} catch (I) {
|
|
2578
|
+
A({
|
|
2579
|
+
kind: "skipped",
|
|
2580
|
+
message: `Packages: ${I instanceof Error ? I.message : String(I)}`
|
|
2581
|
+
});
|
|
2514
2582
|
}
|
|
2515
|
-
return this.submit(!1, !1, !1,
|
|
2583
|
+
return this.submit(!1, !1, !1, g);
|
|
2516
2584
|
}
|
|
2517
|
-
/**
|
|
2585
|
+
/**
|
|
2586
|
+
* Builds without running: C++ compiles its Run-profile translation units (no link, no
|
|
2587
|
+
* devices); Rust compiles and links its crate. Errors arrive as a nonzero exit code.
|
|
2588
|
+
*/
|
|
2518
2589
|
compile() {
|
|
2519
2590
|
return this.submit(!0);
|
|
2520
2591
|
}
|
|
2521
|
-
submit(A,
|
|
2592
|
+
submit(A, g = !1, I = !1, C = {}) {
|
|
2522
2593
|
if (this.disposed) return Promise.resolve(c(new Error("Engine is disposed")));
|
|
2523
2594
|
if (this.active || this.cancellationDraining)
|
|
2524
2595
|
return Promise.resolve(c(new Error("An engine job is already active")));
|
|
2525
|
-
if (A && this.lang
|
|
2526
|
-
return Promise.resolve(
|
|
2596
|
+
if (A && this.lang === "python")
|
|
2597
|
+
return Promise.resolve(
|
|
2598
|
+
c(new Error("Compile-only is supported for C/C++ and Rust"))
|
|
2599
|
+
);
|
|
2527
2600
|
this.cacheValidation = void 0;
|
|
2528
|
-
const B =
|
|
2601
|
+
const B = g && !I;
|
|
2529
2602
|
let E;
|
|
2530
2603
|
try {
|
|
2531
|
-
const
|
|
2532
|
-
if (
|
|
2533
|
-
const
|
|
2534
|
-
(typeof
|
|
2604
|
+
const y = B || !this.cppArtifacts ? null : { ...this.cppArtifacts };
|
|
2605
|
+
if (y?.cacheCertificate !== void 0) {
|
|
2606
|
+
const U = y.cacheCertificate;
|
|
2607
|
+
(typeof U != "string" || U.length > 1024 * 1024 || new TextEncoder().encode(U).byteLength > 1024 * 1024) && delete y.cacheCertificate;
|
|
2535
2608
|
}
|
|
2536
2609
|
E = {
|
|
2537
2610
|
fs: B ? {} : structuredClone(this.fs),
|
|
2538
2611
|
binary_files: Object.fromEntries(
|
|
2539
|
-
Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
])
|
|
2612
|
+
Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(
|
|
2613
|
+
([U, a]) => [U, new Uint8Array(a)]
|
|
2614
|
+
)
|
|
2543
2615
|
),
|
|
2544
|
-
cpp_artifacts: structuredClone(
|
|
2616
|
+
cpp_artifacts: structuredClone(y)
|
|
2545
2617
|
};
|
|
2546
|
-
} catch (
|
|
2547
|
-
return Promise.resolve(c(
|
|
2618
|
+
} catch (y) {
|
|
2619
|
+
return Promise.resolve(c(y));
|
|
2548
2620
|
}
|
|
2549
2621
|
const D = !A && this.debugger.enabled, w = A ? void 0 : this.hostDevice;
|
|
2550
2622
|
if (w !== void 0 && (typeof w != "function" || !["c", "python"].includes(this.lang)))
|
|
2551
2623
|
return Promise.resolve(c(new TypeError("Invalid host device configuration")));
|
|
2552
2624
|
clearTimeout(this.idleTimer), this.stdin[L].clear();
|
|
2553
2625
|
const N = !!this.slot;
|
|
2554
|
-
let
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2626
|
+
let G;
|
|
2627
|
+
const R = new Promise((y) => {
|
|
2628
|
+
G = y;
|
|
2557
2629
|
});
|
|
2558
|
-
this.promise =
|
|
2630
|
+
this.promise = R;
|
|
2559
2631
|
const h = {
|
|
2560
2632
|
generation: this.generation,
|
|
2561
2633
|
scopeEpoch: this.scopeEpoch,
|
|
2562
2634
|
operationId: ++this.operationId,
|
|
2563
2635
|
cacheEpoch: this.generation,
|
|
2564
|
-
prepareOnly:
|
|
2565
|
-
validateCacheInputs:
|
|
2636
|
+
prepareOnly: g,
|
|
2637
|
+
validateCacheInputs: I,
|
|
2566
2638
|
settled: !1,
|
|
2567
2639
|
buildOnly: A,
|
|
2568
2640
|
debug: D,
|
|
2569
2641
|
opener: w,
|
|
2570
2642
|
startedAt: performance.now(),
|
|
2571
|
-
resolve:
|
|
2643
|
+
resolve: G,
|
|
2572
2644
|
stats: {
|
|
2573
|
-
operation:
|
|
2645
|
+
operation: g ? "prepare_compiler" : A ? "compile" : "run",
|
|
2574
2646
|
workerReadyMs: 0,
|
|
2575
2647
|
workerReused: N
|
|
2576
2648
|
},
|
|
2577
2649
|
start: {
|
|
2578
2650
|
...E,
|
|
2579
2651
|
lang: this.lang,
|
|
2580
|
-
prepare_compiler:
|
|
2581
|
-
validate_cache_inputs:
|
|
2652
|
+
prepare_compiler: g,
|
|
2653
|
+
validate_cache_inputs: I,
|
|
2582
2654
|
scope_epoch: this.scopeEpoch,
|
|
2583
2655
|
operation_id: this.operationId,
|
|
2584
2656
|
cache_epoch: this.generation,
|
|
2585
2657
|
is_debug: D,
|
|
2586
2658
|
build_only: A,
|
|
2587
2659
|
stdin_buffer: this.stdin[L].buffer,
|
|
2588
|
-
|
|
2660
|
+
program: {
|
|
2661
|
+
args: [...this.program.args ?? []].map(String),
|
|
2662
|
+
cwd: this.program.cwd,
|
|
2663
|
+
entry: this.program.entry,
|
|
2664
|
+
env: { ...this.program.env },
|
|
2665
|
+
collectFiles: !!this.program.collectFiles
|
|
2666
|
+
},
|
|
2667
|
+
cpp_cache: this.options?.objectCache && !D && !g ? {
|
|
2589
2668
|
generation: this.generation,
|
|
2590
2669
|
entries: this.objects.snapshot(),
|
|
2591
2670
|
max_entry_metadata_bytes: Math.min(
|
|
@@ -2598,33 +2677,33 @@ class HA {
|
|
|
2598
2677
|
};
|
|
2599
2678
|
this.objects.beginBatch(), this.active = h;
|
|
2600
2679
|
try {
|
|
2601
|
-
if (this.slot || this.makeWorker(), !this.current(h)) return
|
|
2602
|
-
const
|
|
2603
|
-
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((
|
|
2604
|
-
this.current(h) && this.slot ===
|
|
2680
|
+
if (this.slot || this.makeWorker(), !this.current(h)) return R;
|
|
2681
|
+
const y = this.slot;
|
|
2682
|
+
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((U) => {
|
|
2683
|
+
this.current(h) && this.slot === y && this.finish(h, c(U));
|
|
2605
2684
|
}), this.slot.ready && this.dispatch(h);
|
|
2606
|
-
} catch (
|
|
2607
|
-
this.finish(h, c(
|
|
2685
|
+
} catch (y) {
|
|
2686
|
+
this.finish(h, c(y));
|
|
2608
2687
|
}
|
|
2609
|
-
return
|
|
2688
|
+
return R;
|
|
2610
2689
|
}
|
|
2611
2690
|
current(A) {
|
|
2612
2691
|
return this.active === A && !A.settled;
|
|
2613
2692
|
}
|
|
2614
2693
|
makeWorker() {
|
|
2615
|
-
const A =
|
|
2694
|
+
const A = Cg(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
|
|
2616
2695
|
} };
|
|
2617
|
-
this.slot =
|
|
2618
|
-
const
|
|
2619
|
-
if (this.slot !==
|
|
2696
|
+
this.slot = g;
|
|
2697
|
+
const I = (E) => {
|
|
2698
|
+
if (this.slot !== g) return;
|
|
2620
2699
|
const D = E.data, w = this.active;
|
|
2621
2700
|
if (D.type === "ready") {
|
|
2622
|
-
if (
|
|
2623
|
-
|
|
2701
|
+
if (g.ready) return;
|
|
2702
|
+
g.ready = !0, w && this.current(w) && this.dispatch(w);
|
|
2624
2703
|
return;
|
|
2625
2704
|
}
|
|
2626
2705
|
if (!(!w || !this.current(w))) {
|
|
2627
|
-
if (!
|
|
2706
|
+
if (!g.ready && D.type === "error") {
|
|
2628
2707
|
this.finish(w, c(new Error(D.message)));
|
|
2629
2708
|
return;
|
|
2630
2709
|
}
|
|
@@ -2633,15 +2712,21 @@ class HA {
|
|
|
2633
2712
|
if (D.type === "cpp_cache_eligibility") {
|
|
2634
2713
|
if (this.options?.toolchainProfile !== "stock-certified-v1" || w.prepareOnly && !w.validateCacheInputs)
|
|
2635
2714
|
return;
|
|
2636
|
-
const N = (
|
|
2715
|
+
const N = (R) => typeof R == "string" && /^[0-9a-f]{64}$/.test(R), G = D.eligible === !0 && N(D.certificate_sha256) && N(D.snapshot);
|
|
2637
2716
|
this.cacheValidation = {
|
|
2638
|
-
eligible:
|
|
2717
|
+
eligible: G,
|
|
2639
2718
|
certificate: N(D.certificate_sha256) ? D.certificate_sha256 : void 0,
|
|
2640
|
-
snapshot:
|
|
2719
|
+
snapshot: G ? D.snapshot : void 0,
|
|
2641
2720
|
operationId: w.operationId,
|
|
2642
|
-
reason:
|
|
2721
|
+
reason: G ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
|
|
2722
|
+
};
|
|
2723
|
+
} else if (D.type === "files")
|
|
2724
|
+
w.files = {
|
|
2725
|
+
written: Object.fromEntries(D.written),
|
|
2726
|
+
removed: D.removed,
|
|
2727
|
+
truncated: D.truncated
|
|
2643
2728
|
};
|
|
2644
|
-
|
|
2729
|
+
else if (D.type === "stop")
|
|
2645
2730
|
this.finish(w, {
|
|
2646
2731
|
type: "completed",
|
|
2647
2732
|
exitCode: D.exit_code,
|
|
@@ -2649,7 +2734,8 @@ class HA {
|
|
|
2649
2734
|
totalMs: performance.now() - w.startedAt,
|
|
2650
2735
|
buildMs: D.build_ms,
|
|
2651
2736
|
runMs: D.run_ms
|
|
2652
|
-
}
|
|
2737
|
+
},
|
|
2738
|
+
...w.files ? { files: w.files } : {}
|
|
2653
2739
|
});
|
|
2654
2740
|
else if (D.type === "error")
|
|
2655
2741
|
this.finish(w, c(new Error(D.message)));
|
|
@@ -2659,27 +2745,27 @@ class HA {
|
|
|
2659
2745
|
} catch {
|
|
2660
2746
|
this.objects.abandonBatch();
|
|
2661
2747
|
}
|
|
2662
|
-
else D.type === "cpp_cache_stats" && D.generation === w.generation ? w.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? w.publication ??= this.publishObjects(w,
|
|
2748
|
+
else D.type === "cpp_cache_stats" && D.generation === w.generation ? w.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? w.publication ??= this.publishObjects(w, g) : D.type === "compiler_module_stats" && (w.stats.compilerModule = D);
|
|
2663
2749
|
} catch (N) {
|
|
2664
2750
|
this.finish(w, c(N));
|
|
2665
2751
|
}
|
|
2666
2752
|
}
|
|
2667
2753
|
}, C = (E) => {
|
|
2668
|
-
this.slot ===
|
|
2754
|
+
this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, c(E.error ?? new Error(E.message))) : this.retireWorker());
|
|
2669
2755
|
}, B = () => C({ message: "Unreadable execution worker message" });
|
|
2670
|
-
this.debugger[L].attach(A), A.addEventListener("message",
|
|
2671
|
-
A.removeEventListener("message",
|
|
2756
|
+
this.debugger[L].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
|
|
2757
|
+
A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[L].detach(A);
|
|
2672
2758
|
};
|
|
2673
2759
|
}
|
|
2674
|
-
async publishObjects(A,
|
|
2675
|
-
let
|
|
2760
|
+
async publishObjects(A, g) {
|
|
2761
|
+
let I = !1;
|
|
2676
2762
|
try {
|
|
2677
|
-
|
|
2763
|
+
I = await this.objects.validateBatch();
|
|
2678
2764
|
} catch {
|
|
2679
2765
|
}
|
|
2680
|
-
if (!(!this.current(A) || this.slot !==
|
|
2766
|
+
if (!(!this.current(A) || this.slot !== g)) {
|
|
2681
2767
|
try {
|
|
2682
|
-
|
|
2768
|
+
I && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
|
|
2683
2769
|
...this.cacheValidation,
|
|
2684
2770
|
eligible: !1,
|
|
2685
2771
|
snapshot: void 0,
|
|
@@ -2693,7 +2779,7 @@ class HA {
|
|
|
2693
2779
|
reason: "stock-publication-failure"
|
|
2694
2780
|
});
|
|
2695
2781
|
}
|
|
2696
|
-
this.current(A) &&
|
|
2782
|
+
this.current(A) && g.worker.postMessage({
|
|
2697
2783
|
type: "object_build_ack",
|
|
2698
2784
|
scopeEpoch: A.scopeEpoch,
|
|
2699
2785
|
operationId: A.operationId,
|
|
@@ -2705,11 +2791,11 @@ class HA {
|
|
|
2705
2791
|
if (this.toolchain) return Promise.resolve(this.toolchain);
|
|
2706
2792
|
if (this.toolchainLoading) return this.toolchainLoading;
|
|
2707
2793
|
this.toolchainController = new AbortController();
|
|
2708
|
-
const A =
|
|
2709
|
-
|
|
2794
|
+
const A = r.load(
|
|
2795
|
+
MA("c"),
|
|
2710
2796
|
this.cacheCompilerModule,
|
|
2711
2797
|
this.toolchainController.signal,
|
|
2712
|
-
|
|
2798
|
+
xA(),
|
|
2713
2799
|
this.options?.toolchainProfile
|
|
2714
2800
|
);
|
|
2715
2801
|
return this.toolchainLoading = A, this.initializing.add(A), A.then(
|
|
@@ -2720,12 +2806,12 @@ class HA {
|
|
|
2720
2806
|
), A;
|
|
2721
2807
|
}
|
|
2722
2808
|
async dispatch(A) {
|
|
2723
|
-
const
|
|
2724
|
-
if (!(!this.current(A) || !
|
|
2809
|
+
const g = this.slot;
|
|
2810
|
+
if (!(!this.current(A) || !g))
|
|
2725
2811
|
try {
|
|
2726
2812
|
if (this.lang === "c") {
|
|
2727
2813
|
const B = this.scopeEpoch, E = this.generation, D = this.ensureToolchain(), w = this.toolchain ?? await D;
|
|
2728
|
-
if (!this.current(A) || this.slot !==
|
|
2814
|
+
if (!this.current(A) || this.slot !== g || B !== this.scopeEpoch) return;
|
|
2729
2815
|
const N = A.start.cpp_artifacts?.requiredToolchain;
|
|
2730
2816
|
if (N && !w.matchesExpectation(N)) {
|
|
2731
2817
|
this.finish(A, {
|
|
@@ -2737,52 +2823,52 @@ class HA {
|
|
|
2737
2823
|
});
|
|
2738
2824
|
return;
|
|
2739
2825
|
}
|
|
2740
|
-
E === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== w.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== w && (this.toolchainIngestions++, this.toolchainHashCount += w.hashCount, this.toolchainHashMs += w.hashMs), this.toolchainIdentity = w.identity, this.toolchain = w, this.toolchainLoading === D && (this.toolchainLoading = void 0)),
|
|
2826
|
+
E === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== w.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== w && (this.toolchainIngestions++, this.toolchainHashCount += w.hashCount, this.toolchainHashMs += w.hashMs), this.toolchainIdentity = w.identity, this.toolchain = w, this.toolchainLoading === D && (this.toolchainLoading = void 0)), g.toolchain !== w && (this.compilerModuleCloned = w.configure(g.worker, {
|
|
2741
2827
|
type: "configure_cpp",
|
|
2742
2828
|
cacheCompilerModule: this.cacheCompilerModule
|
|
2743
|
-
}),
|
|
2829
|
+
}), g.toolchain = w);
|
|
2744
2830
|
}
|
|
2745
|
-
if (!this.current(A) || this.slot !==
|
|
2746
|
-
const
|
|
2831
|
+
if (!this.current(A) || this.slot !== g) return;
|
|
2832
|
+
const I = g.worker;
|
|
2747
2833
|
A.stats.workerReadyMs = performance.now() - A.startedAt;
|
|
2748
2834
|
const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
|
|
2749
|
-
if (this.stdout[L].attach(
|
|
2750
|
-
if (A.device = new
|
|
2835
|
+
if (this.stdout[L].attach(I, C), this.stderr[L].attach(I, C), A.prepareOnly || this.debugger[L].beginRun(), A.opener) {
|
|
2836
|
+
if (A.device = new Qg((B) => this.finish(A, c(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
|
|
2751
2837
|
A.start.host_device = A.device.workerStart;
|
|
2752
2838
|
}
|
|
2753
|
-
this.current(A) && (
|
|
2754
|
-
} catch (
|
|
2755
|
-
this.current(A) && (this.toolchainLoading = void 0, this.finish(A, c(
|
|
2839
|
+
this.current(A) && (I.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
|
|
2840
|
+
} catch (I) {
|
|
2841
|
+
this.current(A) && (this.toolchainLoading = void 0, this.finish(A, c(I)));
|
|
2756
2842
|
}
|
|
2757
2843
|
}
|
|
2758
|
-
finish(A,
|
|
2844
|
+
finish(A, g) {
|
|
2759
2845
|
if (!this.current(A)) return;
|
|
2760
|
-
(
|
|
2761
|
-
const
|
|
2762
|
-
|
|
2846
|
+
(g.type !== "completed" || g.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
|
|
2847
|
+
const I = this.slot?.worker;
|
|
2848
|
+
I && (this.stdout[L].detach(I), this.stderr[L].detach(I));
|
|
2763
2849
|
const C = A.device?.close();
|
|
2764
|
-
C && (
|
|
2765
|
-
const B =
|
|
2850
|
+
C && (g = c(C));
|
|
2851
|
+
const B = g.type === "completed" && A.generation === this.generation && !this.disposed, E = B && g.type === "completed" && g.exitCode === 0;
|
|
2766
2852
|
if (A.generation === this.generation)
|
|
2767
2853
|
for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
|
|
2768
2854
|
if (E)
|
|
2769
2855
|
for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
|
|
2770
2856
|
this.objects.discardBatch(), this.latest = A.stats, this.stdin[L].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(() => {
|
|
2771
2857
|
this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
|
|
2772
|
-
}, 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(
|
|
2858
|
+
}, 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);
|
|
2773
2859
|
}
|
|
2774
2860
|
retireWorker() {
|
|
2775
2861
|
clearTimeout(this.idleTimer);
|
|
2776
2862
|
const A = this.slot;
|
|
2777
|
-
A && (this.slot = void 0, A.remove(), this.stdout[L].detach(A.worker), this.stderr[L].detach(A.worker), A.worker.onerror = (
|
|
2863
|
+
A && (this.slot = void 0, A.remove(), this.stdout[L].detach(A.worker), this.stderr[L].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
|
|
2778
2864
|
}
|
|
2779
2865
|
}
|
|
2780
|
-
class
|
|
2866
|
+
class sA extends cA {
|
|
2781
2867
|
constructor(A) {
|
|
2782
|
-
super(), this.mode = A, this.callback = ((
|
|
2783
|
-
const
|
|
2784
|
-
if (this.accepts && !this.accepts(
|
|
2785
|
-
const C =
|
|
2868
|
+
super(), this.mode = A, this.callback = ((g) => {
|
|
2869
|
+
const I = g.data;
|
|
2870
|
+
if (this.accepts && !this.accepts(I) || I.type !== "stdout" || I.mode !== this.mode) return;
|
|
2871
|
+
const C = I.data;
|
|
2786
2872
|
this.emit("data", C);
|
|
2787
2873
|
}).bind(this), this[L] = {
|
|
2788
2874
|
attach: this.attach.bind(this),
|
|
@@ -2792,14 +2878,14 @@ class LA extends sA {
|
|
|
2792
2878
|
callback;
|
|
2793
2879
|
accepts;
|
|
2794
2880
|
[L];
|
|
2795
|
-
attach(A,
|
|
2796
|
-
this.accepts =
|
|
2881
|
+
attach(A, g) {
|
|
2882
|
+
this.accepts = g, A.addEventListener("message", this.callback);
|
|
2797
2883
|
}
|
|
2798
2884
|
detach(A) {
|
|
2799
2885
|
A.removeEventListener("message", this.callback);
|
|
2800
2886
|
}
|
|
2801
2887
|
}
|
|
2802
|
-
class
|
|
2888
|
+
class q {
|
|
2803
2889
|
/**
|
|
2804
2890
|
* Ring buffer to store stdin data.
|
|
2805
2891
|
*
|
|
@@ -2807,19 +2893,23 @@ class O {
|
|
|
2807
2893
|
* - One slot is always kept empty to distinguish full from empty
|
|
2808
2894
|
*/
|
|
2809
2895
|
static BUFFER_SIZE = 2048;
|
|
2810
|
-
static HEADER_SIZE =
|
|
2811
|
-
//
|
|
2812
|
-
static DATA_SIZE =
|
|
2896
|
+
static HEADER_SIZE = 12;
|
|
2897
|
+
// 3 x i32
|
|
2898
|
+
static DATA_SIZE = q.BUFFER_SIZE - q.HEADER_SIZE;
|
|
2813
2899
|
static READ_IDX = 0;
|
|
2814
2900
|
static WRITE_IDX = 1;
|
|
2901
|
+
/** Nonzero after `end()`: reads return end-of-file once the buffer drains. */
|
|
2902
|
+
static CLOSED_IDX = 2;
|
|
2815
2903
|
static encoder = new TextEncoder();
|
|
2816
|
-
buffer = new SharedArrayBuffer(
|
|
2904
|
+
buffer = new SharedArrayBuffer(q.BUFFER_SIZE);
|
|
2817
2905
|
generation = 0;
|
|
2906
|
+
/** Writes and `end()` happen in call order. */
|
|
2907
|
+
queue = Promise.resolve();
|
|
2818
2908
|
indices;
|
|
2819
2909
|
data;
|
|
2820
2910
|
[L];
|
|
2821
2911
|
constructor() {
|
|
2822
|
-
this.indices = new Int32Array(this.buffer, 0,
|
|
2912
|
+
this.indices = new Int32Array(this.buffer, 0, 3), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
|
|
2823
2913
|
const A = () => this.buffer;
|
|
2824
2914
|
this[L] = {
|
|
2825
2915
|
clear: this.clear.bind(this),
|
|
@@ -2829,35 +2919,52 @@ class O {
|
|
|
2829
2919
|
};
|
|
2830
2920
|
}
|
|
2831
2921
|
clear() {
|
|
2832
|
-
this.generation++, Atomics.notify(this.indices,
|
|
2922
|
+
this.generation++, Atomics.notify(this.indices, q.READ_IDX), this.buffer = new SharedArrayBuffer(q.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 3), this.data = new Int8Array(this.buffer, q.HEADER_SIZE), this.queue = Promise.resolve();
|
|
2833
2923
|
}
|
|
2834
|
-
|
|
2835
|
-
const
|
|
2836
|
-
return this.writeBytes(
|
|
2924
|
+
write(A) {
|
|
2925
|
+
const g = typeof A == "string" ? q.encoder.encode(A) : A;
|
|
2926
|
+
return this.enqueue(() => this.writeBytes(g));
|
|
2927
|
+
}
|
|
2928
|
+
/**
|
|
2929
|
+
* Close the program's input, like Ctrl+D in a terminal or the end of a `< file`:
|
|
2930
|
+
* once it has read everything written so far, its reads return end-of-file.
|
|
2931
|
+
*/
|
|
2932
|
+
end() {
|
|
2933
|
+
const A = this.generation;
|
|
2934
|
+
return this.enqueue(async () => {
|
|
2935
|
+
A === this.generation && (Atomics.store(this.indices, q.CLOSED_IDX, 1), Atomics.notify(this.indices, q.WRITE_IDX));
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2938
|
+
enqueue(A) {
|
|
2939
|
+
const g = this.queue.then(A, A);
|
|
2940
|
+
return this.queue = g.catch(() => {
|
|
2941
|
+
}), g;
|
|
2837
2942
|
}
|
|
2838
2943
|
async writeBytes(A) {
|
|
2839
|
-
const { DATA_SIZE:
|
|
2944
|
+
const { DATA_SIZE: g, READ_IDX: I, WRITE_IDX: C } = q;
|
|
2840
2945
|
let B = 0;
|
|
2841
2946
|
const E = this.generation;
|
|
2842
2947
|
for (; B < A.length && E === this.generation; ) {
|
|
2843
|
-
const D = Atomics.load(this.indices,
|
|
2948
|
+
const D = Atomics.load(this.indices, I);
|
|
2844
2949
|
let w = Atomics.load(this.indices, C);
|
|
2845
|
-
w ===
|
|
2846
|
-
const N = D <= w ?
|
|
2950
|
+
w === g - 1 && D > 0 && (w = 0);
|
|
2951
|
+
const N = D <= w ? g - w - 1 : D - w - 1;
|
|
2847
2952
|
if (N === 0) {
|
|
2848
|
-
await Atomics.waitAsync(this.indices,
|
|
2953
|
+
await Atomics.waitAsync(this.indices, I, D).value;
|
|
2849
2954
|
continue;
|
|
2850
2955
|
}
|
|
2851
|
-
const
|
|
2852
|
-
this.data.set(A.subarray(B, B +
|
|
2956
|
+
const G = Math.min(A.length - B, N);
|
|
2957
|
+
this.data.set(A.subarray(B, B + G), w), Atomics.store(this.indices, C, (w + G) % g), Atomics.notify(this.indices, C), B += G;
|
|
2853
2958
|
}
|
|
2854
2959
|
}
|
|
2855
2960
|
}
|
|
2856
2961
|
export {
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2962
|
+
_A as Artifact,
|
|
2963
|
+
$A as Debugger,
|
|
2964
|
+
qA as Engine,
|
|
2965
|
+
Jg as HOST_DEVICE_PATH,
|
|
2966
|
+
Eg as SITE_PACKAGES,
|
|
2967
|
+
q as Stdin,
|
|
2968
|
+
sA as Stdout,
|
|
2969
|
+
Ug as pythonPackageFiles
|
|
2863
2970
|
};
|