@quireco/cli 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/chunk-Vs_PY4HZ.mjs +37 -0
- package/dist/cli-6V12Qvge.mjs +47354 -0
- package/dist/dist-CF5hqugO.mjs +833 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.mjs +2 -0
- package/dist/quire.d.mts +1 -0
- package/dist/quire.mjs +6 -0
- package/package.json +7 -6
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
import { i as __require, t as __commonJSMin } from "./chunk-Vs_PY4HZ.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/xdelta3-wasm@1.0.0/node_modules/xdelta3-wasm/dist/xdelta3-wasm.cjs.production.min.js
|
|
3
|
+
var require_xdelta3_wasm_cjs_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
function t() {
|
|
5
|
+
t = function() {
|
|
6
|
+
return e;
|
|
7
|
+
};
|
|
8
|
+
var e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function(t, e, r) {
|
|
9
|
+
t[e] = r.value;
|
|
10
|
+
}, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag";
|
|
11
|
+
function s(t, e, r) {
|
|
12
|
+
return Object.defineProperty(t, e, {
|
|
13
|
+
value: r,
|
|
14
|
+
enumerable: !0,
|
|
15
|
+
configurable: !0,
|
|
16
|
+
writable: !0
|
|
17
|
+
}), t[e];
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
s({}, "");
|
|
21
|
+
} catch (t) {
|
|
22
|
+
s = function(t, e, r) {
|
|
23
|
+
return t[e] = r;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function f(t, e, r, n) {
|
|
27
|
+
var i = Object.create((e && e.prototype instanceof p ? e : p).prototype);
|
|
28
|
+
return o(i, "_invoke", { value: E(t, r, new O(n || [])) }), i;
|
|
29
|
+
}
|
|
30
|
+
function l(t, e, r) {
|
|
31
|
+
try {
|
|
32
|
+
return {
|
|
33
|
+
type: "normal",
|
|
34
|
+
arg: t.call(e, r)
|
|
35
|
+
};
|
|
36
|
+
} catch (t) {
|
|
37
|
+
return {
|
|
38
|
+
type: "throw",
|
|
39
|
+
arg: t
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
e.wrap = f;
|
|
44
|
+
var h = {};
|
|
45
|
+
function p() {}
|
|
46
|
+
function v() {}
|
|
47
|
+
function y() {}
|
|
48
|
+
var d = {};
|
|
49
|
+
s(d, a, (function() {
|
|
50
|
+
return this;
|
|
51
|
+
}));
|
|
52
|
+
var m = Object.getPrototypeOf, g = m && m(m(A([])));
|
|
53
|
+
g && g !== r && n.call(g, a) && (d = g);
|
|
54
|
+
var w = y.prototype = p.prototype = Object.create(d);
|
|
55
|
+
function x(t) {
|
|
56
|
+
[
|
|
57
|
+
"next",
|
|
58
|
+
"throw",
|
|
59
|
+
"return"
|
|
60
|
+
].forEach((function(e) {
|
|
61
|
+
s(t, e, (function(t) {
|
|
62
|
+
return this._invoke(e, t);
|
|
63
|
+
}));
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
function b(t, e) {
|
|
67
|
+
function r(o, i, a, c) {
|
|
68
|
+
var u = l(t[o], t, i);
|
|
69
|
+
if ("throw" !== u.type) {
|
|
70
|
+
var s = u.arg, f = s.value;
|
|
71
|
+
return f && "object" == typeof f && n.call(f, "__await") ? e.resolve(f.__await).then((function(t) {
|
|
72
|
+
r("next", t, a, c);
|
|
73
|
+
}), (function(t) {
|
|
74
|
+
r("throw", t, a, c);
|
|
75
|
+
})) : e.resolve(f).then((function(t) {
|
|
76
|
+
s.value = t, a(s);
|
|
77
|
+
}), (function(t) {
|
|
78
|
+
return r("throw", t, a, c);
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
c(u.arg);
|
|
82
|
+
}
|
|
83
|
+
var i;
|
|
84
|
+
o(this, "_invoke", { value: function(t, n) {
|
|
85
|
+
function o() {
|
|
86
|
+
return new e((function(e, o) {
|
|
87
|
+
r(t, n, e, o);
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
return i = i ? i.then(o, o) : o();
|
|
91
|
+
} });
|
|
92
|
+
}
|
|
93
|
+
function E(t, e, r) {
|
|
94
|
+
var n = "suspendedStart";
|
|
95
|
+
return function(o, i) {
|
|
96
|
+
if ("executing" === n) throw new Error("Generator is already running");
|
|
97
|
+
if ("completed" === n) {
|
|
98
|
+
if ("throw" === o) throw i;
|
|
99
|
+
return {
|
|
100
|
+
value: void 0,
|
|
101
|
+
done: !0
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
for (r.method = o, r.arg = i;;) {
|
|
105
|
+
var a = r.delegate;
|
|
106
|
+
if (a) {
|
|
107
|
+
var c = _(a, r);
|
|
108
|
+
if (c) {
|
|
109
|
+
if (c === h) continue;
|
|
110
|
+
return c;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if ("next" === r.method) r.sent = r._sent = r.arg;
|
|
114
|
+
else if ("throw" === r.method) {
|
|
115
|
+
if ("suspendedStart" === n) throw n = "completed", r.arg;
|
|
116
|
+
r.dispatchException(r.arg);
|
|
117
|
+
} else "return" === r.method && r.abrupt("return", r.arg);
|
|
118
|
+
n = "executing";
|
|
119
|
+
var u = l(t, e, r);
|
|
120
|
+
if ("normal" === u.type) {
|
|
121
|
+
if (n = r.done ? "completed" : "suspendedYield", u.arg === h) continue;
|
|
122
|
+
return {
|
|
123
|
+
value: u.arg,
|
|
124
|
+
done: r.done
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
"throw" === u.type && (n = "completed", r.method = "throw", r.arg = u.arg);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function _(t, e) {
|
|
132
|
+
var r = e.method, n = t.iterator[r];
|
|
133
|
+
if (void 0 === n) return e.delegate = null, "throw" === r && t.iterator.return && (e.method = "return", e.arg = void 0, _(t, e), "throw" === e.method) || "return" !== r && (e.method = "throw", e.arg = /* @__PURE__ */ new TypeError("The iterator does not provide a '" + r + "' method")), h;
|
|
134
|
+
var o = l(n, t.iterator, e.arg);
|
|
135
|
+
if ("throw" === o.type) return e.method = "throw", e.arg = o.arg, e.delegate = null, h;
|
|
136
|
+
var i = o.arg;
|
|
137
|
+
return i ? i.done ? (e[t.resultName] = i.value, e.next = t.nextLoc, "return" !== e.method && (e.method = "next", e.arg = void 0), e.delegate = null, h) : i : (e.method = "throw", e.arg = /* @__PURE__ */ new TypeError("iterator result is not an object"), e.delegate = null, h);
|
|
138
|
+
}
|
|
139
|
+
function L(t) {
|
|
140
|
+
var e = { tryLoc: t[0] };
|
|
141
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
142
|
+
}
|
|
143
|
+
function S(t) {
|
|
144
|
+
var e = t.completion || {};
|
|
145
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
146
|
+
}
|
|
147
|
+
function O(t) {
|
|
148
|
+
this.tryEntries = [{ tryLoc: "root" }], t.forEach(L, this), this.reset(!0);
|
|
149
|
+
}
|
|
150
|
+
function A(t) {
|
|
151
|
+
if (t) {
|
|
152
|
+
var e = t[a];
|
|
153
|
+
if (e) return e.call(t);
|
|
154
|
+
if ("function" == typeof t.next) return t;
|
|
155
|
+
if (!isNaN(t.length)) {
|
|
156
|
+
var r = -1, o = function e() {
|
|
157
|
+
for (; ++r < t.length;) if (n.call(t, r)) return e.value = t[r], e.done = !1, e;
|
|
158
|
+
return e.value = void 0, e.done = !0, e;
|
|
159
|
+
};
|
|
160
|
+
return o.next = o;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return { next: T };
|
|
164
|
+
}
|
|
165
|
+
function T() {
|
|
166
|
+
return {
|
|
167
|
+
value: void 0,
|
|
168
|
+
done: !0
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return v.prototype = y, o(w, "constructor", {
|
|
172
|
+
value: y,
|
|
173
|
+
configurable: !0
|
|
174
|
+
}), o(y, "constructor", {
|
|
175
|
+
value: v,
|
|
176
|
+
configurable: !0
|
|
177
|
+
}), v.displayName = s(y, u, "GeneratorFunction"), e.isGeneratorFunction = function(t) {
|
|
178
|
+
var e = "function" == typeof t && t.constructor;
|
|
179
|
+
return !!e && (e === v || "GeneratorFunction" === (e.displayName || e.name));
|
|
180
|
+
}, e.mark = function(t) {
|
|
181
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, y) : (t.__proto__ = y, s(t, u, "GeneratorFunction")), t.prototype = Object.create(w), t;
|
|
182
|
+
}, e.awrap = function(t) {
|
|
183
|
+
return { __await: t };
|
|
184
|
+
}, x(b.prototype), s(b.prototype, c, (function() {
|
|
185
|
+
return this;
|
|
186
|
+
})), e.AsyncIterator = b, e.async = function(t, r, n, o, i) {
|
|
187
|
+
void 0 === i && (i = Promise);
|
|
188
|
+
var a = new b(f(t, r, n, o), i);
|
|
189
|
+
return e.isGeneratorFunction(r) ? a : a.next().then((function(t) {
|
|
190
|
+
return t.done ? t.value : a.next();
|
|
191
|
+
}));
|
|
192
|
+
}, x(w), s(w, u, "Generator"), s(w, a, (function() {
|
|
193
|
+
return this;
|
|
194
|
+
})), s(w, "toString", (function() {
|
|
195
|
+
return "[object Generator]";
|
|
196
|
+
})), e.keys = function(t) {
|
|
197
|
+
var e = Object(t), r = [];
|
|
198
|
+
for (var n in e) r.push(n);
|
|
199
|
+
return r.reverse(), function t() {
|
|
200
|
+
for (; r.length;) {
|
|
201
|
+
var n = r.pop();
|
|
202
|
+
if (n in e) return t.value = n, t.done = !1, t;
|
|
203
|
+
}
|
|
204
|
+
return t.done = !0, t;
|
|
205
|
+
};
|
|
206
|
+
}, e.values = A, O.prototype = {
|
|
207
|
+
constructor: O,
|
|
208
|
+
reset: function(t) {
|
|
209
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(S), !t) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = void 0);
|
|
210
|
+
},
|
|
211
|
+
stop: function() {
|
|
212
|
+
this.done = !0;
|
|
213
|
+
var t = this.tryEntries[0].completion;
|
|
214
|
+
if ("throw" === t.type) throw t.arg;
|
|
215
|
+
return this.rval;
|
|
216
|
+
},
|
|
217
|
+
dispatchException: function(t) {
|
|
218
|
+
if (this.done) throw t;
|
|
219
|
+
var e = this;
|
|
220
|
+
function r(r, n) {
|
|
221
|
+
return a.type = "throw", a.arg = t, e.next = r, n && (e.method = "next", e.arg = void 0), !!n;
|
|
222
|
+
}
|
|
223
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
224
|
+
var i = this.tryEntries[o], a = i.completion;
|
|
225
|
+
if ("root" === i.tryLoc) return r("end");
|
|
226
|
+
if (i.tryLoc <= this.prev) {
|
|
227
|
+
var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc");
|
|
228
|
+
if (c && u) {
|
|
229
|
+
if (this.prev < i.catchLoc) return r(i.catchLoc, !0);
|
|
230
|
+
if (this.prev < i.finallyLoc) return r(i.finallyLoc);
|
|
231
|
+
} else if (c) {
|
|
232
|
+
if (this.prev < i.catchLoc) return r(i.catchLoc, !0);
|
|
233
|
+
} else {
|
|
234
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
235
|
+
if (this.prev < i.finallyLoc) return r(i.finallyLoc);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
abrupt: function(t, e) {
|
|
241
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
242
|
+
var o = this.tryEntries[r];
|
|
243
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
244
|
+
var i = o;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
249
|
+
var a = i ? i.completion : {};
|
|
250
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, h) : this.complete(a);
|
|
251
|
+
},
|
|
252
|
+
complete: function(t, e) {
|
|
253
|
+
if ("throw" === t.type) throw t.arg;
|
|
254
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), h;
|
|
255
|
+
},
|
|
256
|
+
finish: function(t) {
|
|
257
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
258
|
+
var r = this.tryEntries[e];
|
|
259
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), S(r), h;
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
catch: function(t) {
|
|
263
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
264
|
+
var r = this.tryEntries[e];
|
|
265
|
+
if (r.tryLoc === t) {
|
|
266
|
+
var n = r.completion;
|
|
267
|
+
if ("throw" === n.type) {
|
|
268
|
+
var o = n.arg;
|
|
269
|
+
S(r);
|
|
270
|
+
}
|
|
271
|
+
return o;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
throw new Error("illegal catch attempt");
|
|
275
|
+
},
|
|
276
|
+
delegateYield: function(t, e, r) {
|
|
277
|
+
return this.delegate = {
|
|
278
|
+
iterator: A(t),
|
|
279
|
+
resultName: e,
|
|
280
|
+
nextLoc: r
|
|
281
|
+
}, "next" === this.method && (this.arg = void 0), h;
|
|
282
|
+
}
|
|
283
|
+
}, e;
|
|
284
|
+
}
|
|
285
|
+
function e(t, e, r, n, o, i, a) {
|
|
286
|
+
try {
|
|
287
|
+
var c = t[i](a), u = c.value;
|
|
288
|
+
} catch (t) {
|
|
289
|
+
r(t);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
c.done ? e(u) : Promise.resolve(u).then(n, o);
|
|
293
|
+
}
|
|
294
|
+
function r(t) {
|
|
295
|
+
return function() {
|
|
296
|
+
var r = this, n = arguments;
|
|
297
|
+
return new Promise((function(o, i) {
|
|
298
|
+
var a = t.apply(r, n);
|
|
299
|
+
function c(t) {
|
|
300
|
+
e(a, o, i, c, u, "next", t);
|
|
301
|
+
}
|
|
302
|
+
function u(t) {
|
|
303
|
+
e(a, o, i, c, u, "throw", t);
|
|
304
|
+
}
|
|
305
|
+
c(void 0);
|
|
306
|
+
}));
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function n(t) {
|
|
310
|
+
return function(t, e, r, n) {
|
|
311
|
+
function o(t, e, r) {
|
|
312
|
+
var n = r ? WebAssembly.instantiateStreaming : WebAssembly.instantiate, o = r ? WebAssembly.compileStreaming : WebAssembly.compile;
|
|
313
|
+
return e ? n(t, e) : o(t);
|
|
314
|
+
}
|
|
315
|
+
var i = null, a = "undefined" != typeof process && null != process.versions && null != process.versions.node;
|
|
316
|
+
if (e && a) {
|
|
317
|
+
var c = __require("fs"), u = __require("path");
|
|
318
|
+
return new Promise(((t, r) => {
|
|
319
|
+
c.readFile(u.resolve(__dirname, e), ((e, i) => {
|
|
320
|
+
null != e ? r(e) : t(o(i, n, !1));
|
|
321
|
+
}));
|
|
322
|
+
}));
|
|
323
|
+
}
|
|
324
|
+
if (e) return o(fetch(e), n, !0);
|
|
325
|
+
if (a) i = Buffer.from(null, "base64");
|
|
326
|
+
else {
|
|
327
|
+
var s = globalThis.atob(null), f = s.length;
|
|
328
|
+
i = new Uint8Array(new ArrayBuffer(f));
|
|
329
|
+
for (var l = 0; l < f; l++) i[l] = s.charCodeAt(l);
|
|
330
|
+
}
|
|
331
|
+
return o(i, n, !1);
|
|
332
|
+
}(0, "df58e7ef369c5c18.wasm", 0, t);
|
|
333
|
+
}
|
|
334
|
+
var o, i;
|
|
335
|
+
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.xd3_smatch_cfg = void 0, (o = exports.xd3_smatch_cfg || (exports.xd3_smatch_cfg = {}))[o.DEFAULT = 0] = "DEFAULT", o[o.SLOW = 1] = "SLOW", o[o.FAST = 2] = "FAST", o[o.FASTER = 3] = "FASTER", o[o.FASTEST = 4] = "FASTEST", o[o.SOFT = 5] = "SOFT", exports.WASI_ERRNO = void 0, (i = exports.WASI_ERRNO || (exports.WASI_ERRNO = {}))[i.SUCCESS = 0] = "SUCCESS", i[i.ENOMEM = 48] = "ENOMEM", i[i.ENOSPC = 51] = "ENOSPC";
|
|
336
|
+
var a, c, u = n({}), s = function() {
|
|
337
|
+
var e = r(t().mark((function e() {
|
|
338
|
+
return t().wrap((function(t) {
|
|
339
|
+
for (;;) switch (t.prev = t.next) {
|
|
340
|
+
case 0: return t.next = 2, u;
|
|
341
|
+
case 2:
|
|
342
|
+
case "end": return t.stop();
|
|
343
|
+
}
|
|
344
|
+
}), e);
|
|
345
|
+
})));
|
|
346
|
+
return function() {
|
|
347
|
+
return e.apply(this, arguments);
|
|
348
|
+
};
|
|
349
|
+
}();
|
|
350
|
+
u.then((function(t) {
|
|
351
|
+
a = t;
|
|
352
|
+
}));
|
|
353
|
+
var f = new Proxy({}, { get: function(t, e) {
|
|
354
|
+
var r;
|
|
355
|
+
if (!a) throw new Error("WASM not initialized - await init() first");
|
|
356
|
+
return "memory_view" === e ? null != (r = c) ? r : c = new DataView(a.instance.exports.memory.buffer) : a.instance.exports[e];
|
|
357
|
+
} }), l = function(t, e) {
|
|
358
|
+
new Uint8Array(f.memory.buffer, t, e.byteLength).set(e);
|
|
359
|
+
}, h = function(t) {
|
|
360
|
+
return function(e, r, n, o) {
|
|
361
|
+
var i = f.malloc, a = f.free, c = f.memory_view, u = f[t], s = i(e.byteLength), h = i(r.byteLength), p = i(n), v = i(4);
|
|
362
|
+
l(s, e), l(h, r);
|
|
363
|
+
var y, d = u(s, e.byteLength, h, r.byteLength, p, v, n, o), m = c.getUint32(v, !0), g = new Uint8Array(m);
|
|
364
|
+
return g.set(new Uint8Array(f.memory.buffer, p, m)), a(s), a(h), a(p), a(v), {
|
|
365
|
+
ret: d,
|
|
366
|
+
str: (y = d, y in exports.WASI_ERRNO ? exports.WASI_ERRNO[y] : function(t) {
|
|
367
|
+
for (var e = t; 0 !== f.memory_view.getUint8(e); e++);
|
|
368
|
+
return new TextDecoder().decode(new Uint8Array(f.memory.buffer, t, e - t));
|
|
369
|
+
}(f.xd3_strerror(y))),
|
|
370
|
+
output: g
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
}, p = h("xd3_encode_memory"), v = h("xd3_decode_memory");
|
|
374
|
+
exports.init = s, exports.xd3_decode_memory = function(t, e, r) {
|
|
375
|
+
return v(t, e, r, 0);
|
|
376
|
+
}, exports.xd3_encode_memory = p;
|
|
377
|
+
}));
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region ../../node_modules/.pnpm/xdelta3-wasm@1.0.0/node_modules/xdelta3-wasm/dist/xdelta3-wasm.cjs.development.js
|
|
380
|
+
var require_xdelta3_wasm_cjs_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
381
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
382
|
+
function _regeneratorRuntime() {
|
|
383
|
+
_regeneratorRuntime = function() {
|
|
384
|
+
return exports$1;
|
|
385
|
+
};
|
|
386
|
+
var exports$1 = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function(obj, key, desc) {
|
|
387
|
+
obj[key] = desc.value;
|
|
388
|
+
}, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
389
|
+
function define(obj, key, value) {
|
|
390
|
+
return Object.defineProperty(obj, key, {
|
|
391
|
+
value,
|
|
392
|
+
enumerable: !0,
|
|
393
|
+
configurable: !0,
|
|
394
|
+
writable: !0
|
|
395
|
+
}), obj[key];
|
|
396
|
+
}
|
|
397
|
+
try {
|
|
398
|
+
define({}, "");
|
|
399
|
+
} catch (err) {
|
|
400
|
+
define = function(obj, key, value) {
|
|
401
|
+
return obj[key] = value;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
405
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype);
|
|
406
|
+
return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, new Context(tryLocsList || [])) }), generator;
|
|
407
|
+
}
|
|
408
|
+
function tryCatch(fn, obj, arg) {
|
|
409
|
+
try {
|
|
410
|
+
return {
|
|
411
|
+
type: "normal",
|
|
412
|
+
arg: fn.call(obj, arg)
|
|
413
|
+
};
|
|
414
|
+
} catch (err) {
|
|
415
|
+
return {
|
|
416
|
+
type: "throw",
|
|
417
|
+
arg: err
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
exports$1.wrap = wrap;
|
|
422
|
+
var ContinueSentinel = {};
|
|
423
|
+
function Generator() {}
|
|
424
|
+
function GeneratorFunction() {}
|
|
425
|
+
function GeneratorFunctionPrototype() {}
|
|
426
|
+
var IteratorPrototype = {};
|
|
427
|
+
define(IteratorPrototype, iteratorSymbol, function() {
|
|
428
|
+
return this;
|
|
429
|
+
});
|
|
430
|
+
var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
431
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
432
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
433
|
+
function defineIteratorMethods(prototype) {
|
|
434
|
+
[
|
|
435
|
+
"next",
|
|
436
|
+
"throw",
|
|
437
|
+
"return"
|
|
438
|
+
].forEach(function(method) {
|
|
439
|
+
define(prototype, method, function(arg) {
|
|
440
|
+
return this._invoke(method, arg);
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
445
|
+
function invoke(method, arg, resolve, reject) {
|
|
446
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
447
|
+
if ("throw" !== record.type) {
|
|
448
|
+
var result = record.arg, value = result.value;
|
|
449
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function(value) {
|
|
450
|
+
invoke("next", value, resolve, reject);
|
|
451
|
+
}, function(err) {
|
|
452
|
+
invoke("throw", err, resolve, reject);
|
|
453
|
+
}) : PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
454
|
+
result.value = unwrapped, resolve(result);
|
|
455
|
+
}, function(error) {
|
|
456
|
+
return invoke("throw", error, resolve, reject);
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
reject(record.arg);
|
|
460
|
+
}
|
|
461
|
+
var previousPromise;
|
|
462
|
+
defineProperty(this, "_invoke", { value: function(method, arg) {
|
|
463
|
+
function callInvokeWithMethodAndArg() {
|
|
464
|
+
return new PromiseImpl(function(resolve, reject) {
|
|
465
|
+
invoke(method, arg, resolve, reject);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
469
|
+
} });
|
|
470
|
+
}
|
|
471
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
472
|
+
var state = "suspendedStart";
|
|
473
|
+
return function(method, arg) {
|
|
474
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
475
|
+
if ("completed" === state) {
|
|
476
|
+
if ("throw" === method) throw arg;
|
|
477
|
+
return doneResult();
|
|
478
|
+
}
|
|
479
|
+
for (context.method = method, context.arg = arg;;) {
|
|
480
|
+
var delegate = context.delegate;
|
|
481
|
+
if (delegate) {
|
|
482
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
483
|
+
if (delegateResult) {
|
|
484
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
485
|
+
return delegateResult;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;
|
|
489
|
+
else if ("throw" === context.method) {
|
|
490
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
491
|
+
context.dispatchException(context.arg);
|
|
492
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
493
|
+
state = "executing";
|
|
494
|
+
var record = tryCatch(innerFn, self, context);
|
|
495
|
+
if ("normal" === record.type) {
|
|
496
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
497
|
+
return {
|
|
498
|
+
value: record.arg,
|
|
499
|
+
done: context.done
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
507
|
+
var methodName = context.method, method = delegate.iterator[methodName];
|
|
508
|
+
if (void 0 === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = /* @__PURE__ */ new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
509
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
510
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
511
|
+
var info = record.arg;
|
|
512
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = void 0), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = /* @__PURE__ */ new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
513
|
+
}
|
|
514
|
+
function pushTryEntry(locs) {
|
|
515
|
+
var entry = { tryLoc: locs[0] };
|
|
516
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
517
|
+
}
|
|
518
|
+
function resetTryEntry(entry) {
|
|
519
|
+
var record = entry.completion || {};
|
|
520
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
521
|
+
}
|
|
522
|
+
function Context(tryLocsList) {
|
|
523
|
+
this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
524
|
+
}
|
|
525
|
+
function values(iterable) {
|
|
526
|
+
if (iterable) {
|
|
527
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
528
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
529
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
530
|
+
if (!isNaN(iterable.length)) {
|
|
531
|
+
var i = -1, next = function next() {
|
|
532
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
533
|
+
return next.value = void 0, next.done = !0, next;
|
|
534
|
+
};
|
|
535
|
+
return next.next = next;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return { next: doneResult };
|
|
539
|
+
}
|
|
540
|
+
function doneResult() {
|
|
541
|
+
return {
|
|
542
|
+
value: void 0,
|
|
543
|
+
done: !0
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
547
|
+
value: GeneratorFunctionPrototype,
|
|
548
|
+
configurable: !0
|
|
549
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
550
|
+
value: GeneratorFunction,
|
|
551
|
+
configurable: !0
|
|
552
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports$1.isGeneratorFunction = function(genFun) {
|
|
553
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
554
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
555
|
+
}, exports$1.mark = function(genFun) {
|
|
556
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
557
|
+
}, exports$1.awrap = function(arg) {
|
|
558
|
+
return { __await: arg };
|
|
559
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function() {
|
|
560
|
+
return this;
|
|
561
|
+
}), exports$1.AsyncIterator = AsyncIterator, exports$1.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
562
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
563
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
564
|
+
return exports$1.isGeneratorFunction(outerFn) ? iter : iter.next().then(function(result) {
|
|
565
|
+
return result.done ? result.value : iter.next();
|
|
566
|
+
});
|
|
567
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function() {
|
|
568
|
+
return this;
|
|
569
|
+
}), define(Gp, "toString", function() {
|
|
570
|
+
return "[object Generator]";
|
|
571
|
+
}), exports$1.keys = function(val) {
|
|
572
|
+
var object = Object(val), keys = [];
|
|
573
|
+
for (var key in object) keys.push(key);
|
|
574
|
+
return keys.reverse(), function next() {
|
|
575
|
+
for (; keys.length;) {
|
|
576
|
+
var key = keys.pop();
|
|
577
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
578
|
+
}
|
|
579
|
+
return next.done = !0, next;
|
|
580
|
+
};
|
|
581
|
+
}, exports$1.values = values, Context.prototype = {
|
|
582
|
+
constructor: Context,
|
|
583
|
+
reset: function(skipTempReset) {
|
|
584
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = void 0);
|
|
585
|
+
},
|
|
586
|
+
stop: function() {
|
|
587
|
+
this.done = !0;
|
|
588
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
589
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
590
|
+
return this.rval;
|
|
591
|
+
},
|
|
592
|
+
dispatchException: function(exception) {
|
|
593
|
+
if (this.done) throw exception;
|
|
594
|
+
var context = this;
|
|
595
|
+
function handle(loc, caught) {
|
|
596
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = void 0), !!caught;
|
|
597
|
+
}
|
|
598
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
599
|
+
var entry = this.tryEntries[i], record = entry.completion;
|
|
600
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
601
|
+
if (entry.tryLoc <= this.prev) {
|
|
602
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
603
|
+
if (hasCatch && hasFinally) {
|
|
604
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
605
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
606
|
+
} else if (hasCatch) {
|
|
607
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
608
|
+
} else {
|
|
609
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
610
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
abrupt: function(type, arg) {
|
|
616
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
617
|
+
var entry = this.tryEntries[i];
|
|
618
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
619
|
+
var finallyEntry = entry;
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
624
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
625
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
626
|
+
},
|
|
627
|
+
complete: function(record, afterLoc) {
|
|
628
|
+
if ("throw" === record.type) throw record.arg;
|
|
629
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
630
|
+
},
|
|
631
|
+
finish: function(finallyLoc) {
|
|
632
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
633
|
+
var entry = this.tryEntries[i];
|
|
634
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
catch: function(tryLoc) {
|
|
638
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
639
|
+
var entry = this.tryEntries[i];
|
|
640
|
+
if (entry.tryLoc === tryLoc) {
|
|
641
|
+
var record = entry.completion;
|
|
642
|
+
if ("throw" === record.type) {
|
|
643
|
+
var thrown = record.arg;
|
|
644
|
+
resetTryEntry(entry);
|
|
645
|
+
}
|
|
646
|
+
return thrown;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
throw new Error("illegal catch attempt");
|
|
650
|
+
},
|
|
651
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
|
652
|
+
return this.delegate = {
|
|
653
|
+
iterator: values(iterable),
|
|
654
|
+
resultName,
|
|
655
|
+
nextLoc
|
|
656
|
+
}, "next" === this.method && (this.arg = void 0), ContinueSentinel;
|
|
657
|
+
}
|
|
658
|
+
}, exports$1;
|
|
659
|
+
}
|
|
660
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
661
|
+
try {
|
|
662
|
+
var info = gen[key](arg);
|
|
663
|
+
var value = info.value;
|
|
664
|
+
} catch (error) {
|
|
665
|
+
reject(error);
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
if (info.done) resolve(value);
|
|
669
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
670
|
+
}
|
|
671
|
+
function _asyncToGenerator(fn) {
|
|
672
|
+
return function() {
|
|
673
|
+
var self = this, args = arguments;
|
|
674
|
+
return new Promise(function(resolve, reject) {
|
|
675
|
+
var gen = fn.apply(self, args);
|
|
676
|
+
function _next(value) {
|
|
677
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
678
|
+
}
|
|
679
|
+
function _throw(err) {
|
|
680
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
681
|
+
}
|
|
682
|
+
_next(void 0);
|
|
683
|
+
});
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
function _loadWasmModule(sync, filepath, src, imports) {
|
|
687
|
+
function _instantiateOrCompile(source, imports, stream) {
|
|
688
|
+
var instantiateFunc = stream ? WebAssembly.instantiateStreaming : WebAssembly.instantiate;
|
|
689
|
+
var compileFunc = stream ? WebAssembly.compileStreaming : WebAssembly.compile;
|
|
690
|
+
if (imports) return instantiateFunc(source, imports);
|
|
691
|
+
else return compileFunc(source);
|
|
692
|
+
}
|
|
693
|
+
var buf = null;
|
|
694
|
+
var isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
695
|
+
if (filepath && isNode) {
|
|
696
|
+
var fs = __require("fs");
|
|
697
|
+
var path = __require("path");
|
|
698
|
+
return new Promise((resolve, reject) => {
|
|
699
|
+
fs.readFile(path.resolve(__dirname, filepath), (error, buffer) => {
|
|
700
|
+
if (error != null) reject(error);
|
|
701
|
+
else resolve(_instantiateOrCompile(buffer, imports, false));
|
|
702
|
+
});
|
|
703
|
+
});
|
|
704
|
+
} else if (filepath) return _instantiateOrCompile(fetch(filepath), imports, true);
|
|
705
|
+
if (isNode) buf = Buffer.from(src, "base64");
|
|
706
|
+
else {
|
|
707
|
+
var raw = globalThis.atob(src);
|
|
708
|
+
var rawLength = raw.length;
|
|
709
|
+
buf = new Uint8Array(new ArrayBuffer(rawLength));
|
|
710
|
+
for (var i = 0; i < rawLength; i++) buf[i] = raw.charCodeAt(i);
|
|
711
|
+
}
|
|
712
|
+
if (sync) {
|
|
713
|
+
var mod = new WebAssembly.Module(buf);
|
|
714
|
+
return imports ? new WebAssembly.Instance(mod, imports) : mod;
|
|
715
|
+
} else return _instantiateOrCompile(buf, imports, false);
|
|
716
|
+
}
|
|
717
|
+
function wasm(imports) {
|
|
718
|
+
return _loadWasmModule(0, "df58e7ef369c5c18.wasm", null, imports);
|
|
719
|
+
}
|
|
720
|
+
exports.xd3_smatch_cfg = void 0;
|
|
721
|
+
(function(xd3_smatch_cfg) {
|
|
722
|
+
xd3_smatch_cfg[xd3_smatch_cfg["DEFAULT"] = 0] = "DEFAULT";
|
|
723
|
+
xd3_smatch_cfg[xd3_smatch_cfg["SLOW"] = 1] = "SLOW";
|
|
724
|
+
xd3_smatch_cfg[xd3_smatch_cfg["FAST"] = 2] = "FAST";
|
|
725
|
+
xd3_smatch_cfg[xd3_smatch_cfg["FASTER"] = 3] = "FASTER";
|
|
726
|
+
xd3_smatch_cfg[xd3_smatch_cfg["FASTEST"] = 4] = "FASTEST";
|
|
727
|
+
xd3_smatch_cfg[xd3_smatch_cfg["SOFT"] = 5] = "SOFT";
|
|
728
|
+
})(exports.xd3_smatch_cfg || (exports.xd3_smatch_cfg = {}));
|
|
729
|
+
exports.WASI_ERRNO = void 0;
|
|
730
|
+
(function(WASI_ERRNO) {
|
|
731
|
+
WASI_ERRNO[WASI_ERRNO["SUCCESS"] = 0] = "SUCCESS";
|
|
732
|
+
WASI_ERRNO[WASI_ERRNO["ENOMEM"] = 48] = "ENOMEM";
|
|
733
|
+
WASI_ERRNO[WASI_ERRNO["ENOSPC"] = 51] = "ENOSPC";
|
|
734
|
+
})(exports.WASI_ERRNO || (exports.WASI_ERRNO = {}));
|
|
735
|
+
var initPromise = /* @__PURE__ */ wasm({});
|
|
736
|
+
var init = /* @__PURE__ */ function() {
|
|
737
|
+
var _ref = /* @__PURE__ */ _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
738
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
739
|
+
while (1) switch (_context.prev = _context.next) {
|
|
740
|
+
case 0:
|
|
741
|
+
_context.next = 2;
|
|
742
|
+
return initPromise;
|
|
743
|
+
case 2:
|
|
744
|
+
case "end": return _context.stop();
|
|
745
|
+
}
|
|
746
|
+
}, _callee);
|
|
747
|
+
}));
|
|
748
|
+
return function init() {
|
|
749
|
+
return _ref.apply(this, arguments);
|
|
750
|
+
};
|
|
751
|
+
}();
|
|
752
|
+
var _w;
|
|
753
|
+
initPromise.then(function(w) {
|
|
754
|
+
_w = w;
|
|
755
|
+
});
|
|
756
|
+
var _memory_view;
|
|
757
|
+
var exports$1 = /* @__PURE__ */ new Proxy({}, { get: function get(_, prop) {
|
|
758
|
+
var _memory_view2;
|
|
759
|
+
if (!_w) throw new Error("WASM not initialized - await init() first");
|
|
760
|
+
return prop === "memory_view" ? (_memory_view2 = _memory_view) != null ? _memory_view2 : _memory_view = new DataView(_w.instance.exports["memory"].buffer) : _w.instance.exports[prop];
|
|
761
|
+
} });
|
|
762
|
+
var writeToMemoryAt = function writeToMemoryAt(ptr, data) {
|
|
763
|
+
new Uint8Array(exports$1.memory.buffer, ptr, data.byteLength).set(data);
|
|
764
|
+
};
|
|
765
|
+
var readFromMemoryAt = function readFromMemoryAt(ptr, length) {
|
|
766
|
+
return new Uint8Array(exports$1.memory.buffer, ptr, length);
|
|
767
|
+
};
|
|
768
|
+
var readCStrAt = function readCStrAt(ptr) {
|
|
769
|
+
var b = ptr;
|
|
770
|
+
for (; exports$1.memory_view.getUint8(b) !== 0; b++);
|
|
771
|
+
return new TextDecoder().decode(new Uint8Array(exports$1.memory.buffer, ptr, b - ptr));
|
|
772
|
+
};
|
|
773
|
+
var getCodeStr = function getCodeStr(code) {
|
|
774
|
+
return code in exports.WASI_ERRNO ? exports.WASI_ERRNO[code] : readCStrAt(exports$1.xd3_strerror(code));
|
|
775
|
+
};
|
|
776
|
+
var makeWrappedXD3Fn = function makeWrappedXD3Fn(xd3_fn_name) {
|
|
777
|
+
return function(input, source, output_size_max, smatch_cfg) {
|
|
778
|
+
var malloc = exports$1.malloc, free = exports$1.free, memory_view = exports$1.memory_view;
|
|
779
|
+
var xd3_fn = exports$1[xd3_fn_name];
|
|
780
|
+
var input_ptr = malloc(input.byteLength);
|
|
781
|
+
var source_ptr = malloc(source.byteLength);
|
|
782
|
+
var output_ptr = malloc(output_size_max);
|
|
783
|
+
var output_size_ptr = malloc(4);
|
|
784
|
+
writeToMemoryAt(input_ptr, input);
|
|
785
|
+
writeToMemoryAt(source_ptr, source);
|
|
786
|
+
var ret = xd3_fn(input_ptr, input.byteLength, source_ptr, source.byteLength, output_ptr, output_size_ptr, output_size_max, smatch_cfg);
|
|
787
|
+
var output_size = memory_view.getUint32(output_size_ptr, true);
|
|
788
|
+
var output = new Uint8Array(output_size);
|
|
789
|
+
output.set(readFromMemoryAt(output_ptr, output_size));
|
|
790
|
+
free(input_ptr);
|
|
791
|
+
free(source_ptr);
|
|
792
|
+
free(output_ptr);
|
|
793
|
+
free(output_size_ptr);
|
|
794
|
+
return {
|
|
795
|
+
ret,
|
|
796
|
+
str: getCodeStr(ret),
|
|
797
|
+
output
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
/**
|
|
802
|
+
* Create a delta of the `input` relative to the `source`.
|
|
803
|
+
* @param input Input data to create a delta of
|
|
804
|
+
* @param source Source/"dictionary" the input is compared to
|
|
805
|
+
* @param output_size_max Maximum size, in bytes, of the resulting delta. If the delta would be larger than this value, the function will return with the error `ENOSPC` and an empty buffer.
|
|
806
|
+
* @param smatch_cfg The string matching configuration to use
|
|
807
|
+
* @returns An object containing the return code, a string representation of the return code, and the resulting bytes of the delta
|
|
808
|
+
*/
|
|
809
|
+
var xd3_encode_memory = /* @__PURE__ */ makeWrappedXD3Fn("xd3_encode_memory");
|
|
810
|
+
var _xd3_decode_memory = /* @__PURE__ */ makeWrappedXD3Fn("xd3_decode_memory");
|
|
811
|
+
/**
|
|
812
|
+
* Decode a delta created relative to the `source`.
|
|
813
|
+
* @param input Delta data to decode
|
|
814
|
+
* @param source Source/"dictionary" the delta is relative to. This is the same `source` as used in encoding
|
|
815
|
+
* @param output_size_max Maximum size, in bytes, of the resulting decoded data. If the decoded data would be larger than this value, the function will return with the error `ENOSPC` and an empty buffer.
|
|
816
|
+
* @returns An object containing the return code, a string representation of the return code, and the resulting bytes of the decoded data
|
|
817
|
+
*/
|
|
818
|
+
var xd3_decode_memory = function xd3_decode_memory(input, source, output_size_max) {
|
|
819
|
+
return _xd3_decode_memory(input, source, output_size_max, 0);
|
|
820
|
+
};
|
|
821
|
+
exports.init = init;
|
|
822
|
+
exports.xd3_decode_memory = xd3_decode_memory;
|
|
823
|
+
exports.xd3_encode_memory = xd3_encode_memory;
|
|
824
|
+
}));
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region ../../node_modules/.pnpm/xdelta3-wasm@1.0.0/node_modules/xdelta3-wasm/dist/index.js
|
|
827
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
828
|
+
if (process.env.NODE_ENV === "production") module.exports = require_xdelta3_wasm_cjs_production_min();
|
|
829
|
+
else module.exports = require_xdelta3_wasm_cjs_development();
|
|
830
|
+
}));
|
|
831
|
+
//#endregion
|
|
832
|
+
export default require_dist();
|
|
833
|
+
export {};
|