glassjar 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{worker-DqvbGm6m.js → worker-DKKpKTP_.js} +399 -420
- package/dist/engine_bg.wasm +0 -0
- package/dist/glassjar.js +1548 -902
- package/dist/glassjar.umd.cjs +5 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/python-packages.d.ts +65 -0
- package/dist/python-packages.d.ts.map +1 -0
- package/dist/python-stdlib-modules.json.d.ts +4 -0
- package/package.json +1 -1
package/dist/glassjar.js
CHANGED
|
@@ -1,228 +1,228 @@
|
|
|
1
|
-
function
|
|
1
|
+
function pA(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(
|
|
9
|
-
return Function.prototype.apply.call(
|
|
10
|
-
},
|
|
11
|
-
Q && typeof Q.ownKeys == "function" ?
|
|
12
|
-
return Object.getOwnPropertyNames(
|
|
13
|
-
} :
|
|
14
|
-
return Object.getOwnPropertyNames(
|
|
4
|
+
var u = { exports: {} }, NA;
|
|
5
|
+
function OA() {
|
|
6
|
+
if (NA) return u.exports;
|
|
7
|
+
NA = 1;
|
|
8
|
+
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(i, F, M) {
|
|
9
|
+
return Function.prototype.apply.call(i, F, M);
|
|
10
|
+
}, I;
|
|
11
|
+
Q && typeof Q.ownKeys == "function" ? I = Q.ownKeys : Object.getOwnPropertySymbols ? I = function(i) {
|
|
12
|
+
return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
|
|
13
|
+
} : I = function(i) {
|
|
14
|
+
return Object.getOwnPropertyNames(i);
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
console && console.warn && console.warn(
|
|
16
|
+
function g(o) {
|
|
17
|
+
console && console.warn && console.warn(o);
|
|
18
18
|
}
|
|
19
|
-
var C = Number.isNaN || function(
|
|
20
|
-
return
|
|
19
|
+
var C = Number.isNaN || function(i) {
|
|
20
|
+
return i !== i;
|
|
21
21
|
};
|
|
22
22
|
function B() {
|
|
23
23
|
B.init.call(this);
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
function D(
|
|
28
|
-
if (typeof
|
|
29
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
25
|
+
u.exports = B, u.exports.once = s, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
|
|
26
|
+
var E = 10;
|
|
27
|
+
function D(o) {
|
|
28
|
+
if (typeof o != "function")
|
|
29
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof o);
|
|
30
30
|
}
|
|
31
31
|
Object.defineProperty(B, "defaultMaxListeners", {
|
|
32
32
|
enumerable: !0,
|
|
33
33
|
get: function() {
|
|
34
|
-
return
|
|
34
|
+
return E;
|
|
35
35
|
},
|
|
36
|
-
set: function(
|
|
37
|
-
if (typeof
|
|
38
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
39
|
-
|
|
36
|
+
set: function(o) {
|
|
37
|
+
if (typeof o != "number" || o < 0 || C(o))
|
|
38
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + o + ".");
|
|
39
|
+
E = o;
|
|
40
40
|
}
|
|
41
41
|
}), B.init = function() {
|
|
42
42
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
43
|
-
}, B.prototype.setMaxListeners = function(
|
|
44
|
-
if (typeof
|
|
45
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' +
|
|
46
|
-
return this._maxListeners =
|
|
43
|
+
}, B.prototype.setMaxListeners = function(i) {
|
|
44
|
+
if (typeof i != "number" || i < 0 || C(i))
|
|
45
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + i + ".");
|
|
46
|
+
return this._maxListeners = i, this;
|
|
47
47
|
};
|
|
48
|
-
function o
|
|
49
|
-
return
|
|
48
|
+
function w(o) {
|
|
49
|
+
return o._maxListeners === void 0 ? B.defaultMaxListeners : o._maxListeners;
|
|
50
50
|
}
|
|
51
51
|
B.prototype.getMaxListeners = function() {
|
|
52
|
-
return
|
|
53
|
-
}, B.prototype.emit = function(
|
|
54
|
-
for (var
|
|
55
|
-
var
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
else if (!
|
|
52
|
+
return w(this);
|
|
53
|
+
}, B.prototype.emit = function(i) {
|
|
54
|
+
for (var F = [], M = 1; M < arguments.length; M++) F.push(arguments[M]);
|
|
55
|
+
var y = i === "error", S = this._events;
|
|
56
|
+
if (S !== void 0)
|
|
57
|
+
y = y && S.error === void 0;
|
|
58
|
+
else if (!y)
|
|
59
59
|
return !1;
|
|
60
|
-
if (
|
|
61
|
-
var
|
|
62
|
-
if (
|
|
63
|
-
throw
|
|
64
|
-
var
|
|
65
|
-
throw
|
|
60
|
+
if (y) {
|
|
61
|
+
var Y;
|
|
62
|
+
if (F.length > 0 && (Y = F[0]), Y instanceof Error)
|
|
63
|
+
throw Y;
|
|
64
|
+
var p = new Error("Unhandled error." + (Y ? " (" + Y.message + ")" : ""));
|
|
65
|
+
throw p.context = Y, p;
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
if (
|
|
67
|
+
var t = S[i];
|
|
68
|
+
if (t === void 0)
|
|
69
69
|
return !1;
|
|
70
|
-
if (typeof
|
|
71
|
-
A(
|
|
70
|
+
if (typeof t == "function")
|
|
71
|
+
A(t, this, F);
|
|
72
72
|
else
|
|
73
|
-
for (var
|
|
74
|
-
A(
|
|
73
|
+
for (var oA = t.length, qA = R(t, oA), M = 0; M < oA; ++M)
|
|
74
|
+
A(qA[M], this, F);
|
|
75
75
|
return !0;
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
if (D(
|
|
77
|
+
function N(o, i, F, M) {
|
|
78
|
+
var y, S, Y;
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
else if (typeof
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
|
|
81
|
+
i,
|
|
82
|
+
F.listener ? F.listener : F
|
|
83
|
+
), S = o._events), Y = S[i]), Y === void 0)
|
|
84
|
+
Y = S[i] = F, ++o._eventsCount;
|
|
85
|
+
else if (typeof Y == "function" ? Y = S[i] = M ? [F, Y] : [Y, F] : M ? Y.unshift(F) : Y.push(F), y = w(o), y > 0 && Y.length > y && !Y.warned) {
|
|
86
|
+
Y.warned = !0;
|
|
87
|
+
var p = new Error("Possible EventEmitter memory leak detected. " + Y.length + " " + String(i) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
88
|
+
p.name = "MaxListenersExceededWarning", p.emitter = o, p.type = i, p.count = Y.length, g(p);
|
|
89
89
|
}
|
|
90
|
-
return
|
|
90
|
+
return o;
|
|
91
91
|
}
|
|
92
|
-
B.prototype.addListener = function(
|
|
93
|
-
return
|
|
94
|
-
}, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(
|
|
95
|
-
return
|
|
92
|
+
B.prototype.addListener = function(i, F) {
|
|
93
|
+
return N(this, i, F, !1);
|
|
94
|
+
}, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(i, F) {
|
|
95
|
+
return N(this, i, F, !0);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function k() {
|
|
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
|
|
104
|
-
}
|
|
105
|
-
B.prototype.once = function(
|
|
106
|
-
return D(
|
|
107
|
-
}, B.prototype.prependOnceListener = function(
|
|
108
|
-
return D(
|
|
109
|
-
}, B.prototype.removeListener = function(
|
|
110
|
-
var
|
|
111
|
-
if (D(
|
|
101
|
+
function U(o, i, F) {
|
|
102
|
+
var M = { fired: !1, wrapFn: void 0, target: o, type: i, listener: F }, y = k.bind(M);
|
|
103
|
+
return y.listener = F, M.wrapFn = y, y;
|
|
104
|
+
}
|
|
105
|
+
B.prototype.once = function(i, F) {
|
|
106
|
+
return D(F), this.on(i, U(this, i, F)), this;
|
|
107
|
+
}, B.prototype.prependOnceListener = function(i, F) {
|
|
108
|
+
return D(F), this.prependListener(i, U(this, i, F)), this;
|
|
109
|
+
}, B.prototype.removeListener = function(i, F) {
|
|
110
|
+
var M, y, S, Y, p;
|
|
111
|
+
if (D(F), y = this._events, y === void 0)
|
|
112
112
|
return this;
|
|
113
|
-
if (
|
|
113
|
+
if (M = y[i], M === 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 (
|
|
119
|
-
if (
|
|
120
|
-
|
|
115
|
+
if (M === F || M.listener === F)
|
|
116
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete y[i], y.removeListener && this.emit("removeListener", i, M.listener || F));
|
|
117
|
+
else if (typeof M != "function") {
|
|
118
|
+
for (S = -1, Y = M.length - 1; Y >= 0; Y--)
|
|
119
|
+
if (M[Y] === F || M[Y].listener === F) {
|
|
120
|
+
p = M[Y].listener, S = Y;
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
|
-
if (
|
|
123
|
+
if (S < 0)
|
|
124
124
|
return this;
|
|
125
|
-
|
|
125
|
+
S === 0 ? M.shift() : H(M, S), M.length === 1 && (y[i] = M[0]), y.removeListener !== void 0 && this.emit("removeListener", i, p || F);
|
|
126
126
|
}
|
|
127
127
|
return this;
|
|
128
|
-
}, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(
|
|
129
|
-
var
|
|
130
|
-
if (
|
|
128
|
+
}, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(i) {
|
|
129
|
+
var F, M, y;
|
|
130
|
+
if (M = this._events, M === void 0)
|
|
131
131
|
return this;
|
|
132
|
-
if (
|
|
133
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
132
|
+
if (M.removeListener === void 0)
|
|
133
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : M[i] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete M[i]), this;
|
|
134
134
|
if (arguments.length === 0) {
|
|
135
|
-
var
|
|
136
|
-
for (
|
|
137
|
-
|
|
135
|
+
var S = Object.keys(M), Y;
|
|
136
|
+
for (y = 0; y < S.length; ++y)
|
|
137
|
+
Y = S[y], 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 (
|
|
141
|
-
this.removeListener(
|
|
142
|
-
else if (
|
|
143
|
-
for (
|
|
144
|
-
this.removeListener(
|
|
140
|
+
if (F = M[i], typeof F == "function")
|
|
141
|
+
this.removeListener(i, F);
|
|
142
|
+
else if (F !== void 0)
|
|
143
|
+
for (y = F.length - 1; y >= 0; y--)
|
|
144
|
+
this.removeListener(i, F[y]);
|
|
145
145
|
return this;
|
|
146
146
|
};
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
if (
|
|
147
|
+
function h(o, i, F) {
|
|
148
|
+
var M = o._events;
|
|
149
|
+
if (M === void 0)
|
|
150
150
|
return [];
|
|
151
|
-
var
|
|
152
|
-
return
|
|
153
|
-
}
|
|
154
|
-
B.prototype.listeners = function(
|
|
155
|
-
return
|
|
156
|
-
}, B.prototype.rawListeners = function(
|
|
157
|
-
return
|
|
158
|
-
}, B.listenerCount = function(
|
|
159
|
-
return typeof
|
|
160
|
-
}, B.prototype.listenerCount =
|
|
161
|
-
function
|
|
162
|
-
var
|
|
163
|
-
if (
|
|
164
|
-
var
|
|
165
|
-
if (typeof
|
|
151
|
+
var y = M[i];
|
|
152
|
+
return y === void 0 ? [] : typeof y == "function" ? F ? [y.listener || y] : [y] : F ? j(y) : R(y, y.length);
|
|
153
|
+
}
|
|
154
|
+
B.prototype.listeners = function(i) {
|
|
155
|
+
return h(this, i, !0);
|
|
156
|
+
}, B.prototype.rawListeners = function(i) {
|
|
157
|
+
return h(this, i, !1);
|
|
158
|
+
}, B.listenerCount = function(o, i) {
|
|
159
|
+
return typeof o.listenerCount == "function" ? o.listenerCount(i) : K.call(o, i);
|
|
160
|
+
}, B.prototype.listenerCount = K;
|
|
161
|
+
function K(o) {
|
|
162
|
+
var i = this._events;
|
|
163
|
+
if (i !== void 0) {
|
|
164
|
+
var F = i[o];
|
|
165
|
+
if (typeof F == "function")
|
|
166
166
|
return 1;
|
|
167
|
-
if (
|
|
168
|
-
return
|
|
167
|
+
if (F !== void 0)
|
|
168
|
+
return F.length;
|
|
169
169
|
}
|
|
170
170
|
return 0;
|
|
171
171
|
}
|
|
172
172
|
B.prototype.eventNames = function() {
|
|
173
|
-
return this._eventsCount > 0 ?
|
|
173
|
+
return this._eventsCount > 0 ? I(this._events) : [];
|
|
174
174
|
};
|
|
175
|
-
function
|
|
176
|
-
for (var
|
|
177
|
-
|
|
178
|
-
return
|
|
179
|
-
}
|
|
180
|
-
function
|
|
181
|
-
for (;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
function
|
|
186
|
-
for (var
|
|
187
|
-
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
function
|
|
191
|
-
return new Promise(function(
|
|
192
|
-
function
|
|
193
|
-
|
|
175
|
+
function R(o, i) {
|
|
176
|
+
for (var F = new Array(i), M = 0; M < i; ++M)
|
|
177
|
+
F[M] = o[M];
|
|
178
|
+
return F;
|
|
179
|
+
}
|
|
180
|
+
function H(o, i) {
|
|
181
|
+
for (; i + 1 < o.length; i++)
|
|
182
|
+
o[i] = o[i + 1];
|
|
183
|
+
o.pop();
|
|
184
|
+
}
|
|
185
|
+
function j(o) {
|
|
186
|
+
for (var i = new Array(o.length), F = 0; F < i.length; ++F)
|
|
187
|
+
i[F] = o[F].listener || o[F];
|
|
188
|
+
return i;
|
|
189
|
+
}
|
|
190
|
+
function s(o, i) {
|
|
191
|
+
return new Promise(function(F, M) {
|
|
192
|
+
function y(Y) {
|
|
193
|
+
o.removeListener(i, S), M(Y);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
typeof
|
|
195
|
+
function S() {
|
|
196
|
+
typeof o.removeListener == "function" && o.removeListener("error", y), F([].slice.call(arguments));
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
V(o, i, S, { once: !0 }), i !== "error" && v(o, y, { once: !0 });
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
typeof
|
|
201
|
+
function v(o, i, F) {
|
|
202
|
+
typeof o.on == "function" && V(o, "error", i, F);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
if (typeof
|
|
206
|
-
|
|
207
|
-
else if (typeof
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
function V(o, i, F, M) {
|
|
205
|
+
if (typeof o.on == "function")
|
|
206
|
+
M.once ? o.once(i, F) : o.on(i, F);
|
|
207
|
+
else if (typeof o.addEventListener == "function")
|
|
208
|
+
o.addEventListener(i, function y(S) {
|
|
209
|
+
M.once && o.removeEventListener(i, y), F(S);
|
|
210
210
|
});
|
|
211
211
|
else
|
|
212
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof
|
|
212
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return u.exports;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
const
|
|
218
|
-
class
|
|
216
|
+
var xA = OA();
|
|
217
|
+
const sA = /* @__PURE__ */ pA(xA);
|
|
218
|
+
class BA {
|
|
219
219
|
__destroy_into_raw() {
|
|
220
220
|
const A = this.__wbg_ptr;
|
|
221
|
-
return this.__wbg_ptr = 0,
|
|
221
|
+
return this.__wbg_ptr = 0, MA.unregister(this), A;
|
|
222
222
|
}
|
|
223
223
|
free() {
|
|
224
224
|
const A = this.__destroy_into_raw();
|
|
225
|
-
|
|
225
|
+
G.__wbg_dapadapter_free(A, 0);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Attaches a worker to the adapter.
|
|
@@ -233,80 +233,80 @@ class $ {
|
|
|
233
233
|
* @param {Worker} worker
|
|
234
234
|
*/
|
|
235
235
|
attach(A) {
|
|
236
|
-
|
|
236
|
+
G.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
|
+
G.dapadapter_detach(this.__wbg_ptr);
|
|
243
243
|
}
|
|
244
244
|
constructor() {
|
|
245
|
-
const A =
|
|
246
|
-
return this.__wbg_ptr = A >>> 0,
|
|
245
|
+
const A = G.dapadapter_new();
|
|
246
|
+
return this.__wbg_ptr = A >>> 0, MA.register(this, this.__wbg_ptr, this), this;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* @param {Function} callback
|
|
250
250
|
*/
|
|
251
251
|
on(A) {
|
|
252
|
-
|
|
252
|
+
G.dapadapter_on(this.__wbg_ptr, A);
|
|
253
253
|
}
|
|
254
254
|
resetRun() {
|
|
255
|
-
|
|
255
|
+
G.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 G.dapadapter_sendMessage(this.__wbg_ptr, A);
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
265
|
* @param {boolean} value
|
|
266
266
|
*/
|
|
267
267
|
setFilterInternals(A) {
|
|
268
|
-
|
|
268
|
+
G.dapadapter_setFilterInternals(this.__wbg_ptr, A);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
Symbol.dispose && (
|
|
272
|
-
class
|
|
271
|
+
Symbol.dispose && (BA.prototype[Symbol.dispose] = BA.prototype.free);
|
|
272
|
+
class r {
|
|
273
273
|
static __wrap(A) {
|
|
274
274
|
A = A >>> 0;
|
|
275
|
-
const
|
|
276
|
-
return
|
|
275
|
+
const I = Object.create(r.prototype);
|
|
276
|
+
return I.__wbg_ptr = A, kA.register(I, I.__wbg_ptr, I), I;
|
|
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, kA.unregister(this), A;
|
|
281
281
|
}
|
|
282
282
|
free() {
|
|
283
283
|
const A = this.__destroy_into_raw();
|
|
284
|
-
|
|
284
|
+
G.__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
|
+
G.trap___wbg_wasmer_trap();
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
Symbol.dispose && (
|
|
295
|
-
function
|
|
294
|
+
Symbol.dispose && (r.prototype[Symbol.dispose] = r.prototype.free);
|
|
295
|
+
function jA() {
|
|
296
296
|
let Q, A;
|
|
297
297
|
try {
|
|
298
|
-
const
|
|
299
|
-
return Q =
|
|
298
|
+
const I = G.cpp_exception_hash();
|
|
299
|
+
return Q = I[0], A = I[1], q(I[0], I[1]);
|
|
300
300
|
} finally {
|
|
301
|
-
|
|
301
|
+
G.__wbindgen_free(Q, A, 1);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const A =
|
|
306
|
-
var C =
|
|
307
|
-
return
|
|
304
|
+
function FA(Q) {
|
|
305
|
+
const A = T(Q, G.__wbindgen_malloc, G.__wbindgen_realloc), I = d, g = G.prefetch_urls(A, I);
|
|
306
|
+
var C = zA(g[0], g[1]).slice();
|
|
307
|
+
return G.__wbindgen_free(g[0], g[1] * 4, 4), C;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function dA() {
|
|
310
310
|
return {
|
|
311
311
|
__proto__: null,
|
|
312
312
|
"./engine_bg.js": {
|
|
@@ -314,33 +314,33 @@ function hA() {
|
|
|
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, I) {
|
|
318
|
+
return Error(q(A, I));
|
|
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, I) {
|
|
324
|
+
const g = String(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
|
|
325
|
+
a().setInt32(A + 4, B, !0), a().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, I) {
|
|
328
|
+
const g = I, C = typeof g == "bigint" ? g : void 0;
|
|
329
|
+
a().setBigInt64(A + 8, x(C) ? BigInt(0) : C, !0), a().setInt32(A + 0, !x(C), !0);
|
|
330
330
|
},
|
|
331
331
|
__wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(A) {
|
|
332
|
-
const
|
|
333
|
-
return
|
|
332
|
+
const I = A, g = typeof I == "boolean" ? I : void 0;
|
|
333
|
+
return x(g) ? 16777215 : g ? 1 : 0;
|
|
334
334
|
},
|
|
335
|
-
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A,
|
|
336
|
-
const
|
|
337
|
-
|
|
335
|
+
__wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, I) {
|
|
336
|
+
const g = EA(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
|
|
337
|
+
a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
|
|
338
338
|
},
|
|
339
339
|
__wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
|
|
340
|
-
return
|
|
340
|
+
return G.__wbindgen_export;
|
|
341
341
|
},
|
|
342
|
-
__wbg___wbindgen_in_47fa6863be6f2f25: function(A,
|
|
343
|
-
return A in
|
|
342
|
+
__wbg___wbindgen_in_47fa6863be6f2f25: function(A, I) {
|
|
343
|
+
return A in I;
|
|
344
344
|
},
|
|
345
345
|
__wbg___wbindgen_is_bigint_31b12575b56f32fc: function(A) {
|
|
346
346
|
return typeof A == "bigint";
|
|
@@ -349,8 +349,8 @@ function hA() {
|
|
|
349
349
|
return typeof A == "function";
|
|
350
350
|
},
|
|
351
351
|
__wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(A) {
|
|
352
|
-
const
|
|
353
|
-
return typeof
|
|
352
|
+
const I = A;
|
|
353
|
+
return typeof I == "object" && I !== null;
|
|
354
354
|
},
|
|
355
355
|
__wbg___wbindgen_is_string_cd444516edc5b180: function(A) {
|
|
356
356
|
return typeof A == "string";
|
|
@@ -358,64 +358,64 @@ function hA() {
|
|
|
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, I) {
|
|
362
|
+
return A === I;
|
|
363
363
|
},
|
|
364
|
-
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A,
|
|
365
|
-
return A ==
|
|
364
|
+
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, I) {
|
|
365
|
+
return A == I;
|
|
366
366
|
},
|
|
367
|
-
__wbg___wbindgen_lt_bb59cc3d23526e0d: function(A,
|
|
368
|
-
return A <
|
|
367
|
+
__wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, I) {
|
|
368
|
+
return A < I;
|
|
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, I) {
|
|
374
|
+
const g = I, C = typeof g == "number" ? g : void 0;
|
|
375
|
+
a().setFloat64(A + 8, x(C) ? 0 : C, !0), a().setInt32(A + 0, !x(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, I) {
|
|
381
|
+
return A >> I;
|
|
382
382
|
},
|
|
383
|
-
__wbg___wbindgen_string_get_72fb696202c56729: function(A,
|
|
384
|
-
const
|
|
385
|
-
var B =
|
|
386
|
-
|
|
383
|
+
__wbg___wbindgen_string_get_72fb696202c56729: function(A, I) {
|
|
384
|
+
const g = I, C = typeof g == "string" ? g : void 0;
|
|
385
|
+
var B = x(C) ? 0 : T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
|
|
386
|
+
a().setInt32(A + 4, E, !0), a().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, I) {
|
|
389
|
+
throw new Error(q(A, I));
|
|
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
|
|
396
|
-
A.addEventListener(
|
|
395
|
+
return J(function(A, I, g, C) {
|
|
396
|
+
A.addEventListener(q(I, g), C);
|
|
397
397
|
}, arguments);
|
|
398
398
|
},
|
|
399
399
|
__wbg_apply_2e22c45cb4f12415: function() {
|
|
400
|
-
return
|
|
401
|
-
return Reflect.apply(A,
|
|
400
|
+
return J(function(A, I, g) {
|
|
401
|
+
return Reflect.apply(A, I, g);
|
|
402
402
|
}, arguments);
|
|
403
403
|
},
|
|
404
404
|
__wbg_apply_ada2ee1a60ac7b3c: function() {
|
|
405
|
-
return
|
|
406
|
-
return A.apply(
|
|
405
|
+
return J(function(A, I, g) {
|
|
406
|
+
return A.apply(I, g);
|
|
407
407
|
}, arguments);
|
|
408
408
|
},
|
|
409
409
|
__wbg_arrayBuffer_bb54076166006c39: function() {
|
|
410
|
-
return
|
|
410
|
+
return J(function(A) {
|
|
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, I, g, C) {
|
|
415
|
+
return A.bind(I, g, C);
|
|
416
416
|
},
|
|
417
|
-
__wbg_bind_29ba380591735d8c: function(A,
|
|
418
|
-
return A.bind(
|
|
417
|
+
__wbg_bind_29ba380591735d8c: function(A, I, g) {
|
|
418
|
+
return A.bind(I, g);
|
|
419
419
|
},
|
|
420
420
|
__wbg_buffer_7b5f53e46557d8f1: function(A) {
|
|
421
421
|
return A.buffer;
|
|
@@ -427,18 +427,18 @@ function hA() {
|
|
|
427
427
|
return A.byteLength;
|
|
428
428
|
},
|
|
429
429
|
__wbg_call_389efe28435a9388: function() {
|
|
430
|
-
return
|
|
431
|
-
return A.call(
|
|
430
|
+
return J(function(A, I) {
|
|
431
|
+
return A.call(I);
|
|
432
432
|
}, arguments);
|
|
433
433
|
},
|
|
434
434
|
__wbg_call_4708e0c13bdc8e95: function() {
|
|
435
|
-
return
|
|
436
|
-
return A.call(
|
|
435
|
+
return J(function(A, I, g) {
|
|
436
|
+
return A.call(I, g);
|
|
437
437
|
}, arguments);
|
|
438
438
|
},
|
|
439
439
|
__wbg_compareExchange_b578410c358e695e: function() {
|
|
440
|
-
return
|
|
441
|
-
return Atomics.compareExchange(A,
|
|
440
|
+
return J(function(A, I, g, C) {
|
|
441
|
+
return Atomics.compareExchange(A, I >>> 0, g, C);
|
|
442
442
|
}, arguments);
|
|
443
443
|
},
|
|
444
444
|
__wbg_constructor_ad6c0ed428f55d34: function(A) {
|
|
@@ -447,8 +447,8 @@ function hA() {
|
|
|
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, I, g) {
|
|
451
|
+
return WebAssembly.Module.customSections(A, q(I, g));
|
|
452
452
|
},
|
|
453
453
|
__wbg_data_5330da50312d0bc1: function(A) {
|
|
454
454
|
return A.data;
|
|
@@ -459,12 +459,12 @@ function hA() {
|
|
|
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, I) {
|
|
463
|
+
let g, C;
|
|
464
464
|
try {
|
|
465
|
-
|
|
465
|
+
g = A, C = I, console.error(q(A, I));
|
|
466
466
|
} finally {
|
|
467
|
-
|
|
467
|
+
G.__wbindgen_free(g, C, 1);
|
|
468
468
|
}
|
|
469
469
|
},
|
|
470
470
|
__wbg_exports_794a42000dacd046: function(A) {
|
|
@@ -473,20 +473,20 @@ function hA() {
|
|
|
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, I, g) {
|
|
477
|
+
return A.fetch(q(I, g));
|
|
478
478
|
},
|
|
479
479
|
__wbg_from_bddd64e7d5ff6941: function(A) {
|
|
480
480
|
return Array.from(A);
|
|
481
481
|
},
|
|
482
482
|
__wbg_getPrototypeOf_2653517f1dc884d5: function() {
|
|
483
|
-
return
|
|
483
|
+
return J(function(A) {
|
|
484
484
|
return Reflect.getPrototypeOf(A);
|
|
485
485
|
}, arguments);
|
|
486
486
|
},
|
|
487
487
|
__wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
|
|
488
|
-
return
|
|
489
|
-
A.getRandomValues(
|
|
488
|
+
return J(function(A, I) {
|
|
489
|
+
A.getRandomValues(I);
|
|
490
490
|
}, arguments);
|
|
491
491
|
},
|
|
492
492
|
__wbg_getTime_1e3cd1391c5c3995: function(A) {
|
|
@@ -495,169 +495,169 @@ function hA() {
|
|
|
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, I, g) {
|
|
499
|
+
return A.getUint32(I >>> 0, g !== 0);
|
|
500
500
|
},
|
|
501
501
|
__wbg_get_7efbcc3819719b0f: function() {
|
|
502
|
-
return
|
|
503
|
-
return A.get(
|
|
502
|
+
return J(function(A, I) {
|
|
503
|
+
return A.get(I >>> 0);
|
|
504
504
|
}, arguments);
|
|
505
505
|
},
|
|
506
|
-
__wbg_get_9b94d73e6221f75c: function(A,
|
|
507
|
-
return A[
|
|
506
|
+
__wbg_get_9b94d73e6221f75c: function(A, I) {
|
|
507
|
+
return A[I >>> 0];
|
|
508
508
|
},
|
|
509
509
|
__wbg_get_b3ed3ad4be2bc8ac: function() {
|
|
510
|
-
return
|
|
511
|
-
return Reflect.get(A,
|
|
510
|
+
return J(function(A, I) {
|
|
511
|
+
return Reflect.get(A, I);
|
|
512
512
|
}, arguments);
|
|
513
513
|
},
|
|
514
|
-
__wbg_get_index_253dd2a9e007656d: function(A,
|
|
515
|
-
return A[
|
|
514
|
+
__wbg_get_index_253dd2a9e007656d: function(A, I) {
|
|
515
|
+
return A[I >>> 0];
|
|
516
516
|
},
|
|
517
|
-
__wbg_get_index_9a5bfdd2ca49c65f: function(A,
|
|
518
|
-
return A[
|
|
517
|
+
__wbg_get_index_9a5bfdd2ca49c65f: function(A, I) {
|
|
518
|
+
return A[I >>> 0];
|
|
519
519
|
},
|
|
520
|
-
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A,
|
|
521
|
-
return A[
|
|
520
|
+
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A, I) {
|
|
521
|
+
return A[I];
|
|
522
522
|
},
|
|
523
523
|
__wbg_grow_5d42bf28c2da22cb: function() {
|
|
524
|
-
return
|
|
525
|
-
return A.grow(
|
|
524
|
+
return J(function(A, I) {
|
|
525
|
+
return A.grow(I >>> 0);
|
|
526
526
|
}, arguments);
|
|
527
527
|
},
|
|
528
528
|
__wbg_grow_d034989fce14cc8e: function() {
|
|
529
|
-
return
|
|
530
|
-
return A.grow(
|
|
529
|
+
return J(function(A, I) {
|
|
530
|
+
return A.grow(I >>> 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 I;
|
|
538
538
|
try {
|
|
539
|
-
|
|
539
|
+
I = A instanceof ArrayBuffer;
|
|
540
540
|
} catch {
|
|
541
|
-
|
|
541
|
+
I = !1;
|
|
542
542
|
}
|
|
543
|
-
return
|
|
543
|
+
return I;
|
|
544
544
|
},
|
|
545
545
|
__wbg_instanceof_Error_8573fe0b0b480f46: function(A) {
|
|
546
|
-
let
|
|
546
|
+
let I;
|
|
547
547
|
try {
|
|
548
|
-
|
|
548
|
+
I = A instanceof Error;
|
|
549
549
|
} catch {
|
|
550
|
-
|
|
550
|
+
I = !1;
|
|
551
551
|
}
|
|
552
|
-
return
|
|
552
|
+
return I;
|
|
553
553
|
},
|
|
554
554
|
__wbg_instanceof_Function_2a29eec978bb3b11: function(A) {
|
|
555
|
-
let
|
|
555
|
+
let I;
|
|
556
556
|
try {
|
|
557
|
-
|
|
557
|
+
I = A instanceof Function;
|
|
558
558
|
} catch {
|
|
559
|
-
|
|
559
|
+
I = !1;
|
|
560
560
|
}
|
|
561
|
-
return
|
|
561
|
+
return I;
|
|
562
562
|
},
|
|
563
563
|
__wbg_instanceof_Global_2db767b6b2347f01: function(A) {
|
|
564
|
-
let
|
|
564
|
+
let I;
|
|
565
565
|
try {
|
|
566
|
-
|
|
566
|
+
I = A instanceof WebAssembly.Global;
|
|
567
567
|
} catch {
|
|
568
|
-
|
|
568
|
+
I = !1;
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return I;
|
|
571
571
|
},
|
|
572
572
|
__wbg_instanceof_Map_53af74335dec57f4: function(A) {
|
|
573
|
-
let
|
|
573
|
+
let I;
|
|
574
574
|
try {
|
|
575
|
-
|
|
575
|
+
I = A instanceof Map;
|
|
576
576
|
} catch {
|
|
577
|
-
|
|
577
|
+
I = !1;
|
|
578
578
|
}
|
|
579
|
-
return
|
|
579
|
+
return I;
|
|
580
580
|
},
|
|
581
581
|
__wbg_instanceof_Memory_dc8c61e3f831ee37: function(A) {
|
|
582
|
-
let
|
|
582
|
+
let I;
|
|
583
583
|
try {
|
|
584
|
-
|
|
584
|
+
I = A instanceof WebAssembly.Memory;
|
|
585
585
|
} catch {
|
|
586
|
-
|
|
586
|
+
I = !1;
|
|
587
587
|
}
|
|
588
|
-
return
|
|
588
|
+
return I;
|
|
589
589
|
},
|
|
590
590
|
__wbg_instanceof_Module_d0d412b14363ba9a: function(A) {
|
|
591
|
-
let
|
|
591
|
+
let I;
|
|
592
592
|
try {
|
|
593
|
-
|
|
593
|
+
I = A instanceof WebAssembly.Module;
|
|
594
594
|
} catch {
|
|
595
|
-
|
|
595
|
+
I = !1;
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return I;
|
|
598
598
|
},
|
|
599
599
|
__wbg_instanceof_Object_1c6af87502b733ed: function(A) {
|
|
600
|
-
let
|
|
600
|
+
let I;
|
|
601
601
|
try {
|
|
602
|
-
|
|
602
|
+
I = A instanceof Object;
|
|
603
603
|
} catch {
|
|
604
|
-
|
|
604
|
+
I = !1;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return I;
|
|
607
607
|
},
|
|
608
608
|
__wbg_instanceof_RangeError_0b0dd056bc557b89: function(A) {
|
|
609
|
-
let
|
|
609
|
+
let I;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
I = A instanceof RangeError;
|
|
612
612
|
} catch {
|
|
613
|
-
|
|
613
|
+
I = !1;
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return I;
|
|
616
616
|
},
|
|
617
617
|
__wbg_instanceof_Response_ee1d54d79ae41977: function(A) {
|
|
618
|
-
let
|
|
618
|
+
let I;
|
|
619
619
|
try {
|
|
620
|
-
|
|
620
|
+
I = A instanceof Response;
|
|
621
621
|
} catch {
|
|
622
|
-
|
|
622
|
+
I = !1;
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return I;
|
|
625
625
|
},
|
|
626
626
|
__wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26: function(A) {
|
|
627
|
-
let
|
|
627
|
+
let I;
|
|
628
628
|
try {
|
|
629
|
-
|
|
629
|
+
I = A instanceof SharedArrayBuffer;
|
|
630
630
|
} catch {
|
|
631
|
-
|
|
631
|
+
I = !1;
|
|
632
632
|
}
|
|
633
|
-
return
|
|
633
|
+
return I;
|
|
634
634
|
},
|
|
635
635
|
__wbg_instanceof_Table_127f216e592f4159: function(A) {
|
|
636
|
-
let
|
|
636
|
+
let I;
|
|
637
637
|
try {
|
|
638
|
-
|
|
638
|
+
I = A instanceof WebAssembly.Table;
|
|
639
639
|
} catch {
|
|
640
|
-
|
|
640
|
+
I = !1;
|
|
641
641
|
}
|
|
642
|
-
return
|
|
642
|
+
return I;
|
|
643
643
|
},
|
|
644
644
|
__wbg_instanceof_Tag_f1d6b24a98b95210: function(A) {
|
|
645
|
-
let
|
|
645
|
+
let I;
|
|
646
646
|
try {
|
|
647
|
-
|
|
647
|
+
I = A instanceof WebAssembly.Tag;
|
|
648
648
|
} catch {
|
|
649
|
-
|
|
649
|
+
I = !1;
|
|
650
650
|
}
|
|
651
|
-
return
|
|
651
|
+
return I;
|
|
652
652
|
},
|
|
653
653
|
__wbg_instanceof_Uint8Array_9b9075935c74707c: function(A) {
|
|
654
|
-
let
|
|
654
|
+
let I;
|
|
655
655
|
try {
|
|
656
|
-
|
|
656
|
+
I = A instanceof Uint8Array;
|
|
657
657
|
} catch {
|
|
658
|
-
|
|
658
|
+
I = !1;
|
|
659
659
|
}
|
|
660
|
-
return
|
|
660
|
+
return I;
|
|
661
661
|
},
|
|
662
662
|
__wbg_isArray_d314bb98fcf08331: function(A) {
|
|
663
663
|
return Array.isArray(A);
|
|
@@ -665,8 +665,8 @@ function hA() {
|
|
|
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, I) {
|
|
669
|
+
return Object.is(A, I);
|
|
670
670
|
},
|
|
671
671
|
__wbg_iterator_6ff6560ca1568e55: function() {
|
|
672
672
|
return Symbol.iterator;
|
|
@@ -681,8 +681,8 @@ function hA() {
|
|
|
681
681
|
return A.length;
|
|
682
682
|
},
|
|
683
683
|
__wbg_load_eff64ff5e429a422: function() {
|
|
684
|
-
return
|
|
685
|
-
return Atomics.load(A,
|
|
684
|
+
return J(function(A, I) {
|
|
685
|
+
return Atomics.load(A, I >>> 0);
|
|
686
686
|
}, arguments);
|
|
687
687
|
},
|
|
688
688
|
__wbg_message_9ddc4b9a62a7c379: function(A) {
|
|
@@ -691,19 +691,14 @@ function hA() {
|
|
|
691
691
|
__wbg_msCrypto_d562bbe83e0d4b91: function(A) {
|
|
692
692
|
return A.msCrypto;
|
|
693
693
|
},
|
|
694
|
-
__wbg_new_0728bd2d4c5d41dd: function() {
|
|
695
|
-
return y(function(A) {
|
|
696
|
-
return new WebAssembly.Tag(A);
|
|
697
|
-
}, arguments);
|
|
698
|
-
},
|
|
699
694
|
__wbg_new_0_73afc35eb544e539: function() {
|
|
700
695
|
return /* @__PURE__ */ new Date();
|
|
701
696
|
},
|
|
702
697
|
__wbg_new_245cd5c49157e602: function(A) {
|
|
703
698
|
return new Date(A);
|
|
704
699
|
},
|
|
705
|
-
__wbg_new_2ac7fa8be584d280: function(A,
|
|
706
|
-
return new DataView(A,
|
|
700
|
+
__wbg_new_2ac7fa8be584d280: function(A, I, g) {
|
|
701
|
+
return new DataView(A, I >>> 0, g >>> 0);
|
|
707
702
|
},
|
|
708
703
|
__wbg_new_361308b2356cecd0: function() {
|
|
709
704
|
return new Object();
|
|
@@ -712,47 +707,42 @@ function hA() {
|
|
|
712
707
|
return new Array();
|
|
713
708
|
},
|
|
714
709
|
__wbg_new_4a996a46a82782b6: function() {
|
|
715
|
-
return
|
|
716
|
-
return new WebAssembly.Global(A,
|
|
710
|
+
return J(function(A, I) {
|
|
711
|
+
return new WebAssembly.Global(A, I);
|
|
717
712
|
}, arguments);
|
|
718
713
|
},
|
|
719
714
|
__wbg_new_57c27ff3ddf5b62c: function() {
|
|
720
|
-
return
|
|
715
|
+
return J(function(A) {
|
|
721
716
|
return new WebAssembly.Module(A);
|
|
722
717
|
}, arguments);
|
|
723
718
|
},
|
|
724
|
-
__wbg_new_67274f72d5abea37: function() {
|
|
725
|
-
return y(function(A) {
|
|
726
|
-
return new WebAssembly.Table(A);
|
|
727
|
-
}, arguments);
|
|
728
|
-
},
|
|
729
719
|
__wbg_new_8a6f238a6ece86ea: function() {
|
|
730
720
|
return new Error();
|
|
731
721
|
},
|
|
732
722
|
__wbg_new_a4e3cab1cdd635ba: function() {
|
|
733
|
-
return
|
|
734
|
-
return new WebAssembly.Instance(A,
|
|
723
|
+
return J(function(A, I) {
|
|
724
|
+
return new WebAssembly.Instance(A, I);
|
|
735
725
|
}, arguments);
|
|
736
726
|
},
|
|
737
727
|
__wbg_new_b061c0550d9f3281: function() {
|
|
738
|
-
return
|
|
728
|
+
return J(function(A) {
|
|
739
729
|
return new WebAssembly.Memory(A);
|
|
740
730
|
}, arguments);
|
|
741
731
|
},
|
|
742
|
-
__wbg_new_b5d9e2fb389fef91: function(A,
|
|
732
|
+
__wbg_new_b5d9e2fb389fef91: function(A, I) {
|
|
743
733
|
try {
|
|
744
|
-
var
|
|
745
|
-
const
|
|
746
|
-
|
|
734
|
+
var g = { a: A, b: I }, C = (E, D) => {
|
|
735
|
+
const w = g.a;
|
|
736
|
+
g.a = 0;
|
|
747
737
|
try {
|
|
748
|
-
return
|
|
738
|
+
return tA(w, g.b, E, D);
|
|
749
739
|
} finally {
|
|
750
|
-
|
|
740
|
+
g.a = w;
|
|
751
741
|
}
|
|
752
742
|
};
|
|
753
743
|
return new Promise(C);
|
|
754
744
|
} finally {
|
|
755
|
-
|
|
745
|
+
g.a = g.b = 0;
|
|
756
746
|
}
|
|
757
747
|
},
|
|
758
748
|
__wbg_new_ca409f861989e0c5: function(A) {
|
|
@@ -764,23 +754,23 @@ function hA() {
|
|
|
764
754
|
__wbg_new_dd2b680c8bf6ae29: function(A) {
|
|
765
755
|
return new Uint8Array(A);
|
|
766
756
|
},
|
|
767
|
-
__wbg_new_from_slice_a3d2629dc1826784: function(A,
|
|
768
|
-
return new Uint8Array(
|
|
757
|
+
__wbg_new_from_slice_a3d2629dc1826784: function(A, I) {
|
|
758
|
+
return new Uint8Array(e(A, I));
|
|
769
759
|
},
|
|
770
|
-
__wbg_new_no_args_1c7c842f08d00ebb: function(A,
|
|
771
|
-
return new Function(
|
|
760
|
+
__wbg_new_no_args_1c7c842f08d00ebb: function(A, I) {
|
|
761
|
+
return new Function(q(A, I));
|
|
772
762
|
},
|
|
773
|
-
__wbg_new_with_args_7bba34e94b1cfa40: function(A,
|
|
774
|
-
return new Function(
|
|
763
|
+
__wbg_new_with_args_7bba34e94b1cfa40: function(A, I, g, C) {
|
|
764
|
+
return new Function(q(A, I), q(g, C));
|
|
775
765
|
},
|
|
776
|
-
__wbg_new_with_byte_offset_9120ba79e057895b: function(A,
|
|
777
|
-
return new Uint8Array(A,
|
|
766
|
+
__wbg_new_with_byte_offset_9120ba79e057895b: function(A, I) {
|
|
767
|
+
return new Uint8Array(A, I >>> 0);
|
|
778
768
|
},
|
|
779
|
-
__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A,
|
|
780
|
-
return new Uint8Array(A,
|
|
769
|
+
__wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, I, g) {
|
|
770
|
+
return new Uint8Array(A, I >>> 0, g >>> 0);
|
|
781
771
|
},
|
|
782
|
-
__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A,
|
|
783
|
-
return new Int32Array(A,
|
|
772
|
+
__wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, I, g) {
|
|
773
|
+
return new Int32Array(A, I >>> 0, g >>> 0);
|
|
784
774
|
},
|
|
785
775
|
__wbg_new_with_length_1763c527b2923202: function(A) {
|
|
786
776
|
return new Array(A >>> 0);
|
|
@@ -789,7 +779,7 @@ function hA() {
|
|
|
789
779
|
return new Uint8Array(A >>> 0);
|
|
790
780
|
},
|
|
791
781
|
__wbg_next_3482f54c49e8af19: function() {
|
|
792
|
-
return
|
|
782
|
+
return J(function(A) {
|
|
793
783
|
return A.next();
|
|
794
784
|
}, arguments);
|
|
795
785
|
},
|
|
@@ -800,8 +790,8 @@ function hA() {
|
|
|
800
790
|
return A.node;
|
|
801
791
|
},
|
|
802
792
|
__wbg_notify_78a90977fab74963: function() {
|
|
803
|
-
return
|
|
804
|
-
return Atomics.notify(A,
|
|
793
|
+
return J(function(A, I) {
|
|
794
|
+
return Atomics.notify(A, I >>> 0);
|
|
805
795
|
}, arguments);
|
|
806
796
|
},
|
|
807
797
|
__wbg_now_a3af9a2f4bbaa4d1: function() {
|
|
@@ -814,18 +804,18 @@ function hA() {
|
|
|
814
804
|
return A.ok;
|
|
815
805
|
},
|
|
816
806
|
__wbg_postMessage_2041f4e90af61318: function() {
|
|
817
|
-
return
|
|
818
|
-
A.postMessage(
|
|
807
|
+
return J(function(A, I) {
|
|
808
|
+
A.postMessage(I);
|
|
819
809
|
}, arguments);
|
|
820
810
|
},
|
|
821
811
|
__wbg_process_3975fd6c72f520aa: function(A) {
|
|
822
812
|
return A.process;
|
|
823
813
|
},
|
|
824
|
-
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(A,
|
|
825
|
-
Uint8Array.prototype.set.call(
|
|
814
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, I, g) {
|
|
815
|
+
Uint8Array.prototype.set.call(e(A, I), g);
|
|
826
816
|
},
|
|
827
|
-
__wbg_push_8ffdcb2063340ba5: function(A,
|
|
828
|
-
return A.push(
|
|
817
|
+
__wbg_push_8ffdcb2063340ba5: function(A, I) {
|
|
818
|
+
return A.push(I);
|
|
829
819
|
},
|
|
830
820
|
__wbg_queueMicrotask_0aa0a927f78f5d98: function(A) {
|
|
831
821
|
return A.queueMicrotask;
|
|
@@ -834,17 +824,17 @@ function hA() {
|
|
|
834
824
|
queueMicrotask(A);
|
|
835
825
|
},
|
|
836
826
|
__wbg_randomFillSync_f8c153b79f285817: function() {
|
|
837
|
-
return
|
|
838
|
-
A.randomFillSync(
|
|
827
|
+
return J(function(A, I) {
|
|
828
|
+
A.randomFillSync(I);
|
|
839
829
|
}, arguments);
|
|
840
830
|
},
|
|
841
831
|
__wbg_removeEventListener_e63328781a5b9af9: function() {
|
|
842
|
-
return
|
|
843
|
-
A.removeEventListener(
|
|
832
|
+
return J(function(A, I, g, C) {
|
|
833
|
+
A.removeEventListener(q(I, g), C);
|
|
844
834
|
}, arguments);
|
|
845
835
|
},
|
|
846
836
|
__wbg_require_b74f47fc2d022fd6: function() {
|
|
847
|
-
return
|
|
837
|
+
return J(function() {
|
|
848
838
|
return module.require;
|
|
849
839
|
}, arguments);
|
|
850
840
|
},
|
|
@@ -852,99 +842,99 @@ function hA() {
|
|
|
852
842
|
return Promise.resolve(A);
|
|
853
843
|
},
|
|
854
844
|
__wbg_setTimeout_e0aacd5a637418a6: function() {
|
|
855
|
-
return
|
|
856
|
-
return A.setTimeout(
|
|
845
|
+
return J(function(A, I, g) {
|
|
846
|
+
return A.setTimeout(I, g);
|
|
857
847
|
}, arguments);
|
|
858
848
|
},
|
|
859
|
-
__wbg_setUint32_d168af7751a8557e: function(A,
|
|
860
|
-
A.setUint32(
|
|
849
|
+
__wbg_setUint32_d168af7751a8557e: function(A, I, g, C) {
|
|
850
|
+
A.setUint32(I >>> 0, g >>> 0, C !== 0);
|
|
861
851
|
},
|
|
862
852
|
__wbg_set_0af2522656c2a71b: function() {
|
|
863
|
-
return
|
|
864
|
-
A.set(
|
|
853
|
+
return J(function(A, I, g) {
|
|
854
|
+
A.set(I >>> 0, g);
|
|
865
855
|
}, arguments);
|
|
866
856
|
},
|
|
867
|
-
__wbg_set_1eb0999cf5d27fc8: function(A,
|
|
868
|
-
return A.set(
|
|
857
|
+
__wbg_set_1eb0999cf5d27fc8: function(A, I, g) {
|
|
858
|
+
return A.set(I, g);
|
|
869
859
|
},
|
|
870
|
-
__wbg_set_25cf9deff6bf0ea8: function(A,
|
|
871
|
-
A.set(
|
|
860
|
+
__wbg_set_25cf9deff6bf0ea8: function(A, I, g) {
|
|
861
|
+
A.set(I, g >>> 0);
|
|
872
862
|
},
|
|
873
|
-
__wbg_set_3f1d0b984ed272ed: function(A,
|
|
874
|
-
A[
|
|
863
|
+
__wbg_set_3f1d0b984ed272ed: function(A, I, g) {
|
|
864
|
+
A[I] = g;
|
|
875
865
|
},
|
|
876
866
|
__wbg_set_6cb8631f80447a67: function() {
|
|
877
|
-
return
|
|
878
|
-
return Reflect.set(A,
|
|
867
|
+
return J(function(A, I, g) {
|
|
868
|
+
return Reflect.set(A, I, g);
|
|
879
869
|
}, arguments);
|
|
880
870
|
},
|
|
881
|
-
__wbg_set_cc56eefd2dd91957: function(A,
|
|
882
|
-
A.set(
|
|
871
|
+
__wbg_set_cc56eefd2dd91957: function(A, I, g) {
|
|
872
|
+
A.set(e(I, g));
|
|
883
873
|
},
|
|
884
|
-
__wbg_set_f43e577aea94465b: function(A,
|
|
885
|
-
A[
|
|
874
|
+
__wbg_set_f43e577aea94465b: function(A, I, g) {
|
|
875
|
+
A[I >>> 0] = g;
|
|
886
876
|
},
|
|
887
|
-
__wbg_set_index_b3244a6c458021e4: function(A,
|
|
888
|
-
A[
|
|
877
|
+
__wbg_set_index_b3244a6c458021e4: function(A, I, g) {
|
|
878
|
+
A[I >>> 0] = g;
|
|
889
879
|
},
|
|
890
|
-
__wbg_set_index_f259b54e97f7b177: function(A,
|
|
891
|
-
A[
|
|
880
|
+
__wbg_set_index_f259b54e97f7b177: function(A, I, g) {
|
|
881
|
+
A[I >>> 0] = g;
|
|
892
882
|
},
|
|
893
|
-
__wbg_set_onmessage_ea7cc2ba099021cd: function(A,
|
|
894
|
-
A.onmessage =
|
|
883
|
+
__wbg_set_onmessage_ea7cc2ba099021cd: function(A, I) {
|
|
884
|
+
A.onmessage = I;
|
|
895
885
|
},
|
|
896
|
-
__wbg_set_value_fc06e541de098215: function(A,
|
|
897
|
-
A.value =
|
|
886
|
+
__wbg_set_value_fc06e541de098215: function(A, I) {
|
|
887
|
+
A.value = I;
|
|
898
888
|
},
|
|
899
|
-
__wbg_slice_8bbd46adb2100583: function(A,
|
|
900
|
-
return A.slice(
|
|
889
|
+
__wbg_slice_8bbd46adb2100583: function(A, I, g) {
|
|
890
|
+
return A.slice(I >>> 0, g >>> 0);
|
|
901
891
|
},
|
|
902
|
-
__wbg_stack_0ed75d68575b0f3c: function(A,
|
|
903
|
-
const
|
|
904
|
-
|
|
892
|
+
__wbg_stack_0ed75d68575b0f3c: function(A, I) {
|
|
893
|
+
const g = I.stack, C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
|
|
894
|
+
a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
|
|
905
895
|
},
|
|
906
896
|
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
907
897
|
const A = typeof global > "u" ? null : global;
|
|
908
|
-
return
|
|
898
|
+
return x(A) ? 0 : P(A);
|
|
909
899
|
},
|
|
910
900
|
__wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
|
|
911
901
|
const A = typeof globalThis > "u" ? null : globalThis;
|
|
912
|
-
return
|
|
902
|
+
return x(A) ? 0 : P(A);
|
|
913
903
|
},
|
|
914
904
|
__wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
|
|
915
905
|
const A = typeof self > "u" ? null : self;
|
|
916
|
-
return
|
|
906
|
+
return x(A) ? 0 : P(A);
|
|
917
907
|
},
|
|
918
908
|
__wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
|
|
919
909
|
const A = typeof window > "u" ? null : window;
|
|
920
|
-
return
|
|
910
|
+
return x(A) ? 0 : P(A);
|
|
921
911
|
},
|
|
922
912
|
__wbg_store_d1d951c98d9bed41: function() {
|
|
923
|
-
return
|
|
924
|
-
return Atomics.store(A,
|
|
913
|
+
return J(function(A, I, g) {
|
|
914
|
+
return Atomics.store(A, I >>> 0, g);
|
|
925
915
|
}, arguments);
|
|
926
916
|
},
|
|
927
|
-
__wbg_subarray_a96e1fef17ed23cb: function(A,
|
|
928
|
-
return A.subarray(
|
|
917
|
+
__wbg_subarray_a96e1fef17ed23cb: function(A, I, g) {
|
|
918
|
+
return A.subarray(I >>> 0, g >>> 0);
|
|
929
919
|
},
|
|
930
|
-
__wbg_then_0d9fe2c7b1857d32: function(A,
|
|
931
|
-
return A.then(
|
|
920
|
+
__wbg_then_0d9fe2c7b1857d32: function(A, I, g) {
|
|
921
|
+
return A.then(I, g);
|
|
932
922
|
},
|
|
933
|
-
__wbg_then_b9e7b3b5f1a9e1b5: function(A,
|
|
934
|
-
return A.then(
|
|
923
|
+
__wbg_then_b9e7b3b5f1a9e1b5: function(A, I) {
|
|
924
|
+
return A.then(I);
|
|
935
925
|
},
|
|
936
|
-
__wbg_toString_56d946daff83867b: function(A,
|
|
937
|
-
const C =
|
|
938
|
-
|
|
926
|
+
__wbg_toString_56d946daff83867b: function(A, I, g) {
|
|
927
|
+
const C = I.toString(g), B = T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
|
|
928
|
+
a().setInt32(A + 4, E, !0), a().setInt32(A + 0, B, !0);
|
|
939
929
|
},
|
|
940
930
|
__wbg_toString_964ff7fe6eca8362: function(A) {
|
|
941
931
|
return A.toString();
|
|
942
932
|
},
|
|
943
933
|
__wbg_trap_new: function(A) {
|
|
944
|
-
return
|
|
934
|
+
return r.__wrap(A);
|
|
945
935
|
},
|
|
946
936
|
__wbg_validate_71c2d02a71bda62f: function() {
|
|
947
|
-
return
|
|
937
|
+
return J(function(A) {
|
|
948
938
|
return WebAssembly.validate(A);
|
|
949
939
|
}, arguments);
|
|
950
940
|
},
|
|
@@ -958,30 +948,30 @@ function hA() {
|
|
|
958
948
|
return A.versions;
|
|
959
949
|
},
|
|
960
950
|
__wbg_wait_be5dae1e53f590f1: function() {
|
|
961
|
-
return
|
|
962
|
-
return Atomics.wait(A,
|
|
951
|
+
return J(function(A, I, g) {
|
|
952
|
+
return Atomics.wait(A, I >>> 0, g);
|
|
963
953
|
}, arguments);
|
|
964
954
|
},
|
|
965
|
-
__wbg_warn_81ab00e6e16e886d: function(A,
|
|
966
|
-
console.warn(A,
|
|
955
|
+
__wbg_warn_81ab00e6e16e886d: function(A, I, g) {
|
|
956
|
+
console.warn(A, I, g);
|
|
967
957
|
},
|
|
968
|
-
__wbindgen_cast_0000000000000001: function(A,
|
|
969
|
-
return
|
|
958
|
+
__wbindgen_cast_0000000000000001: function(A, I) {
|
|
959
|
+
return lA(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, WA);
|
|
970
960
|
},
|
|
971
|
-
__wbindgen_cast_0000000000000002: function(A,
|
|
972
|
-
return
|
|
961
|
+
__wbindgen_cast_0000000000000002: function(A, I) {
|
|
962
|
+
return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, ZA);
|
|
973
963
|
},
|
|
974
|
-
__wbindgen_cast_0000000000000003: function(A,
|
|
975
|
-
return
|
|
964
|
+
__wbindgen_cast_0000000000000003: function(A, I) {
|
|
965
|
+
return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, GA);
|
|
976
966
|
},
|
|
977
|
-
__wbindgen_cast_0000000000000004: function(A,
|
|
978
|
-
return
|
|
967
|
+
__wbindgen_cast_0000000000000004: function(A, I) {
|
|
968
|
+
return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, GA);
|
|
979
969
|
},
|
|
980
|
-
__wbindgen_cast_0000000000000005: function(A,
|
|
981
|
-
return
|
|
970
|
+
__wbindgen_cast_0000000000000005: function(A, I) {
|
|
971
|
+
return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, VA);
|
|
982
972
|
},
|
|
983
|
-
__wbindgen_cast_0000000000000006: function(A,
|
|
984
|
-
return
|
|
973
|
+
__wbindgen_cast_0000000000000006: function(A, I) {
|
|
974
|
+
return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, TA);
|
|
985
975
|
},
|
|
986
976
|
__wbindgen_cast_0000000000000007: function(A) {
|
|
987
977
|
return A;
|
|
@@ -989,65 +979,61 @@ function hA() {
|
|
|
989
979
|
__wbindgen_cast_0000000000000008: function(A) {
|
|
990
980
|
return A;
|
|
991
981
|
},
|
|
992
|
-
__wbindgen_cast_0000000000000009: function(A,
|
|
993
|
-
return
|
|
982
|
+
__wbindgen_cast_0000000000000009: function(A, I) {
|
|
983
|
+
return e(A, I);
|
|
994
984
|
},
|
|
995
|
-
__wbindgen_cast_000000000000000a: function(A,
|
|
996
|
-
return
|
|
985
|
+
__wbindgen_cast_000000000000000a: function(A, I) {
|
|
986
|
+
return q(A, I);
|
|
997
987
|
},
|
|
998
|
-
__wbindgen_cast_000000000000000b: function(A,
|
|
999
|
-
return BigInt.asUintN(64, A) | BigInt.asUintN(64,
|
|
988
|
+
__wbindgen_cast_000000000000000b: function(A, I) {
|
|
989
|
+
return BigInt.asUintN(64, A) | BigInt.asUintN(64, I) << BigInt(64);
|
|
1000
990
|
},
|
|
1001
991
|
__wbindgen_cast_000000000000000c: function(A) {
|
|
1002
992
|
return BigInt.asUintN(64, A);
|
|
1003
993
|
},
|
|
1004
|
-
__wbindgen_cast_000000000000000d: function(A, g) {
|
|
1005
|
-
var I = MA(A, g).slice();
|
|
1006
|
-
return k.__wbindgen_free(A, g * 4, 4), I;
|
|
1007
|
-
},
|
|
1008
994
|
__wbindgen_init_externref_table: function() {
|
|
1009
|
-
const A =
|
|
1010
|
-
A.set(0, void 0), A.set(
|
|
995
|
+
const A = G.__wbindgen_externrefs, I = A.grow(4);
|
|
996
|
+
A.set(0, void 0), A.set(I + 0, void 0), A.set(I + 1, null), A.set(I + 2, !0), A.set(I + 3, !1);
|
|
1011
997
|
}
|
|
1012
998
|
}
|
|
1013
999
|
};
|
|
1014
1000
|
}
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1001
|
+
function WA(Q, A, I) {
|
|
1002
|
+
G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, I);
|
|
1017
1003
|
}
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1004
|
+
function ZA(Q, A, I) {
|
|
1005
|
+
G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, I);
|
|
1020
1006
|
}
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1007
|
+
function TA(Q, A, I) {
|
|
1008
|
+
G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I);
|
|
1023
1009
|
}
|
|
1024
|
-
function
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1027
|
-
throw
|
|
1010
|
+
function VA(Q, A, I) {
|
|
1011
|
+
const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
|
|
1012
|
+
if (g[1])
|
|
1013
|
+
throw DA(g[0]);
|
|
1028
1014
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1032
|
-
throw
|
|
1033
|
-
return
|
|
1015
|
+
function GA(Q, A, I) {
|
|
1016
|
+
const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
|
|
1017
|
+
if (g[2])
|
|
1018
|
+
throw DA(g[1]);
|
|
1019
|
+
return DA(g[0]);
|
|
1034
1020
|
}
|
|
1035
|
-
function
|
|
1036
|
-
|
|
1021
|
+
function tA(Q, A, I, g) {
|
|
1022
|
+
G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I, g);
|
|
1037
1023
|
}
|
|
1038
|
-
const
|
|
1024
|
+
const MA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1039
1025
|
}, unregister: () => {
|
|
1040
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1026
|
+
} } : new FinalizationRegistry((Q) => G.__wbg_dapadapter_free(Q >>> 0, 1)), kA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1041
1027
|
}, unregister: () => {
|
|
1042
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1043
|
-
function
|
|
1044
|
-
const A =
|
|
1045
|
-
return
|
|
1028
|
+
} } : new FinalizationRegistry((Q) => G.__wbg_trap_free(Q >>> 0, 1));
|
|
1029
|
+
function P(Q) {
|
|
1030
|
+
const A = G.__externref_table_alloc();
|
|
1031
|
+
return G.__wbindgen_externrefs.set(A, Q), A;
|
|
1046
1032
|
}
|
|
1047
|
-
const
|
|
1033
|
+
const IA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1048
1034
|
}, unregister: () => {
|
|
1049
1035
|
} } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
|
|
1050
|
-
function
|
|
1036
|
+
function EA(Q) {
|
|
1051
1037
|
const A = typeof Q;
|
|
1052
1038
|
if (A == "number" || A == "boolean" || Q == null)
|
|
1053
1039
|
return `${Q}`;
|
|
@@ -1064,148 +1050,148 @@ function AA(Q) {
|
|
|
1064
1050
|
if (Array.isArray(Q)) {
|
|
1065
1051
|
const C = Q.length;
|
|
1066
1052
|
let B = "[";
|
|
1067
|
-
C > 0 && (B +=
|
|
1068
|
-
for (let
|
|
1069
|
-
B += ", " +
|
|
1053
|
+
C > 0 && (B += EA(Q[0]));
|
|
1054
|
+
for (let E = 1; E < C; E++)
|
|
1055
|
+
B += ", " + EA(Q[E]);
|
|
1070
1056
|
return B += "]", B;
|
|
1071
1057
|
}
|
|
1072
|
-
const
|
|
1073
|
-
let
|
|
1074
|
-
if (
|
|
1075
|
-
|
|
1058
|
+
const I = /\[object ([^\]]+)\]/.exec(toString.call(Q));
|
|
1059
|
+
let g;
|
|
1060
|
+
if (I && I.length > 1)
|
|
1061
|
+
g = I[1];
|
|
1076
1062
|
else
|
|
1077
1063
|
return toString.call(Q);
|
|
1078
|
-
if (
|
|
1064
|
+
if (g == "Object")
|
|
1079
1065
|
try {
|
|
1080
1066
|
return "Object(" + JSON.stringify(Q) + ")";
|
|
1081
1067
|
} catch {
|
|
1082
1068
|
return "Object";
|
|
1083
1069
|
}
|
|
1084
1070
|
return Q instanceof Error ? `${Q.name}: ${Q.message}
|
|
1085
|
-
${Q.stack}` :
|
|
1071
|
+
${Q.stack}` : g;
|
|
1086
1072
|
}
|
|
1087
|
-
function
|
|
1073
|
+
function zA(Q, A) {
|
|
1088
1074
|
Q = Q >>> 0;
|
|
1089
|
-
const
|
|
1075
|
+
const I = a(), g = [];
|
|
1090
1076
|
for (let C = Q; C < Q + 4 * A; C += 4)
|
|
1091
|
-
|
|
1092
|
-
return
|
|
1077
|
+
g.push(G.__wbindgen_externrefs.get(I.getUint32(C, !0)));
|
|
1078
|
+
return G.__externref_drop_slice(Q, A), g;
|
|
1093
1079
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return Q = Q >>> 0,
|
|
1080
|
+
function e(Q, A) {
|
|
1081
|
+
return Q = Q >>> 0, b().subarray(Q / 1, Q / 1 + A);
|
|
1096
1082
|
}
|
|
1097
|
-
let
|
|
1098
|
-
function
|
|
1099
|
-
return (
|
|
1083
|
+
let Z = null;
|
|
1084
|
+
function a() {
|
|
1085
|
+
return (Z === null || Z.buffer.detached === !0 || Z.buffer.detached === void 0 && Z.buffer !== G.memory.buffer) && (Z = new DataView(G.memory.buffer)), Z;
|
|
1100
1086
|
}
|
|
1101
|
-
function
|
|
1102
|
-
return Q = Q >>> 0,
|
|
1087
|
+
function q(Q, A) {
|
|
1088
|
+
return Q = Q >>> 0, fA(Q, A);
|
|
1103
1089
|
}
|
|
1104
|
-
let
|
|
1105
|
-
function
|
|
1106
|
-
return (
|
|
1090
|
+
let f = null;
|
|
1091
|
+
function b() {
|
|
1092
|
+
return (f === null || f.byteLength === 0) && (f = new Uint8Array(G.memory.buffer)), f;
|
|
1107
1093
|
}
|
|
1108
|
-
function
|
|
1094
|
+
function J(Q, A) {
|
|
1109
1095
|
try {
|
|
1110
1096
|
return Q.apply(this, A);
|
|
1111
|
-
} catch (
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1097
|
+
} catch (I) {
|
|
1098
|
+
const g = P(I);
|
|
1099
|
+
G.__wbindgen_exn_store(g);
|
|
1114
1100
|
}
|
|
1115
1101
|
}
|
|
1116
|
-
function
|
|
1102
|
+
function x(Q) {
|
|
1117
1103
|
return Q == null;
|
|
1118
1104
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
1105
|
+
function lA(Q, A, I, g) {
|
|
1106
|
+
const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
|
|
1121
1107
|
C.cnt++;
|
|
1122
1108
|
try {
|
|
1123
|
-
return
|
|
1109
|
+
return g(C.a, C.b, ...E);
|
|
1124
1110
|
} finally {
|
|
1125
1111
|
B._wbg_cb_unref();
|
|
1126
1112
|
}
|
|
1127
1113
|
};
|
|
1128
1114
|
return B._wbg_cb_unref = () => {
|
|
1129
|
-
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0,
|
|
1130
|
-
},
|
|
1115
|
+
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
|
|
1116
|
+
}, IA.register(B, C, C), B;
|
|
1131
1117
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
1118
|
+
function z(Q, A, I, g) {
|
|
1119
|
+
const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
|
|
1134
1120
|
C.cnt++;
|
|
1135
1121
|
const D = C.a;
|
|
1136
1122
|
C.a = 0;
|
|
1137
1123
|
try {
|
|
1138
|
-
return
|
|
1124
|
+
return g(D, C.b, ...E);
|
|
1139
1125
|
} finally {
|
|
1140
1126
|
C.a = D, B._wbg_cb_unref();
|
|
1141
1127
|
}
|
|
1142
1128
|
};
|
|
1143
1129
|
return B._wbg_cb_unref = () => {
|
|
1144
|
-
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0,
|
|
1145
|
-
},
|
|
1130
|
+
--C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, IA.unregister(C));
|
|
1131
|
+
}, IA.register(B, C, C), B;
|
|
1146
1132
|
}
|
|
1147
|
-
function
|
|
1148
|
-
if (
|
|
1149
|
-
const D =
|
|
1150
|
-
return
|
|
1151
|
-
}
|
|
1152
|
-
let
|
|
1153
|
-
const B =
|
|
1154
|
-
let
|
|
1155
|
-
for (;
|
|
1156
|
-
const D = Q.charCodeAt(
|
|
1133
|
+
function T(Q, A, I) {
|
|
1134
|
+
if (I === void 0) {
|
|
1135
|
+
const D = m.encode(Q), w = A(D.length, 1) >>> 0;
|
|
1136
|
+
return b().subarray(w, w + D.length).set(D), d = D.length, w;
|
|
1137
|
+
}
|
|
1138
|
+
let g = Q.length, C = A(g, 1) >>> 0;
|
|
1139
|
+
const B = b();
|
|
1140
|
+
let E = 0;
|
|
1141
|
+
for (; E < g; E++) {
|
|
1142
|
+
const D = Q.charCodeAt(E);
|
|
1157
1143
|
if (D > 127) break;
|
|
1158
|
-
B[C +
|
|
1144
|
+
B[C + E] = D;
|
|
1159
1145
|
}
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1162
|
-
const D =
|
|
1163
|
-
|
|
1146
|
+
if (E !== g) {
|
|
1147
|
+
E !== 0 && (Q = Q.slice(E)), C = I(C, g, g = E + Q.length * 3, 1) >>> 0;
|
|
1148
|
+
const D = b().subarray(C + E, C + g), w = m.encodeInto(Q, D);
|
|
1149
|
+
E += w.written, C = I(C, g, E, 1) >>> 0;
|
|
1164
1150
|
}
|
|
1165
|
-
return
|
|
1151
|
+
return d = E, C;
|
|
1166
1152
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const A =
|
|
1169
|
-
return
|
|
1153
|
+
function DA(Q) {
|
|
1154
|
+
const A = G.__wbindgen_externrefs.get(Q);
|
|
1155
|
+
return G.__externref_table_dealloc(Q), A;
|
|
1170
1156
|
}
|
|
1171
|
-
let
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
let
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1157
|
+
let $ = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1158
|
+
$.decode();
|
|
1159
|
+
const PA = 2146435072;
|
|
1160
|
+
let CA = 0;
|
|
1161
|
+
function fA(Q, A) {
|
|
1162
|
+
return CA += A, CA >= PA && ($ = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), $.decode(), CA = A), $.decode(b().subarray(Q, Q + A));
|
|
1177
1163
|
}
|
|
1178
|
-
const
|
|
1179
|
-
"encodeInto" in
|
|
1180
|
-
const
|
|
1181
|
-
return A.set(
|
|
1164
|
+
const m = new TextEncoder();
|
|
1165
|
+
"encodeInto" in m || (m.encodeInto = function(Q, A) {
|
|
1166
|
+
const I = m.encode(Q);
|
|
1167
|
+
return A.set(I), {
|
|
1182
1168
|
read: Q.length,
|
|
1183
|
-
written:
|
|
1169
|
+
written: I.length
|
|
1184
1170
|
};
|
|
1185
1171
|
});
|
|
1186
|
-
let
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1172
|
+
let d = 0, G;
|
|
1173
|
+
function bA(Q, A) {
|
|
1174
|
+
return G = Q.exports, Z = null, f = null, G.__wbindgen_start(), G;
|
|
1189
1175
|
}
|
|
1190
|
-
async function
|
|
1176
|
+
async function mA(Q, A) {
|
|
1191
1177
|
if (typeof Response == "function" && Q instanceof Response) {
|
|
1192
1178
|
if (typeof WebAssembly.instantiateStreaming == "function")
|
|
1193
1179
|
try {
|
|
1194
1180
|
return await WebAssembly.instantiateStreaming(Q, A);
|
|
1195
1181
|
} catch (C) {
|
|
1196
|
-
if (Q.ok &&
|
|
1182
|
+
if (Q.ok && I(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
|
|
1197
1183
|
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);
|
|
1198
1184
|
else
|
|
1199
1185
|
throw C;
|
|
1200
1186
|
}
|
|
1201
|
-
const
|
|
1202
|
-
return await WebAssembly.instantiate(
|
|
1187
|
+
const g = await Q.arrayBuffer();
|
|
1188
|
+
return await WebAssembly.instantiate(g, A);
|
|
1203
1189
|
} else {
|
|
1204
|
-
const
|
|
1205
|
-
return
|
|
1190
|
+
const g = await WebAssembly.instantiate(Q, A);
|
|
1191
|
+
return g instanceof WebAssembly.Instance ? { instance: g, module: Q } : g;
|
|
1206
1192
|
}
|
|
1207
|
-
function g
|
|
1208
|
-
switch (
|
|
1193
|
+
function I(g) {
|
|
1194
|
+
switch (g) {
|
|
1209
1195
|
case "basic":
|
|
1210
1196
|
case "cors":
|
|
1211
1197
|
case "default":
|
|
@@ -1214,21 +1200,21 @@ async function xA(Q, A) {
|
|
|
1214
1200
|
return !1;
|
|
1215
1201
|
}
|
|
1216
1202
|
}
|
|
1217
|
-
async function
|
|
1218
|
-
if (
|
|
1203
|
+
async function XA(Q) {
|
|
1204
|
+
if (G !== void 0) return G;
|
|
1219
1205
|
Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("", import.meta.url));
|
|
1220
|
-
const A =
|
|
1206
|
+
const A = dA();
|
|
1221
1207
|
(typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
|
|
1222
|
-
const { instance:
|
|
1223
|
-
return
|
|
1208
|
+
const { instance: I, module: g } = await mA(await Q, A);
|
|
1209
|
+
return bA(I);
|
|
1224
1210
|
}
|
|
1225
|
-
const
|
|
1211
|
+
const rA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.8.0/dist/engine_bg.wasm"), nA = Object.freeze({
|
|
1226
1212
|
maxObjectBytes: 128 * 1024 * 1024,
|
|
1227
1213
|
maxEntries: 256,
|
|
1228
1214
|
maxMetadataBytes: 8 * 1024 * 1024,
|
|
1229
1215
|
maxEntryMetadataBytes: 1024 * 1024
|
|
1230
1216
|
});
|
|
1231
|
-
class
|
|
1217
|
+
class vA {
|
|
1232
1218
|
records = /* @__PURE__ */ new Map();
|
|
1233
1219
|
staged = /* @__PURE__ */ new Map();
|
|
1234
1220
|
stagingFailed = !1;
|
|
@@ -1238,9 +1224,9 @@ class tA {
|
|
|
1238
1224
|
oversized = 0;
|
|
1239
1225
|
limits;
|
|
1240
1226
|
constructor(A = {}) {
|
|
1241
|
-
this.limits = Object.freeze({ ...
|
|
1242
|
-
for (const
|
|
1243
|
-
if (!Number.isSafeInteger(
|
|
1227
|
+
this.limits = Object.freeze({ ...nA, ...A });
|
|
1228
|
+
for (const I of Object.values(this.limits))
|
|
1229
|
+
if (!Number.isSafeInteger(I) || I < 0)
|
|
1244
1230
|
throw new RangeError("C++ cache limits must be nonnegative safe integers");
|
|
1245
1231
|
}
|
|
1246
1232
|
beginBatch() {
|
|
@@ -1249,23 +1235,23 @@ class tA {
|
|
|
1249
1235
|
/** Stage against the same storage budget, before copying any optional object. */
|
|
1250
1236
|
stage(A) {
|
|
1251
1237
|
if (this.stagingFailed) return;
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1238
|
+
const I = this.recordSize(A);
|
|
1239
|
+
if (I === void 0 || this.staged.has(A.source)) {
|
|
1254
1240
|
this.failBatch();
|
|
1255
1241
|
return;
|
|
1256
1242
|
}
|
|
1257
|
-
const
|
|
1258
|
-
for (; this.records.size && (this.records.size + this.staged.size >=
|
|
1243
|
+
const g = this.limits;
|
|
1244
|
+
for (; this.records.size && (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes); )
|
|
1259
1245
|
this.remove(this.records.keys().next().value), this.evictions++;
|
|
1260
|
-
if (this.records.size + this.staged.size >=
|
|
1246
|
+
if (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
|
|
1261
1247
|
this.oversized++, this.failBatch();
|
|
1262
1248
|
return;
|
|
1263
1249
|
}
|
|
1264
1250
|
this.staged.set(A.source, {
|
|
1265
1251
|
...A,
|
|
1266
1252
|
object: new Uint8Array(A.object),
|
|
1267
|
-
metadataBytes:
|
|
1268
|
-
}), this.objectBytes += A.object.byteLength, this.metadataBytes +=
|
|
1253
|
+
metadataBytes: I
|
|
1254
|
+
}), this.objectBytes += A.object.byteLength, this.metadataBytes += I;
|
|
1269
1255
|
}
|
|
1270
1256
|
abandonBatch() {
|
|
1271
1257
|
this.failBatch();
|
|
@@ -1274,7 +1260,7 @@ class tA {
|
|
|
1274
1260
|
this.discardBatch(), this.stagingFailed = !0;
|
|
1275
1261
|
}
|
|
1276
1262
|
recordSize(A) {
|
|
1277
|
-
if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((
|
|
1263
|
+
if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((I) => !I || I === "." || I === "..") || 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)))
|
|
1278
1264
|
return new TextEncoder().encode(
|
|
1279
1265
|
JSON.stringify({
|
|
1280
1266
|
source: A.source,
|
|
@@ -1287,19 +1273,19 @@ class tA {
|
|
|
1287
1273
|
async validateBatch() {
|
|
1288
1274
|
if (this.stagingFailed) return !1;
|
|
1289
1275
|
const A = [...this.staged.values()];
|
|
1290
|
-
for (const
|
|
1291
|
-
if (!
|
|
1292
|
-
const
|
|
1276
|
+
for (const I of A) {
|
|
1277
|
+
if (!uA(I.object)) return !1;
|
|
1278
|
+
const g = await crypto.subtle.digest("SHA-256", I.object);
|
|
1293
1279
|
if (Array.from(
|
|
1294
|
-
new Uint8Array(
|
|
1280
|
+
new Uint8Array(g),
|
|
1295
1281
|
(B) => B.toString(16).padStart(2, "0")
|
|
1296
|
-
).join("") !==
|
|
1282
|
+
).join("") !== I.object_hash) return !1;
|
|
1297
1283
|
}
|
|
1298
1284
|
return !0;
|
|
1299
1285
|
}
|
|
1300
1286
|
commitBatch() {
|
|
1301
|
-
for (const [A,
|
|
1302
|
-
this.remove(A), this.records.set(A,
|
|
1287
|
+
for (const [A, I] of this.staged)
|
|
1288
|
+
this.remove(A), this.records.set(A, I);
|
|
1303
1289
|
this.staged.clear(), this.stagingFailed = !1;
|
|
1304
1290
|
}
|
|
1305
1291
|
discardBatch() {
|
|
@@ -1308,40 +1294,40 @@ class tA {
|
|
|
1308
1294
|
this.staged.clear();
|
|
1309
1295
|
}
|
|
1310
1296
|
snapshot() {
|
|
1311
|
-
return [...this.records.values()].map(({ source: A, key:
|
|
1297
|
+
return [...this.records.values()].map(({ source: A, key: I, object_hash: g, object: C, receipt: B }) => ({
|
|
1312
1298
|
source: A,
|
|
1313
|
-
key:
|
|
1314
|
-
object_hash:
|
|
1299
|
+
key: I,
|
|
1300
|
+
object_hash: g,
|
|
1315
1301
|
...B == null ? {} : { receipt: B },
|
|
1316
1302
|
object: C.slice()
|
|
1317
1303
|
}));
|
|
1318
1304
|
}
|
|
1319
1305
|
/** Worker hits are the only accesses that move an entry to the LRU tail. */
|
|
1320
1306
|
touch(A) {
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1307
|
+
const I = this.records.get(A);
|
|
1308
|
+
I && (this.records.delete(A), this.records.set(A, I));
|
|
1323
1309
|
}
|
|
1324
1310
|
put(A) {
|
|
1325
1311
|
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))
|
|
1326
1312
|
return;
|
|
1327
|
-
const
|
|
1328
|
-
if (
|
|
1329
|
-
const
|
|
1330
|
-
if (this.remove(A.source),
|
|
1313
|
+
const I = this.recordSize(A);
|
|
1314
|
+
if (I === void 0) return;
|
|
1315
|
+
const g = this.limits;
|
|
1316
|
+
if (this.remove(A.source), g.maxEntries === 0 || A.object.byteLength > g.maxObjectBytes || I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
|
|
1331
1317
|
this.oversized++;
|
|
1332
1318
|
return;
|
|
1333
1319
|
}
|
|
1334
|
-
for (; this.records.size >=
|
|
1320
|
+
for (; this.records.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes; )
|
|
1335
1321
|
this.remove(this.records.keys().next().value), this.evictions++;
|
|
1336
|
-
const C = { ...A, object: new Uint8Array(A.object), metadataBytes:
|
|
1337
|
-
this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes +=
|
|
1322
|
+
const C = { ...A, object: new Uint8Array(A.object), metadataBytes: I };
|
|
1323
|
+
this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += I;
|
|
1338
1324
|
}
|
|
1339
1325
|
delete(A) {
|
|
1340
1326
|
this.remove(A);
|
|
1341
1327
|
}
|
|
1342
1328
|
remove(A) {
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1329
|
+
const I = this.records.get(A);
|
|
1330
|
+
I && (this.objectBytes -= I.object.byteLength, this.metadataBytes -= I.metadataBytes, this.records.delete(A));
|
|
1345
1331
|
}
|
|
1346
1332
|
clear() {
|
|
1347
1333
|
this.records.clear(), this.staged.clear(), this.stagingFailed = !1, this.objectBytes = this.metadataBytes = 0;
|
|
@@ -1353,11 +1339,11 @@ class tA {
|
|
|
1353
1339
|
entries: this.records.size,
|
|
1354
1340
|
stagingEntries: this.staged.size,
|
|
1355
1341
|
stagingObjectBytes: [...this.staged.values()].reduce(
|
|
1356
|
-
(A,
|
|
1342
|
+
(A, I) => A + I.object.byteLength,
|
|
1357
1343
|
0
|
|
1358
1344
|
),
|
|
1359
1345
|
stagingMetadataBytes: [...this.staged.values()].reduce(
|
|
1360
|
-
(A,
|
|
1346
|
+
(A, I) => A + I.metadataBytes,
|
|
1361
1347
|
0
|
|
1362
1348
|
),
|
|
1363
1349
|
evictions: this.evictions,
|
|
@@ -1365,12 +1351,12 @@ class tA {
|
|
|
1365
1351
|
};
|
|
1366
1352
|
}
|
|
1367
1353
|
}
|
|
1368
|
-
function
|
|
1354
|
+
function uA(Q) {
|
|
1369
1355
|
if (!WebAssembly.validate(Q) || Q.length < 8) return !1;
|
|
1370
|
-
let A = 8,
|
|
1371
|
-
const
|
|
1356
|
+
let A = 8, I = !1;
|
|
1357
|
+
const g = () => {
|
|
1372
1358
|
let C = 0, B = 0;
|
|
1373
|
-
for (let
|
|
1359
|
+
for (let E = 0; E < 5 && A < Q.length; E++, B += 7) {
|
|
1374
1360
|
const D = Q[A++];
|
|
1375
1361
|
if (C += (D & 127) * 2 ** B, !(D & 128)) return C;
|
|
1376
1362
|
}
|
|
@@ -1378,26 +1364,26 @@ function jA(Q) {
|
|
|
1378
1364
|
};
|
|
1379
1365
|
try {
|
|
1380
1366
|
for (; A < Q.length; ) {
|
|
1381
|
-
const C = Q[A++], B =
|
|
1382
|
-
if (
|
|
1367
|
+
const C = Q[A++], B = g(), E = A + B;
|
|
1368
|
+
if (E > Q.length || C === 8) return !1;
|
|
1383
1369
|
if (C === 0) {
|
|
1384
|
-
const D =
|
|
1385
|
-
if (A + D >
|
|
1386
|
-
const
|
|
1387
|
-
if (A += D,
|
|
1388
|
-
if (
|
|
1389
|
-
|
|
1370
|
+
const D = g();
|
|
1371
|
+
if (A + D > E) return !1;
|
|
1372
|
+
const w = new TextDecoder().decode(Q.subarray(A, A + D));
|
|
1373
|
+
if (A += D, w === "linking") {
|
|
1374
|
+
if (I || g() !== 2) return !1;
|
|
1375
|
+
I = !0;
|
|
1390
1376
|
}
|
|
1391
1377
|
}
|
|
1392
|
-
A =
|
|
1378
|
+
A = E;
|
|
1393
1379
|
}
|
|
1394
|
-
return
|
|
1380
|
+
return I;
|
|
1395
1381
|
} catch {
|
|
1396
1382
|
return !1;
|
|
1397
1383
|
}
|
|
1398
1384
|
}
|
|
1399
|
-
const
|
|
1400
|
-
function
|
|
1385
|
+
const L = /* @__PURE__ */ Symbol();
|
|
1386
|
+
function c(Q) {
|
|
1401
1387
|
return Q instanceof Error ? {
|
|
1402
1388
|
type: "error",
|
|
1403
1389
|
error: { type: Q.constructor.name, message: Q.message }
|
|
@@ -1406,24 +1392,24 @@ function L(Q) {
|
|
|
1406
1392
|
error: { type: typeof Q, message: String(Q) }
|
|
1407
1393
|
};
|
|
1408
1394
|
}
|
|
1409
|
-
class
|
|
1395
|
+
class eA {
|
|
1410
1396
|
name;
|
|
1411
1397
|
data;
|
|
1412
|
-
constructor(A,
|
|
1413
|
-
this.name = A, this.data =
|
|
1398
|
+
constructor(A, I) {
|
|
1399
|
+
this.name = A, this.data = I;
|
|
1414
1400
|
}
|
|
1415
1401
|
download() {
|
|
1416
|
-
const A = new Uint8Array(this.data),
|
|
1417
|
-
C.href =
|
|
1402
|
+
const A = new Uint8Array(this.data), I = new Blob([A]), g = URL.createObjectURL(I), C = document.createElement("a");
|
|
1403
|
+
C.href = g, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(g);
|
|
1418
1404
|
}
|
|
1419
1405
|
}
|
|
1420
|
-
class
|
|
1406
|
+
class _A extends sA {
|
|
1421
1407
|
/**
|
|
1422
1408
|
* Access to internal properties of the debugger.
|
|
1423
1409
|
* These are put under a special symbol so that they cannot be accessed by
|
|
1424
1410
|
* clients of the library.
|
|
1425
1411
|
*/
|
|
1426
|
-
[
|
|
1412
|
+
[L];
|
|
1427
1413
|
dap;
|
|
1428
1414
|
/**
|
|
1429
1415
|
* Whether or not debugging is enabled.
|
|
@@ -1440,19 +1426,19 @@ class fA extends GA {
|
|
|
1440
1426
|
this.dap.setFilterInternals(A);
|
|
1441
1427
|
}
|
|
1442
1428
|
constructor() {
|
|
1443
|
-
super(), this[
|
|
1429
|
+
super(), this[L] = {
|
|
1444
1430
|
attach: this.attach.bind(this),
|
|
1445
1431
|
detach: this.detach.bind(this),
|
|
1446
1432
|
beginRun: () => this.dap.resetRun()
|
|
1447
|
-
}, this.onMessage = this.onMessage.bind(this), this.dap = new
|
|
1433
|
+
}, this.onMessage = this.onMessage.bind(this), this.dap = new BA(), this.dap.on(this.onMessage);
|
|
1448
1434
|
}
|
|
1449
1435
|
send(A) {
|
|
1450
1436
|
return this.dap.sendMessage(A);
|
|
1451
1437
|
}
|
|
1452
1438
|
artifactListener = (A) => {
|
|
1453
1439
|
if (A.data.type !== "artifact") return;
|
|
1454
|
-
const
|
|
1455
|
-
this.emit("artifact",
|
|
1440
|
+
const I = new eA(A.data.name, new Uint8Array(A.data.data));
|
|
1441
|
+
this.emit("artifact", I);
|
|
1456
1442
|
};
|
|
1457
1443
|
attach(A) {
|
|
1458
1444
|
A.addEventListener("message", this.artifactListener), this.dap.attach(A);
|
|
@@ -1464,27 +1450,27 @@ class fA extends GA {
|
|
|
1464
1450
|
this.emit("event", A);
|
|
1465
1451
|
}
|
|
1466
1452
|
}
|
|
1467
|
-
const
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
if (
|
|
1471
|
-
throw new TypeError(`Engine Wasm must be served over http(s), not ${
|
|
1472
|
-
return
|
|
1453
|
+
const $A = "glassjar-wasm:";
|
|
1454
|
+
function AI(Q, A) {
|
|
1455
|
+
const I = new URL(String(Q), A);
|
|
1456
|
+
if (I.protocol !== "https:" && I.protocol !== "http:")
|
|
1457
|
+
throw new TypeError(`Engine Wasm must be served over http(s), not ${I.protocol}`);
|
|
1458
|
+
return I.href;
|
|
1473
1459
|
}
|
|
1474
|
-
function
|
|
1460
|
+
function II(Q) {
|
|
1475
1461
|
return new Worker(
|
|
1476
|
-
"" + new URL("assets/worker-
|
|
1462
|
+
"" + new URL("assets/worker-DKKpKTP_.js", import.meta.url).href,
|
|
1477
1463
|
{
|
|
1478
1464
|
type: "module",
|
|
1479
1465
|
name: Q?.name
|
|
1480
1466
|
}
|
|
1481
1467
|
);
|
|
1482
1468
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return new
|
|
1469
|
+
function gI(Q) {
|
|
1470
|
+
return new II(Q ? { name: $A + Q } : void 0);
|
|
1485
1471
|
}
|
|
1486
|
-
const
|
|
1487
|
-
class
|
|
1472
|
+
const RI = "/dev/debugger-sh-host";
|
|
1473
|
+
class KA {
|
|
1488
1474
|
buffer = new SharedArrayBuffer(4 + 64 * 1024);
|
|
1489
1475
|
length = new Int32Array(this.buffer, 0, 1);
|
|
1490
1476
|
bytes = new Uint8Array(this.buffer, 4);
|
|
@@ -1492,7 +1478,7 @@ class NA {
|
|
|
1492
1478
|
Atomics.store(this.length, 0, A), Atomics.notify(this.length, 0);
|
|
1493
1479
|
}
|
|
1494
1480
|
}
|
|
1495
|
-
function
|
|
1481
|
+
function wA(Q) {
|
|
1496
1482
|
try {
|
|
1497
1483
|
return new Error(
|
|
1498
1484
|
`Host device callback failed: ${Q instanceof Error ? Q.message : String(Q)}`
|
|
@@ -1501,22 +1487,22 @@ function IA(Q) {
|
|
|
1501
1487
|
return new Error("Host device callback failed");
|
|
1502
1488
|
}
|
|
1503
1489
|
}
|
|
1504
|
-
function
|
|
1490
|
+
function yA(Q) {
|
|
1505
1491
|
try {
|
|
1506
1492
|
const A = Q?.();
|
|
1507
1493
|
if (A && typeof A.then == "function")
|
|
1508
1494
|
return Promise.resolve(A).catch(() => {
|
|
1509
1495
|
}), new TypeError("Host device cleanup must be synchronous");
|
|
1510
1496
|
} catch (A) {
|
|
1511
|
-
return
|
|
1497
|
+
return wA(A);
|
|
1512
1498
|
}
|
|
1513
1499
|
}
|
|
1514
|
-
class
|
|
1500
|
+
class CI {
|
|
1515
1501
|
constructor(A) {
|
|
1516
1502
|
this.onFailure = A;
|
|
1517
1503
|
}
|
|
1518
|
-
incoming = new
|
|
1519
|
-
outgoing = new
|
|
1504
|
+
incoming = new KA();
|
|
1505
|
+
outgoing = new KA();
|
|
1520
1506
|
workerStart = {
|
|
1521
1507
|
guest_to_host: this.incoming.buffer,
|
|
1522
1508
|
host_to_guest: this.outgoing.buffer
|
|
@@ -1527,30 +1513,30 @@ class PA {
|
|
|
1527
1513
|
worker;
|
|
1528
1514
|
writing = !1;
|
|
1529
1515
|
open(A) {
|
|
1530
|
-
let
|
|
1516
|
+
let I;
|
|
1531
1517
|
try {
|
|
1532
|
-
|
|
1518
|
+
I = A({
|
|
1533
1519
|
signal: this.abort.signal,
|
|
1534
|
-
onData: (
|
|
1535
|
-
if (this.assertOpen(), typeof
|
|
1520
|
+
onData: (g) => {
|
|
1521
|
+
if (this.assertOpen(), typeof g != "function")
|
|
1536
1522
|
throw new TypeError("Host device listener must be a function");
|
|
1537
|
-
return this.listeners.add(
|
|
1538
|
-
this.listeners.delete(
|
|
1523
|
+
return this.listeners.add(g), () => {
|
|
1524
|
+
this.listeners.delete(g);
|
|
1539
1525
|
};
|
|
1540
1526
|
},
|
|
1541
|
-
write: (
|
|
1527
|
+
write: (g) => this.write(g)
|
|
1542
1528
|
});
|
|
1543
|
-
} catch (
|
|
1544
|
-
throw
|
|
1529
|
+
} catch (g) {
|
|
1530
|
+
throw wA(g);
|
|
1545
1531
|
}
|
|
1546
|
-
if (
|
|
1547
|
-
throw Promise.resolve(
|
|
1532
|
+
if (I !== void 0 && typeof I != "function")
|
|
1533
|
+
throw Promise.resolve(I).catch(() => {
|
|
1548
1534
|
}), new TypeError("Host device opener must return a cleanup function or undefined");
|
|
1549
|
-
if (typeof
|
|
1535
|
+
if (typeof I == "function")
|
|
1550
1536
|
if (this.abort.signal.aborted) {
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1553
|
-
} else this.cleanup =
|
|
1537
|
+
const g = yA(I);
|
|
1538
|
+
if (g) throw g;
|
|
1539
|
+
} else this.cleanup = I;
|
|
1554
1540
|
}
|
|
1555
1541
|
attach(A) {
|
|
1556
1542
|
this.assertOpen(), this.worker = A, A.addEventListener("message", this.onMessage);
|
|
@@ -1564,17 +1550,17 @@ class PA {
|
|
|
1564
1550
|
if (this.writing) throw new Error("Await the previous host device write before writing again");
|
|
1565
1551
|
this.writing = !0;
|
|
1566
1552
|
try {
|
|
1567
|
-
const
|
|
1553
|
+
const I = new Uint8Array(A), g = this.outgoing;
|
|
1568
1554
|
let C = 0;
|
|
1569
|
-
for (; C <
|
|
1555
|
+
for (; C < I.length; ) {
|
|
1570
1556
|
this.assertOpen();
|
|
1571
|
-
const B = Atomics.load(
|
|
1557
|
+
const B = Atomics.load(g.length, 0);
|
|
1572
1558
|
if (B !== 0) {
|
|
1573
|
-
await Atomics.waitAsync(
|
|
1559
|
+
await Atomics.waitAsync(g.length, 0, B).value;
|
|
1574
1560
|
continue;
|
|
1575
1561
|
}
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1562
|
+
const E = I.subarray(C, C + g.bytes.length);
|
|
1563
|
+
g.bytes.set(E), g.publish(E.length), C += E.length;
|
|
1578
1564
|
}
|
|
1579
1565
|
} finally {
|
|
1580
1566
|
this.writing = !1;
|
|
@@ -1583,97 +1569,727 @@ class PA {
|
|
|
1583
1569
|
onMessage = (A) => {
|
|
1584
1570
|
if (!(this.abort.signal.aborted || A.data?.type !== "host_wake"))
|
|
1585
1571
|
try {
|
|
1586
|
-
const
|
|
1587
|
-
if (
|
|
1588
|
-
const
|
|
1572
|
+
const I = Atomics.load(this.incoming.length, 0);
|
|
1573
|
+
if (I <= 0) return;
|
|
1574
|
+
const g = this.incoming.bytes.slice(0, I);
|
|
1589
1575
|
this.incoming.publish(0);
|
|
1590
1576
|
for (const C of this.listeners) {
|
|
1591
1577
|
if (this.abort.signal.aborted) break;
|
|
1592
|
-
Promise.resolve(C(
|
|
1578
|
+
Promise.resolve(C(g)).catch((B) => this.fail(B));
|
|
1593
1579
|
}
|
|
1594
|
-
} catch (
|
|
1595
|
-
this.fail(
|
|
1580
|
+
} catch (I) {
|
|
1581
|
+
this.fail(I);
|
|
1596
1582
|
}
|
|
1597
1583
|
};
|
|
1598
1584
|
fail(A) {
|
|
1599
|
-
this.abort.signal.aborted || (this.close(), this.onFailure(
|
|
1585
|
+
this.abort.signal.aborted || (this.close(), this.onFailure(wA(A)));
|
|
1600
1586
|
}
|
|
1601
1587
|
close() {
|
|
1602
1588
|
if (this.abort.signal.aborted) return;
|
|
1603
1589
|
this.worker?.removeEventListener("message", this.onMessage), this.worker = void 0, this.incoming.publish(-1), this.outgoing.publish(-1), this.abort.abort(), this.listeners.clear();
|
|
1604
1590
|
const A = this.cleanup;
|
|
1605
|
-
return this.cleanup = void 0,
|
|
1591
|
+
return this.cleanup = void 0, yA(A);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
const QI = [
|
|
1595
|
+
"__future__",
|
|
1596
|
+
"_abc",
|
|
1597
|
+
"_aix_support",
|
|
1598
|
+
"_android_support",
|
|
1599
|
+
"_apple_support",
|
|
1600
|
+
"_ast",
|
|
1601
|
+
"_ast_unparse",
|
|
1602
|
+
"_asyncio",
|
|
1603
|
+
"_bisect",
|
|
1604
|
+
"_blake2",
|
|
1605
|
+
"_bz2",
|
|
1606
|
+
"_codecs",
|
|
1607
|
+
"_codecs_cn",
|
|
1608
|
+
"_codecs_hk",
|
|
1609
|
+
"_codecs_iso2022",
|
|
1610
|
+
"_codecs_jp",
|
|
1611
|
+
"_codecs_kr",
|
|
1612
|
+
"_codecs_tw",
|
|
1613
|
+
"_collections",
|
|
1614
|
+
"_collections_abc",
|
|
1615
|
+
"_colorize",
|
|
1616
|
+
"_compat_pickle",
|
|
1617
|
+
"_contextvars",
|
|
1618
|
+
"_csv",
|
|
1619
|
+
"_ctypes",
|
|
1620
|
+
"_curses",
|
|
1621
|
+
"_curses_panel",
|
|
1622
|
+
"_datetime",
|
|
1623
|
+
"_dbm",
|
|
1624
|
+
"_decimal",
|
|
1625
|
+
"_elementtree",
|
|
1626
|
+
"_frozen_importlib",
|
|
1627
|
+
"_frozen_importlib_external",
|
|
1628
|
+
"_functools",
|
|
1629
|
+
"_gdbm",
|
|
1630
|
+
"_hashlib",
|
|
1631
|
+
"_heapq",
|
|
1632
|
+
"_hmac",
|
|
1633
|
+
"_imp",
|
|
1634
|
+
"_interpchannels",
|
|
1635
|
+
"_interpqueues",
|
|
1636
|
+
"_interpreters",
|
|
1637
|
+
"_io",
|
|
1638
|
+
"_ios_support",
|
|
1639
|
+
"_json",
|
|
1640
|
+
"_locale",
|
|
1641
|
+
"_lsprof",
|
|
1642
|
+
"_lzma",
|
|
1643
|
+
"_markupbase",
|
|
1644
|
+
"_math_integer",
|
|
1645
|
+
"_md5",
|
|
1646
|
+
"_multibytecodec",
|
|
1647
|
+
"_multiprocessing",
|
|
1648
|
+
"_opcode",
|
|
1649
|
+
"_opcode_metadata",
|
|
1650
|
+
"_operator",
|
|
1651
|
+
"_osx_support",
|
|
1652
|
+
"_overlapped",
|
|
1653
|
+
"_pickle",
|
|
1654
|
+
"_posixshmem",
|
|
1655
|
+
"_posixsubprocess",
|
|
1656
|
+
"_py_abc",
|
|
1657
|
+
"_py_warnings",
|
|
1658
|
+
"_pydatetime",
|
|
1659
|
+
"_pydecimal",
|
|
1660
|
+
"_pyio",
|
|
1661
|
+
"_pylong",
|
|
1662
|
+
"_pyrepl",
|
|
1663
|
+
"_queue",
|
|
1664
|
+
"_random",
|
|
1665
|
+
"_remote_debugging",
|
|
1666
|
+
"_scproxy",
|
|
1667
|
+
"_sha1",
|
|
1668
|
+
"_sha2",
|
|
1669
|
+
"_sha3",
|
|
1670
|
+
"_signal",
|
|
1671
|
+
"_sitebuiltins",
|
|
1672
|
+
"_socket",
|
|
1673
|
+
"_sqlite3",
|
|
1674
|
+
"_sre",
|
|
1675
|
+
"_ssl",
|
|
1676
|
+
"_stat",
|
|
1677
|
+
"_statistics",
|
|
1678
|
+
"_string",
|
|
1679
|
+
"_strptime",
|
|
1680
|
+
"_struct",
|
|
1681
|
+
"_suggestions",
|
|
1682
|
+
"_symtable",
|
|
1683
|
+
"_sysconfig",
|
|
1684
|
+
"_testbuffer",
|
|
1685
|
+
"_testcapi",
|
|
1686
|
+
"_testclinic",
|
|
1687
|
+
"_testclinic_limited",
|
|
1688
|
+
"_testinternalcapi",
|
|
1689
|
+
"_testlimitedcapi",
|
|
1690
|
+
"_thread",
|
|
1691
|
+
"_threading_local",
|
|
1692
|
+
"_tkinter",
|
|
1693
|
+
"_tokenize",
|
|
1694
|
+
"_tracemalloc",
|
|
1695
|
+
"_types",
|
|
1696
|
+
"_typing",
|
|
1697
|
+
"_uuid",
|
|
1698
|
+
"_warnings",
|
|
1699
|
+
"_weakref",
|
|
1700
|
+
"_weakrefset",
|
|
1701
|
+
"_winapi",
|
|
1702
|
+
"_wmi",
|
|
1703
|
+
"_xxtestfuzz",
|
|
1704
|
+
"_zoneinfo",
|
|
1705
|
+
"_zstd",
|
|
1706
|
+
"abc",
|
|
1707
|
+
"annotationlib",
|
|
1708
|
+
"antigravity",
|
|
1709
|
+
"argparse",
|
|
1710
|
+
"array",
|
|
1711
|
+
"ast",
|
|
1712
|
+
"asyncio",
|
|
1713
|
+
"atexit",
|
|
1714
|
+
"base64",
|
|
1715
|
+
"bdb",
|
|
1716
|
+
"binascii",
|
|
1717
|
+
"bisect",
|
|
1718
|
+
"builtins",
|
|
1719
|
+
"bz2",
|
|
1720
|
+
"cProfile",
|
|
1721
|
+
"calendar",
|
|
1722
|
+
"cmath",
|
|
1723
|
+
"cmd",
|
|
1724
|
+
"code",
|
|
1725
|
+
"codecs",
|
|
1726
|
+
"codeop",
|
|
1727
|
+
"collections",
|
|
1728
|
+
"colorsys",
|
|
1729
|
+
"compileall",
|
|
1730
|
+
"compression",
|
|
1731
|
+
"concurrent",
|
|
1732
|
+
"configparser",
|
|
1733
|
+
"contextlib",
|
|
1734
|
+
"contextvars",
|
|
1735
|
+
"copy",
|
|
1736
|
+
"copyreg",
|
|
1737
|
+
"csv",
|
|
1738
|
+
"ctypes",
|
|
1739
|
+
"curses",
|
|
1740
|
+
"dataclasses",
|
|
1741
|
+
"datetime",
|
|
1742
|
+
"dbm",
|
|
1743
|
+
"decimal",
|
|
1744
|
+
"difflib",
|
|
1745
|
+
"dis",
|
|
1746
|
+
"doctest",
|
|
1747
|
+
"email",
|
|
1748
|
+
"encodings",
|
|
1749
|
+
"ensurepip",
|
|
1750
|
+
"enum",
|
|
1751
|
+
"errno",
|
|
1752
|
+
"faulthandler",
|
|
1753
|
+
"fcntl",
|
|
1754
|
+
"filecmp",
|
|
1755
|
+
"fileinput",
|
|
1756
|
+
"fnmatch",
|
|
1757
|
+
"fractions",
|
|
1758
|
+
"ftplib",
|
|
1759
|
+
"functools",
|
|
1760
|
+
"gc",
|
|
1761
|
+
"genericpath",
|
|
1762
|
+
"getopt",
|
|
1763
|
+
"getpass",
|
|
1764
|
+
"gettext",
|
|
1765
|
+
"glob",
|
|
1766
|
+
"graphlib",
|
|
1767
|
+
"grp",
|
|
1768
|
+
"gzip",
|
|
1769
|
+
"hashlib",
|
|
1770
|
+
"heapq",
|
|
1771
|
+
"hmac",
|
|
1772
|
+
"html",
|
|
1773
|
+
"http",
|
|
1774
|
+
"idlelib",
|
|
1775
|
+
"imaplib",
|
|
1776
|
+
"importlib",
|
|
1777
|
+
"inspect",
|
|
1778
|
+
"io",
|
|
1779
|
+
"ipaddress",
|
|
1780
|
+
"itertools",
|
|
1781
|
+
"json",
|
|
1782
|
+
"keyword",
|
|
1783
|
+
"linecache",
|
|
1784
|
+
"locale",
|
|
1785
|
+
"logging",
|
|
1786
|
+
"lzma",
|
|
1787
|
+
"mailbox",
|
|
1788
|
+
"marshal",
|
|
1789
|
+
"math",
|
|
1790
|
+
"mimetypes",
|
|
1791
|
+
"mmap",
|
|
1792
|
+
"modulefinder",
|
|
1793
|
+
"msvcrt",
|
|
1794
|
+
"multiprocessing",
|
|
1795
|
+
"netrc",
|
|
1796
|
+
"nt",
|
|
1797
|
+
"ntpath",
|
|
1798
|
+
"nturl2path",
|
|
1799
|
+
"numbers",
|
|
1800
|
+
"opcode",
|
|
1801
|
+
"operator",
|
|
1802
|
+
"optparse",
|
|
1803
|
+
"os",
|
|
1804
|
+
"pathlib",
|
|
1805
|
+
"pdb",
|
|
1806
|
+
"pickle",
|
|
1807
|
+
"pickletools",
|
|
1808
|
+
"pkgutil",
|
|
1809
|
+
"platform",
|
|
1810
|
+
"plistlib",
|
|
1811
|
+
"poplib",
|
|
1812
|
+
"posix",
|
|
1813
|
+
"posixpath",
|
|
1814
|
+
"pprint",
|
|
1815
|
+
"profile",
|
|
1816
|
+
"profiling",
|
|
1817
|
+
"pstats",
|
|
1818
|
+
"pty",
|
|
1819
|
+
"pwd",
|
|
1820
|
+
"py_compile",
|
|
1821
|
+
"pyclbr",
|
|
1822
|
+
"pydoc",
|
|
1823
|
+
"pydoc_data",
|
|
1824
|
+
"pyexpat",
|
|
1825
|
+
"queue",
|
|
1826
|
+
"quopri",
|
|
1827
|
+
"random",
|
|
1828
|
+
"re",
|
|
1829
|
+
"readline",
|
|
1830
|
+
"reprlib",
|
|
1831
|
+
"resource",
|
|
1832
|
+
"rlcompleter",
|
|
1833
|
+
"runpy",
|
|
1834
|
+
"sched",
|
|
1835
|
+
"secrets",
|
|
1836
|
+
"select",
|
|
1837
|
+
"selectors",
|
|
1838
|
+
"shelve",
|
|
1839
|
+
"shlex",
|
|
1840
|
+
"shutil",
|
|
1841
|
+
"signal",
|
|
1842
|
+
"site",
|
|
1843
|
+
"smtplib",
|
|
1844
|
+
"socket",
|
|
1845
|
+
"socketserver",
|
|
1846
|
+
"sqlite3",
|
|
1847
|
+
"ssl",
|
|
1848
|
+
"stat",
|
|
1849
|
+
"statistics",
|
|
1850
|
+
"string",
|
|
1851
|
+
"stringprep",
|
|
1852
|
+
"struct",
|
|
1853
|
+
"subprocess",
|
|
1854
|
+
"symtable",
|
|
1855
|
+
"sys",
|
|
1856
|
+
"sysconfig",
|
|
1857
|
+
"syslog",
|
|
1858
|
+
"tabnanny",
|
|
1859
|
+
"tarfile",
|
|
1860
|
+
"tempfile",
|
|
1861
|
+
"termios",
|
|
1862
|
+
"textwrap",
|
|
1863
|
+
"this",
|
|
1864
|
+
"threading",
|
|
1865
|
+
"time",
|
|
1866
|
+
"timeit",
|
|
1867
|
+
"tkinter",
|
|
1868
|
+
"token",
|
|
1869
|
+
"tokenize",
|
|
1870
|
+
"tomllib",
|
|
1871
|
+
"trace",
|
|
1872
|
+
"traceback",
|
|
1873
|
+
"tracemalloc",
|
|
1874
|
+
"tty",
|
|
1875
|
+
"turtle",
|
|
1876
|
+
"turtledemo",
|
|
1877
|
+
"types",
|
|
1878
|
+
"typing",
|
|
1879
|
+
"unicodedata",
|
|
1880
|
+
"unittest",
|
|
1881
|
+
"urllib",
|
|
1882
|
+
"uuid",
|
|
1883
|
+
"venv",
|
|
1884
|
+
"warnings",
|
|
1885
|
+
"wave",
|
|
1886
|
+
"weakref",
|
|
1887
|
+
"webbrowser",
|
|
1888
|
+
"winreg",
|
|
1889
|
+
"winsound",
|
|
1890
|
+
"wsgiref",
|
|
1891
|
+
"xml",
|
|
1892
|
+
"xmlrpc",
|
|
1893
|
+
"xxsubtype",
|
|
1894
|
+
"zipapp",
|
|
1895
|
+
"zipfile",
|
|
1896
|
+
"zipimport",
|
|
1897
|
+
"zlib",
|
|
1898
|
+
"zoneinfo"
|
|
1899
|
+
], AA = "3.15.2", BI = "/usr/local/lib/python3.15/site-packages", UA = "https://pypi.org/pypi", EI = "files.pythonhosted.org", l = { packages: 50, downloadBytes: 60 * 1024 * 1024, files: 5e3, unpackedBytes: 200 * 1024 * 1024 }, DI = {
|
|
1900
|
+
python_version: AA.split(".").slice(0, 2).join("."),
|
|
1901
|
+
python_full_version: AA,
|
|
1902
|
+
implementation_name: "cpython",
|
|
1903
|
+
implementation_version: AA,
|
|
1904
|
+
platform_python_implementation: "CPython",
|
|
1905
|
+
os_name: "posix",
|
|
1906
|
+
sys_platform: "wasi",
|
|
1907
|
+
platform_system: "",
|
|
1908
|
+
platform_machine: "wasm32",
|
|
1909
|
+
platform_release: "0.0.0",
|
|
1910
|
+
platform_version: "0.0.0"
|
|
1911
|
+
}, RA = {
|
|
1912
|
+
yaml: "PyYAML",
|
|
1913
|
+
bs4: "beautifulsoup4",
|
|
1914
|
+
dateutil: "python-dateutil",
|
|
1915
|
+
attr: "attrs",
|
|
1916
|
+
dotenv: "python-dotenv",
|
|
1917
|
+
jwt: "PyJWT",
|
|
1918
|
+
serial: "pyserial",
|
|
1919
|
+
docx: "python-docx",
|
|
1920
|
+
pptx: "python-pptx",
|
|
1921
|
+
slugify: "python-slugify",
|
|
1922
|
+
PIL: "pillow",
|
|
1923
|
+
sklearn: "scikit-learn",
|
|
1924
|
+
cv2: "opencv-python",
|
|
1925
|
+
Crypto: "pycryptodome",
|
|
1926
|
+
skimage: "scikit-image",
|
|
1927
|
+
google: "protobuf",
|
|
1928
|
+
_pytest: "pytest"
|
|
1929
|
+
}, wI = new Set(QI), YA = /^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;
|
|
1930
|
+
function W(Q) {
|
|
1931
|
+
return Q.toLowerCase().replace(/[-_.]+/g, "-");
|
|
1932
|
+
}
|
|
1933
|
+
function iI(Q) {
|
|
1934
|
+
const A = /* @__PURE__ */ new Set();
|
|
1935
|
+
for (const I of Q.split(`
|
|
1936
|
+
`)) {
|
|
1937
|
+
const g = I.replace(/#.*/, "").trim();
|
|
1938
|
+
let C = /^import\s+(.+)$/.exec(g);
|
|
1939
|
+
if (C) {
|
|
1940
|
+
for (const B of C[1].split(",")) {
|
|
1941
|
+
const E = B.trim().split(/\s+/)[0]?.split(".")[0];
|
|
1942
|
+
E && A.add(E);
|
|
1943
|
+
}
|
|
1944
|
+
continue;
|
|
1945
|
+
}
|
|
1946
|
+
C = /^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(g), C && A.add(C[1].split(".")[0]);
|
|
1947
|
+
}
|
|
1948
|
+
return A;
|
|
1949
|
+
}
|
|
1950
|
+
function oI(Q) {
|
|
1951
|
+
const A = /* @__PURE__ */ new Set(), I = [];
|
|
1952
|
+
let g = "";
|
|
1953
|
+
const C = (E, D) => {
|
|
1954
|
+
for (const [w, N] of Object.entries(E))
|
|
1955
|
+
typeof N == "string" ? (w.endsWith(".py") && (I.push(N), D || A.add(w.slice(0, -3))), !D && w === "requirements.txt" && (g = N)) : (D || A.add(w), C(N, `${D}/${w}`));
|
|
1956
|
+
};
|
|
1957
|
+
C(Q, "");
|
|
1958
|
+
const B = /* @__PURE__ */ new Map();
|
|
1959
|
+
for (const E of I)
|
|
1960
|
+
for (const D of iI(E)) {
|
|
1961
|
+
if (wI.has(D) || A.has(D) || D.startsWith("_") && !(D in RA)) continue;
|
|
1962
|
+
const w = RA[D] ?? D;
|
|
1963
|
+
B.set(W(w), w);
|
|
1964
|
+
}
|
|
1965
|
+
for (const E of g.split(`
|
|
1966
|
+
`)) {
|
|
1967
|
+
const D = E.replace(/#.*/, "").trim();
|
|
1968
|
+
if (!D || D.startsWith("-")) continue;
|
|
1969
|
+
const w = /^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];
|
|
1970
|
+
w && B.set(W(w), D);
|
|
1971
|
+
}
|
|
1972
|
+
return [...B.values()].sort();
|
|
1973
|
+
}
|
|
1974
|
+
function n(Q) {
|
|
1975
|
+
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
|
+
Q.trim()
|
|
1977
|
+
);
|
|
1978
|
+
if (!A) return null;
|
|
1979
|
+
const I = A[2]?.toLowerCase(), g = I ? { a: 0, alpha: 0, b: 1, beta: 1, c: 2, rc: 2, pre: 2, preview: 2 }[I] : void 0;
|
|
1980
|
+
return {
|
|
1981
|
+
release: A[1].split(".").map(Number),
|
|
1982
|
+
pre: g === void 0 ? void 0 : [g, Number(A[3] || 0)],
|
|
1983
|
+
post: A[4] !== void 0 ? Number(A[4]) : A[5] !== void 0 ? Number(A[5] || 0) : void 0,
|
|
1984
|
+
dev: A[6] !== void 0 ? Number(A[6] || 0) : void 0,
|
|
1985
|
+
text: Q
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function cA(Q, A) {
|
|
1989
|
+
const I = Math.max(Q.release.length, A.release.length);
|
|
1990
|
+
for (let E = 0; E < I; E++) {
|
|
1991
|
+
const D = (Q.release[E] ?? 0) - (A.release[E] ?? 0);
|
|
1992
|
+
if (D) return Math.sign(D);
|
|
1993
|
+
}
|
|
1994
|
+
const g = (E) => [
|
|
1995
|
+
E.pre ? 0 : E.dev !== void 0 && E.post === void 0 ? -1 : 1,
|
|
1996
|
+
E.pre?.[0] ?? 0,
|
|
1997
|
+
E.pre?.[1] ?? 0,
|
|
1998
|
+
E.post ?? -1,
|
|
1999
|
+
E.dev ?? Number.POSITIVE_INFINITY
|
|
2000
|
+
], C = g(Q), B = g(A);
|
|
2001
|
+
for (let E = 0; E < C.length; E++) if (C[E] !== B[E]) return Math.sign(C[E] - B[E]);
|
|
2002
|
+
return 0;
|
|
2003
|
+
}
|
|
2004
|
+
const JA = (Q) => Q.pre !== void 0 || Q.dev !== void 0;
|
|
2005
|
+
function iA(Q, A) {
|
|
2006
|
+
for (const I of A.split(",")) {
|
|
2007
|
+
const g = I.trim();
|
|
2008
|
+
if (!g) continue;
|
|
2009
|
+
const C = /^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(g);
|
|
2010
|
+
if (!C) return !1;
|
|
2011
|
+
const [, B, E] = C;
|
|
2012
|
+
if ((B === "==" || B === "!=") && E.endsWith(".*")) {
|
|
2013
|
+
if (E.slice(0, -2).split(".").map(Number).every((U, h) => (Q.release[h] ?? 0) === U) !== (B === "==")) return !1;
|
|
2014
|
+
continue;
|
|
2015
|
+
}
|
|
2016
|
+
const D = n(E);
|
|
2017
|
+
if (!D) return !1;
|
|
2018
|
+
const w = cA(Q, D);
|
|
2019
|
+
if (B === "~=") {
|
|
2020
|
+
const N = D.release.slice(0, Math.max(1, D.release.length - 1));
|
|
2021
|
+
if (w < 0 || !N.every((k, U) => (Q.release[U] ?? 0) === k)) return !1;
|
|
2022
|
+
} else if (!(B === "==" || B === "===" ? w === 0 : B === "!=" ? w !== 0 : B === "<=" ? w <= 0 : B === ">=" ? w >= 0 : B === "<" ? w < 0 : w > 0))
|
|
2023
|
+
return !1;
|
|
2024
|
+
}
|
|
2025
|
+
return !0;
|
|
2026
|
+
}
|
|
2027
|
+
function hA(Q) {
|
|
2028
|
+
const [A, I] = Q.split(";", 2).map((C) => C.trim()), g = /^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(A);
|
|
2029
|
+
return !g || g[3].includes("@") ? null : {
|
|
2030
|
+
name: g[1],
|
|
2031
|
+
extras: (g[2] ?? "").split(",").map((C) => C.trim()).filter(Boolean),
|
|
2032
|
+
specifiers: g[3].replace(/\s+/g, ""),
|
|
2033
|
+
marker: I || void 0
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
function NI(Q, A = []) {
|
|
2037
|
+
const I = Q.match(/\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g) ?? [];
|
|
2038
|
+
let g = 0;
|
|
2039
|
+
const C = (N) => /^['"]/.test(N) ? { text: N.slice(1, -1) } : N === "extra" ? { text: "", variable: "extra" } : { text: DI[N] ?? "", variable: N }, B = (N, k, U) => {
|
|
2040
|
+
if (N.variable === "extra" || U.variable === "extra") {
|
|
2041
|
+
const R = W((N.variable === "extra" ? U : N).text), H = A.some((j) => W(j) === R);
|
|
2042
|
+
return k === "!=" ? !H : H;
|
|
2043
|
+
}
|
|
2044
|
+
if (k === "in") return U.text.includes(N.text);
|
|
2045
|
+
if (/^not\s+in$/.test(k)) return !U.text.includes(N.text);
|
|
2046
|
+
if (!N.variable && U.variable)
|
|
2047
|
+
return B(U, { "<": ">", ">": "<", "<=": ">=", ">=": "<=" }[k] ?? k, N);
|
|
2048
|
+
const h = n(N.text), K = n(U.text);
|
|
2049
|
+
return h && K && /version/.test(N.variable ?? "") ? iA(h, `${k}${U.text}`) : k === "==" || k === "===" ? N.text === U.text : k === "!=" ? N.text !== U.text : !1;
|
|
2050
|
+
}, E = () => {
|
|
2051
|
+
if (I[g] === "(") {
|
|
2052
|
+
g++;
|
|
2053
|
+
const h = w();
|
|
2054
|
+
return g++, h;
|
|
2055
|
+
}
|
|
2056
|
+
const N = C(I[g++]), k = I[g++], U = C(I[g++]);
|
|
2057
|
+
return B(N, k, U);
|
|
2058
|
+
}, D = () => {
|
|
2059
|
+
let N = E();
|
|
2060
|
+
for (; I[g] === "and"; )
|
|
2061
|
+
g++, N = E() && N;
|
|
2062
|
+
return N;
|
|
2063
|
+
}, w = () => {
|
|
2064
|
+
let N = D();
|
|
2065
|
+
for (; I[g] === "or"; )
|
|
2066
|
+
g++, N = D() || N;
|
|
2067
|
+
return N;
|
|
2068
|
+
};
|
|
2069
|
+
try {
|
|
2070
|
+
return w();
|
|
2071
|
+
} catch {
|
|
2072
|
+
return !1;
|
|
1606
2073
|
}
|
|
1607
2074
|
}
|
|
1608
|
-
|
|
2075
|
+
function FI(Q) {
|
|
2076
|
+
if (Q.packagetype !== "bdist_wheel" || Q.yanked) return !1;
|
|
2077
|
+
const A = Q.filename.replace(/\.whl$/, "").split("-").slice(-3);
|
|
2078
|
+
return A.length === 3 && A[1] === "none" && A[2] === "any" && A[0].split(".").some((I) => I === "py3" || I.startsWith("py3"));
|
|
2079
|
+
}
|
|
2080
|
+
function GI(Q) {
|
|
2081
|
+
return Q ? iA(n(AA), Q.replace(/\s+/g, "")) : !0;
|
|
2082
|
+
}
|
|
2083
|
+
class MI {
|
|
2084
|
+
constructor(A = (I, g) => fetch(I, g)) {
|
|
2085
|
+
this.fetchImpl = A;
|
|
2086
|
+
}
|
|
2087
|
+
projects = /* @__PURE__ */ new Map();
|
|
2088
|
+
metadata = /* @__PURE__ */ new Map();
|
|
2089
|
+
wheels = /* @__PURE__ */ new Map();
|
|
2090
|
+
project(A) {
|
|
2091
|
+
const I = W(A);
|
|
2092
|
+
let g = this.projects.get(I);
|
|
2093
|
+
return g || (g = this.fetchImpl(`${UA}/${encodeURIComponent(I)}/json`).then(
|
|
2094
|
+
async (C) => C.ok ? await C.json() : null,
|
|
2095
|
+
() => null
|
|
2096
|
+
), this.projects.set(I, g)), g;
|
|
2097
|
+
}
|
|
2098
|
+
/** requires_dist of one release (the project JSON only carries the latest's). */
|
|
2099
|
+
requiresDist(A, I, g) {
|
|
2100
|
+
if (g.info.version === I) return Promise.resolve(g.info.requires_dist ?? []);
|
|
2101
|
+
const C = `${W(A)}@${I}`;
|
|
2102
|
+
let B = this.metadata.get(C);
|
|
2103
|
+
return B || (B = this.fetchImpl(`${UA}/${encodeURIComponent(W(A))}/${encodeURIComponent(I)}/json`).then(
|
|
2104
|
+
async (E) => E.ok ? (await E.json()).info.requires_dist ?? [] : [],
|
|
2105
|
+
() => []
|
|
2106
|
+
), this.metadata.set(C, B)), B;
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Resolves requirements and their dependencies to pure-Python wheels. Greedy: the newest
|
|
2110
|
+
* release that fits every constraint seen so far for that project.
|
|
2111
|
+
*/
|
|
2112
|
+
async resolve(A, I = () => {
|
|
2113
|
+
}) {
|
|
2114
|
+
const g = /* @__PURE__ */ new Map(), C = [];
|
|
2115
|
+
for (const B of A) {
|
|
2116
|
+
const E = hA(B);
|
|
2117
|
+
E && YA.test(E.name) && C.push({ requirement: E, top: !0 });
|
|
2118
|
+
}
|
|
2119
|
+
for (; C.length; ) {
|
|
2120
|
+
const { requirement: B, top: E } = C.shift(), D = W(B.name);
|
|
2121
|
+
if (g.has(D)) continue;
|
|
2122
|
+
if (g.size >= l.packages) break;
|
|
2123
|
+
const w = await this.project(B.name);
|
|
2124
|
+
if (!w) {
|
|
2125
|
+
E && I({ kind: "skipped", message: `${B.name}: not found on PyPI` });
|
|
2126
|
+
continue;
|
|
2127
|
+
}
|
|
2128
|
+
const N = Object.entries(w.releases).map(([K, R]) => ({ version: n(K), files: R })).filter((K) => K.version !== null && iA(K.version, B.specifiers)).sort((K, R) => cA(R.version, K.version)), U = [...N.filter((K) => !JA(K.version)), ...N.filter((K) => JA(K.version))].map((K) => ({ version: K.version, wheel: K.files.find((R) => FI(R) && GI(R.requires_python)) })).find((K) => K.wheel);
|
|
2129
|
+
if (!U?.wheel) {
|
|
2130
|
+
const K = N.some((R) => R.files.some((H) => H.packagetype === "bdist_wheel"));
|
|
2131
|
+
I({
|
|
2132
|
+
kind: "skipped",
|
|
2133
|
+
message: K ? `${w.info.name} has compiled code, which can't run in the browser` : `${w.info.name}: no Python 3.15 wheel on PyPI`
|
|
2134
|
+
});
|
|
2135
|
+
continue;
|
|
2136
|
+
}
|
|
2137
|
+
const h = new URL(U.wheel.url);
|
|
2138
|
+
if (!(h.protocol !== "https:" || h.hostname !== EI)) {
|
|
2139
|
+
g.set(D, { name: w.info.name, version: U.version.text, url: U.wheel.url, sha256: U.wheel.digests.sha256, size: U.wheel.size });
|
|
2140
|
+
for (const K of await this.requiresDist(B.name, U.version.text, w)) {
|
|
2141
|
+
const R = hA(K);
|
|
2142
|
+
!R || !YA.test(R.name) || R.marker && !NI(R.marker, B.extras) || C.push({ requirement: R, top: !1 });
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
return [...g.values()];
|
|
2147
|
+
}
|
|
2148
|
+
/** Files to mount, by absolute path in the run, for these resolved packages. */
|
|
2149
|
+
async install(A, I = () => {
|
|
2150
|
+
}) {
|
|
2151
|
+
const g = {};
|
|
2152
|
+
let C = 0, B = 0;
|
|
2153
|
+
for (const E of A) {
|
|
2154
|
+
if (C += E.size, C > l.downloadBytes) {
|
|
2155
|
+
I({ kind: "skipped", message: `${E.name}: over the ${l.downloadBytes >> 20}MB package limit` });
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
const D = `${E.url}#${E.sha256}`;
|
|
2159
|
+
let w = this.wheels.get(D);
|
|
2160
|
+
w || (I({ kind: "installing", message: `Installing ${E.name} ${E.version}` }), w = this.download(E), this.wheels.set(D, w), w.catch(() => this.wheels.delete(D)));
|
|
2161
|
+
let N;
|
|
2162
|
+
try {
|
|
2163
|
+
N = await w;
|
|
2164
|
+
} catch (k) {
|
|
2165
|
+
I({ kind: "skipped", message: `${E.name}: ${k instanceof Error ? k.message : String(k)}` });
|
|
2166
|
+
continue;
|
|
2167
|
+
}
|
|
2168
|
+
for (const [k, U] of N) {
|
|
2169
|
+
if (++B > l.files) break;
|
|
2170
|
+
g[`${BI}/${k}`] = U;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
return g;
|
|
2174
|
+
}
|
|
2175
|
+
async download(A) {
|
|
2176
|
+
const I = await this.fetchImpl(A.url, { cache: "force-cache" });
|
|
2177
|
+
if (!I.ok) throw new Error(`download failed (${I.status})`);
|
|
2178
|
+
const g = new Uint8Array(await I.arrayBuffer());
|
|
2179
|
+
if ([...new Uint8Array(await crypto.subtle.digest("SHA-256", g))].map((B) => B.toString(16).padStart(2, "0")).join("") !== A.sha256) throw new Error("download did not match PyPI's checksum");
|
|
2180
|
+
return kI(await yI(g, l.unpackedBytes));
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
function kI(Q) {
|
|
2184
|
+
const A = /* @__PURE__ */ new Map();
|
|
2185
|
+
for (const [I, g] of Q) {
|
|
2186
|
+
const C = /^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(I);
|
|
2187
|
+
C ? A.set(C[2], g) : /^[^/]+\.data\//.test(I) || A.set(I, g);
|
|
2188
|
+
}
|
|
2189
|
+
return A;
|
|
2190
|
+
}
|
|
2191
|
+
function KI(Q) {
|
|
2192
|
+
return Q.length > 0 && !Q.startsWith("/") && !Q.includes("\\") && !Q.includes("\0") && !Q.split("/").some((A) => A === ".." || A === ".");
|
|
2193
|
+
}
|
|
2194
|
+
async function yI(Q, A) {
|
|
2195
|
+
const I = new DataView(Q.buffer, Q.byteOffset, Q.byteLength);
|
|
2196
|
+
let g = -1;
|
|
2197
|
+
for (let N = Q.length - 22; N >= Math.max(0, Q.length - 22 - 65535); N--)
|
|
2198
|
+
if (I.getUint32(N, !0) === 101010256) {
|
|
2199
|
+
g = N;
|
|
2200
|
+
break;
|
|
2201
|
+
}
|
|
2202
|
+
if (g < 0) throw new Error("not a zip archive");
|
|
2203
|
+
const C = I.getUint16(g + 10, !0);
|
|
2204
|
+
let B = I.getUint32(g + 16, !0);
|
|
2205
|
+
const E = /* @__PURE__ */ new Map();
|
|
2206
|
+
let D = 0;
|
|
2207
|
+
const w = new TextDecoder();
|
|
2208
|
+
for (let N = 0; N < C; N++) {
|
|
2209
|
+
if (I.getUint32(B, !0) !== 33639248) throw new Error("corrupt zip directory");
|
|
2210
|
+
const k = I.getUint16(B + 10, !0), U = I.getUint32(B + 20, !0), h = I.getUint32(B + 24, !0), K = I.getUint16(B + 28, !0), R = I.getUint16(B + 30, !0), H = I.getUint16(B + 32, !0), j = I.getUint32(B + 42, !0), s = w.decode(Q.subarray(B + 46, B + 46 + K));
|
|
2211
|
+
if (B += 46 + K + R + H, s.endsWith("/")) continue;
|
|
2212
|
+
if (!KI(s)) throw new Error(`unsafe path in package: ${s}`);
|
|
2213
|
+
if (D += h, D > A) throw new Error("package too large");
|
|
2214
|
+
const v = j + 30 + I.getUint16(j + 26, !0) + I.getUint16(j + 28, !0), V = Q.subarray(v, v + U);
|
|
2215
|
+
let o;
|
|
2216
|
+
if (k === 0) o = V.slice();
|
|
2217
|
+
else if (k === 8) o = new Uint8Array(await new Response(new Blob([V.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))).arrayBuffer());
|
|
2218
|
+
else throw new Error(`unsupported compression in package: ${s}`);
|
|
2219
|
+
if (o.length !== h) throw new Error(`corrupt entry in package: ${s}`);
|
|
2220
|
+
E.set(s, o);
|
|
2221
|
+
}
|
|
2222
|
+
return E;
|
|
2223
|
+
}
|
|
2224
|
+
const UI = [
|
|
1609
2225
|
"4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
|
|
1610
|
-
],
|
|
2226
|
+
], gA = Object.freeze({
|
|
1611
2227
|
compiler: "d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",
|
|
1612
2228
|
sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
|
|
1613
2229
|
exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
|
|
1614
2230
|
});
|
|
1615
|
-
function
|
|
1616
|
-
if (Q === "legacy") return { profile: Q, digests:
|
|
1617
|
-
if (Q === "stock-certified-v1" &&
|
|
1618
|
-
return { profile: Q, digests:
|
|
2231
|
+
function aA(Q = "legacy") {
|
|
2232
|
+
if (Q === "legacy") return { profile: Q, digests: gA };
|
|
2233
|
+
if (Q === "stock-certified-v1" && UI.length > 0)
|
|
2234
|
+
return { profile: Q, digests: gA };
|
|
1619
2235
|
throw new Error(`The ${Q} toolchain is not available in this build`);
|
|
1620
2236
|
}
|
|
1621
|
-
class
|
|
2237
|
+
class X {
|
|
1622
2238
|
#A;
|
|
1623
2239
|
hashCount = 3;
|
|
1624
2240
|
hashMs;
|
|
1625
|
-
constructor(A,
|
|
1626
|
-
this.#A = A, this.hashMs =
|
|
2241
|
+
constructor(A, I) {
|
|
2242
|
+
this.#A = A, this.hashMs = I;
|
|
1627
2243
|
}
|
|
1628
|
-
static async load(A,
|
|
1629
|
-
const
|
|
2244
|
+
static async load(A, I, g, C = gA.exceptions, B = "legacy") {
|
|
2245
|
+
const E = aA(B);
|
|
1630
2246
|
if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
|
|
1631
|
-
let D,
|
|
1632
|
-
const
|
|
1633
|
-
A.map(async (
|
|
2247
|
+
let D, w;
|
|
2248
|
+
const N = await Promise.allSettled(
|
|
2249
|
+
A.map(async (H, j) => {
|
|
1634
2250
|
try {
|
|
1635
|
-
const
|
|
1636
|
-
if (!
|
|
1637
|
-
return
|
|
1638
|
-
})), new Uint8Array(await
|
|
1639
|
-
} catch (
|
|
1640
|
-
throw D ??= { error:
|
|
2251
|
+
const s = await fetch(H, { cache: "force-cache", signal: g });
|
|
2252
|
+
if (!s.ok) throw new Error(`Cannot load C++ toolchain (${s.status})`);
|
|
2253
|
+
return j === 0 && I && typeof WebAssembly.compileStreaming == "function" && typeof s.clone == "function" && (w = WebAssembly.compileStreaming(s.clone()).catch(() => {
|
|
2254
|
+
})), new Uint8Array(await s.arrayBuffer());
|
|
2255
|
+
} catch (s) {
|
|
2256
|
+
throw D ??= { error: s }, s;
|
|
1641
2257
|
}
|
|
1642
2258
|
})
|
|
1643
2259
|
);
|
|
1644
|
-
if (
|
|
2260
|
+
if (N[0].status === "rejected" || N[1].status === "rejected")
|
|
1645
2261
|
throw D?.error;
|
|
1646
|
-
const [
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
(
|
|
2262
|
+
const [k, U] = [N[0].value, N[1].value], [h, K] = await Promise.allSettled([
|
|
2263
|
+
X.ingestOwned(k, U, !1, C),
|
|
2264
|
+
I ? (w ?? Promise.resolve(void 0)).then(
|
|
2265
|
+
(H) => H ?? WebAssembly.compile(k)
|
|
1650
2266
|
) : Promise.resolve(void 0)
|
|
1651
2267
|
]);
|
|
1652
|
-
if (
|
|
1653
|
-
const
|
|
1654
|
-
if (
|
|
2268
|
+
if (h.status === "rejected") throw h.reason;
|
|
2269
|
+
const R = h.value;
|
|
2270
|
+
if (R.#A.compilerHash !== E.digests.compiler || R.#A.sysrootHash !== E.digests.sysroot || R.#A.exceptionsHash !== E.digests.exceptions)
|
|
1655
2271
|
throw new Error("C++ toolchain integrity mismatch");
|
|
1656
|
-
if (
|
|
1657
|
-
if (
|
|
1658
|
-
return
|
|
2272
|
+
if (g?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
|
|
2273
|
+
if (K.status === "rejected") throw K.reason;
|
|
2274
|
+
return R.#A.stockProfile = E.profile === "stock-certified-v1", R.#A.module = K.value, R;
|
|
1659
2275
|
}
|
|
1660
2276
|
/** Captures even Buffer/subclass inputs before the first asynchronous boundary. */
|
|
1661
|
-
static async fromBytes(A,
|
|
1662
|
-
const C = new Uint8Array(A), B = new Uint8Array(
|
|
1663
|
-
return
|
|
2277
|
+
static async fromBytes(A, I, g) {
|
|
2278
|
+
const C = new Uint8Array(A), B = new Uint8Array(I);
|
|
2279
|
+
return X.ingestOwned(
|
|
1664
2280
|
C,
|
|
1665
2281
|
B,
|
|
1666
|
-
|
|
1667
|
-
|
|
2282
|
+
g,
|
|
2283
|
+
gA.exceptions
|
|
1668
2284
|
);
|
|
1669
2285
|
}
|
|
1670
|
-
static async ingestOwned(A,
|
|
1671
|
-
const B = performance.now(),
|
|
1672
|
-
if (
|
|
1673
|
-
if (
|
|
1674
|
-
const [D,
|
|
1675
|
-
return new
|
|
1676
|
-
{ compiler: A, sysroot:
|
|
2286
|
+
static async ingestOwned(A, I, g, C) {
|
|
2287
|
+
const B = performance.now(), E = await Promise.allSettled([SA(A), SA(I)]);
|
|
2288
|
+
if (E[0].status === "rejected") throw E[0].reason;
|
|
2289
|
+
if (E[1].status === "rejected") throw E[1].reason;
|
|
2290
|
+
const [D, w] = [E[0].value, E[1].value], N = g ? await WebAssembly.compile(A) : void 0;
|
|
2291
|
+
return new X(
|
|
2292
|
+
{ compiler: A, sysroot: I, compilerHash: D, sysrootHash: w, exceptionsHash: C, module: N },
|
|
1677
2293
|
performance.now() - B
|
|
1678
2294
|
);
|
|
1679
2295
|
}
|
|
@@ -1690,25 +2306,25 @@ class l {
|
|
|
1690
2306
|
return this.#A.compiler.byteLength;
|
|
1691
2307
|
}
|
|
1692
2308
|
/** postMessage clones the private seed; never transfer/detach the restart owner. */
|
|
1693
|
-
configure(A,
|
|
2309
|
+
configure(A, I) {
|
|
1694
2310
|
try {
|
|
1695
|
-
return A.postMessage({ ...
|
|
1696
|
-
} catch (
|
|
1697
|
-
if (!(
|
|
1698
|
-
throw
|
|
1699
|
-
return A.postMessage({ ...
|
|
2311
|
+
return A.postMessage({ ...I, toolchain: this.#A }), !!this.#A.module;
|
|
2312
|
+
} catch (g) {
|
|
2313
|
+
if (!(g instanceof DOMException) || g.name !== "DataCloneError" || !this.#A.module)
|
|
2314
|
+
throw g;
|
|
2315
|
+
return A.postMessage({ ...I, toolchain: { ...this.#A, module: void 0 } }), !1;
|
|
1700
2316
|
}
|
|
1701
2317
|
}
|
|
1702
2318
|
}
|
|
1703
|
-
async function
|
|
2319
|
+
async function SA(Q) {
|
|
1704
2320
|
const A = await crypto.subtle.digest("SHA-256", Q);
|
|
1705
|
-
return Array.from(new Uint8Array(A), (
|
|
2321
|
+
return Array.from(new Uint8Array(A), (I) => I.toString(16).padStart(2, "0")).join("");
|
|
1706
2322
|
}
|
|
1707
|
-
let
|
|
1708
|
-
class
|
|
1709
|
-
stdout = new
|
|
1710
|
-
stderr = new
|
|
1711
|
-
stdin = new
|
|
2323
|
+
let QA, _;
|
|
2324
|
+
class HA {
|
|
2325
|
+
stdout = new LA(1);
|
|
2326
|
+
stderr = new LA(2);
|
|
2327
|
+
stdin = new O();
|
|
1712
2328
|
debugger;
|
|
1713
2329
|
lang;
|
|
1714
2330
|
scope;
|
|
@@ -1717,6 +2333,9 @@ class KA {
|
|
|
1717
2333
|
cppArtifacts;
|
|
1718
2334
|
hostDevice;
|
|
1719
2335
|
options;
|
|
2336
|
+
python;
|
|
2337
|
+
installer;
|
|
2338
|
+
installed;
|
|
1720
2339
|
retain;
|
|
1721
2340
|
idleTimeoutMs;
|
|
1722
2341
|
/** Absolute `EngineOptions.wasmUrl`, handed to each worker; unset uses the default. */
|
|
@@ -1746,35 +2365,44 @@ class KA {
|
|
|
1746
2365
|
retirements = 0;
|
|
1747
2366
|
latest;
|
|
1748
2367
|
cacheValidation;
|
|
1749
|
-
static async create(A,
|
|
1750
|
-
const { wasmUrl:
|
|
1751
|
-
|
|
2368
|
+
static async create(A, I = {}) {
|
|
2369
|
+
const { wasmUrl: g, python: C, ...B } = I, E = g === void 0 ? void 0 : AI(g, globalThis.location?.href), D = structuredClone(B);
|
|
2370
|
+
C && (D.python = {
|
|
2371
|
+
packages: !!C.packages,
|
|
2372
|
+
onPackageStatus: typeof C.onPackageStatus == "function" ? C.onPackageStatus : void 0
|
|
2373
|
+
});
|
|
2374
|
+
const w = E ?? null;
|
|
2375
|
+
if (_ !== void 0 && _ !== w)
|
|
1752
2376
|
throw new Error("The engine Wasm is already loaded from a different wasmUrl");
|
|
1753
|
-
|
|
1754
|
-
throw
|
|
1755
|
-
}), await
|
|
1756
|
-
const
|
|
1757
|
-
if (
|
|
1758
|
-
for (const
|
|
1759
|
-
fetch(
|
|
2377
|
+
_ = w, QA ??= XA({ module_or_path: E ?? rA }).catch((k) => {
|
|
2378
|
+
throw QA = void 0, _ = void 0, k;
|
|
2379
|
+
}), await QA;
|
|
2380
|
+
const N = new HA(A, D);
|
|
2381
|
+
if (N.wasmUrl = E, A !== "c" && typeof window < "u" && typeof fetch < "u")
|
|
2382
|
+
for (const k of FA(A))
|
|
2383
|
+
fetch(k, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
|
|
1760
2384
|
});
|
|
1761
|
-
return
|
|
2385
|
+
return N;
|
|
1762
2386
|
}
|
|
1763
|
-
constructor(A,
|
|
1764
|
-
const
|
|
1765
|
-
this.retain =
|
|
1766
|
-
const C =
|
|
2387
|
+
constructor(A, I) {
|
|
2388
|
+
const g = I.cpp;
|
|
2389
|
+
this.retain = I.retainWorker ?? g?.retainWorker ?? !0;
|
|
2390
|
+
const C = I.idleTimeoutMs ?? g?.idleTimeoutMs ?? 3e4;
|
|
1767
2391
|
if (!Number.isSafeInteger(C) || C < 1 || C > 3e5)
|
|
1768
2392
|
throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");
|
|
1769
|
-
if (this.idleTimeoutMs = C,
|
|
2393
|
+
if (this.idleTimeoutMs = C, g) {
|
|
1770
2394
|
if (A !== "c") throw new TypeError("C++ performance options require C/C++");
|
|
1771
|
-
if (!
|
|
2395
|
+
if (!g.scope?.projectId || !g.scope.accountId)
|
|
1772
2396
|
throw new TypeError("C++ performance options require project and account identity");
|
|
1773
|
-
if (
|
|
2397
|
+
if (g.compilerLifetime !== void 0 && !["idle", "project"].includes(g.compilerLifetime))
|
|
1774
2398
|
throw new TypeError("Invalid compiler lifetime");
|
|
1775
|
-
|
|
2399
|
+
aA(g.toolchainProfile), this.scope = Object.freeze({ ...g.scope }), this.options = Object.freeze({ ...g, scope: this.scope, idleTimeoutMs: C });
|
|
2400
|
+
}
|
|
2401
|
+
if (I.python) {
|
|
2402
|
+
if (A !== "python") throw new TypeError("Python options require Python");
|
|
2403
|
+
this.python = Object.freeze({ ...I.python });
|
|
1776
2404
|
}
|
|
1777
|
-
this.objects = new
|
|
2405
|
+
this.objects = new vA(typeof g?.objectCache == "object" ? g.objectCache : {}), this.debugger = new _A(), this.lang = A;
|
|
1778
2406
|
}
|
|
1779
2407
|
/** A retained worker reuses clang, compiled once on this thread and cloned to it. */
|
|
1780
2408
|
get cacheCompilerModule() {
|
|
@@ -1816,23 +2444,23 @@ class KA {
|
|
|
1816
2444
|
cancelCurrentOperation() {
|
|
1817
2445
|
if (this.cancellationDraining) return this.cancellationDraining;
|
|
1818
2446
|
this.operationId++;
|
|
1819
|
-
const A = this.promise,
|
|
2447
|
+
const A = this.promise, I = this.active?.publication;
|
|
1820
2448
|
this.retireWorker(), this.objects.discardBatch(), this.active && this.finish(this.active, { type: "stopped" });
|
|
1821
|
-
const
|
|
1822
|
-
this.cancellationDraining ===
|
|
2449
|
+
const g = Promise.allSettled([A, I]).then(() => {
|
|
2450
|
+
this.cancellationDraining === g && (this.cancellationDraining = void 0);
|
|
1823
2451
|
});
|
|
1824
|
-
return this.cancellationDraining =
|
|
2452
|
+
return this.cancellationDraining = g, g;
|
|
1825
2453
|
}
|
|
1826
2454
|
/** Release idle compiler resources, or defer behind an active guest without stopping it. */
|
|
1827
2455
|
releaseCompilerResources(A = {}) {
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1830
|
-
const C = { resolve:
|
|
1831
|
-
this.releases.add(C),
|
|
2456
|
+
const I = A.signal;
|
|
2457
|
+
return I?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((g) => {
|
|
2458
|
+
const C = { resolve: g, signal: I, abort: () => this.settleRelease(C, "cancelled") };
|
|
2459
|
+
this.releases.add(C), I?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
|
|
1832
2460
|
});
|
|
1833
2461
|
}
|
|
1834
|
-
settleRelease(A,
|
|
1835
|
-
this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(
|
|
2462
|
+
settleRelease(A, I) {
|
|
2463
|
+
this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(I));
|
|
1836
2464
|
}
|
|
1837
2465
|
flushReleases() {
|
|
1838
2466
|
if (!(this.active || !this.releases.size || this.releaseDrain)) {
|
|
@@ -1860,54 +2488,72 @@ class KA {
|
|
|
1860
2488
|
/** Load compiler resources. Optional input validation never invokes Clang, links, or runs a guest. */
|
|
1861
2489
|
prepareCompiler(A) {
|
|
1862
2490
|
if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
|
|
1863
|
-
return Promise.resolve(
|
|
1864
|
-
const
|
|
1865
|
-
return this.submit(!0, !0,
|
|
2491
|
+
return Promise.resolve(c(new TypeError("Invalid compiler preparation options")));
|
|
2492
|
+
const I = 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;
|
|
2493
|
+
return this.submit(!0, !0, I);
|
|
1866
2494
|
}
|
|
1867
2495
|
/** Every Run links current objects and starts a fresh student runtime. */
|
|
1868
2496
|
run() {
|
|
1869
|
-
return this.submit(!1);
|
|
2497
|
+
return this.lang === "python" && this.python?.packages ? this.runWithPackages() : this.submit(!1);
|
|
2498
|
+
}
|
|
2499
|
+
/** Installs what the program imports from PyPI, then runs it with those files mounted. */
|
|
2500
|
+
async runWithPackages() {
|
|
2501
|
+
const A = (g) => {
|
|
2502
|
+
try {
|
|
2503
|
+
this.python?.onPackageStatus?.(g);
|
|
2504
|
+
} catch {
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
let I = {};
|
|
2508
|
+
try {
|
|
2509
|
+
const g = oI(this.fs), C = g.join(`
|
|
2510
|
+
`);
|
|
2511
|
+
g.length && this.installed?.key === C ? I = this.installed.files : g.length && (this.installer ??= new MI(), I = await this.installer.install(await this.installer.resolve(g, A), A), this.installed = { key: C, files: I });
|
|
2512
|
+
} catch (g) {
|
|
2513
|
+
A({ kind: "skipped", message: `Packages: ${g instanceof Error ? g.message : String(g)}` });
|
|
2514
|
+
}
|
|
2515
|
+
return this.submit(!1, !1, !1, I);
|
|
1870
2516
|
}
|
|
1871
2517
|
/** Compiles Run-profile C++ translation units only; never links, runs, or opens devices. */
|
|
1872
2518
|
compile() {
|
|
1873
2519
|
return this.submit(!0);
|
|
1874
2520
|
}
|
|
1875
|
-
submit(A,
|
|
1876
|
-
if (this.disposed) return Promise.resolve(
|
|
2521
|
+
submit(A, I = !1, g = !1, C = {}) {
|
|
2522
|
+
if (this.disposed) return Promise.resolve(c(new Error("Engine is disposed")));
|
|
1877
2523
|
if (this.active || this.cancellationDraining)
|
|
1878
|
-
return Promise.resolve(
|
|
2524
|
+
return Promise.resolve(c(new Error("An engine job is already active")));
|
|
1879
2525
|
if (A && this.lang !== "c")
|
|
1880
|
-
return Promise.resolve(
|
|
2526
|
+
return Promise.resolve(c(new Error("Compile-only is supported for C/C++")));
|
|
1881
2527
|
this.cacheValidation = void 0;
|
|
1882
|
-
const
|
|
1883
|
-
let
|
|
2528
|
+
const B = I && !g;
|
|
2529
|
+
let E;
|
|
1884
2530
|
try {
|
|
1885
|
-
const
|
|
1886
|
-
if (
|
|
1887
|
-
const
|
|
1888
|
-
(typeof
|
|
2531
|
+
const K = B || !this.cppArtifacts ? null : { ...this.cppArtifacts };
|
|
2532
|
+
if (K?.cacheCertificate !== void 0) {
|
|
2533
|
+
const R = K.cacheCertificate;
|
|
2534
|
+
(typeof R != "string" || R.length > 1024 * 1024 || new TextEncoder().encode(R).byteLength > 1024 * 1024) && delete K.cacheCertificate;
|
|
1889
2535
|
}
|
|
1890
|
-
|
|
1891
|
-
fs:
|
|
2536
|
+
E = {
|
|
2537
|
+
fs: B ? {} : structuredClone(this.fs),
|
|
1892
2538
|
binary_files: Object.fromEntries(
|
|
1893
|
-
Object.entries(
|
|
1894
|
-
|
|
2539
|
+
Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(([R, H]) => [
|
|
2540
|
+
R,
|
|
1895
2541
|
new Uint8Array(H)
|
|
1896
2542
|
])
|
|
1897
2543
|
),
|
|
1898
|
-
cpp_artifacts: structuredClone(
|
|
2544
|
+
cpp_artifacts: structuredClone(K)
|
|
1899
2545
|
};
|
|
1900
|
-
} catch (
|
|
1901
|
-
return Promise.resolve(
|
|
2546
|
+
} catch (K) {
|
|
2547
|
+
return Promise.resolve(c(K));
|
|
1902
2548
|
}
|
|
1903
|
-
const
|
|
1904
|
-
if (
|
|
1905
|
-
return Promise.resolve(
|
|
1906
|
-
clearTimeout(this.idleTimer), this.stdin[
|
|
1907
|
-
const
|
|
1908
|
-
let
|
|
1909
|
-
const U = new Promise((
|
|
1910
|
-
|
|
2549
|
+
const D = !A && this.debugger.enabled, w = A ? void 0 : this.hostDevice;
|
|
2550
|
+
if (w !== void 0 && (typeof w != "function" || !["c", "python"].includes(this.lang)))
|
|
2551
|
+
return Promise.resolve(c(new TypeError("Invalid host device configuration")));
|
|
2552
|
+
clearTimeout(this.idleTimer), this.stdin[L].clear();
|
|
2553
|
+
const N = !!this.slot;
|
|
2554
|
+
let k;
|
|
2555
|
+
const U = new Promise((K) => {
|
|
2556
|
+
k = K;
|
|
1911
2557
|
});
|
|
1912
2558
|
this.promise = U;
|
|
1913
2559
|
const h = {
|
|
@@ -1915,31 +2561,31 @@ class KA {
|
|
|
1915
2561
|
scopeEpoch: this.scopeEpoch,
|
|
1916
2562
|
operationId: ++this.operationId,
|
|
1917
2563
|
cacheEpoch: this.generation,
|
|
1918
|
-
prepareOnly:
|
|
1919
|
-
validateCacheInputs:
|
|
2564
|
+
prepareOnly: I,
|
|
2565
|
+
validateCacheInputs: g,
|
|
1920
2566
|
settled: !1,
|
|
1921
2567
|
buildOnly: A,
|
|
1922
|
-
debug:
|
|
1923
|
-
opener:
|
|
2568
|
+
debug: D,
|
|
2569
|
+
opener: w,
|
|
1924
2570
|
startedAt: performance.now(),
|
|
1925
|
-
resolve:
|
|
2571
|
+
resolve: k,
|
|
1926
2572
|
stats: {
|
|
1927
|
-
operation:
|
|
2573
|
+
operation: I ? "prepare_compiler" : A ? "compile" : "run",
|
|
1928
2574
|
workerReadyMs: 0,
|
|
1929
|
-
workerReused:
|
|
2575
|
+
workerReused: N
|
|
1930
2576
|
},
|
|
1931
2577
|
start: {
|
|
1932
|
-
...
|
|
2578
|
+
...E,
|
|
1933
2579
|
lang: this.lang,
|
|
1934
|
-
prepare_compiler:
|
|
1935
|
-
validate_cache_inputs:
|
|
2580
|
+
prepare_compiler: I,
|
|
2581
|
+
validate_cache_inputs: g,
|
|
1936
2582
|
scope_epoch: this.scopeEpoch,
|
|
1937
2583
|
operation_id: this.operationId,
|
|
1938
2584
|
cache_epoch: this.generation,
|
|
1939
|
-
is_debug:
|
|
2585
|
+
is_debug: D,
|
|
1940
2586
|
build_only: A,
|
|
1941
|
-
stdin_buffer: this.stdin[
|
|
1942
|
-
cpp_cache: this.options?.objectCache && !
|
|
2587
|
+
stdin_buffer: this.stdin[L].buffer,
|
|
2588
|
+
cpp_cache: this.options?.objectCache && !D && !I ? {
|
|
1943
2589
|
generation: this.generation,
|
|
1944
2590
|
entries: this.objects.snapshot(),
|
|
1945
2591
|
max_entry_metadata_bytes: Math.min(
|
|
@@ -1953,12 +2599,12 @@ class KA {
|
|
|
1953
2599
|
this.objects.beginBatch(), this.active = h;
|
|
1954
2600
|
try {
|
|
1955
2601
|
if (this.slot || this.makeWorker(), !this.current(h)) return U;
|
|
1956
|
-
const
|
|
1957
|
-
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((
|
|
1958
|
-
this.current(h) && this.slot ===
|
|
2602
|
+
const K = this.slot;
|
|
2603
|
+
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((R) => {
|
|
2604
|
+
this.current(h) && this.slot === K && this.finish(h, c(R));
|
|
1959
2605
|
}), this.slot.ready && this.dispatch(h);
|
|
1960
|
-
} catch (
|
|
1961
|
-
this.finish(h,
|
|
2606
|
+
} catch (K) {
|
|
2607
|
+
this.finish(h, c(K));
|
|
1962
2608
|
}
|
|
1963
2609
|
return U;
|
|
1964
2610
|
}
|
|
@@ -1966,74 +2612,74 @@ class KA {
|
|
|
1966
2612
|
return this.active === A && !A.settled;
|
|
1967
2613
|
}
|
|
1968
2614
|
makeWorker() {
|
|
1969
|
-
const A =
|
|
2615
|
+
const A = gI(this.wasmUrl), I = { worker: A, ready: !1, remove: () => {
|
|
1970
2616
|
} };
|
|
1971
|
-
this.slot =
|
|
1972
|
-
const
|
|
1973
|
-
if (this.slot !==
|
|
1974
|
-
const D =
|
|
2617
|
+
this.slot = I;
|
|
2618
|
+
const g = (E) => {
|
|
2619
|
+
if (this.slot !== I) return;
|
|
2620
|
+
const D = E.data, w = this.active;
|
|
1975
2621
|
if (D.type === "ready") {
|
|
1976
|
-
if (
|
|
1977
|
-
|
|
2622
|
+
if (I.ready) return;
|
|
2623
|
+
I.ready = !0, w && this.current(w) && this.dispatch(w);
|
|
1978
2624
|
return;
|
|
1979
2625
|
}
|
|
1980
|
-
if (!(!
|
|
1981
|
-
if (!
|
|
1982
|
-
this.finish(
|
|
2626
|
+
if (!(!w || !this.current(w))) {
|
|
2627
|
+
if (!I.ready && D.type === "error") {
|
|
2628
|
+
this.finish(w, c(new Error(D.message)));
|
|
1983
2629
|
return;
|
|
1984
2630
|
}
|
|
1985
|
-
if (!(D.operationId !==
|
|
2631
|
+
if (!(D.operationId !== w.operationId || D.scopeEpoch !== w.scopeEpoch))
|
|
1986
2632
|
try {
|
|
1987
2633
|
if (D.type === "cpp_cache_eligibility") {
|
|
1988
|
-
if (this.options?.toolchainProfile !== "stock-certified-v1" ||
|
|
2634
|
+
if (this.options?.toolchainProfile !== "stock-certified-v1" || w.prepareOnly && !w.validateCacheInputs)
|
|
1989
2635
|
return;
|
|
1990
|
-
const
|
|
2636
|
+
const N = (U) => typeof U == "string" && /^[0-9a-f]{64}$/.test(U), k = D.eligible === !0 && N(D.certificate_sha256) && N(D.snapshot);
|
|
1991
2637
|
this.cacheValidation = {
|
|
1992
|
-
eligible:
|
|
1993
|
-
certificate:
|
|
1994
|
-
snapshot:
|
|
1995
|
-
operationId:
|
|
1996
|
-
reason:
|
|
2638
|
+
eligible: k,
|
|
2639
|
+
certificate: N(D.certificate_sha256) ? D.certificate_sha256 : void 0,
|
|
2640
|
+
snapshot: k ? D.snapshot : void 0,
|
|
2641
|
+
operationId: w.operationId,
|
|
2642
|
+
reason: k ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
|
|
1997
2643
|
};
|
|
1998
2644
|
} else if (D.type === "stop")
|
|
1999
|
-
this.finish(
|
|
2645
|
+
this.finish(w, {
|
|
2000
2646
|
type: "completed",
|
|
2001
2647
|
exitCode: D.exit_code,
|
|
2002
2648
|
timing: {
|
|
2003
|
-
totalMs: performance.now() -
|
|
2649
|
+
totalMs: performance.now() - w.startedAt,
|
|
2004
2650
|
buildMs: D.build_ms,
|
|
2005
2651
|
runMs: D.run_ms
|
|
2006
2652
|
}
|
|
2007
2653
|
});
|
|
2008
2654
|
else if (D.type === "error")
|
|
2009
|
-
this.finish(
|
|
2010
|
-
else if (D.type === "cpp_cache_object" && D.generation === this.generation &&
|
|
2655
|
+
this.finish(w, c(new Error(D.message)));
|
|
2656
|
+
else if (D.type === "cpp_cache_object" && D.generation === this.generation && w.generation === this.generation)
|
|
2011
2657
|
try {
|
|
2012
2658
|
this.objects.stage(D);
|
|
2013
2659
|
} catch {
|
|
2014
2660
|
this.objects.abandonBatch();
|
|
2015
2661
|
}
|
|
2016
|
-
else D.type === "cpp_cache_stats" && D.generation ===
|
|
2017
|
-
} catch (
|
|
2018
|
-
this.finish(
|
|
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, I) : D.type === "compiler_module_stats" && (w.stats.compilerModule = D);
|
|
2663
|
+
} catch (N) {
|
|
2664
|
+
this.finish(w, c(N));
|
|
2019
2665
|
}
|
|
2020
2666
|
}
|
|
2021
|
-
}, C = (
|
|
2022
|
-
this.slot ===
|
|
2667
|
+
}, C = (E) => {
|
|
2668
|
+
this.slot === I && (this.clearCaches(), this.active ? this.finish(this.active, c(E.error ?? new Error(E.message))) : this.retireWorker());
|
|
2023
2669
|
}, B = () => C({ message: "Unreadable execution worker message" });
|
|
2024
|
-
this.debugger[
|
|
2025
|
-
A.removeEventListener("message",
|
|
2670
|
+
this.debugger[L].attach(A), A.addEventListener("message", g), A.addEventListener("error", C), A.addEventListener("messageerror", B), I.remove = () => {
|
|
2671
|
+
A.removeEventListener("message", g), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[L].detach(A);
|
|
2026
2672
|
};
|
|
2027
2673
|
}
|
|
2028
|
-
async publishObjects(A,
|
|
2029
|
-
let
|
|
2674
|
+
async publishObjects(A, I) {
|
|
2675
|
+
let g = !1;
|
|
2030
2676
|
try {
|
|
2031
|
-
|
|
2677
|
+
g = await this.objects.validateBatch();
|
|
2032
2678
|
} catch {
|
|
2033
2679
|
}
|
|
2034
|
-
if (!(!this.current(A) || this.slot !==
|
|
2680
|
+
if (!(!this.current(A) || this.slot !== I)) {
|
|
2035
2681
|
try {
|
|
2036
|
-
|
|
2682
|
+
g && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
|
|
2037
2683
|
...this.cacheValidation,
|
|
2038
2684
|
eligible: !1,
|
|
2039
2685
|
snapshot: void 0,
|
|
@@ -2047,7 +2693,7 @@ class KA {
|
|
|
2047
2693
|
reason: "stock-publication-failure"
|
|
2048
2694
|
});
|
|
2049
2695
|
}
|
|
2050
|
-
this.current(A) &&
|
|
2696
|
+
this.current(A) && I.worker.postMessage({
|
|
2051
2697
|
type: "object_build_ack",
|
|
2052
2698
|
scopeEpoch: A.scopeEpoch,
|
|
2053
2699
|
operationId: A.operationId,
|
|
@@ -2059,11 +2705,11 @@ class KA {
|
|
|
2059
2705
|
if (this.toolchain) return Promise.resolve(this.toolchain);
|
|
2060
2706
|
if (this.toolchainLoading) return this.toolchainLoading;
|
|
2061
2707
|
this.toolchainController = new AbortController();
|
|
2062
|
-
const A =
|
|
2063
|
-
|
|
2708
|
+
const A = X.load(
|
|
2709
|
+
FA("c"),
|
|
2064
2710
|
this.cacheCompilerModule,
|
|
2065
2711
|
this.toolchainController.signal,
|
|
2066
|
-
|
|
2712
|
+
jA(),
|
|
2067
2713
|
this.options?.toolchainProfile
|
|
2068
2714
|
);
|
|
2069
2715
|
return this.toolchainLoading = A, this.initializing.add(A), A.then(
|
|
@@ -2074,14 +2720,14 @@ class KA {
|
|
|
2074
2720
|
), A;
|
|
2075
2721
|
}
|
|
2076
2722
|
async dispatch(A) {
|
|
2077
|
-
const
|
|
2078
|
-
if (!(!this.current(A) || !
|
|
2723
|
+
const I = this.slot;
|
|
2724
|
+
if (!(!this.current(A) || !I))
|
|
2079
2725
|
try {
|
|
2080
2726
|
if (this.lang === "c") {
|
|
2081
|
-
const B = this.scopeEpoch,
|
|
2082
|
-
if (!this.current(A) || this.slot !==
|
|
2083
|
-
const
|
|
2084
|
-
if (
|
|
2727
|
+
const B = this.scopeEpoch, E = this.generation, D = this.ensureToolchain(), w = this.toolchain ?? await D;
|
|
2728
|
+
if (!this.current(A) || this.slot !== I || B !== this.scopeEpoch) return;
|
|
2729
|
+
const N = A.start.cpp_artifacts?.requiredToolchain;
|
|
2730
|
+
if (N && !w.matchesExpectation(N)) {
|
|
2085
2731
|
this.finish(A, {
|
|
2086
2732
|
type: "error",
|
|
2087
2733
|
error: {
|
|
@@ -2091,69 +2737,69 @@ class KA {
|
|
|
2091
2737
|
});
|
|
2092
2738
|
return;
|
|
2093
2739
|
}
|
|
2094
|
-
|
|
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)), I.toolchain !== w && (this.compilerModuleCloned = w.configure(I.worker, {
|
|
2095
2741
|
type: "configure_cpp",
|
|
2096
2742
|
cacheCompilerModule: this.cacheCompilerModule
|
|
2097
|
-
}),
|
|
2743
|
+
}), I.toolchain = w);
|
|
2098
2744
|
}
|
|
2099
|
-
if (!this.current(A) || this.slot !==
|
|
2100
|
-
const
|
|
2745
|
+
if (!this.current(A) || this.slot !== I) return;
|
|
2746
|
+
const g = I.worker;
|
|
2101
2747
|
A.stats.workerReadyMs = performance.now() - A.startedAt;
|
|
2102
2748
|
const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
|
|
2103
|
-
if (this.stdout[
|
|
2104
|
-
if (A.device = new
|
|
2749
|
+
if (this.stdout[L].attach(g, C), this.stderr[L].attach(g, C), A.prepareOnly || this.debugger[L].beginRun(), A.opener) {
|
|
2750
|
+
if (A.device = new CI((B) => this.finish(A, c(B))), A.device.attach(g), A.device.open(A.opener), !this.current(A)) return;
|
|
2105
2751
|
A.start.host_device = A.device.workerStart;
|
|
2106
2752
|
}
|
|
2107
|
-
this.current(A) && (
|
|
2108
|
-
} catch (
|
|
2109
|
-
this.current(A) && (this.toolchainLoading = void 0, this.finish(A,
|
|
2753
|
+
this.current(A) && (g.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
|
|
2754
|
+
} catch (g) {
|
|
2755
|
+
this.current(A) && (this.toolchainLoading = void 0, this.finish(A, c(g)));
|
|
2110
2756
|
}
|
|
2111
2757
|
}
|
|
2112
|
-
finish(A,
|
|
2758
|
+
finish(A, I) {
|
|
2113
2759
|
if (!this.current(A)) return;
|
|
2114
|
-
(
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2760
|
+
(I.type !== "completed" || I.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
|
|
2761
|
+
const g = this.slot?.worker;
|
|
2762
|
+
g && (this.stdout[L].detach(g), this.stderr[L].detach(g));
|
|
2117
2763
|
const C = A.device?.close();
|
|
2118
|
-
C && (
|
|
2119
|
-
const B =
|
|
2764
|
+
C && (I = c(C));
|
|
2765
|
+
const B = I.type === "completed" && A.generation === this.generation && !this.disposed, E = B && I.type === "completed" && I.exitCode === 0;
|
|
2120
2766
|
if (A.generation === this.generation)
|
|
2121
2767
|
for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
|
|
2122
|
-
if (
|
|
2768
|
+
if (E)
|
|
2123
2769
|
for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
|
|
2124
|
-
this.objects.discardBatch(), this.latest = A.stats, this.stdin[
|
|
2770
|
+
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(() => {
|
|
2125
2771
|
this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
|
|
2126
|
-
}, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(
|
|
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(I);
|
|
2127
2773
|
}
|
|
2128
2774
|
retireWorker() {
|
|
2129
2775
|
clearTimeout(this.idleTimer);
|
|
2130
2776
|
const A = this.slot;
|
|
2131
|
-
A && (this.slot = void 0, A.remove(), this.stdout[
|
|
2777
|
+
A && (this.slot = void 0, A.remove(), this.stdout[L].detach(A.worker), this.stderr[L].detach(A.worker), A.worker.onerror = (I) => I.preventDefault(), A.worker.terminate(), this.retirements++);
|
|
2132
2778
|
}
|
|
2133
2779
|
}
|
|
2134
|
-
class
|
|
2780
|
+
class LA extends sA {
|
|
2135
2781
|
constructor(A) {
|
|
2136
|
-
super(), this.mode = A, this.callback = ((
|
|
2137
|
-
const
|
|
2138
|
-
if (this.accepts && !this.accepts(
|
|
2139
|
-
const C =
|
|
2782
|
+
super(), this.mode = A, this.callback = ((I) => {
|
|
2783
|
+
const g = I.data;
|
|
2784
|
+
if (this.accepts && !this.accepts(g) || g.type !== "stdout" || g.mode !== this.mode) return;
|
|
2785
|
+
const C = g.data;
|
|
2140
2786
|
this.emit("data", C);
|
|
2141
|
-
}).bind(this), this[
|
|
2787
|
+
}).bind(this), this[L] = {
|
|
2142
2788
|
attach: this.attach.bind(this),
|
|
2143
2789
|
detach: this.detach.bind(this)
|
|
2144
2790
|
};
|
|
2145
2791
|
}
|
|
2146
2792
|
callback;
|
|
2147
2793
|
accepts;
|
|
2148
|
-
[
|
|
2149
|
-
attach(A,
|
|
2150
|
-
this.accepts =
|
|
2794
|
+
[L];
|
|
2795
|
+
attach(A, I) {
|
|
2796
|
+
this.accepts = I, A.addEventListener("message", this.callback);
|
|
2151
2797
|
}
|
|
2152
2798
|
detach(A) {
|
|
2153
2799
|
A.removeEventListener("message", this.callback);
|
|
2154
2800
|
}
|
|
2155
2801
|
}
|
|
2156
|
-
class
|
|
2802
|
+
class O {
|
|
2157
2803
|
/**
|
|
2158
2804
|
* Ring buffer to store stdin data.
|
|
2159
2805
|
*
|
|
@@ -2163,19 +2809,19 @@ class q {
|
|
|
2163
2809
|
static BUFFER_SIZE = 2048;
|
|
2164
2810
|
static HEADER_SIZE = 8;
|
|
2165
2811
|
// 2 x i32
|
|
2166
|
-
static DATA_SIZE =
|
|
2812
|
+
static DATA_SIZE = O.BUFFER_SIZE - O.HEADER_SIZE;
|
|
2167
2813
|
static READ_IDX = 0;
|
|
2168
2814
|
static WRITE_IDX = 1;
|
|
2169
2815
|
static encoder = new TextEncoder();
|
|
2170
|
-
buffer = new SharedArrayBuffer(
|
|
2816
|
+
buffer = new SharedArrayBuffer(O.BUFFER_SIZE);
|
|
2171
2817
|
generation = 0;
|
|
2172
2818
|
indices;
|
|
2173
2819
|
data;
|
|
2174
|
-
[
|
|
2820
|
+
[L];
|
|
2175
2821
|
constructor() {
|
|
2176
|
-
this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer,
|
|
2822
|
+
this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
|
|
2177
2823
|
const A = () => this.buffer;
|
|
2178
|
-
this[
|
|
2824
|
+
this[L] = {
|
|
2179
2825
|
clear: this.clear.bind(this),
|
|
2180
2826
|
get buffer() {
|
|
2181
2827
|
return A();
|
|
@@ -2183,35 +2829,35 @@ class q {
|
|
|
2183
2829
|
};
|
|
2184
2830
|
}
|
|
2185
2831
|
clear() {
|
|
2186
|
-
this.generation++, Atomics.notify(this.indices,
|
|
2832
|
+
this.generation++, Atomics.notify(this.indices, O.READ_IDX), this.buffer = new SharedArrayBuffer(O.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
|
|
2187
2833
|
}
|
|
2188
2834
|
async write(A) {
|
|
2189
|
-
const
|
|
2190
|
-
return this.writeBytes(
|
|
2835
|
+
const I = typeof A == "string" ? O.encoder.encode(A) : A;
|
|
2836
|
+
return this.writeBytes(I);
|
|
2191
2837
|
}
|
|
2192
2838
|
async writeBytes(A) {
|
|
2193
|
-
const { DATA_SIZE:
|
|
2839
|
+
const { DATA_SIZE: I, READ_IDX: g, WRITE_IDX: C } = O;
|
|
2194
2840
|
let B = 0;
|
|
2195
|
-
const
|
|
2196
|
-
for (; B < A.length &&
|
|
2197
|
-
const D = Atomics.load(this.indices,
|
|
2198
|
-
let
|
|
2199
|
-
|
|
2200
|
-
const
|
|
2201
|
-
if (
|
|
2202
|
-
await Atomics.waitAsync(this.indices,
|
|
2841
|
+
const E = this.generation;
|
|
2842
|
+
for (; B < A.length && E === this.generation; ) {
|
|
2843
|
+
const D = Atomics.load(this.indices, g);
|
|
2844
|
+
let w = Atomics.load(this.indices, C);
|
|
2845
|
+
w === I - 1 && D > 0 && (w = 0);
|
|
2846
|
+
const N = D <= w ? I - w - 1 : D - w - 1;
|
|
2847
|
+
if (N === 0) {
|
|
2848
|
+
await Atomics.waitAsync(this.indices, g, D).value;
|
|
2203
2849
|
continue;
|
|
2204
2850
|
}
|
|
2205
|
-
const
|
|
2206
|
-
this.data.set(A.subarray(B, B +
|
|
2851
|
+
const k = Math.min(A.length - B, N);
|
|
2852
|
+
this.data.set(A.subarray(B, B + k), w), Atomics.store(this.indices, C, (w + k) % I), Atomics.notify(this.indices, C), B += k;
|
|
2207
2853
|
}
|
|
2208
2854
|
}
|
|
2209
2855
|
}
|
|
2210
2856
|
export {
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2857
|
+
eA as Artifact,
|
|
2858
|
+
_A as Debugger,
|
|
2859
|
+
HA as Engine,
|
|
2860
|
+
RI as HOST_DEVICE_PATH,
|
|
2861
|
+
O as Stdin,
|
|
2862
|
+
LA as Stdout
|
|
2217
2863
|
};
|