@nil-/xit 0.1.17 → 0.1.20
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/assets/bundler.js +79 -78
- package/assets/index.js +849 -823
- package/assets/svelte/index.js +817 -770
- package/assets/svelte/internal/client.js +1033 -1080
- package/assets/svelte/motion.js +22 -19
- package/assets/svelte/store.js +44 -43
- package/index.d.ts +22 -24
- package/package.json +1 -1
package/assets/index.js
CHANGED
|
@@ -2,9 +2,9 @@ var P = (i) => {
|
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
4
|
var C = (i, e, n) => e.has(i) || P("Cannot " + n);
|
|
5
|
-
var w = (i, e, n) => (C(i, e, "read from private field"), n ? n.call(i) : e.get(i)), F = (i, e, n) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, n),
|
|
5
|
+
var w = (i, e, n) => (C(i, e, "read from private field"), n ? n.call(i) : e.get(i)), F = (i, e, n) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, n), S = (i, e, n, f) => (C(i, e, "write to private field"), f ? f.call(i, n) : e.set(i, n), n), W = (i, e, n) => (C(i, e, "access private method"), n);
|
|
6
6
|
import { w as writable, g as get } from "./svelte/store.js";
|
|
7
|
-
var j, I, x, M, D, L, N,
|
|
7
|
+
var j, I, x, M, D, L, N, $, U;
|
|
8
8
|
let Service$1 = (U = class {
|
|
9
9
|
constructor({ host: e, port: n }) {
|
|
10
10
|
F(this, j);
|
|
@@ -14,76 +14,76 @@ let Service$1 = (U = class {
|
|
|
14
14
|
F(this, D);
|
|
15
15
|
F(this, L);
|
|
16
16
|
F(this, N);
|
|
17
|
-
F(this,
|
|
18
|
-
|
|
17
|
+
F(this, $);
|
|
18
|
+
S(this, N, `${e ?? "localhost"}${n != null ? `:${n}` : ""}`), S(this, x, 0), S(this, M, null), S(this, D, null), S(this, L, null), S(this, $, null);
|
|
19
19
|
}
|
|
20
20
|
on_message(e) {
|
|
21
|
-
|
|
21
|
+
S(this, L, e);
|
|
22
22
|
}
|
|
23
23
|
on_connect(e) {
|
|
24
|
-
|
|
24
|
+
S(this, M, e);
|
|
25
25
|
}
|
|
26
26
|
on_disconnect(e) {
|
|
27
|
-
|
|
27
|
+
S(this, D, e);
|
|
28
28
|
}
|
|
29
29
|
// non-blocking (run is blocking in c++)
|
|
30
30
|
// calling it again should not do anything
|
|
31
31
|
start() {
|
|
32
|
-
w(this,
|
|
33
|
-
|
|
34
|
-
}, w(this,
|
|
35
|
-
w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)),
|
|
36
|
-
}, w(this,
|
|
37
|
-
w(this, x) !== 1 && w(this, x) !== 3 && (
|
|
38
|
-
}, w(this,
|
|
32
|
+
w(this, $) == null && w(this, x) !== 1 && w(this, x) !== 3 && (S(this, $, new WebSocket(`ws://${w(this, N)}`)), w(this, $).binaryType = "arraybuffer", w(this, $).onopen = () => {
|
|
33
|
+
S(this, x, 1), w(this, M) && w(this, M).call(this, w(this, N));
|
|
34
|
+
}, w(this, $).onclose = () => {
|
|
35
|
+
w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)), S(this, x, 2), W(this, j, I).call(this));
|
|
36
|
+
}, w(this, $).onerror = () => {
|
|
37
|
+
w(this, x) !== 1 && w(this, x) !== 3 && (S(this, x, 2), W(this, j, I).call(this));
|
|
38
|
+
}, w(this, $).onmessage = (e) => {
|
|
39
39
|
w(this, L) && w(this, L).call(this, w(this, N), new Uint8Array(e.data));
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
stop() {
|
|
43
|
-
|
|
43
|
+
S(this, x, 3), w(this, $) != null && (w(this, $).close(), S(this, $, null));
|
|
44
44
|
}
|
|
45
45
|
restart() {
|
|
46
|
-
|
|
46
|
+
S(this, x, 0);
|
|
47
47
|
}
|
|
48
48
|
publish(e) {
|
|
49
|
-
w(this,
|
|
49
|
+
w(this, $) != null && w(this, x) == 1 && w(this, $).send(e);
|
|
50
50
|
}
|
|
51
51
|
send(e, n) {
|
|
52
52
|
e === w(this, N) && this.publish(n);
|
|
53
53
|
}
|
|
54
54
|
}, j = new WeakSet(), I = function() {
|
|
55
|
-
w(this,
|
|
56
|
-
}, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(),
|
|
55
|
+
w(this, $) != null && (w(this, $).close(), S(this, $, null)), setTimeout(() => this.start(), 1e3);
|
|
56
|
+
}, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(), $ = new WeakMap(), U);
|
|
57
57
|
const header = (i) => {
|
|
58
58
|
const e = new Uint8Array(4);
|
|
59
59
|
return new DataView(e.buffer).setUint32(0, i, !1), e;
|
|
60
60
|
}, concat = (i) => {
|
|
61
|
-
const e = new Uint8Array(i.reduce((
|
|
61
|
+
const e = new Uint8Array(i.reduce((f, u) => f + u.length, 0));
|
|
62
62
|
let n = 0;
|
|
63
|
-
for (const
|
|
64
|
-
e.set(
|
|
63
|
+
for (const f of i)
|
|
64
|
+
e.set(f, n), n += f.length;
|
|
65
65
|
return e;
|
|
66
66
|
}, test_connection = async (i) => new Promise((e, n) => {
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const f = new Service$1(i), u = setTimeout(() => {
|
|
68
|
+
f.stop(), n("connection failed... stopping");
|
|
69
69
|
}, 2500);
|
|
70
|
-
|
|
71
|
-
console.log("connection tested... proceeding"), clearTimeout(
|
|
72
|
-
}),
|
|
73
|
-
}), service_fetch = async (i, e, n) => new Promise((
|
|
74
|
-
const
|
|
75
|
-
|
|
70
|
+
f.on_connect(() => {
|
|
71
|
+
console.log("connection tested... proceeding"), clearTimeout(u), f.stop(), e();
|
|
72
|
+
}), f.start();
|
|
73
|
+
}), service_fetch = async (i, e, n) => new Promise((f, u) => {
|
|
74
|
+
const a = new Service$1(i), t = setTimeout(() => {
|
|
75
|
+
a.stop(), u("timed out, cancelled");
|
|
76
76
|
}, 2500);
|
|
77
|
-
|
|
77
|
+
a.on_connect(() => a.publish(e)), a.on_message((s, o) => {
|
|
78
78
|
const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4), d = n(r, l);
|
|
79
|
-
d != null && (clearTimeout(t),
|
|
80
|
-
}),
|
|
79
|
+
d != null && (clearTimeout(t), a.stop(), f(d));
|
|
80
|
+
}), a.start();
|
|
81
81
|
}), service_publish = (i, e) => {
|
|
82
|
-
const n = new Service$1(i),
|
|
82
|
+
const n = new Service$1(i), f = setTimeout(() => {
|
|
83
83
|
n.stop();
|
|
84
84
|
}, 2500);
|
|
85
85
|
n.on_connect(() => {
|
|
86
|
-
clearTimeout(
|
|
86
|
+
clearTimeout(f), n.publish(e), n.stop();
|
|
87
87
|
}), n.start();
|
|
88
88
|
};
|
|
89
89
|
function WorkerWrapper(i) {
|
|
@@ -100,23 +100,23 @@ function getDefaultExportFromCjs(i) {
|
|
|
100
100
|
}
|
|
101
101
|
var indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise = asPromise$1;
|
|
102
102
|
function asPromise$1(i, e) {
|
|
103
|
-
for (var n = new Array(arguments.length - 1),
|
|
104
|
-
n[
|
|
103
|
+
for (var n = new Array(arguments.length - 1), f = 0, u = 2, a = !0; u < arguments.length; )
|
|
104
|
+
n[f++] = arguments[u++];
|
|
105
105
|
return new Promise(function(s, o) {
|
|
106
|
-
n[
|
|
107
|
-
if (
|
|
108
|
-
if (
|
|
106
|
+
n[f] = function(l) {
|
|
107
|
+
if (a)
|
|
108
|
+
if (a = !1, l)
|
|
109
109
|
o(l);
|
|
110
110
|
else {
|
|
111
|
-
for (var d = new Array(arguments.length - 1),
|
|
112
|
-
d[
|
|
111
|
+
for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
|
|
112
|
+
d[h++] = arguments[h];
|
|
113
113
|
s.apply(null, d);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
try {
|
|
117
117
|
i.apply(e || null, n);
|
|
118
118
|
} catch (r) {
|
|
119
|
-
|
|
119
|
+
a && (a = !1, o(r));
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
}
|
|
@@ -131,51 +131,51 @@ var base64$1 = {};
|
|
|
131
131
|
++r;
|
|
132
132
|
return Math.ceil(s.length * 3) / 4 - r;
|
|
133
133
|
};
|
|
134
|
-
for (var n = new Array(64),
|
|
135
|
-
|
|
134
|
+
for (var n = new Array(64), f = new Array(123), u = 0; u < 64; )
|
|
135
|
+
f[n[u] = u < 26 ? u + 65 : u < 52 ? u + 71 : u < 62 ? u - 4 : u - 59 | 43] = u++;
|
|
136
136
|
e.encode = function(s, o, r) {
|
|
137
|
-
for (var l = null, d = [],
|
|
138
|
-
var
|
|
139
|
-
switch (
|
|
137
|
+
for (var l = null, d = [], h = 0, c = 0, p; o < r; ) {
|
|
138
|
+
var y = s[o++];
|
|
139
|
+
switch (c) {
|
|
140
140
|
case 0:
|
|
141
|
-
d[
|
|
141
|
+
d[h++] = n[y >> 2], p = (y & 3) << 4, c = 1;
|
|
142
142
|
break;
|
|
143
143
|
case 1:
|
|
144
|
-
d[
|
|
144
|
+
d[h++] = n[p | y >> 4], p = (y & 15) << 2, c = 2;
|
|
145
145
|
break;
|
|
146
146
|
case 2:
|
|
147
|
-
d[
|
|
147
|
+
d[h++] = n[p | y >> 6], d[h++] = n[y & 63], c = 0;
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), h = 0);
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return c && (d[h++] = n[p], d[h++] = 61, c === 1 && (d[h++] = 61)), l ? (h && l.push(String.fromCharCode.apply(String, d.slice(0, h))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, h));
|
|
153
153
|
};
|
|
154
|
-
var
|
|
154
|
+
var a = "invalid encoding";
|
|
155
155
|
e.decode = function(s, o, r) {
|
|
156
|
-
for (var l = r, d = 0,
|
|
157
|
-
var p = s.charCodeAt(
|
|
156
|
+
for (var l = r, d = 0, h, c = 0; c < s.length; ) {
|
|
157
|
+
var p = s.charCodeAt(c++);
|
|
158
158
|
if (p === 61 && d > 1)
|
|
159
159
|
break;
|
|
160
|
-
if ((p =
|
|
161
|
-
throw Error(
|
|
160
|
+
if ((p = f[p]) === void 0)
|
|
161
|
+
throw Error(a);
|
|
162
162
|
switch (d) {
|
|
163
163
|
case 0:
|
|
164
|
-
|
|
164
|
+
h = p, d = 1;
|
|
165
165
|
break;
|
|
166
166
|
case 1:
|
|
167
|
-
o[r++] =
|
|
167
|
+
o[r++] = h << 2 | (p & 48) >> 4, h = p, d = 2;
|
|
168
168
|
break;
|
|
169
169
|
case 2:
|
|
170
|
-
o[r++] = (
|
|
170
|
+
o[r++] = (h & 15) << 4 | (p & 60) >> 2, h = p, d = 3;
|
|
171
171
|
break;
|
|
172
172
|
case 3:
|
|
173
|
-
o[r++] = (
|
|
173
|
+
o[r++] = (h & 3) << 6 | p, d = 0;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
if (d === 1)
|
|
178
|
-
throw Error(
|
|
178
|
+
throw Error(a);
|
|
179
179
|
return r - l;
|
|
180
180
|
}, e.test = function(s) {
|
|
181
181
|
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
|
|
@@ -185,10 +185,10 @@ var eventemitter = EventEmitter;
|
|
|
185
185
|
function EventEmitter() {
|
|
186
186
|
this._listeners = {};
|
|
187
187
|
}
|
|
188
|
-
EventEmitter.prototype.on = function(e, n,
|
|
188
|
+
EventEmitter.prototype.on = function(e, n, f) {
|
|
189
189
|
return (this._listeners[e] || (this._listeners[e] = [])).push({
|
|
190
190
|
fn: n,
|
|
191
|
-
ctx:
|
|
191
|
+
ctx: f || this
|
|
192
192
|
}), this;
|
|
193
193
|
};
|
|
194
194
|
EventEmitter.prototype.off = function(e, n) {
|
|
@@ -197,111 +197,111 @@ EventEmitter.prototype.off = function(e, n) {
|
|
|
197
197
|
else if (n === void 0)
|
|
198
198
|
this._listeners[e] = [];
|
|
199
199
|
else
|
|
200
|
-
for (var
|
|
201
|
-
|
|
200
|
+
for (var f = this._listeners[e], u = 0; u < f.length; )
|
|
201
|
+
f[u].fn === n ? f.splice(u, 1) : ++u;
|
|
202
202
|
return this;
|
|
203
203
|
};
|
|
204
204
|
EventEmitter.prototype.emit = function(e) {
|
|
205
205
|
var n = this._listeners[e];
|
|
206
206
|
if (n) {
|
|
207
|
-
for (var
|
|
208
|
-
|
|
209
|
-
for (
|
|
210
|
-
n[
|
|
207
|
+
for (var f = [], u = 1; u < arguments.length; )
|
|
208
|
+
f.push(arguments[u++]);
|
|
209
|
+
for (u = 0; u < n.length; )
|
|
210
|
+
n[u].fn.apply(n[u++].ctx, f);
|
|
211
211
|
}
|
|
212
212
|
return this;
|
|
213
213
|
};
|
|
214
214
|
var float = factory(factory);
|
|
215
215
|
function factory(i) {
|
|
216
216
|
return typeof Float32Array < "u" ? function() {
|
|
217
|
-
var e = new Float32Array([-0]), n = new Uint8Array(e.buffer),
|
|
218
|
-
function
|
|
217
|
+
var e = new Float32Array([-0]), n = new Uint8Array(e.buffer), f = n[3] === 128;
|
|
218
|
+
function u(o, r, l) {
|
|
219
219
|
e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3];
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function a(o, r, l) {
|
|
222
222
|
e[0] = o, r[l] = n[3], r[l + 1] = n[2], r[l + 2] = n[1], r[l + 3] = n[0];
|
|
223
223
|
}
|
|
224
|
-
i.writeFloatLE =
|
|
224
|
+
i.writeFloatLE = f ? u : a, i.writeFloatBE = f ? a : u;
|
|
225
225
|
function t(o, r) {
|
|
226
226
|
return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], e[0];
|
|
227
227
|
}
|
|
228
228
|
function s(o, r) {
|
|
229
229
|
return n[3] = o[r], n[2] = o[r + 1], n[1] = o[r + 2], n[0] = o[r + 3], e[0];
|
|
230
230
|
}
|
|
231
|
-
i.readFloatLE =
|
|
231
|
+
i.readFloatLE = f ? t : s, i.readFloatBE = f ? s : t;
|
|
232
232
|
}() : function() {
|
|
233
|
-
function e(
|
|
234
|
-
var s =
|
|
235
|
-
if (s && (
|
|
236
|
-
|
|
233
|
+
function e(f, u, a, t) {
|
|
234
|
+
var s = u < 0 ? 1 : 0;
|
|
235
|
+
if (s && (u = -u), u === 0)
|
|
236
|
+
f(1 / u > 0 ? (
|
|
237
237
|
/* positive */
|
|
238
238
|
0
|
|
239
239
|
) : (
|
|
240
240
|
/* negative 0 */
|
|
241
241
|
2147483648
|
|
242
|
-
),
|
|
243
|
-
else if (isNaN(
|
|
244
|
-
|
|
245
|
-
else if (
|
|
246
|
-
|
|
247
|
-
else if (
|
|
248
|
-
|
|
242
|
+
), a, t);
|
|
243
|
+
else if (isNaN(u))
|
|
244
|
+
f(2143289344, a, t);
|
|
245
|
+
else if (u > 34028234663852886e22)
|
|
246
|
+
f((s << 31 | 2139095040) >>> 0, a, t);
|
|
247
|
+
else if (u < 11754943508222875e-54)
|
|
248
|
+
f((s << 31 | Math.round(u / 1401298464324817e-60)) >>> 0, a, t);
|
|
249
249
|
else {
|
|
250
|
-
var o = Math.floor(Math.log(
|
|
251
|
-
|
|
250
|
+
var o = Math.floor(Math.log(u) / Math.LN2), r = Math.round(u * Math.pow(2, -o) * 8388608) & 8388607;
|
|
251
|
+
f((s << 31 | o + 127 << 23 | r) >>> 0, a, t);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
i.writeFloatLE = e.bind(null, writeUintLE), i.writeFloatBE = e.bind(null, writeUintBE);
|
|
255
|
-
function n(
|
|
256
|
-
var t =
|
|
255
|
+
function n(f, u, a) {
|
|
256
|
+
var t = f(u, a), s = (t >> 31) * 2 + 1, o = t >>> 23 & 255, r = t & 8388607;
|
|
257
257
|
return o === 255 ? r ? NaN : s * (1 / 0) : o === 0 ? s * 1401298464324817e-60 * r : s * Math.pow(2, o - 150) * (r + 8388608);
|
|
258
258
|
}
|
|
259
259
|
i.readFloatLE = n.bind(null, readUintLE), i.readFloatBE = n.bind(null, readUintBE);
|
|
260
260
|
}(), typeof Float64Array < "u" ? function() {
|
|
261
|
-
var e = new Float64Array([-0]), n = new Uint8Array(e.buffer),
|
|
262
|
-
function
|
|
261
|
+
var e = new Float64Array([-0]), n = new Uint8Array(e.buffer), f = n[7] === 128;
|
|
262
|
+
function u(o, r, l) {
|
|
263
263
|
e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3], r[l + 4] = n[4], r[l + 5] = n[5], r[l + 6] = n[6], r[l + 7] = n[7];
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function a(o, r, l) {
|
|
266
266
|
e[0] = o, r[l] = n[7], r[l + 1] = n[6], r[l + 2] = n[5], r[l + 3] = n[4], r[l + 4] = n[3], r[l + 5] = n[2], r[l + 6] = n[1], r[l + 7] = n[0];
|
|
267
267
|
}
|
|
268
|
-
i.writeDoubleLE =
|
|
268
|
+
i.writeDoubleLE = f ? u : a, i.writeDoubleBE = f ? a : u;
|
|
269
269
|
function t(o, r) {
|
|
270
270
|
return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], n[4] = o[r + 4], n[5] = o[r + 5], n[6] = o[r + 6], n[7] = o[r + 7], e[0];
|
|
271
271
|
}
|
|
272
272
|
function s(o, r) {
|
|
273
273
|
return n[7] = o[r], n[6] = o[r + 1], n[5] = o[r + 2], n[4] = o[r + 3], n[3] = o[r + 4], n[2] = o[r + 5], n[1] = o[r + 6], n[0] = o[r + 7], e[0];
|
|
274
274
|
}
|
|
275
|
-
i.readDoubleLE =
|
|
275
|
+
i.readDoubleLE = f ? t : s, i.readDoubleBE = f ? s : t;
|
|
276
276
|
}() : function() {
|
|
277
|
-
function e(
|
|
277
|
+
function e(f, u, a, t, s, o) {
|
|
278
278
|
var r = t < 0 ? 1 : 0;
|
|
279
279
|
if (r && (t = -t), t === 0)
|
|
280
|
-
|
|
280
|
+
f(0, s, o + u), f(1 / t > 0 ? (
|
|
281
281
|
/* positive */
|
|
282
282
|
0
|
|
283
283
|
) : (
|
|
284
284
|
/* negative 0 */
|
|
285
285
|
2147483648
|
|
286
|
-
), s, o +
|
|
286
|
+
), s, o + a);
|
|
287
287
|
else if (isNaN(t))
|
|
288
|
-
|
|
288
|
+
f(0, s, o + u), f(2146959360, s, o + a);
|
|
289
289
|
else if (t > 17976931348623157e292)
|
|
290
|
-
|
|
290
|
+
f(0, s, o + u), f((r << 31 | 2146435072) >>> 0, s, o + a);
|
|
291
291
|
else {
|
|
292
292
|
var l;
|
|
293
293
|
if (t < 22250738585072014e-324)
|
|
294
|
-
l = t / 5e-324,
|
|
294
|
+
l = t / 5e-324, f(l >>> 0, s, o + u), f((r << 31 | l / 4294967296) >>> 0, s, o + a);
|
|
295
295
|
else {
|
|
296
296
|
var d = Math.floor(Math.log(t) / Math.LN2);
|
|
297
|
-
d === 1024 && (d = 1023), l = t * Math.pow(2, -d),
|
|
297
|
+
d === 1024 && (d = 1023), l = t * Math.pow(2, -d), f(l * 4503599627370496 >>> 0, s, o + u), f((r << 31 | d + 1023 << 20 | l * 1048576 & 1048575) >>> 0, s, o + a);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
i.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), i.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
|
|
302
|
-
function n(
|
|
303
|
-
var o =
|
|
304
|
-
return d === 2047 ?
|
|
302
|
+
function n(f, u, a, t, s) {
|
|
303
|
+
var o = f(t, s + u), r = f(t, s + a), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047, h = 4294967296 * (r & 1048575) + o;
|
|
304
|
+
return d === 2047 ? h ? NaN : l * (1 / 0) : d === 0 ? l * 5e-324 * h : l * Math.pow(2, d - 1075) * (h + 4503599627370496);
|
|
305
305
|
}
|
|
306
306
|
i.readDoubleLE = n.bind(null, readUintLE, 0, 4), i.readDoubleBE = n.bind(null, readUintBE, 4, 0);
|
|
307
307
|
}(), i;
|
|
@@ -331,31 +331,31 @@ function inquire$1(moduleName) {
|
|
|
331
331
|
var utf8$2 = {};
|
|
332
332
|
(function(i) {
|
|
333
333
|
var e = i;
|
|
334
|
-
e.length = function(
|
|
335
|
-
for (var
|
|
336
|
-
|
|
337
|
-
return
|
|
338
|
-
}, e.read = function(
|
|
339
|
-
var t =
|
|
334
|
+
e.length = function(f) {
|
|
335
|
+
for (var u = 0, a = 0, t = 0; t < f.length; ++t)
|
|
336
|
+
a = f.charCodeAt(t), a < 128 ? u += 1 : a < 2048 ? u += 2 : (a & 64512) === 55296 && (f.charCodeAt(t + 1) & 64512) === 56320 ? (++t, u += 4) : u += 3;
|
|
337
|
+
return u;
|
|
338
|
+
}, e.read = function(f, u, a) {
|
|
339
|
+
var t = a - u;
|
|
340
340
|
if (t < 1)
|
|
341
341
|
return "";
|
|
342
|
-
for (var s = null, o = [], r = 0, l;
|
|
343
|
-
l =
|
|
342
|
+
for (var s = null, o = [], r = 0, l; u < a; )
|
|
343
|
+
l = f[u++], l < 128 ? o[r++] = l : l > 191 && l < 224 ? o[r++] = (l & 31) << 6 | f[u++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (f[u++] & 63) << 12 | (f[u++] & 63) << 6 | f[u++] & 63) - 65536, o[r++] = 55296 + (l >> 10), o[r++] = 56320 + (l & 1023)) : o[r++] = (l & 15) << 12 | (f[u++] & 63) << 6 | f[u++] & 63, r > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, o)), r = 0);
|
|
344
344
|
return s ? (r && s.push(String.fromCharCode.apply(String, o.slice(0, r))), s.join("")) : String.fromCharCode.apply(String, o.slice(0, r));
|
|
345
|
-
}, e.write = function(
|
|
346
|
-
for (var t =
|
|
347
|
-
s =
|
|
348
|
-
return
|
|
345
|
+
}, e.write = function(f, u, a) {
|
|
346
|
+
for (var t = a, s, o, r = 0; r < f.length; ++r)
|
|
347
|
+
s = f.charCodeAt(r), s < 128 ? u[a++] = s : s < 2048 ? (u[a++] = s >> 6 | 192, u[a++] = s & 63 | 128) : (s & 64512) === 55296 && ((o = f.charCodeAt(r + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (o & 1023), ++r, u[a++] = s >> 18 | 240, u[a++] = s >> 12 & 63 | 128, u[a++] = s >> 6 & 63 | 128, u[a++] = s & 63 | 128) : (u[a++] = s >> 12 | 224, u[a++] = s >> 6 & 63 | 128, u[a++] = s & 63 | 128);
|
|
348
|
+
return a - t;
|
|
349
349
|
};
|
|
350
350
|
})(utf8$2);
|
|
351
351
|
var pool_1 = pool;
|
|
352
352
|
function pool(i, e, n) {
|
|
353
|
-
var
|
|
353
|
+
var f = n || 8192, u = f >>> 1, a = null, t = f;
|
|
354
354
|
return function(o) {
|
|
355
|
-
if (o < 1 || o >
|
|
355
|
+
if (o < 1 || o > u)
|
|
356
356
|
return i(o);
|
|
357
|
-
t + o >
|
|
358
|
-
var r = e.call(
|
|
357
|
+
t + o > f && (a = i(f), t = 0);
|
|
358
|
+
var r = e.call(a, t, t += o);
|
|
359
359
|
return t & 7 && (t = (t | 7) + 1), r;
|
|
360
360
|
};
|
|
361
361
|
}
|
|
@@ -364,8 +364,8 @@ function requireLongbits() {
|
|
|
364
364
|
if (hasRequiredLongbits) return longbits;
|
|
365
365
|
hasRequiredLongbits = 1, longbits = e;
|
|
366
366
|
var i = requireMinimal();
|
|
367
|
-
function e(
|
|
368
|
-
this.lo =
|
|
367
|
+
function e(a, t) {
|
|
368
|
+
this.lo = a >>> 0, this.hi = t >>> 0;
|
|
369
369
|
}
|
|
370
370
|
var n = e.zero = new e(0, 0);
|
|
371
371
|
n.toNumber = function() {
|
|
@@ -375,7 +375,7 @@ function requireLongbits() {
|
|
|
375
375
|
}, n.length = function() {
|
|
376
376
|
return 1;
|
|
377
377
|
};
|
|
378
|
-
var
|
|
378
|
+
var f = e.zeroHash = "\0\0\0\0\0\0\0\0";
|
|
379
379
|
e.fromNumber = function(t) {
|
|
380
380
|
if (t === 0)
|
|
381
381
|
return n;
|
|
@@ -401,11 +401,11 @@ function requireLongbits() {
|
|
|
401
401
|
}, e.prototype.toLong = function(t) {
|
|
402
402
|
return i.Long ? new i.Long(this.lo | 0, this.hi | 0, !!t) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!t };
|
|
403
403
|
};
|
|
404
|
-
var
|
|
404
|
+
var u = String.prototype.charCodeAt;
|
|
405
405
|
return e.fromHash = function(t) {
|
|
406
|
-
return t ===
|
|
407
|
-
(
|
|
408
|
-
(
|
|
406
|
+
return t === f ? n : new e(
|
|
407
|
+
(u.call(t, 0) | u.call(t, 1) << 8 | u.call(t, 2) << 16 | u.call(t, 3) << 24) >>> 0,
|
|
408
|
+
(u.call(t, 4) | u.call(t, 5) << 8 | u.call(t, 6) << 16 | u.call(t, 7) << 24) >>> 0
|
|
409
409
|
);
|
|
410
410
|
}, e.prototype.toHash = function() {
|
|
411
411
|
return String.fromCharCode(
|
|
@@ -440,68 +440,68 @@ function requireMinimal() {
|
|
|
440
440
|
/* istanbul ignore next */
|
|
441
441
|
{}
|
|
442
442
|
), e.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
443
|
-
function(
|
|
444
|
-
return typeof
|
|
445
|
-
}, e.isString = function(
|
|
446
|
-
return typeof
|
|
447
|
-
}, e.isObject = function(
|
|
448
|
-
return
|
|
443
|
+
function(a) {
|
|
444
|
+
return typeof a == "number" && isFinite(a) && Math.floor(a) === a;
|
|
445
|
+
}, e.isString = function(a) {
|
|
446
|
+
return typeof a == "string" || a instanceof String;
|
|
447
|
+
}, e.isObject = function(a) {
|
|
448
|
+
return a && typeof a == "object";
|
|
449
449
|
}, e.isset = /**
|
|
450
450
|
* Checks if a property on a message is considered to be present.
|
|
451
451
|
* @param {Object} obj Plain object or message instance
|
|
452
452
|
* @param {string} prop Property name
|
|
453
453
|
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
454
454
|
*/
|
|
455
|
-
e.isSet = function(
|
|
456
|
-
var s =
|
|
457
|
-
return s != null &&
|
|
455
|
+
e.isSet = function(a, t) {
|
|
456
|
+
var s = a[t];
|
|
457
|
+
return s != null && a.hasOwnProperty(t) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
|
|
458
458
|
}, e.Buffer = function() {
|
|
459
459
|
try {
|
|
460
|
-
var
|
|
461
|
-
return
|
|
460
|
+
var u = e.inquire("buffer").Buffer;
|
|
461
|
+
return u.prototype.utf8Write ? u : (
|
|
462
462
|
/* istanbul ignore next */
|
|
463
463
|
null
|
|
464
464
|
);
|
|
465
465
|
} catch {
|
|
466
466
|
return null;
|
|
467
467
|
}
|
|
468
|
-
}(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(
|
|
469
|
-
return typeof
|
|
468
|
+
}(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(a) {
|
|
469
|
+
return typeof a == "number" ? e.Buffer ? e._Buffer_allocUnsafe(a) : new e.Array(a) : e.Buffer ? e._Buffer_from(a) : typeof Uint8Array > "u" ? a : new Uint8Array(a);
|
|
470
470
|
}, e.Array = typeof Uint8Array < "u" ? Uint8Array : Array, e.Long = /* istanbul ignore next */
|
|
471
471
|
e.global.dcodeIO && /* istanbul ignore next */
|
|
472
472
|
e.global.dcodeIO.Long || /* istanbul ignore next */
|
|
473
|
-
e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(
|
|
474
|
-
return
|
|
475
|
-
}, e.longFromHash = function(
|
|
476
|
-
var s = e.LongBits.fromHash(
|
|
473
|
+
e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(a) {
|
|
474
|
+
return a ? e.LongBits.from(a).toHash() : e.LongBits.zeroHash;
|
|
475
|
+
}, e.longFromHash = function(a, t) {
|
|
476
|
+
var s = e.LongBits.fromHash(a);
|
|
477
477
|
return e.Long ? e.Long.fromBits(s.lo, s.hi, t) : s.toNumber(!!t);
|
|
478
478
|
};
|
|
479
|
-
function n(
|
|
480
|
-
for (var s = Object.keys(
|
|
481
|
-
(
|
|
482
|
-
return
|
|
479
|
+
function n(u, a, t) {
|
|
480
|
+
for (var s = Object.keys(a), o = 0; o < s.length; ++o)
|
|
481
|
+
(u[s[o]] === void 0 || !t) && (u[s[o]] = a[s[o]]);
|
|
482
|
+
return u;
|
|
483
483
|
}
|
|
484
|
-
e.merge = n, e.lcFirst = function(
|
|
485
|
-
return
|
|
484
|
+
e.merge = n, e.lcFirst = function(a) {
|
|
485
|
+
return a.charAt(0).toLowerCase() + a.substring(1);
|
|
486
486
|
};
|
|
487
|
-
function
|
|
488
|
-
function
|
|
489
|
-
if (!(this instanceof
|
|
490
|
-
return new
|
|
487
|
+
function f(u) {
|
|
488
|
+
function a(t, s) {
|
|
489
|
+
if (!(this instanceof a))
|
|
490
|
+
return new a(t, s);
|
|
491
491
|
Object.defineProperty(this, "message", { get: function() {
|
|
492
492
|
return t;
|
|
493
|
-
} }), Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
493
|
+
} }), Error.captureStackTrace ? Error.captureStackTrace(this, a) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), s && n(this, s);
|
|
494
494
|
}
|
|
495
|
-
return
|
|
495
|
+
return a.prototype = Object.create(Error.prototype, {
|
|
496
496
|
constructor: {
|
|
497
|
-
value:
|
|
497
|
+
value: a,
|
|
498
498
|
writable: !0,
|
|
499
499
|
enumerable: !1,
|
|
500
500
|
configurable: !0
|
|
501
501
|
},
|
|
502
502
|
name: {
|
|
503
503
|
get: function() {
|
|
504
|
-
return
|
|
504
|
+
return u;
|
|
505
505
|
},
|
|
506
506
|
set: void 0,
|
|
507
507
|
enumerable: !1,
|
|
@@ -519,20 +519,20 @@ function requireMinimal() {
|
|
|
519
519
|
enumerable: !1,
|
|
520
520
|
configurable: !0
|
|
521
521
|
}
|
|
522
|
-
}),
|
|
522
|
+
}), a;
|
|
523
523
|
}
|
|
524
|
-
e.newError =
|
|
525
|
-
for (var t = {}, s = 0; s <
|
|
526
|
-
t[
|
|
524
|
+
e.newError = f, e.ProtocolError = f("ProtocolError"), e.oneOfGetter = function(a) {
|
|
525
|
+
for (var t = {}, s = 0; s < a.length; ++s)
|
|
526
|
+
t[a[s]] = 1;
|
|
527
527
|
return function() {
|
|
528
528
|
for (var o = Object.keys(this), r = o.length - 1; r > -1; --r)
|
|
529
529
|
if (t[o[r]] === 1 && this[o[r]] !== void 0 && this[o[r]] !== null)
|
|
530
530
|
return o[r];
|
|
531
531
|
};
|
|
532
|
-
}, e.oneOfSetter = function(
|
|
532
|
+
}, e.oneOfSetter = function(a) {
|
|
533
533
|
return function(t) {
|
|
534
|
-
for (var s = 0; s <
|
|
535
|
-
|
|
534
|
+
for (var s = 0; s < a.length; ++s)
|
|
535
|
+
a[s] !== t && delete this[a[s]];
|
|
536
536
|
};
|
|
537
537
|
}, e.toJSONOptions = {
|
|
538
538
|
longs: String,
|
|
@@ -540,17 +540,17 @@ function requireMinimal() {
|
|
|
540
540
|
bytes: String,
|
|
541
541
|
json: !0
|
|
542
542
|
}, e._configure = function() {
|
|
543
|
-
var
|
|
544
|
-
if (!
|
|
543
|
+
var u = e.Buffer;
|
|
544
|
+
if (!u) {
|
|
545
545
|
e._Buffer_from = e._Buffer_allocUnsafe = null;
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
|
-
e._Buffer_from =
|
|
548
|
+
e._Buffer_from = u.from !== Uint8Array.from && u.from || /* istanbul ignore next */
|
|
549
549
|
function(t, s) {
|
|
550
|
-
return new
|
|
551
|
-
}, e._Buffer_allocUnsafe =
|
|
550
|
+
return new u(t, s);
|
|
551
|
+
}, e._Buffer_allocUnsafe = u.allocUnsafe || /* istanbul ignore next */
|
|
552
552
|
function(t) {
|
|
553
|
-
return new
|
|
553
|
+
return new u(t);
|
|
554
554
|
};
|
|
555
555
|
};
|
|
556
556
|
}(minimal)), minimal;
|
|
@@ -581,8 +581,8 @@ Writer$1.alloc = function i(e) {
|
|
|
581
581
|
return new util$6.Array(e);
|
|
582
582
|
};
|
|
583
583
|
util$6.Array !== Array && (Writer$1.alloc = util$6.pool(Writer$1.alloc, util$6.Array.prototype.subarray));
|
|
584
|
-
Writer$1.prototype._push = function i(e, n,
|
|
585
|
-
return this.tail = this.tail.next = new Op(e, n,
|
|
584
|
+
Writer$1.prototype._push = function i(e, n, f) {
|
|
585
|
+
return this.tail = this.tail.next = new Op(e, n, f), this.len += n, this;
|
|
586
586
|
};
|
|
587
587
|
function writeByte(i, e, n) {
|
|
588
588
|
e[n] = i & 255;
|
|
@@ -646,19 +646,19 @@ Writer$1.prototype.float = function i(e) {
|
|
|
646
646
|
Writer$1.prototype.double = function i(e) {
|
|
647
647
|
return this._push(util$6.float.writeDoubleLE, 8, e);
|
|
648
648
|
};
|
|
649
|
-
var writeBytes = util$6.Array.prototype.set ? function i(e, n,
|
|
650
|
-
n.set(e,
|
|
651
|
-
} : function i(e, n,
|
|
652
|
-
for (var
|
|
653
|
-
n[
|
|
649
|
+
var writeBytes = util$6.Array.prototype.set ? function i(e, n, f) {
|
|
650
|
+
n.set(e, f);
|
|
651
|
+
} : function i(e, n, f) {
|
|
652
|
+
for (var u = 0; u < e.length; ++u)
|
|
653
|
+
n[f + u] = e[u];
|
|
654
654
|
};
|
|
655
655
|
Writer$1.prototype.bytes = function i(e) {
|
|
656
656
|
var n = e.length >>> 0;
|
|
657
657
|
if (!n)
|
|
658
658
|
return this._push(writeByte, 1, 0);
|
|
659
659
|
if (util$6.isString(e)) {
|
|
660
|
-
var
|
|
661
|
-
base64.decode(e,
|
|
660
|
+
var f = Writer$1.alloc(n = base64.length(e));
|
|
661
|
+
base64.decode(e, f, 0), e = f;
|
|
662
662
|
}
|
|
663
663
|
return this.uint32(n)._push(writeBytes, n, e);
|
|
664
664
|
};
|
|
@@ -673,12 +673,12 @@ Writer$1.prototype.reset = function i() {
|
|
|
673
673
|
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new Op(noop$1, 0, 0), this.len = 0), this;
|
|
674
674
|
};
|
|
675
675
|
Writer$1.prototype.ldelim = function i() {
|
|
676
|
-
var e = this.head, n = this.tail,
|
|
677
|
-
return this.reset().uint32(
|
|
676
|
+
var e = this.head, n = this.tail, f = this.len;
|
|
677
|
+
return this.reset().uint32(f), f && (this.tail.next = e.next, this.tail = n, this.len += f), this;
|
|
678
678
|
};
|
|
679
679
|
Writer$1.prototype.finish = function i() {
|
|
680
|
-
for (var e = this.head.next, n = this.constructor.alloc(this.len),
|
|
681
|
-
e.fn(e.val, n,
|
|
680
|
+
for (var e = this.head.next, n = this.constructor.alloc(this.len), f = 0; e; )
|
|
681
|
+
e.fn(e.val, n, f), f += e.len, e = e.next;
|
|
682
682
|
return n;
|
|
683
683
|
};
|
|
684
684
|
Writer$1._configure = function(i) {
|
|
@@ -691,13 +691,13 @@ function BufferWriter() {
|
|
|
691
691
|
Writer.call(this);
|
|
692
692
|
}
|
|
693
693
|
BufferWriter._configure = function() {
|
|
694
|
-
BufferWriter.alloc = util$5._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$5.Buffer && util$5.Buffer.prototype instanceof Uint8Array && util$5.Buffer.prototype.set.name === "set" ? function(e, n,
|
|
695
|
-
n.set(e,
|
|
696
|
-
} : function(e, n,
|
|
694
|
+
BufferWriter.alloc = util$5._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$5.Buffer && util$5.Buffer.prototype instanceof Uint8Array && util$5.Buffer.prototype.set.name === "set" ? function(e, n, f) {
|
|
695
|
+
n.set(e, f);
|
|
696
|
+
} : function(e, n, f) {
|
|
697
697
|
if (e.copy)
|
|
698
|
-
e.copy(n,
|
|
699
|
-
else for (var
|
|
700
|
-
n[
|
|
698
|
+
e.copy(n, f, 0, e.length);
|
|
699
|
+
else for (var u = 0; u < e.length; )
|
|
700
|
+
n[f++] = e[u++];
|
|
701
701
|
};
|
|
702
702
|
};
|
|
703
703
|
BufferWriter.prototype.bytes = function i(e) {
|
|
@@ -730,8 +730,8 @@ var create_array = typeof Uint8Array < "u" ? function i(e) {
|
|
|
730
730
|
throw Error("illegal buffer");
|
|
731
731
|
}, create = function i() {
|
|
732
732
|
return util$4.Buffer ? function(n) {
|
|
733
|
-
return (Reader$1.create = function(
|
|
734
|
-
return util$4.Buffer.isBuffer(
|
|
733
|
+
return (Reader$1.create = function(u) {
|
|
734
|
+
return util$4.Buffer.isBuffer(u) ? new BufferReader$1(u) : create_array(u);
|
|
735
735
|
})(n);
|
|
736
736
|
} : create_array;
|
|
737
737
|
};
|
|
@@ -819,16 +819,16 @@ Reader$1.prototype.double = function i() {
|
|
|
819
819
|
return this.pos += 8, e;
|
|
820
820
|
};
|
|
821
821
|
Reader$1.prototype.bytes = function i() {
|
|
822
|
-
var e = this.uint32(), n = this.pos,
|
|
823
|
-
if (
|
|
822
|
+
var e = this.uint32(), n = this.pos, f = this.pos + e;
|
|
823
|
+
if (f > this.len)
|
|
824
824
|
throw indexOutOfRange(this, e);
|
|
825
825
|
if (this.pos += e, Array.isArray(this.buf))
|
|
826
|
-
return this.buf.slice(n,
|
|
827
|
-
if (n ===
|
|
828
|
-
var
|
|
829
|
-
return
|
|
826
|
+
return this.buf.slice(n, f);
|
|
827
|
+
if (n === f) {
|
|
828
|
+
var u = util$4.Buffer;
|
|
829
|
+
return u ? u.alloc(0) : new this.buf.constructor(0);
|
|
830
830
|
}
|
|
831
|
-
return this._slice.call(this.buf, n,
|
|
831
|
+
return this._slice.call(this.buf, n, f);
|
|
832
832
|
};
|
|
833
833
|
Reader$1.prototype.string = function i() {
|
|
834
834
|
var e = this.bytes();
|
|
@@ -914,25 +914,25 @@ function Service(i, e, n) {
|
|
|
914
914
|
throw TypeError("rpcImpl must be a function");
|
|
915
915
|
util$2.EventEmitter.call(this), this.rpcImpl = i, this.requestDelimited = !!e, this.responseDelimited = !!n;
|
|
916
916
|
}
|
|
917
|
-
Service.prototype.rpcCall = function i(e, n,
|
|
918
|
-
if (!
|
|
917
|
+
Service.prototype.rpcCall = function i(e, n, f, u, a) {
|
|
918
|
+
if (!u)
|
|
919
919
|
throw TypeError("request must be specified");
|
|
920
920
|
var t = this;
|
|
921
|
-
if (!
|
|
922
|
-
return util$2.asPromise(i, t, e, n,
|
|
921
|
+
if (!a)
|
|
922
|
+
return util$2.asPromise(i, t, e, n, f, u);
|
|
923
923
|
if (!t.rpcImpl) {
|
|
924
924
|
setTimeout(function() {
|
|
925
|
-
|
|
925
|
+
a(Error("already ended"));
|
|
926
926
|
}, 0);
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
929
|
try {
|
|
930
930
|
return t.rpcImpl(
|
|
931
931
|
e,
|
|
932
|
-
n[t.requestDelimited ? "encodeDelimited" : "encode"](
|
|
932
|
+
n[t.requestDelimited ? "encodeDelimited" : "encode"](u).finish(),
|
|
933
933
|
function(o, r) {
|
|
934
934
|
if (o)
|
|
935
|
-
return t.emit("error", o, e),
|
|
935
|
+
return t.emit("error", o, e), a(o);
|
|
936
936
|
if (r === null) {
|
|
937
937
|
t.end(
|
|
938
938
|
/* endedByRPC */
|
|
@@ -940,18 +940,18 @@ Service.prototype.rpcCall = function i(e, n, a, f, u) {
|
|
|
940
940
|
);
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
|
-
if (!(r instanceof
|
|
943
|
+
if (!(r instanceof f))
|
|
944
944
|
try {
|
|
945
|
-
r =
|
|
945
|
+
r = f[t.responseDelimited ? "decodeDelimited" : "decode"](r);
|
|
946
946
|
} catch (l) {
|
|
947
|
-
return t.emit("error", l, e),
|
|
947
|
+
return t.emit("error", l, e), a(l);
|
|
948
948
|
}
|
|
949
|
-
return t.emit("data", r, e),
|
|
949
|
+
return t.emit("data", r, e), a(null, r);
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
952
|
} catch (s) {
|
|
953
953
|
t.emit("error", s, e), setTimeout(function() {
|
|
954
|
-
|
|
954
|
+
a(s);
|
|
955
955
|
}, 0);
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
@@ -976,21 +976,21 @@ var util$1 = { exports: {} }, codegen_1 = codegen;
|
|
|
976
976
|
function codegen(i, e) {
|
|
977
977
|
typeof i == "string" && (e = i, i = void 0);
|
|
978
978
|
var n = [];
|
|
979
|
-
function a
|
|
980
|
-
if (typeof
|
|
981
|
-
var t =
|
|
982
|
-
if (codegen.verbose && console.log("codegen: " + t), t = "return " + t,
|
|
983
|
-
for (var s = Object.keys(
|
|
984
|
-
o[l] = s[l], r[l] =
|
|
979
|
+
function f(a) {
|
|
980
|
+
if (typeof a != "string") {
|
|
981
|
+
var t = u();
|
|
982
|
+
if (codegen.verbose && console.log("codegen: " + t), t = "return " + t, a) {
|
|
983
|
+
for (var s = Object.keys(a), o = new Array(s.length + 1), r = new Array(s.length), l = 0; l < s.length; )
|
|
984
|
+
o[l] = s[l], r[l] = a[s[l++]];
|
|
985
985
|
return o[l] = t, Function.apply(null, o).apply(null, r);
|
|
986
986
|
}
|
|
987
987
|
return Function(t)();
|
|
988
988
|
}
|
|
989
|
-
for (var d = new Array(arguments.length - 1),
|
|
990
|
-
d[
|
|
991
|
-
if (
|
|
992
|
-
var _ = d[
|
|
993
|
-
switch (
|
|
989
|
+
for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
|
|
990
|
+
d[h] = arguments[++h];
|
|
991
|
+
if (h = 0, a = a.replace(/%([%dfijs])/g, function(p, y) {
|
|
992
|
+
var _ = d[h++];
|
|
993
|
+
switch (y) {
|
|
994
994
|
case "d":
|
|
995
995
|
case "f":
|
|
996
996
|
return String(Number(_));
|
|
@@ -1002,43 +1002,43 @@ function codegen(i, e) {
|
|
|
1002
1002
|
return String(_);
|
|
1003
1003
|
}
|
|
1004
1004
|
return "%";
|
|
1005
|
-
}),
|
|
1005
|
+
}), h !== d.length)
|
|
1006
1006
|
throw Error("parameter count mismatch");
|
|
1007
|
-
return n.push(
|
|
1007
|
+
return n.push(a), f;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return "function " + (
|
|
1009
|
+
function u(a) {
|
|
1010
|
+
return "function " + (a || e || "") + "(" + (i && i.join(",") || "") + `){
|
|
1011
1011
|
` + n.join(`
|
|
1012
1012
|
`) + `
|
|
1013
1013
|
}`;
|
|
1014
1014
|
}
|
|
1015
|
-
return
|
|
1015
|
+
return f.toString = u, f;
|
|
1016
1016
|
}
|
|
1017
1017
|
codegen.verbose = !1;
|
|
1018
1018
|
var fetch_1 = fetch, asPromise = aspromise, inquire = inquire_1, fs = inquire("fs");
|
|
1019
1019
|
function fetch(i, e, n) {
|
|
1020
|
-
return typeof e == "function" ? (n = e, e = {}) : e || (e = {}), n ? !e.xhr && fs && fs.readFile ? fs.readFile(i, function(
|
|
1021
|
-
return
|
|
1020
|
+
return typeof e == "function" ? (n = e, e = {}) : e || (e = {}), n ? !e.xhr && fs && fs.readFile ? fs.readFile(i, function(u, a) {
|
|
1021
|
+
return u && typeof XMLHttpRequest < "u" ? fetch.xhr(i, e, n) : u ? n(u) : n(null, e.binary ? a : a.toString("utf8"));
|
|
1022
1022
|
}) : fetch.xhr(i, e, n) : asPromise(fetch, this, i, e);
|
|
1023
1023
|
}
|
|
1024
|
-
fetch.xhr = function i(e, n,
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1027
|
-
if (
|
|
1028
|
-
if (
|
|
1029
|
-
return
|
|
1024
|
+
fetch.xhr = function i(e, n, f) {
|
|
1025
|
+
var u = new XMLHttpRequest();
|
|
1026
|
+
u.onreadystatechange = function() {
|
|
1027
|
+
if (u.readyState === 4) {
|
|
1028
|
+
if (u.status !== 0 && u.status !== 200)
|
|
1029
|
+
return f(Error("status " + u.status));
|
|
1030
1030
|
if (n.binary) {
|
|
1031
|
-
var t =
|
|
1031
|
+
var t = u.response;
|
|
1032
1032
|
if (!t) {
|
|
1033
1033
|
t = [];
|
|
1034
|
-
for (var s = 0; s <
|
|
1035
|
-
t.push(
|
|
1034
|
+
for (var s = 0; s < u.responseText.length; ++s)
|
|
1035
|
+
t.push(u.responseText.charCodeAt(s) & 255);
|
|
1036
1036
|
}
|
|
1037
|
-
return
|
|
1037
|
+
return f(null, typeof Uint8Array < "u" ? new Uint8Array(t) : t);
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return f(null, u.responseText);
|
|
1040
1040
|
}
|
|
1041
|
-
}, n.binary && ("overrideMimeType" in
|
|
1041
|
+
}, n.binary && ("overrideMimeType" in u && u.overrideMimeType("text/plain; charset=x-user-defined"), u.responseType = "arraybuffer"), u.open("GET", e), u.send();
|
|
1042
1042
|
};
|
|
1043
1043
|
var path = {};
|
|
1044
1044
|
(function(i) {
|
|
@@ -1048,32 +1048,32 @@ var path = {};
|
|
|
1048
1048
|
* @param {string} path Path to test
|
|
1049
1049
|
* @returns {boolean} `true` if path is absolute
|
|
1050
1050
|
*/
|
|
1051
|
-
e.isAbsolute = function(
|
|
1052
|
-
return /^(?:\/|\w+:)/.test(
|
|
1051
|
+
e.isAbsolute = function(a) {
|
|
1052
|
+
return /^(?:\/|\w+:)/.test(a);
|
|
1053
1053
|
}
|
|
1054
|
-
),
|
|
1054
|
+
), f = (
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Normalizes the specified path.
|
|
1057
1057
|
* @param {string} path Path to normalize
|
|
1058
1058
|
* @returns {string} Normalized path
|
|
1059
1059
|
*/
|
|
1060
|
-
e.normalize = function(
|
|
1061
|
-
|
|
1062
|
-
var t =
|
|
1060
|
+
e.normalize = function(a) {
|
|
1061
|
+
a = a.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
1062
|
+
var t = a.split("/"), s = n(a), o = "";
|
|
1063
1063
|
s && (o = t.shift() + "/");
|
|
1064
1064
|
for (var r = 0; r < t.length; )
|
|
1065
1065
|
t[r] === ".." ? r > 0 && t[r - 1] !== ".." ? t.splice(--r, 2) : s ? t.splice(r, 1) : ++r : t[r] === "." ? t.splice(r, 1) : ++r;
|
|
1066
1066
|
return o + t.join("/");
|
|
1067
1067
|
}
|
|
1068
1068
|
);
|
|
1069
|
-
e.resolve = function(
|
|
1070
|
-
return s || (t =
|
|
1069
|
+
e.resolve = function(a, t, s) {
|
|
1070
|
+
return s || (t = f(t)), n(t) ? t : (s || (a = f(a)), (a = a.replace(/(?:\/|^)[^/]+$/, "")).length ? f(a + "/" + t) : t);
|
|
1071
1071
|
};
|
|
1072
1072
|
})(path);
|
|
1073
1073
|
var types = {}, hasRequiredTypes;
|
|
1074
1074
|
function requireTypes() {
|
|
1075
1075
|
return hasRequiredTypes || (hasRequiredTypes = 1, function(i) {
|
|
1076
|
-
var e = i, n = requireUtil(),
|
|
1076
|
+
var e = i, n = requireUtil(), f = [
|
|
1077
1077
|
"double",
|
|
1078
1078
|
// 0
|
|
1079
1079
|
"float",
|
|
@@ -1105,12 +1105,12 @@ function requireTypes() {
|
|
|
1105
1105
|
"bytes"
|
|
1106
1106
|
// 14
|
|
1107
1107
|
];
|
|
1108
|
-
function
|
|
1108
|
+
function u(a, t) {
|
|
1109
1109
|
var s = 0, o = {};
|
|
1110
|
-
for (t |= 0; s <
|
|
1110
|
+
for (t |= 0; s < a.length; ) o[f[s + t]] = a[s++];
|
|
1111
1111
|
return o;
|
|
1112
1112
|
}
|
|
1113
|
-
e.basic =
|
|
1113
|
+
e.basic = u([
|
|
1114
1114
|
/* double */
|
|
1115
1115
|
1,
|
|
1116
1116
|
/* float */
|
|
@@ -1141,7 +1141,7 @@ function requireTypes() {
|
|
|
1141
1141
|
2,
|
|
1142
1142
|
/* bytes */
|
|
1143
1143
|
2
|
|
1144
|
-
]), e.defaults =
|
|
1144
|
+
]), e.defaults = u([
|
|
1145
1145
|
/* double */
|
|
1146
1146
|
0,
|
|
1147
1147
|
/* float */
|
|
@@ -1174,7 +1174,7 @@ function requireTypes() {
|
|
|
1174
1174
|
n.emptyArray,
|
|
1175
1175
|
/* message */
|
|
1176
1176
|
null
|
|
1177
|
-
]), e.long =
|
|
1177
|
+
]), e.long = u([
|
|
1178
1178
|
/* int64 */
|
|
1179
1179
|
0,
|
|
1180
1180
|
/* uint64 */
|
|
@@ -1185,7 +1185,7 @@ function requireTypes() {
|
|
|
1185
1185
|
1,
|
|
1186
1186
|
/* sfixed64 */
|
|
1187
1187
|
1
|
|
1188
|
-
], 7), e.mapKey =
|
|
1188
|
+
], 7), e.mapKey = u([
|
|
1189
1189
|
/* int32 */
|
|
1190
1190
|
0,
|
|
1191
1191
|
/* uint32 */
|
|
@@ -1210,7 +1210,7 @@ function requireTypes() {
|
|
|
1210
1210
|
0,
|
|
1211
1211
|
/* string */
|
|
1212
1212
|
2
|
|
1213
|
-
], 2), e.packed =
|
|
1213
|
+
], 2), e.packed = u([
|
|
1214
1214
|
/* double */
|
|
1215
1215
|
1,
|
|
1216
1216
|
/* float */
|
|
@@ -1246,23 +1246,23 @@ function requireField() {
|
|
|
1246
1246
|
hasRequiredField = 1, field = t;
|
|
1247
1247
|
var i = requireObject();
|
|
1248
1248
|
((t.prototype = Object.create(i.prototype)).constructor = t).className = "Field";
|
|
1249
|
-
var e = require_enum(), n = requireTypes(),
|
|
1249
|
+
var e = require_enum(), n = requireTypes(), f = requireUtil(), u, a = /^required|optional|repeated$/;
|
|
1250
1250
|
t.fromJSON = function(o, r) {
|
|
1251
1251
|
return new t(o, r.id, r.type, r.rule, r.extend, r.options, r.comment);
|
|
1252
1252
|
};
|
|
1253
|
-
function t(s, o, r, l, d,
|
|
1254
|
-
if (
|
|
1253
|
+
function t(s, o, r, l, d, h, c) {
|
|
1254
|
+
if (f.isObject(l) ? (c = d, h = l, l = d = void 0) : f.isObject(d) && (c = h, h = d, d = void 0), i.call(this, s, h), !f.isInteger(o) || o < 0)
|
|
1255
1255
|
throw TypeError("id must be a non-negative integer");
|
|
1256
|
-
if (!
|
|
1256
|
+
if (!f.isString(r))
|
|
1257
1257
|
throw TypeError("type must be a string");
|
|
1258
|
-
if (l !== void 0 && !
|
|
1258
|
+
if (l !== void 0 && !a.test(l = l.toString().toLowerCase()))
|
|
1259
1259
|
throw TypeError("rule must be a string rule");
|
|
1260
|
-
if (d !== void 0 && !
|
|
1260
|
+
if (d !== void 0 && !f.isString(d))
|
|
1261
1261
|
throw TypeError("extend must be a string");
|
|
1262
|
-
l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = r, this.id = o, this.extend = d || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long =
|
|
1262
|
+
l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = r, this.id = o, this.extend = d || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = f.Long ? n.long[r] !== void 0 : (
|
|
1263
1263
|
/* istanbul ignore next */
|
|
1264
1264
|
!1
|
|
1265
|
-
), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment =
|
|
1265
|
+
), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = c;
|
|
1266
1266
|
}
|
|
1267
1267
|
return Object.defineProperty(t.prototype, "packed", {
|
|
1268
1268
|
get: function() {
|
|
@@ -1272,7 +1272,7 @@ function requireField() {
|
|
|
1272
1272
|
return o === "packed" && (this._packed = null), i.prototype.setOption.call(this, o, r, l);
|
|
1273
1273
|
}, t.prototype.toJSON = function(o) {
|
|
1274
1274
|
var r = o ? !!o.keepComments : !1;
|
|
1275
|
-
return
|
|
1275
|
+
return f.toObject([
|
|
1276
1276
|
"rule",
|
|
1277
1277
|
this.rule !== "optional" && this.rule || void 0,
|
|
1278
1278
|
"type",
|
|
@@ -1289,36 +1289,36 @@ function requireField() {
|
|
|
1289
1289
|
}, t.prototype.resolve = function() {
|
|
1290
1290
|
if (this.resolved)
|
|
1291
1291
|
return this;
|
|
1292
|
-
if ((this.typeDefault = n.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof
|
|
1293
|
-
this.typeDefault =
|
|
1292
|
+
if ((this.typeDefault = n.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof u ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof e && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof e)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
|
|
1293
|
+
this.typeDefault = f.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
|
|
1294
1294
|
else if (this.bytes && typeof this.typeDefault == "string") {
|
|
1295
1295
|
var o;
|
|
1296
|
-
|
|
1296
|
+
f.base64.test(this.typeDefault) ? f.base64.decode(this.typeDefault, o = f.newBuffer(f.base64.length(this.typeDefault)), 0) : f.utf8.write(this.typeDefault, o = f.newBuffer(f.utf8.length(this.typeDefault)), 0), this.typeDefault = o;
|
|
1297
1297
|
}
|
|
1298
|
-
return this.map ? this.defaultValue =
|
|
1298
|
+
return this.map ? this.defaultValue = f.emptyObject : this.repeated ? this.defaultValue = f.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof u && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
|
|
1299
1299
|
}, t.d = function(o, r, l, d) {
|
|
1300
|
-
return typeof r == "function" ? r =
|
|
1301
|
-
|
|
1300
|
+
return typeof r == "function" ? r = f.decorateType(r).name : r && typeof r == "object" && (r = f.decorateEnum(r).name), function(c, p) {
|
|
1301
|
+
f.decorateType(c.constructor).add(new t(p, o, r, l, { default: d }));
|
|
1302
1302
|
};
|
|
1303
1303
|
}, t._configure = function(o) {
|
|
1304
|
-
|
|
1304
|
+
u = o;
|
|
1305
1305
|
}, field;
|
|
1306
1306
|
}
|
|
1307
1307
|
var oneof, hasRequiredOneof;
|
|
1308
1308
|
function requireOneof() {
|
|
1309
1309
|
if (hasRequiredOneof) return oneof;
|
|
1310
|
-
hasRequiredOneof = 1, oneof =
|
|
1310
|
+
hasRequiredOneof = 1, oneof = f;
|
|
1311
1311
|
var i = requireObject();
|
|
1312
|
-
((
|
|
1312
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "OneOf";
|
|
1313
1313
|
var e = requireField(), n = requireUtil();
|
|
1314
|
-
function a
|
|
1315
|
-
if (Array.isArray(t) || (s = t, t = void 0), i.call(this,
|
|
1314
|
+
function f(a, t, s, o) {
|
|
1315
|
+
if (Array.isArray(t) || (s = t, t = void 0), i.call(this, a, s), !(t === void 0 || Array.isArray(t)))
|
|
1316
1316
|
throw TypeError("fieldNames must be an Array");
|
|
1317
1317
|
this.oneof = t || [], this.fieldsArray = [], this.comment = o;
|
|
1318
1318
|
}
|
|
1319
|
-
|
|
1320
|
-
return new
|
|
1321
|
-
},
|
|
1319
|
+
f.fromJSON = function(t, s) {
|
|
1320
|
+
return new f(t, s.oneof, s.options, s.comment);
|
|
1321
|
+
}, f.prototype.toJSON = function(t) {
|
|
1322
1322
|
var s = t ? !!t.keepComments : !1;
|
|
1323
1323
|
return n.toObject([
|
|
1324
1324
|
"options",
|
|
@@ -1329,38 +1329,38 @@ function requireOneof() {
|
|
|
1329
1329
|
s ? this.comment : void 0
|
|
1330
1330
|
]);
|
|
1331
1331
|
};
|
|
1332
|
-
function
|
|
1333
|
-
if (
|
|
1334
|
-
for (var t = 0; t <
|
|
1335
|
-
|
|
1332
|
+
function u(a) {
|
|
1333
|
+
if (a.parent)
|
|
1334
|
+
for (var t = 0; t < a.fieldsArray.length; ++t)
|
|
1335
|
+
a.fieldsArray[t].parent || a.parent.add(a.fieldsArray[t]);
|
|
1336
1336
|
}
|
|
1337
|
-
return
|
|
1337
|
+
return f.prototype.add = function(t) {
|
|
1338
1338
|
if (!(t instanceof e))
|
|
1339
1339
|
throw TypeError("field must be a Field");
|
|
1340
|
-
return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), t.partOf = this,
|
|
1341
|
-
},
|
|
1340
|
+
return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), t.partOf = this, u(this), this;
|
|
1341
|
+
}, f.prototype.remove = function(t) {
|
|
1342
1342
|
if (!(t instanceof e))
|
|
1343
1343
|
throw TypeError("field must be a Field");
|
|
1344
1344
|
var s = this.fieldsArray.indexOf(t);
|
|
1345
1345
|
if (s < 0)
|
|
1346
1346
|
throw Error(t + " is not a member of " + this);
|
|
1347
1347
|
return this.fieldsArray.splice(s, 1), s = this.oneof.indexOf(t.name), s > -1 && this.oneof.splice(s, 1), t.partOf = null, this;
|
|
1348
|
-
},
|
|
1348
|
+
}, f.prototype.onAdd = function(t) {
|
|
1349
1349
|
i.prototype.onAdd.call(this, t);
|
|
1350
1350
|
for (var s = this, o = 0; o < this.oneof.length; ++o) {
|
|
1351
1351
|
var r = t.get(this.oneof[o]);
|
|
1352
1352
|
r && !r.partOf && (r.partOf = s, s.fieldsArray.push(r));
|
|
1353
1353
|
}
|
|
1354
|
-
|
|
1355
|
-
},
|
|
1354
|
+
u(this);
|
|
1355
|
+
}, f.prototype.onRemove = function(t) {
|
|
1356
1356
|
for (var s = 0, o; s < this.fieldsArray.length; ++s)
|
|
1357
1357
|
(o = this.fieldsArray[s]).parent && o.parent.remove(o);
|
|
1358
1358
|
i.prototype.onRemove.call(this, t);
|
|
1359
|
-
},
|
|
1359
|
+
}, f.d = function() {
|
|
1360
1360
|
for (var t = new Array(arguments.length), s = 0; s < arguments.length; )
|
|
1361
1361
|
t[s] = arguments[s++];
|
|
1362
1362
|
return function(r, l) {
|
|
1363
|
-
n.decorateType(r.constructor).add(new
|
|
1363
|
+
n.decorateType(r.constructor).add(new f(l, t)), Object.defineProperty(r, l, {
|
|
1364
1364
|
get: n.oneOfGetter(t),
|
|
1365
1365
|
set: n.oneOfSetter(t)
|
|
1366
1366
|
});
|
|
@@ -1373,28 +1373,28 @@ function requireNamespace() {
|
|
|
1373
1373
|
hasRequiredNamespace = 1, namespace = o;
|
|
1374
1374
|
var i = requireObject();
|
|
1375
1375
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Namespace";
|
|
1376
|
-
var e = requireField(), n = requireUtil(),
|
|
1377
|
-
o.fromJSON = function(d,
|
|
1378
|
-
return new o(d,
|
|
1376
|
+
var e = requireField(), n = requireUtil(), f = requireOneof(), u, a, t;
|
|
1377
|
+
o.fromJSON = function(d, h) {
|
|
1378
|
+
return new o(d, h.options).addJSON(h.nested);
|
|
1379
1379
|
};
|
|
1380
1380
|
function s(l, d) {
|
|
1381
1381
|
if (l && l.length) {
|
|
1382
|
-
for (var
|
|
1383
|
-
|
|
1384
|
-
return
|
|
1382
|
+
for (var h = {}, c = 0; c < l.length; ++c)
|
|
1383
|
+
h[l[c].name] = l[c].toJSON(d);
|
|
1384
|
+
return h;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
o.arrayToJSON = s, o.isReservedId = function(d,
|
|
1387
|
+
o.arrayToJSON = s, o.isReservedId = function(d, h) {
|
|
1388
1388
|
if (d) {
|
|
1389
|
-
for (var
|
|
1390
|
-
if (typeof d[
|
|
1389
|
+
for (var c = 0; c < d.length; ++c)
|
|
1390
|
+
if (typeof d[c] != "string" && d[c][0] <= h && d[c][1] > h)
|
|
1391
1391
|
return !0;
|
|
1392
1392
|
}
|
|
1393
1393
|
return !1;
|
|
1394
|
-
}, o.isReservedName = function(d,
|
|
1394
|
+
}, o.isReservedName = function(d, h) {
|
|
1395
1395
|
if (d) {
|
|
1396
|
-
for (var
|
|
1397
|
-
if (d[
|
|
1396
|
+
for (var c = 0; c < d.length; ++c)
|
|
1397
|
+
if (d[c] === h)
|
|
1398
1398
|
return !0;
|
|
1399
1399
|
}
|
|
1400
1400
|
return !1;
|
|
@@ -1417,12 +1417,12 @@ function requireNamespace() {
|
|
|
1417
1417
|
s(this.nestedArray, d)
|
|
1418
1418
|
]);
|
|
1419
1419
|
}, o.prototype.addJSON = function(d) {
|
|
1420
|
-
var
|
|
1420
|
+
var h = this;
|
|
1421
1421
|
if (d)
|
|
1422
|
-
for (var
|
|
1423
|
-
|
|
1422
|
+
for (var c = Object.keys(d), p = 0, y; p < c.length; ++p)
|
|
1423
|
+
y = d[c[p]], h.add(
|
|
1424
1424
|
// most to least likely
|
|
1425
|
-
(
|
|
1425
|
+
(y.fields !== void 0 ? u.fromJSON : y.values !== void 0 ? t.fromJSON : y.methods !== void 0 ? a.fromJSON : y.id !== void 0 ? e.fromJSON : o.fromJSON)(c[p], y)
|
|
1426
1426
|
);
|
|
1427
1427
|
return this;
|
|
1428
1428
|
}, o.prototype.get = function(d) {
|
|
@@ -1432,17 +1432,17 @@ function requireNamespace() {
|
|
|
1432
1432
|
return this.nested[d].values;
|
|
1433
1433
|
throw Error("no such enum: " + d);
|
|
1434
1434
|
}, o.prototype.add = function(d) {
|
|
1435
|
-
if (!(d instanceof e && d.extend !== void 0 || d instanceof
|
|
1435
|
+
if (!(d instanceof e && d.extend !== void 0 || d instanceof u || d instanceof f || d instanceof t || d instanceof a || d instanceof o))
|
|
1436
1436
|
throw TypeError("object must be a valid nested object");
|
|
1437
1437
|
if (!this.nested)
|
|
1438
1438
|
this.nested = {};
|
|
1439
1439
|
else {
|
|
1440
|
-
var
|
|
1441
|
-
if (
|
|
1442
|
-
if (
|
|
1443
|
-
for (var
|
|
1444
|
-
d.add(
|
|
1445
|
-
this.remove(
|
|
1440
|
+
var h = this.get(d.name);
|
|
1441
|
+
if (h)
|
|
1442
|
+
if (h instanceof o && d instanceof o && !(h instanceof u || h instanceof a)) {
|
|
1443
|
+
for (var c = h.nestedArray, p = 0; p < c.length; ++p)
|
|
1444
|
+
d.add(c[p]);
|
|
1445
|
+
this.remove(h), this.nested || (this.nested = {}), d.setOptions(h.options, !0);
|
|
1446
1446
|
} else
|
|
1447
1447
|
throw Error("duplicate name '" + d.name + "' in " + this);
|
|
1448
1448
|
}
|
|
@@ -1453,87 +1453,87 @@ function requireNamespace() {
|
|
|
1453
1453
|
if (d.parent !== this)
|
|
1454
1454
|
throw Error(d + " is not a member of " + this);
|
|
1455
1455
|
return delete this.nested[d.name], Object.keys(this.nested).length || (this.nested = void 0), d.onRemove(this), r(this);
|
|
1456
|
-
}, o.prototype.define = function(d,
|
|
1456
|
+
}, o.prototype.define = function(d, h) {
|
|
1457
1457
|
if (n.isString(d))
|
|
1458
1458
|
d = d.split(".");
|
|
1459
1459
|
else if (!Array.isArray(d))
|
|
1460
1460
|
throw TypeError("illegal path");
|
|
1461
1461
|
if (d && d.length && d[0] === "")
|
|
1462
1462
|
throw Error("path must be relative");
|
|
1463
|
-
for (var
|
|
1463
|
+
for (var c = this; d.length > 0; ) {
|
|
1464
1464
|
var p = d.shift();
|
|
1465
|
-
if (
|
|
1466
|
-
if (
|
|
1465
|
+
if (c.nested && c.nested[p]) {
|
|
1466
|
+
if (c = c.nested[p], !(c instanceof o))
|
|
1467
1467
|
throw Error("path conflicts with non-namespace objects");
|
|
1468
1468
|
} else
|
|
1469
|
-
|
|
1469
|
+
c.add(c = new o(p));
|
|
1470
1470
|
}
|
|
1471
|
-
return
|
|
1471
|
+
return h && c.addJSON(h), c;
|
|
1472
1472
|
}, o.prototype.resolveAll = function() {
|
|
1473
|
-
for (var d = this.nestedArray,
|
|
1474
|
-
d[
|
|
1473
|
+
for (var d = this.nestedArray, h = 0; h < d.length; )
|
|
1474
|
+
d[h] instanceof o ? d[h++].resolveAll() : d[h++].resolve();
|
|
1475
1475
|
return this.resolve();
|
|
1476
|
-
}, o.prototype.lookup = function(d,
|
|
1477
|
-
if (typeof
|
|
1476
|
+
}, o.prototype.lookup = function(d, h, c) {
|
|
1477
|
+
if (typeof h == "boolean" ? (c = h, h = void 0) : h && !Array.isArray(h) && (h = [h]), n.isString(d) && d.length) {
|
|
1478
1478
|
if (d === ".")
|
|
1479
1479
|
return this.root;
|
|
1480
1480
|
d = d.split(".");
|
|
1481
1481
|
} else if (!d.length)
|
|
1482
1482
|
return this;
|
|
1483
1483
|
if (d[0] === "")
|
|
1484
|
-
return this.root.lookup(d.slice(1),
|
|
1484
|
+
return this.root.lookup(d.slice(1), h);
|
|
1485
1485
|
var p = this.get(d[0]);
|
|
1486
1486
|
if (p) {
|
|
1487
1487
|
if (d.length === 1) {
|
|
1488
|
-
if (!
|
|
1488
|
+
if (!h || h.indexOf(p.constructor) > -1)
|
|
1489
1489
|
return p;
|
|
1490
|
-
} else if (p instanceof o && (p = p.lookup(d.slice(1),
|
|
1490
|
+
} else if (p instanceof o && (p = p.lookup(d.slice(1), h, !0)))
|
|
1491
1491
|
return p;
|
|
1492
1492
|
} else
|
|
1493
|
-
for (var
|
|
1494
|
-
if (this._nestedArray[
|
|
1493
|
+
for (var y = 0; y < this.nestedArray.length; ++y)
|
|
1494
|
+
if (this._nestedArray[y] instanceof o && (p = this._nestedArray[y].lookup(d, h, !0)))
|
|
1495
1495
|
return p;
|
|
1496
|
-
return this.parent === null ||
|
|
1496
|
+
return this.parent === null || c ? null : this.parent.lookup(d, h);
|
|
1497
1497
|
}, o.prototype.lookupType = function(d) {
|
|
1498
|
-
var
|
|
1499
|
-
if (!
|
|
1498
|
+
var h = this.lookup(d, [u]);
|
|
1499
|
+
if (!h)
|
|
1500
1500
|
throw Error("no such type: " + d);
|
|
1501
|
-
return
|
|
1501
|
+
return h;
|
|
1502
1502
|
}, o.prototype.lookupEnum = function(d) {
|
|
1503
|
-
var
|
|
1504
|
-
if (!
|
|
1503
|
+
var h = this.lookup(d, [t]);
|
|
1504
|
+
if (!h)
|
|
1505
1505
|
throw Error("no such Enum '" + d + "' in " + this);
|
|
1506
|
-
return
|
|
1506
|
+
return h;
|
|
1507
1507
|
}, o.prototype.lookupTypeOrEnum = function(d) {
|
|
1508
|
-
var
|
|
1509
|
-
if (!
|
|
1508
|
+
var h = this.lookup(d, [u, t]);
|
|
1509
|
+
if (!h)
|
|
1510
1510
|
throw Error("no such Type or Enum '" + d + "' in " + this);
|
|
1511
|
-
return
|
|
1511
|
+
return h;
|
|
1512
1512
|
}, o.prototype.lookupService = function(d) {
|
|
1513
|
-
var
|
|
1514
|
-
if (!
|
|
1513
|
+
var h = this.lookup(d, [a]);
|
|
1514
|
+
if (!h)
|
|
1515
1515
|
throw Error("no such Service '" + d + "' in " + this);
|
|
1516
|
-
return
|
|
1517
|
-
}, o._configure = function(l, d,
|
|
1518
|
-
|
|
1516
|
+
return h;
|
|
1517
|
+
}, o._configure = function(l, d, h) {
|
|
1518
|
+
u = l, a = d, t = h;
|
|
1519
1519
|
}, namespace;
|
|
1520
1520
|
}
|
|
1521
1521
|
var mapfield, hasRequiredMapfield;
|
|
1522
1522
|
function requireMapfield() {
|
|
1523
1523
|
if (hasRequiredMapfield) return mapfield;
|
|
1524
|
-
hasRequiredMapfield = 1, mapfield =
|
|
1524
|
+
hasRequiredMapfield = 1, mapfield = f;
|
|
1525
1525
|
var i = requireField();
|
|
1526
|
-
((
|
|
1526
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "MapField";
|
|
1527
1527
|
var e = requireTypes(), n = requireUtil();
|
|
1528
|
-
function
|
|
1529
|
-
if (i.call(this,
|
|
1528
|
+
function f(u, a, t, s, o, r) {
|
|
1529
|
+
if (i.call(this, u, a, s, void 0, void 0, o, r), !n.isString(t))
|
|
1530
1530
|
throw TypeError("keyType must be a string");
|
|
1531
1531
|
this.keyType = t, this.resolvedKeyType = null, this.map = !0;
|
|
1532
1532
|
}
|
|
1533
|
-
return
|
|
1534
|
-
return new a
|
|
1535
|
-
},
|
|
1536
|
-
var t =
|
|
1533
|
+
return f.fromJSON = function(a, t) {
|
|
1534
|
+
return new f(a, t.id, t.keyType, t.type, t.options, t.comment);
|
|
1535
|
+
}, f.prototype.toJSON = function(a) {
|
|
1536
|
+
var t = a ? !!a.keepComments : !1;
|
|
1537
1537
|
return n.toObject([
|
|
1538
1538
|
"keyType",
|
|
1539
1539
|
this.keyType,
|
|
@@ -1548,15 +1548,15 @@ function requireMapfield() {
|
|
|
1548
1548
|
"comment",
|
|
1549
1549
|
t ? this.comment : void 0
|
|
1550
1550
|
]);
|
|
1551
|
-
},
|
|
1551
|
+
}, f.prototype.resolve = function() {
|
|
1552
1552
|
if (this.resolved)
|
|
1553
1553
|
return this;
|
|
1554
1554
|
if (e.mapKey[this.keyType] === void 0)
|
|
1555
1555
|
throw Error("invalid key type: " + this.keyType);
|
|
1556
1556
|
return i.prototype.resolve.call(this);
|
|
1557
|
-
},
|
|
1557
|
+
}, f.d = function(a, t, s) {
|
|
1558
1558
|
return typeof s == "function" ? s = n.decorateType(s).name : s && typeof s == "object" && (s = n.decorateEnum(s).name), function(r, l) {
|
|
1559
|
-
n.decorateType(r.constructor).add(new
|
|
1559
|
+
n.decorateType(r.constructor).add(new f(l, a, t, s));
|
|
1560
1560
|
};
|
|
1561
1561
|
}, mapfield;
|
|
1562
1562
|
}
|
|
@@ -1567,19 +1567,19 @@ function requireMethod() {
|
|
|
1567
1567
|
var i = requireObject();
|
|
1568
1568
|
((n.prototype = Object.create(i.prototype)).constructor = n).className = "Method";
|
|
1569
1569
|
var e = requireUtil();
|
|
1570
|
-
function n(
|
|
1571
|
-
if (e.isObject(s) ? (r = s, s = o = void 0) : e.isObject(o) && (r = o, o = void 0), !(
|
|
1570
|
+
function n(f, u, a, t, s, o, r, l, d) {
|
|
1571
|
+
if (e.isObject(s) ? (r = s, s = o = void 0) : e.isObject(o) && (r = o, o = void 0), !(u === void 0 || e.isString(u)))
|
|
1572
1572
|
throw TypeError("type must be a string");
|
|
1573
|
-
if (!e.isString(
|
|
1573
|
+
if (!e.isString(a))
|
|
1574
1574
|
throw TypeError("requestType must be a string");
|
|
1575
1575
|
if (!e.isString(t))
|
|
1576
1576
|
throw TypeError("responseType must be a string");
|
|
1577
|
-
i.call(this,
|
|
1577
|
+
i.call(this, f, r), this.type = u || "rpc", this.requestType = a, this.requestStream = s ? !0 : void 0, this.responseType = t, this.responseStream = o ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = d;
|
|
1578
1578
|
}
|
|
1579
|
-
return n.fromJSON = function(
|
|
1580
|
-
return new n(
|
|
1581
|
-
}, n.prototype.toJSON = function(
|
|
1582
|
-
var
|
|
1579
|
+
return n.fromJSON = function(u, a) {
|
|
1580
|
+
return new n(u, a.type, a.requestType, a.responseType, a.requestStream, a.responseStream, a.options, a.comment, a.parsedOptions);
|
|
1581
|
+
}, n.prototype.toJSON = function(u) {
|
|
1582
|
+
var a = u ? !!u.keepComments : !1;
|
|
1583
1583
|
return e.toObject([
|
|
1584
1584
|
"type",
|
|
1585
1585
|
this.type !== "rpc" && /* istanbul ignore next */
|
|
@@ -1595,7 +1595,7 @@ function requireMethod() {
|
|
|
1595
1595
|
"options",
|
|
1596
1596
|
this.options,
|
|
1597
1597
|
"comment",
|
|
1598
|
-
|
|
1598
|
+
a ? this.comment : void 0,
|
|
1599
1599
|
"parsedOptions",
|
|
1600
1600
|
this.parsedOptions
|
|
1601
1601
|
]);
|
|
@@ -1606,20 +1606,20 @@ function requireMethod() {
|
|
|
1606
1606
|
var service, hasRequiredService;
|
|
1607
1607
|
function requireService() {
|
|
1608
1608
|
if (hasRequiredService) return service;
|
|
1609
|
-
hasRequiredService = 1, service =
|
|
1609
|
+
hasRequiredService = 1, service = u;
|
|
1610
1610
|
var i = requireNamespace();
|
|
1611
|
-
((
|
|
1612
|
-
var e = requireMethod(), n = requireUtil(),
|
|
1613
|
-
function
|
|
1611
|
+
((u.prototype = Object.create(i.prototype)).constructor = u).className = "Service";
|
|
1612
|
+
var e = requireMethod(), n = requireUtil(), f = rpc;
|
|
1613
|
+
function u(t, s) {
|
|
1614
1614
|
i.call(this, t, s), this.methods = {}, this._methodsArray = null;
|
|
1615
1615
|
}
|
|
1616
|
-
|
|
1617
|
-
var r = new
|
|
1616
|
+
u.fromJSON = function(s, o) {
|
|
1617
|
+
var r = new u(s, o.options);
|
|
1618
1618
|
if (o.methods)
|
|
1619
1619
|
for (var l = Object.keys(o.methods), d = 0; d < l.length; ++d)
|
|
1620
1620
|
r.add(e.fromJSON(l[d], o.methods[l[d]]));
|
|
1621
1621
|
return o.nested && r.addJSON(o.nested), r.comment = o.comment, r;
|
|
1622
|
-
},
|
|
1622
|
+
}, u.prototype.toJSON = function(s) {
|
|
1623
1623
|
var o = i.prototype.toJSON.call(this, s), r = s ? !!s.keepComments : !1;
|
|
1624
1624
|
return n.toObject([
|
|
1625
1625
|
"options",
|
|
@@ -1632,39 +1632,39 @@ function requireService() {
|
|
|
1632
1632
|
"comment",
|
|
1633
1633
|
r ? this.comment : void 0
|
|
1634
1634
|
]);
|
|
1635
|
-
}, Object.defineProperty(
|
|
1635
|
+
}, Object.defineProperty(u.prototype, "methodsArray", {
|
|
1636
1636
|
get: function() {
|
|
1637
1637
|
return this._methodsArray || (this._methodsArray = n.toArray(this.methods));
|
|
1638
1638
|
}
|
|
1639
1639
|
});
|
|
1640
|
-
function
|
|
1640
|
+
function a(t) {
|
|
1641
1641
|
return t._methodsArray = null, t;
|
|
1642
1642
|
}
|
|
1643
|
-
return
|
|
1643
|
+
return u.prototype.get = function(s) {
|
|
1644
1644
|
return this.methods[s] || i.prototype.get.call(this, s);
|
|
1645
|
-
},
|
|
1645
|
+
}, u.prototype.resolveAll = function() {
|
|
1646
1646
|
for (var s = this.methodsArray, o = 0; o < s.length; ++o)
|
|
1647
1647
|
s[o].resolve();
|
|
1648
1648
|
return i.prototype.resolve.call(this);
|
|
1649
|
-
},
|
|
1649
|
+
}, u.prototype.add = function(s) {
|
|
1650
1650
|
if (this.get(s.name))
|
|
1651
1651
|
throw Error("duplicate name '" + s.name + "' in " + this);
|
|
1652
|
-
return s instanceof e ? (this.methods[s.name] = s, s.parent = this,
|
|
1653
|
-
},
|
|
1652
|
+
return s instanceof e ? (this.methods[s.name] = s, s.parent = this, a(this)) : i.prototype.add.call(this, s);
|
|
1653
|
+
}, u.prototype.remove = function(s) {
|
|
1654
1654
|
if (s instanceof e) {
|
|
1655
1655
|
if (this.methods[s.name] !== s)
|
|
1656
1656
|
throw Error(s + " is not a member of " + this);
|
|
1657
|
-
return delete this.methods[s.name], s.parent = null,
|
|
1657
|
+
return delete this.methods[s.name], s.parent = null, a(this);
|
|
1658
1658
|
}
|
|
1659
1659
|
return i.prototype.remove.call(this, s);
|
|
1660
|
-
},
|
|
1661
|
-
for (var l = new
|
|
1660
|
+
}, u.prototype.create = function(s, o, r) {
|
|
1661
|
+
for (var l = new f.Service(s, o, r), d = 0, h; d < /* initializes */
|
|
1662
1662
|
this.methodsArray.length; ++d) {
|
|
1663
|
-
var
|
|
1664
|
-
l[
|
|
1665
|
-
m:
|
|
1666
|
-
q:
|
|
1667
|
-
s:
|
|
1663
|
+
var c = n.lcFirst((h = this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g, "");
|
|
1664
|
+
l[c] = n.codegen(["r", "c"], n.isReserved(c) ? c + "_" : c)("return this.rpcCall(m,q,s,r,c)")({
|
|
1665
|
+
m: h,
|
|
1666
|
+
q: h.resolvedRequestType.ctor,
|
|
1667
|
+
s: h.resolvedResponseType.ctor
|
|
1668
1668
|
});
|
|
1669
1669
|
}
|
|
1670
1670
|
return l;
|
|
@@ -1706,24 +1706,24 @@ Message.prototype.toJSON = function i() {
|
|
|
1706
1706
|
var decoder_1, hasRequiredDecoder;
|
|
1707
1707
|
function requireDecoder() {
|
|
1708
1708
|
if (hasRequiredDecoder) return decoder_1;
|
|
1709
|
-
hasRequiredDecoder = 1, decoder_1 =
|
|
1709
|
+
hasRequiredDecoder = 1, decoder_1 = u;
|
|
1710
1710
|
var i = require_enum(), e = requireTypes(), n = requireUtil();
|
|
1711
|
-
function a
|
|
1712
|
-
return "missing required '" +
|
|
1711
|
+
function f(a) {
|
|
1712
|
+
return "missing required '" + a.name + "'";
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1715
|
-
var t = n.codegen(["r", "l"],
|
|
1716
|
-
return
|
|
1714
|
+
function u(a) {
|
|
1715
|
+
var t = n.codegen(["r", "l"], a.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (a.fieldsArray.filter(function(h) {
|
|
1716
|
+
return h.map;
|
|
1717
1717
|
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()");
|
|
1718
|
-
|
|
1718
|
+
a.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
|
|
1719
1719
|
for (var s = 0; s < /* initializes */
|
|
1720
|
-
|
|
1721
|
-
var o =
|
|
1720
|
+
a.fieldsArray.length; ++s) {
|
|
1721
|
+
var o = a._fieldsArray[s].resolve(), r = o.resolvedType instanceof i ? "int32" : o.type, l = "m" + n.safeProp(o.name);
|
|
1722
1722
|
t("case %i: {", o.id), o.map ? (t("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), e.defaults[o.keyType] !== void 0 ? t("k=%j", e.defaults[o.keyType]) : t("k=null"), e.defaults[r] !== void 0 ? t("value=%j", e.defaults[r]) : t("value=null"), t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", o.keyType)("case 2:"), e.basic[r] === void 0 ? t("value=types[%i].decode(r,r.uint32())", s) : t("value=r.%s()", r), t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), e.long[o.keyType] !== void 0 ? t('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : t("%s[k]=value", l)) : o.repeated ? (t("if(!(%s&&%s.length))", l, l)("%s=[]", l), e.packed[r] !== void 0 && t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, r)("}else"), e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, s) : t("%s.push(r.%s())", l, r)) : e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, s) : t("%s=r.%s()", l, r), t("break")("}");
|
|
1723
1723
|
}
|
|
1724
|
-
for (t("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s <
|
|
1725
|
-
var d =
|
|
1726
|
-
d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})",
|
|
1724
|
+
for (t("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s < a._fieldsArray.length; ++s) {
|
|
1725
|
+
var d = a._fieldsArray[s];
|
|
1726
|
+
d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})", f(d));
|
|
1727
1727
|
}
|
|
1728
1728
|
return t("return m");
|
|
1729
1729
|
}
|
|
@@ -1732,12 +1732,12 @@ function requireDecoder() {
|
|
|
1732
1732
|
var verifier_1, hasRequiredVerifier;
|
|
1733
1733
|
function requireVerifier() {
|
|
1734
1734
|
if (hasRequiredVerifier) return verifier_1;
|
|
1735
|
-
hasRequiredVerifier = 1, verifier_1 =
|
|
1735
|
+
hasRequiredVerifier = 1, verifier_1 = a;
|
|
1736
1736
|
var i = require_enum(), e = requireUtil();
|
|
1737
1737
|
function n(t, s) {
|
|
1738
1738
|
return t.name + ": " + s + (t.repeated && s !== "array" ? "[]" : t.map && s !== "object" ? "{k:" + t.keyType + "}" : "") + " expected";
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function f(t, s, o, r) {
|
|
1741
1741
|
if (s.resolvedType)
|
|
1742
1742
|
if (s.resolvedType instanceof i) {
|
|
1743
1743
|
t("switch(%s){", r)("default:")("return%j", n(s, "enum value"));
|
|
@@ -1777,7 +1777,7 @@ function requireVerifier() {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
return t;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function u(t, s, o) {
|
|
1781
1781
|
switch (s.keyType) {
|
|
1782
1782
|
case "int32":
|
|
1783
1783
|
case "uint32":
|
|
@@ -1799,22 +1799,22 @@ function requireVerifier() {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
return t;
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function a(t) {
|
|
1803
1803
|
var s = e.codegen(["m"], t.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), o = t.oneofsArray, r = {};
|
|
1804
1804
|
o.length && s("var p={}");
|
|
1805
1805
|
for (var l = 0; l < /* initializes */
|
|
1806
1806
|
t.fieldsArray.length; ++l) {
|
|
1807
|
-
var d = t._fieldsArray[l].resolve(),
|
|
1808
|
-
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){",
|
|
1809
|
-
s("if(!util.isObject(%s))",
|
|
1807
|
+
var d = t._fieldsArray[l].resolve(), h = "m" + e.safeProp(d.name);
|
|
1808
|
+
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", h, d.name), d.map)
|
|
1809
|
+
s("if(!util.isObject(%s))", h)("return%j", n(d, "object"))("var k=Object.keys(%s)", h)("for(var i=0;i<k.length;++i){"), u(s, d, "k[i]"), f(s, d, l, h + "[k[i]]")("}");
|
|
1810
1810
|
else if (d.repeated)
|
|
1811
|
-
s("if(!Array.isArray(%s))",
|
|
1811
|
+
s("if(!Array.isArray(%s))", h)("return%j", n(d, "array"))("for(var i=0;i<%s.length;++i){", h), f(s, d, l, h + "[i]")("}");
|
|
1812
1812
|
else {
|
|
1813
1813
|
if (d.partOf) {
|
|
1814
|
-
var
|
|
1815
|
-
r[d.partOf.name] === 1 && s("if(p%s===1)",
|
|
1814
|
+
var c = e.safeProp(d.partOf.name);
|
|
1815
|
+
r[d.partOf.name] === 1 && s("if(p%s===1)", c)("return%j", d.partOf.name + ": multiple values"), r[d.partOf.name] = 1, s("p%s=1", c);
|
|
1816
1816
|
}
|
|
1817
|
-
|
|
1817
|
+
f(s, d, l, h);
|
|
1818
1818
|
}
|
|
1819
1819
|
d.optional && s("}");
|
|
1820
1820
|
}
|
|
@@ -1825,14 +1825,14 @@ function requireVerifier() {
|
|
|
1825
1825
|
var converter = {}, hasRequiredConverter;
|
|
1826
1826
|
function requireConverter() {
|
|
1827
1827
|
return hasRequiredConverter || (hasRequiredConverter = 1, function(i) {
|
|
1828
|
-
var e = i, n = require_enum(),
|
|
1829
|
-
function
|
|
1828
|
+
var e = i, n = require_enum(), f = requireUtil();
|
|
1829
|
+
function u(t, s, o, r) {
|
|
1830
1830
|
var l = !1;
|
|
1831
1831
|
if (s.resolvedType)
|
|
1832
1832
|
if (s.resolvedType instanceof n) {
|
|
1833
1833
|
t("switch(d%s){", r);
|
|
1834
|
-
for (var d = s.resolvedType.values,
|
|
1835
|
-
d[c
|
|
1834
|
+
for (var d = s.resolvedType.values, h = Object.keys(d), c = 0; c < h.length; ++c)
|
|
1835
|
+
d[h[c]] === s.typeDefault && !l && (t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', r, r, r), s.repeated || t("break"), l = !0), t("case%j:", h[c])("case %i:", d[h[c]])("m%s=%j", r, d[h[c]])("break");
|
|
1836
1836
|
t("}");
|
|
1837
1837
|
} else t('if(typeof d%s!=="object")', r)("throw TypeError(%j)", s.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", r, o, r);
|
|
1838
1838
|
else {
|
|
@@ -1873,34 +1873,34 @@ function requireConverter() {
|
|
|
1873
1873
|
return t;
|
|
1874
1874
|
}
|
|
1875
1875
|
e.fromObject = function(s) {
|
|
1876
|
-
var o = s.fieldsArray, r =
|
|
1876
|
+
var o = s.fieldsArray, r = f.codegen(["d"], s.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
|
|
1877
1877
|
if (!o.length) return r("return new this.ctor");
|
|
1878
1878
|
r("var m=new this.ctor");
|
|
1879
1879
|
for (var l = 0; l < o.length; ++l) {
|
|
1880
|
-
var d = o[l].resolve(),
|
|
1881
|
-
d.map ? (r("if(d%s){",
|
|
1880
|
+
var d = o[l].resolve(), h = f.safeProp(d.name);
|
|
1881
|
+
d.map ? (r("if(d%s){", h)('if(typeof d%s!=="object")', h)("throw TypeError(%j)", d.fullName + ": object expected")("m%s={}", h)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", h), u(
|
|
1882
1882
|
r,
|
|
1883
1883
|
d,
|
|
1884
1884
|
/* not sorted */
|
|
1885
1885
|
l,
|
|
1886
|
-
|
|
1887
|
-
)("}")("}")) : d.repeated ? (r("if(d%s){",
|
|
1886
|
+
h + "[ks[i]]"
|
|
1887
|
+
)("}")("}")) : d.repeated ? (r("if(d%s){", h)("if(!Array.isArray(d%s))", h)("throw TypeError(%j)", d.fullName + ": array expected")("m%s=[]", h)("for(var i=0;i<d%s.length;++i){", h), u(
|
|
1888
1888
|
r,
|
|
1889
1889
|
d,
|
|
1890
1890
|
/* not sorted */
|
|
1891
1891
|
l,
|
|
1892
|
-
|
|
1893
|
-
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){",
|
|
1892
|
+
h + "[i]"
|
|
1893
|
+
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){", h), u(
|
|
1894
1894
|
r,
|
|
1895
1895
|
d,
|
|
1896
1896
|
/* not sorted */
|
|
1897
1897
|
l,
|
|
1898
|
-
|
|
1898
|
+
h
|
|
1899
1899
|
), d.resolvedType instanceof n || r("}"));
|
|
1900
1900
|
}
|
|
1901
1901
|
return r("return m");
|
|
1902
1902
|
};
|
|
1903
|
-
function
|
|
1903
|
+
function a(t, s, o, r) {
|
|
1904
1904
|
if (s.resolvedType)
|
|
1905
1905
|
s.resolvedType instanceof n ? t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", r, o, r, r, o, r, r) : t("d%s=types[%i].toObject(m%s,o)", r, o, r);
|
|
1906
1906
|
else {
|
|
@@ -1929,53 +1929,53 @@ function requireConverter() {
|
|
|
1929
1929
|
return t;
|
|
1930
1930
|
}
|
|
1931
1931
|
e.toObject = function(s) {
|
|
1932
|
-
var o = s.fieldsArray.slice().sort(
|
|
1932
|
+
var o = s.fieldsArray.slice().sort(f.compareFieldsById);
|
|
1933
1933
|
if (!o.length)
|
|
1934
|
-
return
|
|
1935
|
-
for (var r =
|
|
1936
|
-
o[
|
|
1934
|
+
return f.codegen()("return {}");
|
|
1935
|
+
for (var r = f.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [], h = [], c = 0; c < o.length; ++c)
|
|
1936
|
+
o[c].partOf || (o[c].resolve().repeated ? l : o[c].map ? d : h).push(o[c]);
|
|
1937
1937
|
if (l.length) {
|
|
1938
|
-
for (r("if(o.arrays||o.defaults){"),
|
|
1938
|
+
for (r("if(o.arrays||o.defaults){"), c = 0; c < l.length; ++c) r("d%s=[]", f.safeProp(l[c].name));
|
|
1939
1939
|
r("}");
|
|
1940
1940
|
}
|
|
1941
1941
|
if (d.length) {
|
|
1942
|
-
for (r("if(o.objects||o.defaults){"),
|
|
1942
|
+
for (r("if(o.objects||o.defaults){"), c = 0; c < d.length; ++c) r("d%s={}", f.safeProp(d[c].name));
|
|
1943
1943
|
r("}");
|
|
1944
1944
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
for (r("if(o.defaults){"),
|
|
1947
|
-
var p = c
|
|
1948
|
-
if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j",
|
|
1949
|
-
else if (p.long) r("if(util.Long){")("var n=new util.Long(%i,%i,%j)", p.typeDefault.low, p.typeDefault.high, p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",
|
|
1945
|
+
if (h.length) {
|
|
1946
|
+
for (r("if(o.defaults){"), c = 0; c < h.length; ++c) {
|
|
1947
|
+
var p = h[c], y = f.safeProp(p.name);
|
|
1948
|
+
if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", y, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
|
|
1949
|
+
else if (p.long) r("if(util.Long){")("var n=new util.Long(%i,%i,%j)", p.typeDefault.low, p.typeDefault.high, p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", y)("}else")("d%s=o.longs===String?%j:%i", y, p.typeDefault.toString(), p.typeDefault.toNumber());
|
|
1950
1950
|
else if (p.bytes) {
|
|
1951
1951
|
var _ = "[" + Array.prototype.slice.call(p.typeDefault).join(",") + "]";
|
|
1952
|
-
r("if(o.bytes===String)d%s=%j",
|
|
1953
|
-
} else r("d%s=%j",
|
|
1952
|
+
r("if(o.bytes===String)d%s=%j", y, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", y, _)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", y, y)("}");
|
|
1953
|
+
} else r("d%s=%j", y, p.typeDefault);
|
|
1954
1954
|
}
|
|
1955
1955
|
r("}");
|
|
1956
1956
|
}
|
|
1957
1957
|
var v = !1;
|
|
1958
|
-
for (
|
|
1959
|
-
var p = o[
|
|
1960
|
-
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){",
|
|
1958
|
+
for (c = 0; c < o.length; ++c) {
|
|
1959
|
+
var p = o[c], m = s._fieldsArray.indexOf(p), y = f.safeProp(p.name);
|
|
1960
|
+
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", y, y)("d%s={}", y)("for(var j=0;j<ks2.length;++j){"), a(
|
|
1961
1961
|
r,
|
|
1962
1962
|
p,
|
|
1963
1963
|
/* sorted */
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
)("}")) : p.repeated ? (r("if(m%s&&m%s.length){",
|
|
1964
|
+
m,
|
|
1965
|
+
y + "[ks2[j]]"
|
|
1966
|
+
)("}")) : p.repeated ? (r("if(m%s&&m%s.length){", y, y)("d%s=[]", y)("for(var j=0;j<m%s.length;++j){", y), a(
|
|
1967
1967
|
r,
|
|
1968
1968
|
p,
|
|
1969
1969
|
/* sorted */
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){",
|
|
1970
|
+
m,
|
|
1971
|
+
y + "[j]"
|
|
1972
|
+
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", y, p.name), a(
|
|
1973
1973
|
r,
|
|
1974
1974
|
p,
|
|
1975
1975
|
/* sorted */
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
), p.partOf && r("if(o.oneofs)")("d%s=%j",
|
|
1976
|
+
m,
|
|
1977
|
+
y
|
|
1978
|
+
), p.partOf && r("if(o.oneofs)")("d%s=%j", f.safeProp(p.partOf.name), p.name)), r("}");
|
|
1979
1979
|
}
|
|
1980
1980
|
return r("return d");
|
|
1981
1981
|
};
|
|
@@ -1985,45 +1985,45 @@ var wrappers = {};
|
|
|
1985
1985
|
(function(i) {
|
|
1986
1986
|
var e = i, n = message;
|
|
1987
1987
|
e[".google.protobuf.Any"] = {
|
|
1988
|
-
fromObject: function(
|
|
1989
|
-
if (
|
|
1990
|
-
var
|
|
1991
|
-
if (
|
|
1992
|
-
var t =
|
|
1988
|
+
fromObject: function(f) {
|
|
1989
|
+
if (f && f["@type"]) {
|
|
1990
|
+
var u = f["@type"].substring(f["@type"].lastIndexOf("/") + 1), a = this.lookup(u);
|
|
1991
|
+
if (a) {
|
|
1992
|
+
var t = f["@type"].charAt(0) === "." ? f["@type"].slice(1) : f["@type"];
|
|
1993
1993
|
return t.indexOf("/") === -1 && (t = "/" + t), this.create({
|
|
1994
1994
|
type_url: t,
|
|
1995
|
-
value:
|
|
1995
|
+
value: a.encode(a.fromObject(f)).finish()
|
|
1996
1996
|
});
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
|
-
return this.fromObject(
|
|
1999
|
+
return this.fromObject(f);
|
|
2000
2000
|
},
|
|
2001
|
-
toObject: function(
|
|
2002
|
-
var
|
|
2003
|
-
if (
|
|
2004
|
-
s =
|
|
2001
|
+
toObject: function(f, u) {
|
|
2002
|
+
var a = "type.googleapis.com/", t = "", s = "";
|
|
2003
|
+
if (u && u.json && f.type_url && f.value) {
|
|
2004
|
+
s = f.type_url.substring(f.type_url.lastIndexOf("/") + 1), t = f.type_url.substring(0, f.type_url.lastIndexOf("/") + 1);
|
|
2005
2005
|
var o = this.lookup(s);
|
|
2006
|
-
o && (
|
|
2006
|
+
o && (f = o.decode(f.value));
|
|
2007
2007
|
}
|
|
2008
|
-
if (!(
|
|
2009
|
-
var r =
|
|
2010
|
-
return t === "" && (t =
|
|
2008
|
+
if (!(f instanceof this.ctor) && f instanceof n) {
|
|
2009
|
+
var r = f.$type.toObject(f, u), l = f.$type.fullName[0] === "." ? f.$type.fullName.slice(1) : f.$type.fullName;
|
|
2010
|
+
return t === "" && (t = a), s = t + l, r["@type"] = s, r;
|
|
2011
2011
|
}
|
|
2012
|
-
return this.toObject(
|
|
2012
|
+
return this.toObject(f, u);
|
|
2013
2013
|
}
|
|
2014
2014
|
};
|
|
2015
2015
|
})(wrappers);
|
|
2016
2016
|
var type, hasRequiredType;
|
|
2017
2017
|
function requireType() {
|
|
2018
2018
|
if (hasRequiredType) return type;
|
|
2019
|
-
hasRequiredType = 1, type =
|
|
2019
|
+
hasRequiredType = 1, type = y;
|
|
2020
2020
|
var i = requireNamespace();
|
|
2021
|
-
((
|
|
2022
|
-
var e = require_enum(), n = requireOneof(),
|
|
2023
|
-
function
|
|
2024
|
-
i.call(this, v,
|
|
2021
|
+
((y.prototype = Object.create(i.prototype)).constructor = y).className = "Type";
|
|
2022
|
+
var e = require_enum(), n = requireOneof(), f = requireField(), u = requireMapfield(), a = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), h = requireVerifier(), c = requireConverter(), p = wrappers;
|
|
2023
|
+
function y(v, m) {
|
|
2024
|
+
i.call(this, v, m), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
|
|
2025
2025
|
}
|
|
2026
|
-
Object.defineProperties(
|
|
2026
|
+
Object.defineProperties(y.prototype, {
|
|
2027
2027
|
/**
|
|
2028
2028
|
* Message fields by id.
|
|
2029
2029
|
* @name Type#fieldsById
|
|
@@ -2035,8 +2035,8 @@ function requireType() {
|
|
|
2035
2035
|
if (this._fieldsById)
|
|
2036
2036
|
return this._fieldsById;
|
|
2037
2037
|
this._fieldsById = {};
|
|
2038
|
-
for (var v = Object.keys(this.fields),
|
|
2039
|
-
var g = this.fields[v[
|
|
2038
|
+
for (var v = Object.keys(this.fields), m = 0; m < v.length; ++m) {
|
|
2039
|
+
var g = this.fields[v[m]], b = g.id;
|
|
2040
2040
|
if (this._fieldsById[b])
|
|
2041
2041
|
throw Error("duplicate id " + b + " in " + this);
|
|
2042
2042
|
this._fieldsById[b] = g;
|
|
@@ -2074,11 +2074,11 @@ function requireType() {
|
|
|
2074
2074
|
*/
|
|
2075
2075
|
ctor: {
|
|
2076
2076
|
get: function() {
|
|
2077
|
-
return this._ctor || (this.ctor =
|
|
2077
|
+
return this._ctor || (this.ctor = y.generateConstructor(this)());
|
|
2078
2078
|
},
|
|
2079
2079
|
set: function(v) {
|
|
2080
|
-
var
|
|
2081
|
-
|
|
2080
|
+
var m = v.prototype;
|
|
2081
|
+
m instanceof t || ((v.prototype = new t()).constructor = v, r.merge(v.prototype, m)), v.$type = v.prototype.$type = this, r.merge(v, t, !0), this._ctor = v;
|
|
2082
2082
|
for (var g = 0; g < /* initializes */
|
|
2083
2083
|
this.fieldsArray.length; ++g)
|
|
2084
2084
|
this._fieldsArray[g].resolve();
|
|
@@ -2092,20 +2092,20 @@ function requireType() {
|
|
|
2092
2092
|
g && Object.defineProperties(v.prototype, b);
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
}),
|
|
2096
|
-
for (var g = r.codegen(["p"],
|
|
2097
|
-
(R =
|
|
2095
|
+
}), y.generateConstructor = function(m) {
|
|
2096
|
+
for (var g = r.codegen(["p"], m.name), b = 0, R; b < m.fieldsArray.length; ++b)
|
|
2097
|
+
(R = m._fieldsArray[b]).map ? g("this%s={}", r.safeProp(R.name)) : R.repeated && g("this%s=[]", r.safeProp(R.name));
|
|
2098
2098
|
return g("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
|
|
2099
2099
|
};
|
|
2100
2100
|
function _(v) {
|
|
2101
2101
|
return v._fieldsById = v._fieldsArray = v._oneofsArray = null, delete v.encode, delete v.decode, delete v.verify, v;
|
|
2102
2102
|
}
|
|
2103
|
-
return
|
|
2104
|
-
var b = new m
|
|
2103
|
+
return y.fromJSON = function(m, g) {
|
|
2104
|
+
var b = new y(m, g.options);
|
|
2105
2105
|
b.extensions = g.extensions, b.reserved = g.reserved;
|
|
2106
2106
|
for (var R = Object.keys(g.fields), O = 0; O < R.length; ++O)
|
|
2107
2107
|
b.add(
|
|
2108
|
-
(typeof g.fields[R[O]].keyType < "u" ?
|
|
2108
|
+
(typeof g.fields[R[O]].keyType < "u" ? u.fromJSON : f.fromJSON)(R[O], g.fields[R[O]])
|
|
2109
2109
|
);
|
|
2110
2110
|
if (g.oneofs)
|
|
2111
2111
|
for (R = Object.keys(g.oneofs), O = 0; O < R.length; ++O)
|
|
@@ -2115,21 +2115,21 @@ function requireType() {
|
|
|
2115
2115
|
var T = g.nested[R[O]];
|
|
2116
2116
|
b.add(
|
|
2117
2117
|
// most to least likely
|
|
2118
|
-
(T.id !== void 0 ?
|
|
2118
|
+
(T.id !== void 0 ? f.fromJSON : T.fields !== void 0 ? y.fromJSON : T.values !== void 0 ? e.fromJSON : T.methods !== void 0 ? a.fromJSON : i.fromJSON)(R[O], T)
|
|
2119
2119
|
);
|
|
2120
2120
|
}
|
|
2121
2121
|
return g.extensions && g.extensions.length && (b.extensions = g.extensions), g.reserved && g.reserved.length && (b.reserved = g.reserved), g.group && (b.group = !0), g.comment && (b.comment = g.comment), b;
|
|
2122
|
-
},
|
|
2123
|
-
var g = i.prototype.toJSON.call(this,
|
|
2122
|
+
}, y.prototype.toJSON = function(m) {
|
|
2123
|
+
var g = i.prototype.toJSON.call(this, m), b = m ? !!m.keepComments : !1;
|
|
2124
2124
|
return r.toObject([
|
|
2125
2125
|
"options",
|
|
2126
2126
|
g && g.options || void 0,
|
|
2127
2127
|
"oneofs",
|
|
2128
|
-
i.arrayToJSON(this.oneofsArray,
|
|
2128
|
+
i.arrayToJSON(this.oneofsArray, m),
|
|
2129
2129
|
"fields",
|
|
2130
2130
|
i.arrayToJSON(this.fieldsArray.filter(function(R) {
|
|
2131
2131
|
return !R.declaringField;
|
|
2132
|
-
}),
|
|
2132
|
+
}), m) || {},
|
|
2133
2133
|
"extensions",
|
|
2134
2134
|
this.extensions && this.extensions.length ? this.extensions : void 0,
|
|
2135
2135
|
"reserved",
|
|
@@ -2141,51 +2141,51 @@ function requireType() {
|
|
|
2141
2141
|
"comment",
|
|
2142
2142
|
b ? this.comment : void 0
|
|
2143
2143
|
]);
|
|
2144
|
-
},
|
|
2145
|
-
for (var
|
|
2146
|
-
|
|
2144
|
+
}, y.prototype.resolveAll = function() {
|
|
2145
|
+
for (var m = this.fieldsArray, g = 0; g < m.length; )
|
|
2146
|
+
m[g++].resolve();
|
|
2147
2147
|
var b = this.oneofsArray;
|
|
2148
2148
|
for (g = 0; g < b.length; )
|
|
2149
2149
|
b[g++].resolve();
|
|
2150
2150
|
return i.prototype.resolveAll.call(this);
|
|
2151
|
-
},
|
|
2152
|
-
return this.fields[
|
|
2153
|
-
},
|
|
2154
|
-
if (this.get(
|
|
2155
|
-
throw Error("duplicate name '" +
|
|
2156
|
-
if (
|
|
2151
|
+
}, y.prototype.get = function(m) {
|
|
2152
|
+
return this.fields[m] || this.oneofs && this.oneofs[m] || this.nested && this.nested[m] || null;
|
|
2153
|
+
}, y.prototype.add = function(m) {
|
|
2154
|
+
if (this.get(m.name))
|
|
2155
|
+
throw Error("duplicate name '" + m.name + "' in " + this);
|
|
2156
|
+
if (m instanceof f && m.extend === void 0) {
|
|
2157
2157
|
if (this._fieldsById ? (
|
|
2158
2158
|
/* istanbul ignore next */
|
|
2159
|
-
this._fieldsById[
|
|
2160
|
-
) : this.fieldsById[
|
|
2161
|
-
throw Error("duplicate id " +
|
|
2162
|
-
if (this.isReservedId(
|
|
2163
|
-
throw Error("id " +
|
|
2164
|
-
if (this.isReservedName(
|
|
2165
|
-
throw Error("name '" +
|
|
2166
|
-
return
|
|
2167
|
-
}
|
|
2168
|
-
return
|
|
2169
|
-
},
|
|
2170
|
-
if (
|
|
2171
|
-
if (!this.fields || this.fields[
|
|
2172
|
-
throw Error(
|
|
2173
|
-
return delete this.fields[
|
|
2174
|
-
}
|
|
2175
|
-
if (
|
|
2176
|
-
if (!this.oneofs || this.oneofs[
|
|
2177
|
-
throw Error(
|
|
2178
|
-
return delete this.oneofs[
|
|
2179
|
-
}
|
|
2180
|
-
return i.prototype.remove.call(this,
|
|
2181
|
-
},
|
|
2182
|
-
return i.isReservedId(this.reserved,
|
|
2183
|
-
},
|
|
2184
|
-
return i.isReservedName(this.reserved,
|
|
2185
|
-
},
|
|
2186
|
-
return new this.ctor(
|
|
2187
|
-
},
|
|
2188
|
-
for (var
|
|
2159
|
+
this._fieldsById[m.id]
|
|
2160
|
+
) : this.fieldsById[m.id])
|
|
2161
|
+
throw Error("duplicate id " + m.id + " in " + this);
|
|
2162
|
+
if (this.isReservedId(m.id))
|
|
2163
|
+
throw Error("id " + m.id + " is reserved in " + this);
|
|
2164
|
+
if (this.isReservedName(m.name))
|
|
2165
|
+
throw Error("name '" + m.name + "' is reserved in " + this);
|
|
2166
|
+
return m.parent && m.parent.remove(m), this.fields[m.name] = m, m.message = this, m.onAdd(this), _(this);
|
|
2167
|
+
}
|
|
2168
|
+
return m instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[m.name] = m, m.onAdd(this), _(this)) : i.prototype.add.call(this, m);
|
|
2169
|
+
}, y.prototype.remove = function(m) {
|
|
2170
|
+
if (m instanceof f && m.extend === void 0) {
|
|
2171
|
+
if (!this.fields || this.fields[m.name] !== m)
|
|
2172
|
+
throw Error(m + " is not a member of " + this);
|
|
2173
|
+
return delete this.fields[m.name], m.parent = null, m.onRemove(this), _(this);
|
|
2174
|
+
}
|
|
2175
|
+
if (m instanceof n) {
|
|
2176
|
+
if (!this.oneofs || this.oneofs[m.name] !== m)
|
|
2177
|
+
throw Error(m + " is not a member of " + this);
|
|
2178
|
+
return delete this.oneofs[m.name], m.parent = null, m.onRemove(this), _(this);
|
|
2179
|
+
}
|
|
2180
|
+
return i.prototype.remove.call(this, m);
|
|
2181
|
+
}, y.prototype.isReservedId = function(m) {
|
|
2182
|
+
return i.isReservedId(this.reserved, m);
|
|
2183
|
+
}, y.prototype.isReservedName = function(m) {
|
|
2184
|
+
return i.isReservedName(this.reserved, m);
|
|
2185
|
+
}, y.prototype.create = function(m) {
|
|
2186
|
+
return new this.ctor(m);
|
|
2187
|
+
}, y.prototype.setup = function() {
|
|
2188
|
+
for (var m = this.fullName, g = [], b = 0; b < /* initializes */
|
|
2189
2189
|
this.fieldsArray.length; ++b)
|
|
2190
2190
|
g.push(this._fieldsArray[b].resolve().resolvedType);
|
|
2191
2191
|
this.encode = l(this)({
|
|
@@ -2196,39 +2196,39 @@ function requireType() {
|
|
|
2196
2196
|
Reader: s,
|
|
2197
2197
|
types: g,
|
|
2198
2198
|
util: r
|
|
2199
|
-
}), this.verify =
|
|
2199
|
+
}), this.verify = h(this)({
|
|
2200
2200
|
types: g,
|
|
2201
2201
|
util: r
|
|
2202
|
-
}), this.fromObject =
|
|
2202
|
+
}), this.fromObject = c.fromObject(this)({
|
|
2203
2203
|
types: g,
|
|
2204
2204
|
util: r
|
|
2205
|
-
}), this.toObject =
|
|
2205
|
+
}), this.toObject = c.toObject(this)({
|
|
2206
2206
|
types: g,
|
|
2207
2207
|
util: r
|
|
2208
2208
|
});
|
|
2209
|
-
var R = p[
|
|
2209
|
+
var R = p[m];
|
|
2210
2210
|
if (R) {
|
|
2211
2211
|
var O = Object.create(this);
|
|
2212
2212
|
O.fromObject = this.fromObject, this.fromObject = R.fromObject.bind(O), O.toObject = this.toObject, this.toObject = R.toObject.bind(O);
|
|
2213
2213
|
}
|
|
2214
2214
|
return this;
|
|
2215
|
-
},
|
|
2216
|
-
return this.setup().encode(
|
|
2217
|
-
},
|
|
2218
|
-
return this.encode(
|
|
2219
|
-
},
|
|
2220
|
-
return this.setup().decode(
|
|
2221
|
-
},
|
|
2222
|
-
return
|
|
2223
|
-
},
|
|
2224
|
-
return this.setup().verify(
|
|
2225
|
-
},
|
|
2226
|
-
return this.setup().fromObject(
|
|
2227
|
-
},
|
|
2228
|
-
return this.setup().toObject(
|
|
2229
|
-
},
|
|
2215
|
+
}, y.prototype.encode = function(m, g) {
|
|
2216
|
+
return this.setup().encode(m, g);
|
|
2217
|
+
}, y.prototype.encodeDelimited = function(m, g) {
|
|
2218
|
+
return this.encode(m, g && g.len ? g.fork() : g).ldelim();
|
|
2219
|
+
}, y.prototype.decode = function(m, g) {
|
|
2220
|
+
return this.setup().decode(m, g);
|
|
2221
|
+
}, y.prototype.decodeDelimited = function(m) {
|
|
2222
|
+
return m instanceof s || (m = s.create(m)), this.decode(m, m.uint32());
|
|
2223
|
+
}, y.prototype.verify = function(m) {
|
|
2224
|
+
return this.setup().verify(m);
|
|
2225
|
+
}, y.prototype.fromObject = function(m) {
|
|
2226
|
+
return this.setup().fromObject(m);
|
|
2227
|
+
}, y.prototype.toObject = function(m, g) {
|
|
2228
|
+
return this.setup().toObject(m, g);
|
|
2229
|
+
}, y.d = function(m) {
|
|
2230
2230
|
return function(b) {
|
|
2231
|
-
r.decorateType(b,
|
|
2231
|
+
r.decorateType(b, m);
|
|
2232
2232
|
};
|
|
2233
2233
|
}, type;
|
|
2234
2234
|
}
|
|
@@ -2238,27 +2238,27 @@ function requireRoot() {
|
|
|
2238
2238
|
hasRequiredRoot = 1, root = o;
|
|
2239
2239
|
var i = requireNamespace();
|
|
2240
2240
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Root";
|
|
2241
|
-
var e = requireField(), n = require_enum(),
|
|
2242
|
-
function o(
|
|
2243
|
-
i.call(this, "",
|
|
2241
|
+
var e = requireField(), n = require_enum(), f = requireOneof(), u = requireUtil(), a, t, s;
|
|
2242
|
+
function o(h) {
|
|
2243
|
+
i.call(this, "", h), this.deferred = [], this.files = [];
|
|
2244
2244
|
}
|
|
2245
|
-
o.fromJSON = function(
|
|
2246
|
-
return p || (p = new o()),
|
|
2247
|
-
}, o.prototype.resolvePath =
|
|
2245
|
+
o.fromJSON = function(c, p) {
|
|
2246
|
+
return p || (p = new o()), c.options && p.setOptions(c.options), p.addJSON(c.nested);
|
|
2247
|
+
}, o.prototype.resolvePath = u.path.resolve, o.prototype.fetch = u.fetch;
|
|
2248
2248
|
function r() {
|
|
2249
2249
|
}
|
|
2250
|
-
o.prototype.load = function c
|
|
2251
|
-
typeof p == "function" && (
|
|
2250
|
+
o.prototype.load = function h(c, p, y) {
|
|
2251
|
+
typeof p == "function" && (y = p, p = void 0);
|
|
2252
2252
|
var _ = this;
|
|
2253
|
-
if (!
|
|
2254
|
-
return
|
|
2255
|
-
var v =
|
|
2256
|
-
function
|
|
2257
|
-
if (
|
|
2253
|
+
if (!y)
|
|
2254
|
+
return u.asPromise(h, _, c, p);
|
|
2255
|
+
var v = y === r;
|
|
2256
|
+
function m(q, k) {
|
|
2257
|
+
if (y) {
|
|
2258
2258
|
if (v)
|
|
2259
2259
|
throw q;
|
|
2260
|
-
var A =
|
|
2261
|
-
|
|
2260
|
+
var A = y;
|
|
2261
|
+
y = null, A(q, k);
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
2264
|
function g(q) {
|
|
@@ -2271,7 +2271,7 @@ function requireRoot() {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
function b(q, k) {
|
|
2273
2273
|
try {
|
|
2274
|
-
if (
|
|
2274
|
+
if (u.isString(k) && k.charAt(0) === "{" && (k = JSON.parse(k)), !u.isString(k))
|
|
2275
2275
|
_.setOptions(k.options).addJSON(k.nested);
|
|
2276
2276
|
else {
|
|
2277
2277
|
t.filename = q;
|
|
@@ -2284,9 +2284,9 @@ function requireRoot() {
|
|
|
2284
2284
|
(B = g(A.weakImports[E]) || _.resolvePath(q, A.weakImports[E])) && R(B, !0);
|
|
2285
2285
|
}
|
|
2286
2286
|
} catch (V) {
|
|
2287
|
-
|
|
2287
|
+
m(V);
|
|
2288
2288
|
}
|
|
2289
|
-
!v && !O &&
|
|
2289
|
+
!v && !O && m(null, _);
|
|
2290
2290
|
}
|
|
2291
2291
|
function R(q, k) {
|
|
2292
2292
|
if (q = g(q) || q, !(_.files.indexOf(q) > -1)) {
|
|
@@ -2299,17 +2299,17 @@ function requireRoot() {
|
|
|
2299
2299
|
if (v) {
|
|
2300
2300
|
var A;
|
|
2301
2301
|
try {
|
|
2302
|
-
A =
|
|
2302
|
+
A = u.fs.readFileSync(q).toString("utf8");
|
|
2303
2303
|
} catch (B) {
|
|
2304
|
-
k ||
|
|
2304
|
+
k || m(B);
|
|
2305
2305
|
return;
|
|
2306
2306
|
}
|
|
2307
2307
|
b(q, A);
|
|
2308
2308
|
} else
|
|
2309
2309
|
++O, _.fetch(q, function(B, E) {
|
|
2310
|
-
if (--O, !!
|
|
2310
|
+
if (--O, !!y) {
|
|
2311
2311
|
if (B) {
|
|
2312
|
-
k ? O ||
|
|
2312
|
+
k ? O || m(null, _) : m(B);
|
|
2313
2313
|
return;
|
|
2314
2314
|
}
|
|
2315
2315
|
b(q, E);
|
|
@@ -2318,99 +2318,99 @@ function requireRoot() {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
var O = 0;
|
|
2321
|
-
|
|
2322
|
-
for (var T = 0, J; T <
|
|
2323
|
-
(J = _.resolvePath("",
|
|
2321
|
+
u.isString(c) && (c = [c]);
|
|
2322
|
+
for (var T = 0, J; T < c.length; ++T)
|
|
2323
|
+
(J = _.resolvePath("", c[T])) && R(J);
|
|
2324
2324
|
if (v)
|
|
2325
2325
|
return _;
|
|
2326
|
-
O ||
|
|
2327
|
-
}, o.prototype.loadSync = function(
|
|
2328
|
-
if (!
|
|
2326
|
+
O || m(null, _);
|
|
2327
|
+
}, o.prototype.loadSync = function(c, p) {
|
|
2328
|
+
if (!u.isNode)
|
|
2329
2329
|
throw Error("not supported");
|
|
2330
|
-
return this.load(
|
|
2330
|
+
return this.load(c, p, r);
|
|
2331
2331
|
}, o.prototype.resolveAll = function() {
|
|
2332
2332
|
if (this.deferred.length)
|
|
2333
|
-
throw Error("unresolvable extensions: " + this.deferred.map(function(
|
|
2334
|
-
return "'extend " +
|
|
2333
|
+
throw Error("unresolvable extensions: " + this.deferred.map(function(c) {
|
|
2334
|
+
return "'extend " + c.extend + "' in " + c.parent.fullName;
|
|
2335
2335
|
}).join(", "));
|
|
2336
2336
|
return i.prototype.resolveAll.call(this);
|
|
2337
2337
|
};
|
|
2338
2338
|
var l = /^[A-Z]/;
|
|
2339
|
-
function d(
|
|
2340
|
-
var p =
|
|
2339
|
+
function d(h, c) {
|
|
2340
|
+
var p = c.parent.lookup(c.extend);
|
|
2341
2341
|
if (p) {
|
|
2342
|
-
var
|
|
2343
|
-
return p.get(
|
|
2342
|
+
var y = new e(c.fullName, c.id, c.type, c.rule, void 0, c.options);
|
|
2343
|
+
return p.get(y.name) || (y.declaringField = c, c.extensionField = y, p.add(y)), !0;
|
|
2344
2344
|
}
|
|
2345
2345
|
return !1;
|
|
2346
2346
|
}
|
|
2347
|
-
return o.prototype._handleAdd = function(
|
|
2348
|
-
if (
|
|
2347
|
+
return o.prototype._handleAdd = function(c) {
|
|
2348
|
+
if (c instanceof e)
|
|
2349
2349
|
/* an extension field (implies not part of a oneof) */
|
|
2350
|
-
|
|
2351
|
-
!
|
|
2352
|
-
else if (
|
|
2353
|
-
l.test(
|
|
2354
|
-
else if (!(
|
|
2355
|
-
if (
|
|
2350
|
+
c.extend !== void 0 && /* not already handled */
|
|
2351
|
+
!c.extensionField && (d(this, c) || this.deferred.push(c));
|
|
2352
|
+
else if (c instanceof n)
|
|
2353
|
+
l.test(c.name) && (c.parent[c.name] = c.values);
|
|
2354
|
+
else if (!(c instanceof f)) {
|
|
2355
|
+
if (c instanceof a)
|
|
2356
2356
|
for (var p = 0; p < this.deferred.length; )
|
|
2357
2357
|
d(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
|
|
2358
|
-
for (var
|
|
2359
|
-
|
|
2360
|
-
this._handleAdd(
|
|
2361
|
-
l.test(
|
|
2358
|
+
for (var y = 0; y < /* initializes */
|
|
2359
|
+
c.nestedArray.length; ++y)
|
|
2360
|
+
this._handleAdd(c._nestedArray[y]);
|
|
2361
|
+
l.test(c.name) && (c.parent[c.name] = c);
|
|
2362
2362
|
}
|
|
2363
|
-
}, o.prototype._handleRemove = function(
|
|
2364
|
-
if (
|
|
2363
|
+
}, o.prototype._handleRemove = function(c) {
|
|
2364
|
+
if (c instanceof e) {
|
|
2365
2365
|
if (
|
|
2366
2366
|
/* an extension field */
|
|
2367
|
-
|
|
2367
|
+
c.extend !== void 0
|
|
2368
2368
|
)
|
|
2369
2369
|
if (
|
|
2370
2370
|
/* already handled */
|
|
2371
|
-
|
|
2371
|
+
c.extensionField
|
|
2372
2372
|
)
|
|
2373
|
-
|
|
2373
|
+
c.extensionField.parent.remove(c.extensionField), c.extensionField = null;
|
|
2374
2374
|
else {
|
|
2375
|
-
var p = this.deferred.indexOf(
|
|
2375
|
+
var p = this.deferred.indexOf(c);
|
|
2376
2376
|
p > -1 && this.deferred.splice(p, 1);
|
|
2377
2377
|
}
|
|
2378
|
-
} else if (
|
|
2379
|
-
l.test(
|
|
2380
|
-
else if (
|
|
2381
|
-
for (var
|
|
2382
|
-
|
|
2383
|
-
this._handleRemove(
|
|
2384
|
-
l.test(
|
|
2385
|
-
}
|
|
2386
|
-
}, o._configure = function(
|
|
2387
|
-
|
|
2378
|
+
} else if (c instanceof n)
|
|
2379
|
+
l.test(c.name) && delete c.parent[c.name];
|
|
2380
|
+
else if (c instanceof i) {
|
|
2381
|
+
for (var y = 0; y < /* initializes */
|
|
2382
|
+
c.nestedArray.length; ++y)
|
|
2383
|
+
this._handleRemove(c._nestedArray[y]);
|
|
2384
|
+
l.test(c.name) && delete c.parent[c.name];
|
|
2385
|
+
}
|
|
2386
|
+
}, o._configure = function(h, c, p) {
|
|
2387
|
+
a = h, t = c, s = p;
|
|
2388
2388
|
}, root;
|
|
2389
2389
|
}
|
|
2390
2390
|
var hasRequiredUtil;
|
|
2391
2391
|
function requireUtil() {
|
|
2392
2392
|
if (hasRequiredUtil) return util$1.exports;
|
|
2393
2393
|
hasRequiredUtil = 1;
|
|
2394
|
-
var i = util$1.exports = requireMinimal(), e = roots, n,
|
|
2394
|
+
var i = util$1.exports = requireMinimal(), e = roots, n, f;
|
|
2395
2395
|
i.codegen = codegen_1, i.fetch = fetch_1, i.path = path, i.fs = i.inquire("fs"), i.toArray = function(r) {
|
|
2396
2396
|
if (r) {
|
|
2397
|
-
for (var l = Object.keys(r), d = new Array(l.length),
|
|
2398
|
-
d[
|
|
2397
|
+
for (var l = Object.keys(r), d = new Array(l.length), h = 0; h < l.length; )
|
|
2398
|
+
d[h] = r[l[h++]];
|
|
2399
2399
|
return d;
|
|
2400
2400
|
}
|
|
2401
2401
|
return [];
|
|
2402
2402
|
}, i.toObject = function(r) {
|
|
2403
2403
|
for (var l = {}, d = 0; d < r.length; ) {
|
|
2404
|
-
var
|
|
2405
|
-
|
|
2404
|
+
var h = r[d++], c = r[d++];
|
|
2405
|
+
c !== void 0 && (l[h] = c);
|
|
2406
2406
|
}
|
|
2407
2407
|
return l;
|
|
2408
2408
|
};
|
|
2409
|
-
var
|
|
2409
|
+
var u = /\\/g, a = /"/g;
|
|
2410
2410
|
i.isReserved = function(r) {
|
|
2411
2411
|
return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(r);
|
|
2412
2412
|
}, i.safeProp = function(r) {
|
|
2413
|
-
return !/^[$\w_]+$/.test(r) || i.isReserved(r) ? '["' + r.replace(
|
|
2413
|
+
return !/^[$\w_]+$/.test(r) || i.isReserved(r) ? '["' + r.replace(u, "\\\\").replace(a, '\\"') + '"]' : "." + r;
|
|
2414
2414
|
}, i.ucFirst = function(r) {
|
|
2415
2415
|
return r.charAt(0).toUpperCase() + r.substring(1);
|
|
2416
2416
|
};
|
|
@@ -2432,27 +2432,27 @@ function requireUtil() {
|
|
|
2432
2432
|
return i.decorateEnum = function(r) {
|
|
2433
2433
|
if (r.$type)
|
|
2434
2434
|
return r.$type;
|
|
2435
|
-
|
|
2436
|
-
var l = new
|
|
2435
|
+
f || (f = require_enum());
|
|
2436
|
+
var l = new f("Enum" + s++, r);
|
|
2437
2437
|
return i.decorateRoot.add(l), Object.defineProperty(r, "$type", { value: l, enumerable: !1 }), l;
|
|
2438
2438
|
}, i.setProperty = function(r, l, d) {
|
|
2439
|
-
function c
|
|
2439
|
+
function h(c, p, y) {
|
|
2440
2440
|
var _ = p.shift();
|
|
2441
2441
|
if (_ === "__proto__" || _ === "prototype")
|
|
2442
|
-
return
|
|
2442
|
+
return c;
|
|
2443
2443
|
if (p.length > 0)
|
|
2444
|
-
|
|
2444
|
+
c[_] = h(c[_] || {}, p, y);
|
|
2445
2445
|
else {
|
|
2446
|
-
var v =
|
|
2447
|
-
v && (
|
|
2446
|
+
var v = c[_];
|
|
2447
|
+
v && (y = [].concat(v).concat(y)), c[_] = y;
|
|
2448
2448
|
}
|
|
2449
|
-
return
|
|
2449
|
+
return c;
|
|
2450
2450
|
}
|
|
2451
2451
|
if (typeof r != "object")
|
|
2452
2452
|
throw TypeError("dst must be an object");
|
|
2453
2453
|
if (!l)
|
|
2454
2454
|
throw TypeError("path must be specified");
|
|
2455
|
-
return l = l.split("."),
|
|
2455
|
+
return l = l.split("."), h(r, l, d);
|
|
2456
2456
|
}, Object.defineProperty(i, "decorateRoot", {
|
|
2457
2457
|
get: function() {
|
|
2458
2458
|
return e.decorated || (e.decorated = new (requireRoot())());
|
|
@@ -2464,12 +2464,12 @@ function requireObject() {
|
|
|
2464
2464
|
if (hasRequiredObject) return object;
|
|
2465
2465
|
hasRequiredObject = 1, object = n, n.className = "ReflectionObject";
|
|
2466
2466
|
var i = requireUtil(), e;
|
|
2467
|
-
function n(
|
|
2468
|
-
if (!i.isString(
|
|
2467
|
+
function n(f, u) {
|
|
2468
|
+
if (!i.isString(f))
|
|
2469
2469
|
throw TypeError("name must be a string");
|
|
2470
|
-
if (
|
|
2470
|
+
if (u && !i.isObject(u))
|
|
2471
2471
|
throw TypeError("options must be an object");
|
|
2472
|
-
this.options =
|
|
2472
|
+
this.options = u, this.parsedOptions = null, this.name = f, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
|
|
2473
2473
|
}
|
|
2474
2474
|
return Object.defineProperties(n.prototype, {
|
|
2475
2475
|
/**
|
|
@@ -2480,9 +2480,9 @@ function requireObject() {
|
|
|
2480
2480
|
*/
|
|
2481
2481
|
root: {
|
|
2482
2482
|
get: function() {
|
|
2483
|
-
for (var
|
|
2484
|
-
|
|
2485
|
-
return
|
|
2483
|
+
for (var f = this; f.parent !== null; )
|
|
2484
|
+
f = f.parent;
|
|
2485
|
+
return f;
|
|
2486
2486
|
}
|
|
2487
2487
|
},
|
|
2488
2488
|
/**
|
|
@@ -2493,76 +2493,76 @@ function requireObject() {
|
|
|
2493
2493
|
*/
|
|
2494
2494
|
fullName: {
|
|
2495
2495
|
get: function() {
|
|
2496
|
-
for (var
|
|
2497
|
-
|
|
2498
|
-
return
|
|
2496
|
+
for (var f = [this.name], u = this.parent; u; )
|
|
2497
|
+
f.unshift(u.name), u = u.parent;
|
|
2498
|
+
return f.join(".");
|
|
2499
2499
|
}
|
|
2500
2500
|
}
|
|
2501
2501
|
}), n.prototype.toJSON = /* istanbul ignore next */
|
|
2502
2502
|
function() {
|
|
2503
2503
|
throw Error();
|
|
2504
|
-
}, n.prototype.onAdd = function(
|
|
2505
|
-
this.parent && this.parent !==
|
|
2506
|
-
var
|
|
2507
|
-
|
|
2508
|
-
}, n.prototype.onRemove = function(
|
|
2509
|
-
var
|
|
2510
|
-
|
|
2504
|
+
}, n.prototype.onAdd = function(u) {
|
|
2505
|
+
this.parent && this.parent !== u && this.parent.remove(this), this.parent = u, this.resolved = !1;
|
|
2506
|
+
var a = u.root;
|
|
2507
|
+
a instanceof e && a._handleAdd(this);
|
|
2508
|
+
}, n.prototype.onRemove = function(u) {
|
|
2509
|
+
var a = u.root;
|
|
2510
|
+
a instanceof e && a._handleRemove(this), this.parent = null, this.resolved = !1;
|
|
2511
2511
|
}, n.prototype.resolve = function() {
|
|
2512
2512
|
return this.resolved ? this : (this.root instanceof e && (this.resolved = !0), this);
|
|
2513
|
-
}, n.prototype.getOption = function(
|
|
2513
|
+
}, n.prototype.getOption = function(u) {
|
|
2514
2514
|
if (this.options)
|
|
2515
|
-
return this.options[
|
|
2516
|
-
}, n.prototype.setOption = function(
|
|
2517
|
-
return (!t || !this.options || this.options[
|
|
2518
|
-
}, n.prototype.setParsedOption = function(
|
|
2515
|
+
return this.options[u];
|
|
2516
|
+
}, n.prototype.setOption = function(u, a, t) {
|
|
2517
|
+
return (!t || !this.options || this.options[u] === void 0) && ((this.options || (this.options = {}))[u] = a), this;
|
|
2518
|
+
}, n.prototype.setParsedOption = function(u, a, t) {
|
|
2519
2519
|
this.parsedOptions || (this.parsedOptions = []);
|
|
2520
2520
|
var s = this.parsedOptions;
|
|
2521
2521
|
if (t) {
|
|
2522
2522
|
var o = s.find(function(d) {
|
|
2523
|
-
return Object.prototype.hasOwnProperty.call(d,
|
|
2523
|
+
return Object.prototype.hasOwnProperty.call(d, u);
|
|
2524
2524
|
});
|
|
2525
2525
|
if (o) {
|
|
2526
|
-
var r = o[
|
|
2527
|
-
i.setProperty(r, t,
|
|
2526
|
+
var r = o[u];
|
|
2527
|
+
i.setProperty(r, t, a);
|
|
2528
2528
|
} else
|
|
2529
|
-
o = {}, o[
|
|
2529
|
+
o = {}, o[u] = i.setProperty({}, t, a), s.push(o);
|
|
2530
2530
|
} else {
|
|
2531
2531
|
var l = {};
|
|
2532
|
-
l[
|
|
2532
|
+
l[u] = a, s.push(l);
|
|
2533
2533
|
}
|
|
2534
2534
|
return this;
|
|
2535
|
-
}, n.prototype.setOptions = function(
|
|
2536
|
-
if (
|
|
2537
|
-
for (var t = Object.keys(
|
|
2538
|
-
this.setOption(t[s],
|
|
2535
|
+
}, n.prototype.setOptions = function(u, a) {
|
|
2536
|
+
if (u)
|
|
2537
|
+
for (var t = Object.keys(u), s = 0; s < t.length; ++s)
|
|
2538
|
+
this.setOption(t[s], u[t[s]], a);
|
|
2539
2539
|
return this;
|
|
2540
2540
|
}, n.prototype.toString = function() {
|
|
2541
|
-
var
|
|
2542
|
-
return
|
|
2543
|
-
}, n._configure = function(
|
|
2544
|
-
e =
|
|
2541
|
+
var u = this.constructor.className, a = this.fullName;
|
|
2542
|
+
return a.length ? u + " " + a : u;
|
|
2543
|
+
}, n._configure = function(f) {
|
|
2544
|
+
e = f;
|
|
2545
2545
|
}, object;
|
|
2546
2546
|
}
|
|
2547
2547
|
var _enum, hasRequired_enum;
|
|
2548
2548
|
function require_enum() {
|
|
2549
2549
|
if (hasRequired_enum) return _enum;
|
|
2550
|
-
hasRequired_enum = 1, _enum =
|
|
2550
|
+
hasRequired_enum = 1, _enum = f;
|
|
2551
2551
|
var i = requireObject();
|
|
2552
|
-
((
|
|
2552
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "Enum";
|
|
2553
2553
|
var e = requireNamespace(), n = requireUtil();
|
|
2554
|
-
function
|
|
2555
|
-
if (i.call(this,
|
|
2554
|
+
function f(u, a, t, s, o, r) {
|
|
2555
|
+
if (i.call(this, u, t), a && typeof a != "object")
|
|
2556
2556
|
throw TypeError("values must be an object");
|
|
2557
|
-
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = o || {}, this.valuesOptions = r, this.reserved = void 0,
|
|
2558
|
-
for (var l = Object.keys(
|
|
2559
|
-
typeof
|
|
2557
|
+
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = o || {}, this.valuesOptions = r, this.reserved = void 0, a)
|
|
2558
|
+
for (var l = Object.keys(a), d = 0; d < l.length; ++d)
|
|
2559
|
+
typeof a[l[d]] == "number" && (this.valuesById[this.values[l[d]] = a[l[d]]] = l[d]);
|
|
2560
2560
|
}
|
|
2561
|
-
return
|
|
2562
|
-
var s = new a
|
|
2561
|
+
return f.fromJSON = function(a, t) {
|
|
2562
|
+
var s = new f(a, t.values, t.options, t.comment, t.comments);
|
|
2563
2563
|
return s.reserved = t.reserved, s;
|
|
2564
|
-
},
|
|
2565
|
-
var t =
|
|
2564
|
+
}, f.prototype.toJSON = function(a) {
|
|
2565
|
+
var t = a ? !!a.keepComments : !1;
|
|
2566
2566
|
return n.toObject([
|
|
2567
2567
|
"options",
|
|
2568
2568
|
this.options,
|
|
@@ -2577,52 +2577,52 @@ function require_enum() {
|
|
|
2577
2577
|
"comments",
|
|
2578
2578
|
t ? this.comments : void 0
|
|
2579
2579
|
]);
|
|
2580
|
-
},
|
|
2581
|
-
if (!n.isString(
|
|
2580
|
+
}, f.prototype.add = function(a, t, s, o) {
|
|
2581
|
+
if (!n.isString(a))
|
|
2582
2582
|
throw TypeError("name must be a string");
|
|
2583
2583
|
if (!n.isInteger(t))
|
|
2584
2584
|
throw TypeError("id must be an integer");
|
|
2585
|
-
if (this.values[
|
|
2586
|
-
throw Error("duplicate name '" +
|
|
2585
|
+
if (this.values[a] !== void 0)
|
|
2586
|
+
throw Error("duplicate name '" + a + "' in " + this);
|
|
2587
2587
|
if (this.isReservedId(t))
|
|
2588
2588
|
throw Error("id " + t + " is reserved in " + this);
|
|
2589
|
-
if (this.isReservedName(
|
|
2590
|
-
throw Error("name '" +
|
|
2589
|
+
if (this.isReservedName(a))
|
|
2590
|
+
throw Error("name '" + a + "' is reserved in " + this);
|
|
2591
2591
|
if (this.valuesById[t] !== void 0) {
|
|
2592
2592
|
if (!(this.options && this.options.allow_alias))
|
|
2593
2593
|
throw Error("duplicate id " + t + " in " + this);
|
|
2594
|
-
this.values[
|
|
2594
|
+
this.values[a] = t;
|
|
2595
2595
|
} else
|
|
2596
|
-
this.valuesById[this.values[
|
|
2597
|
-
return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[
|
|
2598
|
-
},
|
|
2599
|
-
if (!n.isString(
|
|
2596
|
+
this.valuesById[this.values[a] = t] = a;
|
|
2597
|
+
return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[a] = o || null), this.comments[a] = s || null, this;
|
|
2598
|
+
}, f.prototype.remove = function(a) {
|
|
2599
|
+
if (!n.isString(a))
|
|
2600
2600
|
throw TypeError("name must be a string");
|
|
2601
|
-
var t = this.values[
|
|
2601
|
+
var t = this.values[a];
|
|
2602
2602
|
if (t == null)
|
|
2603
|
-
throw Error("name '" +
|
|
2604
|
-
return delete this.valuesById[t], delete this.values[
|
|
2605
|
-
},
|
|
2606
|
-
return e.isReservedId(this.reserved,
|
|
2607
|
-
},
|
|
2608
|
-
return e.isReservedName(this.reserved,
|
|
2603
|
+
throw Error("name '" + a + "' does not exist in " + this);
|
|
2604
|
+
return delete this.valuesById[t], delete this.values[a], delete this.comments[a], this.valuesOptions && delete this.valuesOptions[a], this;
|
|
2605
|
+
}, f.prototype.isReservedId = function(a) {
|
|
2606
|
+
return e.isReservedId(this.reserved, a);
|
|
2607
|
+
}, f.prototype.isReservedName = function(a) {
|
|
2608
|
+
return e.isReservedName(this.reserved, a);
|
|
2609
2609
|
}, _enum;
|
|
2610
2610
|
}
|
|
2611
2611
|
var encoder_1, hasRequiredEncoder;
|
|
2612
2612
|
function requireEncoder() {
|
|
2613
2613
|
if (hasRequiredEncoder) return encoder_1;
|
|
2614
|
-
hasRequiredEncoder = 1, encoder_1 =
|
|
2614
|
+
hasRequiredEncoder = 1, encoder_1 = u;
|
|
2615
2615
|
var i = require_enum(), e = requireTypes(), n = requireUtil();
|
|
2616
|
-
function a
|
|
2617
|
-
return t.resolvedType.group ?
|
|
2616
|
+
function f(a, t, s, o) {
|
|
2617
|
+
return t.resolvedType.group ? a("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", s, o, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : a("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", s, o, (t.id << 3 | 2) >>> 0);
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2620
|
-
for (var t = n.codegen(["m", "w"],
|
|
2619
|
+
function u(a) {
|
|
2620
|
+
for (var t = n.codegen(["m", "w"], a.name + "$encode")("if(!w)")("w=Writer.create()"), s, o, r = (
|
|
2621
2621
|
/* initializes */
|
|
2622
|
-
|
|
2622
|
+
a.fieldsArray.slice().sort(n.compareFieldsById)
|
|
2623
2623
|
), s = 0; s < r.length; ++s) {
|
|
2624
|
-
var l = r[s].resolve(), d =
|
|
2625
|
-
o = "m" + n.safeProp(l.name), l.map ? (t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", o, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType),
|
|
2624
|
+
var l = r[s].resolve(), d = a._fieldsArray.indexOf(l), h = l.resolvedType instanceof i ? "int32" : l.type, c = e.basic[h];
|
|
2625
|
+
o = "m" + n.safeProp(l.name), l.map ? (t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", o, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType), c === void 0 ? t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", d, o) : t(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | c, h, o), t("}")("}")) : l.repeated ? (t("if(%s!=null&&%s.length){", o, o), l.packed && e.packed[h] !== void 0 ? t("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", o)("w.%s(%s[i])", h, o)("w.ldelim()") : (t("for(var i=0;i<%s.length;++i)", o), c === void 0 ? f(t, l, d, o + "[i]") : t("w.uint32(%i).%s(%s[i])", (l.id << 3 | c) >>> 0, h, o)), t("}")) : (l.optional && t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", o, l.name), c === void 0 ? f(t, l, d, o) : t("w.uint32(%i).%s(%s)", (l.id << 3 | c) >>> 0, h, o));
|
|
2626
2626
|
}
|
|
2627
2627
|
return t("return w");
|
|
2628
2628
|
}
|
|
@@ -2664,36 +2664,36 @@ var indexLightExports = indexLight.exports, light = indexLightExports;
|
|
|
2664
2664
|
const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2, MessageType_FrameLoaded: 3, MessageType_FrameSubscribe: 4, MessageType_FrameUnsubscribe: 5, MessageType_ValueRequest: 6, MessageType_ValueResponse: 7, MessageType_ValueUpdate: 8, MessageType_SignalRequest: 9, MessageType_SignalResponse: 10, MessageType_SignalNotify: 11, MessageType_FileRequest: 12, MessageType_FileResponse: 13 } }, FrameRequest: { fields: { id: { type: "string", id: 1 } } }, FrameResponse: { oneofs: { value: { oneof: ["file", "content"] } }, fields: { id: { type: "string", id: 1 }, file: { type: "string", id: 2 }, content: { type: "string", id: 3 } } }, FrameCache: { fields: { id: { type: "string", id: 1 }, content: { type: "string", id: 2 }, files: { rule: "repeated", type: "FileInfo", id: 3 } } }, FrameLoaded: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameSubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameUnsubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, Value: { oneofs: { value: { oneof: ["value_boolean", "value_number", "value_double", "value_string", "value_buffer"] } }, fields: { id: { type: "string", id: 1 }, value_boolean: { type: "bool", id: 2 }, value_number: { type: "int64", id: 3 }, value_double: { type: "double", id: 4 }, value_string: { type: "string", id: 5 }, value_buffer: { type: "bytes", id: 6 } } }, ValueRequest: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, ValueResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, values: { rule: "repeated", type: "Value", id: 3 } } }, ValueUpdate: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, value: { type: "Value", id: 3 } } }, SignalRequest: { fields: { id: { type: "string", id: 1 } } }, Signal: { oneofs: { _type: { oneof: ["type"] } }, fields: { id: { type: "string", id: 1 }, type: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, SignalResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signals: { rule: "repeated", type: "Signal", id: 3 } } }, SignalNotify: { oneofs: { _tag: { oneof: ["tag"] }, arg: { oneof: ["arg_boolean", "arg_number", "arg_double", "arg_string", "arg_buffer"] } }, fields: { frame_id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signal_id: { type: "string", id: 3 }, arg_boolean: { type: "bool", id: 4 }, arg_number: { type: "int64", id: 5 }, arg_double: { type: "double", id: 6 }, arg_string: { type: "string", id: 7 }, arg_buffer: { type: "bytes", id: 8 } } }, FileRequest: { fields: { target: { type: "string", id: 1 } } }, FileResponse: { fields: { target: { type: "string", id: 1 }, content: { type: "string", id: 2 }, metadata: { type: "bytes", id: 3 } } }, FileInfo: { fields: { target: { type: "string", id: 1 }, metadata: { type: "bytes", id: 2 } } } } } } } } } } }, nil_xit_proto = protobufjs.Root.fromJSON(proto_data).lookup(
|
|
2665
2665
|
"nil.xit.proto"
|
|
2666
2666
|
), bundle = async (i) => new Promise((e, n) => {
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2669
|
-
if (
|
|
2670
|
-
if (
|
|
2671
|
-
const
|
|
2667
|
+
const f = new WorkerWrapper();
|
|
2668
|
+
f.postMessage({ type: "init", host: i.host, id: i.id, cdn_url: i.cdn_url }), f.addEventListener("message", async (u) => {
|
|
2669
|
+
if (u.data.ok) {
|
|
2670
|
+
if (u.data.files) {
|
|
2671
|
+
const a = concat([
|
|
2672
2672
|
header(nil_xit_proto.MessageType.MessageType_FrameCache),
|
|
2673
2673
|
nil_xit_proto.FrameCache.encode({
|
|
2674
2674
|
id: i.id,
|
|
2675
|
-
content:
|
|
2676
|
-
files:
|
|
2675
|
+
content: u.data.code,
|
|
2676
|
+
files: u.data.files
|
|
2677
2677
|
}).finish()
|
|
2678
2678
|
]);
|
|
2679
|
-
service_publish({ host: i.host },
|
|
2679
|
+
service_publish({ host: i.host }, a);
|
|
2680
2680
|
}
|
|
2681
2681
|
e(await import(
|
|
2682
2682
|
/* @vite-ignore */
|
|
2683
|
-
|
|
2683
|
+
u.data.code
|
|
2684
2684
|
));
|
|
2685
2685
|
} else
|
|
2686
|
-
n(
|
|
2687
|
-
|
|
2686
|
+
n(u.data.err);
|
|
2687
|
+
f.terminate();
|
|
2688
2688
|
});
|
|
2689
2689
|
}), noop = (i) => {
|
|
2690
2690
|
}, make_values = async ({
|
|
2691
2691
|
id: i,
|
|
2692
2692
|
tag: e,
|
|
2693
2693
|
host: n,
|
|
2694
|
-
service:
|
|
2694
|
+
service: f
|
|
2695
2695
|
}) => {
|
|
2696
|
-
const
|
|
2696
|
+
const u = await service_fetch(
|
|
2697
2697
|
{ host: n },
|
|
2698
2698
|
concat([
|
|
2699
2699
|
header(nil_xit_proto.MessageType.MessageType_ValueRequest),
|
|
@@ -2706,7 +2706,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2706
2706
|
return r.values;
|
|
2707
2707
|
}
|
|
2708
2708
|
}
|
|
2709
|
-
),
|
|
2709
|
+
), a = {
|
|
2710
2710
|
value_boolean: /* @__PURE__ */ new Map(),
|
|
2711
2711
|
value_double: /* @__PURE__ */ new Map(),
|
|
2712
2712
|
value_number: /* @__PURE__ */ new Map(),
|
|
@@ -2714,55 +2714,55 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2714
2714
|
value_buffer: /* @__PURE__ */ new Map()
|
|
2715
2715
|
};
|
|
2716
2716
|
let t = !1;
|
|
2717
|
-
for (const s of
|
|
2717
|
+
for (const s of u) {
|
|
2718
2718
|
const o = s.id, r = s.value, l = writable(s[r]);
|
|
2719
2719
|
l.subscribe((d) => {
|
|
2720
2720
|
if (t)
|
|
2721
2721
|
return;
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2722
|
+
const h = { id: o, [r]: d, value: r }, c = { id: i, tag: e, value: h };
|
|
2723
|
+
f.publish(
|
|
2724
2724
|
concat([
|
|
2725
2725
|
header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
|
|
2726
|
-
nil_xit_proto.ValueUpdate.encode(
|
|
2726
|
+
nil_xit_proto.ValueUpdate.encode(c).finish()
|
|
2727
2727
|
])
|
|
2728
2728
|
);
|
|
2729
|
-
}),
|
|
2729
|
+
}), a[r].set(o, l);
|
|
2730
2730
|
}
|
|
2731
|
-
return
|
|
2731
|
+
return f.on_message((s, o) => {
|
|
2732
2732
|
var d;
|
|
2733
2733
|
const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4);
|
|
2734
2734
|
if (r === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
|
|
2735
|
-
const
|
|
2736
|
-
if (
|
|
2735
|
+
const h = nil_xit_proto.ValueUpdate.decode(l);
|
|
2736
|
+
if (h.id === i && (h.tag === null || e === h.tag)) {
|
|
2737
2737
|
t = !0;
|
|
2738
|
-
const
|
|
2739
|
-
if (
|
|
2740
|
-
const
|
|
2738
|
+
const c = h.value.value, p = (d = a[c]) == null ? void 0 : d.get(h.value.id);
|
|
2739
|
+
if (c === "value_buffer") {
|
|
2740
|
+
const y = h.value[c], _ = get(p);
|
|
2741
2741
|
let v = !0;
|
|
2742
|
-
if (
|
|
2742
|
+
if (y.length != _.length)
|
|
2743
2743
|
v = !1;
|
|
2744
2744
|
else {
|
|
2745
|
-
const
|
|
2746
|
-
for (let g = 0; g <
|
|
2747
|
-
if (
|
|
2745
|
+
const m = y.length;
|
|
2746
|
+
for (let g = 0; g < m; g++)
|
|
2747
|
+
if (y[g] !== _[g]) {
|
|
2748
2748
|
v = !1;
|
|
2749
2749
|
break;
|
|
2750
2750
|
}
|
|
2751
2751
|
}
|
|
2752
|
-
v || p == null || p.set(
|
|
2752
|
+
v || p == null || p.set(y);
|
|
2753
2753
|
} else
|
|
2754
|
-
p == null || p.set(
|
|
2754
|
+
p == null || p.set(h.value[c]);
|
|
2755
2755
|
t = !1;
|
|
2756
2756
|
}
|
|
2757
2757
|
}
|
|
2758
|
-
}),
|
|
2758
|
+
}), a;
|
|
2759
2759
|
}, make_signals = async ({
|
|
2760
2760
|
id: i,
|
|
2761
2761
|
tag: e,
|
|
2762
2762
|
host: n,
|
|
2763
|
-
service:
|
|
2763
|
+
service: f
|
|
2764
2764
|
}) => {
|
|
2765
|
-
const
|
|
2765
|
+
const u = await service_fetch(
|
|
2766
2766
|
{ host: n },
|
|
2767
2767
|
concat([
|
|
2768
2768
|
header(nil_xit_proto.MessageType.MessageType_SignalRequest),
|
|
@@ -2775,7 +2775,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2775
2775
|
return o.signals;
|
|
2776
2776
|
}
|
|
2777
2777
|
}
|
|
2778
|
-
),
|
|
2778
|
+
), a = {
|
|
2779
2779
|
arg_none: /* @__PURE__ */ new Map(),
|
|
2780
2780
|
arg_boolean: /* @__PURE__ */ new Map(),
|
|
2781
2781
|
arg_double: /* @__PURE__ */ new Map(),
|
|
@@ -2783,129 +2783,155 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2783
2783
|
arg_string: /* @__PURE__ */ new Map(),
|
|
2784
2784
|
arg_buffer: /* @__PURE__ */ new Map()
|
|
2785
2785
|
};
|
|
2786
|
-
for (const { id: t, type: s } of
|
|
2787
|
-
s == null ?
|
|
2786
|
+
for (const { id: t, type: s } of u)
|
|
2787
|
+
s == null ? a.arg_none.set(t, () => {
|
|
2788
2788
|
const o = { frame_id: i, signal_id: t, tag: e };
|
|
2789
|
-
|
|
2789
|
+
f.publish(
|
|
2790
2790
|
concat([
|
|
2791
2791
|
header(nil_xit_proto.MessageType.MessageType_SignalNotify),
|
|
2792
2792
|
nil_xit_proto.SignalNotify.encode(o).finish()
|
|
2793
2793
|
])
|
|
2794
2794
|
);
|
|
2795
|
-
}) :
|
|
2795
|
+
}) : a[s].set(t, (o) => {
|
|
2796
2796
|
const r = { frame_id: i, signal_id: t, tag: e, [s]: o };
|
|
2797
|
-
|
|
2797
|
+
f.publish(
|
|
2798
2798
|
concat([
|
|
2799
2799
|
header(nil_xit_proto.MessageType.MessageType_SignalNotify),
|
|
2800
2800
|
nil_xit_proto.SignalNotify.encode(r).finish()
|
|
2801
2801
|
])
|
|
2802
2802
|
);
|
|
2803
2803
|
});
|
|
2804
|
-
return
|
|
2805
|
-
},
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
update
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
bundle({ host: i, cdn_url: a, id: e })
|
|
2852
|
-
]), l = {
|
|
2853
|
-
svelte: () => import("./svelte/index.js").then((p) => p.bT),
|
|
2854
|
-
"svelte/store": () => import("./svelte/store.js").then((p) => p.i),
|
|
2804
|
+
return a;
|
|
2805
|
+
}, create_context_values = (i) => ({
|
|
2806
|
+
boolean: (e, n) => i.value_boolean.get(e) ?? writable(n),
|
|
2807
|
+
double: (e, n) => i.value_double.get(e) ?? writable(n),
|
|
2808
|
+
string: (e, n) => i.value_string.get(e) ?? writable(n),
|
|
2809
|
+
number: (e, n) => i.value_number.get(e) ?? writable(n),
|
|
2810
|
+
buffer: (e, n) => i.value_buffer.get(e) ?? writable(n),
|
|
2811
|
+
json: (e, n, f) => {
|
|
2812
|
+
const u = i.value_buffer.get(e);
|
|
2813
|
+
if (u != null) {
|
|
2814
|
+
let a = get(u), t = f.decode(a);
|
|
2815
|
+
return {
|
|
2816
|
+
set: (s) => {
|
|
2817
|
+
t = s, a = f.encode(t), u.set(a);
|
|
2818
|
+
},
|
|
2819
|
+
subscribe: (s) => u.subscribe((o) => {
|
|
2820
|
+
o !== a && (a = o, t = f.decode(a)), s(t);
|
|
2821
|
+
}),
|
|
2822
|
+
update: (s) => {
|
|
2823
|
+
u.update((o) => (t = s(t), a = f.encode(t), a));
|
|
2824
|
+
}
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
return writable(n);
|
|
2828
|
+
}
|
|
2829
|
+
}), create_context_signals = (i) => ({
|
|
2830
|
+
none: (e) => i.arg_none.get(e) ?? (() => {
|
|
2831
|
+
}),
|
|
2832
|
+
boolean: (e) => i.arg_boolean.get(e) ?? noop,
|
|
2833
|
+
double: (e) => i.arg_double.get(e) ?? noop,
|
|
2834
|
+
number: (e) => i.arg_number.get(e) ?? noop,
|
|
2835
|
+
string: (e) => i.arg_string.get(e) ?? noop,
|
|
2836
|
+
buffer: (e) => i.arg_buffer.get(e) ?? noop,
|
|
2837
|
+
json: (e, n) => {
|
|
2838
|
+
const f = i.arg_buffer.get(e);
|
|
2839
|
+
return f != null ? (u) => f(n(u)) : noop;
|
|
2840
|
+
}
|
|
2841
|
+
}), create_component$1 = async (i, e, n, f, u, a) => {
|
|
2842
|
+
const t = { host: i };
|
|
2843
|
+
await test_connection(t);
|
|
2844
|
+
const s = new Service$1(t), [o, r, { nil_xit_fn: l }] = await Promise.all([
|
|
2845
|
+
make_values({ id: e, tag: n, host: i, service: s }),
|
|
2846
|
+
make_signals({ id: e, tag: n, host: i, service: s }),
|
|
2847
|
+
bundle({ host: i, cdn_url: f, id: e })
|
|
2848
|
+
]), d = {
|
|
2849
|
+
svelte: () => import("./svelte/index.js").then((y) => y.bW),
|
|
2850
|
+
"svelte/store": () => import("./svelte/store.js").then((y) => y.i),
|
|
2855
2851
|
"svelte/animate": () => import("./svelte/animate.js"),
|
|
2856
2852
|
"svelte/easing": () => import("./svelte/easing.js"),
|
|
2857
2853
|
"svelte/events": () => import("./svelte/events.js"),
|
|
2858
|
-
"svelte/motion": () => import("./svelte/motion.js").then((
|
|
2854
|
+
"svelte/motion": () => import("./svelte/motion.js").then((y) => y.i),
|
|
2859
2855
|
"svelte/transition": () => import("./svelte/transition.js"),
|
|
2860
2856
|
// @ts-ignore
|
|
2861
2857
|
"svelte/internal/disclose-version": () => import("./svelte/internal/disclose-version.js"),
|
|
2862
2858
|
// @ts-ignore
|
|
2863
2859
|
"svelte/internal/client": () => import("./svelte/internal/client.js")
|
|
2864
|
-
},
|
|
2860
|
+
}, h = (y) => y in d ? d[y]() : import(
|
|
2865
2861
|
/* @vite-ignore */
|
|
2866
|
-
|
|
2867
|
-
), { action: c } = await
|
|
2862
|
+
y
|
|
2863
|
+
), { action: c } = await l(h), p = concat([
|
|
2868
2864
|
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2869
2865
|
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2870
2866
|
]);
|
|
2871
|
-
return
|
|
2872
|
-
const
|
|
2867
|
+
return s.start(), s.on_connect(() => {
|
|
2868
|
+
const y = concat([
|
|
2873
2869
|
header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
|
|
2874
2870
|
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2875
2871
|
]);
|
|
2876
|
-
|
|
2877
|
-
}), service_publish(
|
|
2878
|
-
const
|
|
2879
|
-
|
|
2880
|
-
|
|
2872
|
+
s.publish(y);
|
|
2873
|
+
}), service_publish(t, p), (y) => {
|
|
2874
|
+
const _ = /* @__PURE__ */ new Map();
|
|
2875
|
+
_.set("nil.xit", {
|
|
2876
|
+
values: create_context_values(o),
|
|
2877
|
+
signals: create_context_signals(r),
|
|
2878
|
+
frame_ui: u,
|
|
2879
|
+
frame: a
|
|
2880
|
+
});
|
|
2881
|
+
const { destroy: v } = c(y, _);
|
|
2881
2882
|
return {
|
|
2882
2883
|
destroy: () => {
|
|
2883
|
-
|
|
2884
|
+
s.stop(), v();
|
|
2884
2885
|
}
|
|
2885
2886
|
};
|
|
2886
2887
|
};
|
|
2887
|
-
},
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
)
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2888
|
+
}, create_frame = async ({
|
|
2889
|
+
server: i,
|
|
2890
|
+
frame: e,
|
|
2891
|
+
tag: n
|
|
2892
|
+
}) => {
|
|
2893
|
+
const f = { host: i };
|
|
2894
|
+
await test_connection(f);
|
|
2895
|
+
const u = new Service$1(f), [a, t] = await Promise.all([
|
|
2896
|
+
make_values({ id: e, tag: n ?? null, host: i, service: u }),
|
|
2897
|
+
make_signals({ id: e, tag: n ?? null, host: i, service: u })
|
|
2898
|
+
]), s = concat([
|
|
2899
|
+
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2900
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
|
|
2901
|
+
]);
|
|
2902
|
+
return u.start(), u.on_connect(() => {
|
|
2903
|
+
const o = concat([
|
|
2904
|
+
header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
|
|
2905
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
|
|
2906
|
+
]);
|
|
2907
|
+
u.publish(o);
|
|
2908
|
+
}), service_publish(f, s), { values: create_context_values(a), signals: create_context_signals(t) };
|
|
2909
|
+
}, create_frame_ui = async ({
|
|
2910
|
+
server: i,
|
|
2911
|
+
cdn_url: e,
|
|
2912
|
+
frame: n,
|
|
2913
|
+
tag: f
|
|
2914
|
+
}) => {
|
|
2915
|
+
const u = async (a, t) => {
|
|
2916
|
+
const s = await create_frame_ui({
|
|
2917
|
+
server: i,
|
|
2918
|
+
cdn_url: e,
|
|
2919
|
+
frame: a,
|
|
2920
|
+
tag: t
|
|
2921
|
+
});
|
|
2922
|
+
return (o) => s(o);
|
|
2903
2923
|
};
|
|
2904
|
-
return
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2924
|
+
return create_component$1(
|
|
2925
|
+
i,
|
|
2926
|
+
n,
|
|
2927
|
+
f ?? null,
|
|
2928
|
+
e,
|
|
2929
|
+
async (a, t) => u(a, t),
|
|
2930
|
+
async (a, t) => create_frame({ server: i, frame: a, tag: t })
|
|
2931
|
+
);
|
|
2932
|
+
}, create_component = async (i, e) => (await create_frame_ui(e))(i);
|
|
2909
2933
|
export {
|
|
2910
|
-
create_component
|
|
2934
|
+
create_component,
|
|
2935
|
+
create_frame,
|
|
2936
|
+
create_frame_ui
|
|
2911
2937
|
};
|