@nil-/xit 0.1.17 → 0.1.18

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/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), $ = (i, e, n, a) => (C(i, e, "write to private field"), a ? a.call(i, n) : e.set(i, n), n), W = (i, e, n) => (C(i, e, "access private method"), 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, S, U;
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, S);
18
- $(this, N, `${e ?? "localhost"}${n != null ? `:${n}` : ""}`), $(this, x, 0), $(this, M, null), $(this, D, null), $(this, L, null), $(this, S, null);
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
- $(this, L, e);
21
+ S(this, L, e);
22
22
  }
23
23
  on_connect(e) {
24
- $(this, M, e);
24
+ S(this, M, e);
25
25
  }
26
26
  on_disconnect(e) {
27
- $(this, D, e);
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, S) == null && w(this, x) !== 1 && w(this, x) !== 3 && ($(this, S, new WebSocket(`ws://${w(this, N)}`)), w(this, S).binaryType = "arraybuffer", w(this, S).onopen = () => {
33
- $(this, x, 1), w(this, M) && w(this, M).call(this, w(this, N));
34
- }, w(this, S).onclose = () => {
35
- w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)), $(this, x, 2), W(this, j, I).call(this));
36
- }, w(this, S).onerror = () => {
37
- w(this, x) !== 1 && w(this, x) !== 3 && ($(this, x, 2), W(this, j, I).call(this));
38
- }, w(this, S).onmessage = (e) => {
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
- $(this, x, 3), w(this, S) != null && (w(this, S).close(), $(this, S, null));
43
+ S(this, x, 3), w(this, $) != null && (w(this, $).close(), S(this, $, null));
44
44
  }
45
45
  restart() {
46
- $(this, x, 0);
46
+ S(this, x, 0);
47
47
  }
48
48
  publish(e) {
49
- w(this, S) != null && w(this, x) == 1 && w(this, S).send(e);
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, S) != null && (w(this, S).close(), $(this, S, null)), setTimeout(() => this.start(), 1e3);
56
- }, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(), S = new WeakMap(), U);
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((a, f) => a + f.length, 0));
61
+ const e = new Uint8Array(i.reduce((f, u) => f + u.length, 0));
62
62
  let n = 0;
63
- for (const a of i)
64
- e.set(a, n), n += a.length;
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 a = new Service$1(i), f = setTimeout(() => {
68
- a.stop(), n("connection failed... stopping");
67
+ const f = new Service$1(i), u = setTimeout(() => {
68
+ f.stop(), n("connection failed... stopping");
69
69
  }, 2500);
70
- a.on_connect(() => {
71
- console.log("connection tested... proceeding"), clearTimeout(f), a.stop(), e();
72
- }), a.start();
73
- }), service_fetch = async (i, e, n) => new Promise((a, f) => {
74
- const u = new Service$1(i), t = setTimeout(() => {
75
- u.stop(), f("timed out, cancelled");
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
- u.on_connect(() => u.publish(e)), u.on_message((s, o) => {
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), u.stop(), a(d));
80
- }), u.start();
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), a = setTimeout(() => {
82
+ const n = new Service$1(i), f = setTimeout(() => {
83
83
  n.stop();
84
84
  }, 2500);
85
85
  n.on_connect(() => {
86
- clearTimeout(a), n.publish(e), n.stop();
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), a = 0, f = 2, u = !0; f < arguments.length; )
104
- n[a++] = arguments[f++];
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[a] = function(l) {
107
- if (u)
108
- if (u = !1, l)
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), c = 0; c < d.length; )
112
- d[c++] = arguments[c];
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
- u && (u = !1, o(r));
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), a = new Array(123), f = 0; f < 64; )
135
- a[n[f] = f < 26 ? f + 65 : f < 52 ? f + 71 : f < 62 ? f - 4 : f - 59 | 43] = f++;
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 = [], c = 0, h = 0, p; o < r; ) {
137
+ for (var l = null, d = [], h = 0, c = 0, p; o < r; ) {
138
138
  var m = s[o++];
139
- switch (h) {
139
+ switch (c) {
140
140
  case 0:
141
- d[c++] = n[m >> 2], p = (m & 3) << 4, h = 1;
141
+ d[h++] = n[m >> 2], p = (m & 3) << 4, c = 1;
142
142
  break;
143
143
  case 1:
144
- d[c++] = n[p | m >> 4], p = (m & 15) << 2, h = 2;
144
+ d[h++] = n[p | m >> 4], p = (m & 15) << 2, c = 2;
145
145
  break;
146
146
  case 2:
147
- d[c++] = n[p | m >> 6], d[c++] = n[m & 63], h = 0;
147
+ d[h++] = n[p | m >> 6], d[h++] = n[m & 63], c = 0;
148
148
  break;
149
149
  }
150
- c > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), c = 0);
150
+ h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), h = 0);
151
151
  }
152
- return h && (d[c++] = n[p], d[c++] = 61, h === 1 && (d[c++] = 61)), l ? (c && l.push(String.fromCharCode.apply(String, d.slice(0, c))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, c));
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 u = "invalid encoding";
154
+ var a = "invalid encoding";
155
155
  e.decode = function(s, o, r) {
156
- for (var l = r, d = 0, c, h = 0; h < s.length; ) {
157
- var p = s.charCodeAt(h++);
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 = a[p]) === void 0)
161
- throw Error(u);
160
+ if ((p = f[p]) === void 0)
161
+ throw Error(a);
162
162
  switch (d) {
163
163
  case 0:
164
- c = p, d = 1;
164
+ h = p, d = 1;
165
165
  break;
166
166
  case 1:
167
- o[r++] = c << 2 | (p & 48) >> 4, c = p, d = 2;
167
+ o[r++] = h << 2 | (p & 48) >> 4, h = p, d = 2;
168
168
  break;
169
169
  case 2:
170
- o[r++] = (c & 15) << 4 | (p & 60) >> 2, c = p, d = 3;
170
+ o[r++] = (h & 15) << 4 | (p & 60) >> 2, h = p, d = 3;
171
171
  break;
172
172
  case 3:
173
- o[r++] = (c & 3) << 6 | p, d = 0;
173
+ o[r++] = (h & 3) << 6 | p, d = 0;
174
174
  break;
175
175
  }
176
176
  }
177
177
  if (d === 1)
178
- throw Error(u);
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, a) {
188
+ EventEmitter.prototype.on = function(e, n, f) {
189
189
  return (this._listeners[e] || (this._listeners[e] = [])).push({
190
190
  fn: n,
191
- ctx: a || this
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 a = this._listeners[e], f = 0; f < a.length; )
201
- a[f].fn === n ? a.splice(f, 1) : ++f;
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 a = [], f = 1; f < arguments.length; )
208
- a.push(arguments[f++]);
209
- for (f = 0; f < n.length; )
210
- n[f].fn.apply(n[f++].ctx, a);
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), a = n[3] === 128;
218
- function f(o, r, l) {
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 u(o, r, l) {
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 = a ? f : u, i.writeFloatBE = a ? u : f;
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 = a ? t : s, i.readFloatBE = a ? s : t;
231
+ i.readFloatLE = f ? t : s, i.readFloatBE = f ? s : t;
232
232
  }() : function() {
233
- function e(a, f, u, t) {
234
- var s = f < 0 ? 1 : 0;
235
- if (s && (f = -f), f === 0)
236
- a(1 / f > 0 ? (
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
- ), u, t);
243
- else if (isNaN(f))
244
- a(2143289344, u, t);
245
- else if (f > 34028234663852886e22)
246
- a((s << 31 | 2139095040) >>> 0, u, t);
247
- else if (f < 11754943508222875e-54)
248
- a((s << 31 | Math.round(f / 1401298464324817e-60)) >>> 0, u, t);
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(f) / Math.LN2), r = Math.round(f * Math.pow(2, -o) * 8388608) & 8388607;
251
- a((s << 31 | o + 127 << 23 | r) >>> 0, u, t);
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(a, f, u) {
256
- var t = a(f, u), s = (t >> 31) * 2 + 1, o = t >>> 23 & 255, r = t & 8388607;
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), a = n[7] === 128;
262
- function f(o, r, l) {
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 u(o, r, l) {
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 = a ? f : u, i.writeDoubleBE = a ? u : f;
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 = a ? t : s, i.readDoubleBE = a ? s : t;
275
+ i.readDoubleLE = f ? t : s, i.readDoubleBE = f ? s : t;
276
276
  }() : function() {
277
- function e(a, f, u, t, s, o) {
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
- a(0, s, o + f), a(1 / t > 0 ? (
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 + u);
286
+ ), s, o + a);
287
287
  else if (isNaN(t))
288
- a(0, s, o + f), a(2146959360, s, o + u);
288
+ f(0, s, o + u), f(2146959360, s, o + a);
289
289
  else if (t > 17976931348623157e292)
290
- a(0, s, o + f), a((r << 31 | 2146435072) >>> 0, s, o + u);
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, a(l >>> 0, s, o + f), a((r << 31 | l / 4294967296) >>> 0, s, o + u);
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), a(l * 4503599627370496 >>> 0, s, o + f), a((r << 31 | d + 1023 << 20 | l * 1048576 & 1048575) >>> 0, s, o + u);
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(a, f, u, t, s) {
303
- var o = a(t, s + f), r = a(t, s + u), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047, c = 4294967296 * (r & 1048575) + o;
304
- return d === 2047 ? c ? NaN : l * (1 / 0) : d === 0 ? l * 5e-324 * c : l * Math.pow(2, d - 1075) * (c + 4503599627370496);
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(a) {
335
- for (var f = 0, u = 0, t = 0; t < a.length; ++t)
336
- u = a.charCodeAt(t), u < 128 ? f += 1 : u < 2048 ? f += 2 : (u & 64512) === 55296 && (a.charCodeAt(t + 1) & 64512) === 56320 ? (++t, f += 4) : f += 3;
337
- return f;
338
- }, e.read = function(a, f, u) {
339
- var t = u - f;
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; f < u; )
343
- l = a[f++], l < 128 ? o[r++] = l : l > 191 && l < 224 ? o[r++] = (l & 31) << 6 | a[f++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (a[f++] & 63) << 12 | (a[f++] & 63) << 6 | a[f++] & 63) - 65536, o[r++] = 55296 + (l >> 10), o[r++] = 56320 + (l & 1023)) : o[r++] = (l & 15) << 12 | (a[f++] & 63) << 6 | a[f++] & 63, r > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, o)), r = 0);
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(a, f, u) {
346
- for (var t = u, s, o, r = 0; r < a.length; ++r)
347
- s = a.charCodeAt(r), s < 128 ? f[u++] = s : s < 2048 ? (f[u++] = s >> 6 | 192, f[u++] = s & 63 | 128) : (s & 64512) === 55296 && ((o = a.charCodeAt(r + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (o & 1023), ++r, f[u++] = s >> 18 | 240, f[u++] = s >> 12 & 63 | 128, f[u++] = s >> 6 & 63 | 128, f[u++] = s & 63 | 128) : (f[u++] = s >> 12 | 224, f[u++] = s >> 6 & 63 | 128, f[u++] = s & 63 | 128);
348
- return u - t;
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 a = n || 8192, f = a >>> 1, u = null, t = a;
353
+ var f = n || 8192, u = f >>> 1, a = null, t = f;
354
354
  return function(o) {
355
- if (o < 1 || o > f)
355
+ if (o < 1 || o > u)
356
356
  return i(o);
357
- t + o > a && (u = i(a), t = 0);
358
- var r = e.call(u, t, t += o);
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(u, t) {
368
- this.lo = u >>> 0, this.hi = t >>> 0;
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 a = e.zeroHash = "\0\0\0\0\0\0\0\0";
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 f = String.prototype.charCodeAt;
404
+ var u = String.prototype.charCodeAt;
405
405
  return e.fromHash = function(t) {
406
- return t === a ? n : new e(
407
- (f.call(t, 0) | f.call(t, 1) << 8 | f.call(t, 2) << 16 | f.call(t, 3) << 24) >>> 0,
408
- (f.call(t, 4) | f.call(t, 5) << 8 | f.call(t, 6) << 16 | f.call(t, 7) << 24) >>> 0
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(u) {
444
- return typeof u == "number" && isFinite(u) && Math.floor(u) === u;
445
- }, e.isString = function(u) {
446
- return typeof u == "string" || u instanceof String;
447
- }, e.isObject = function(u) {
448
- return u && typeof u == "object";
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(u, t) {
456
- var s = u[t];
457
- return s != null && u.hasOwnProperty(t) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
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 f = e.inquire("buffer").Buffer;
461
- return f.prototype.utf8Write ? f : (
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(u) {
469
- return typeof u == "number" ? e.Buffer ? e._Buffer_allocUnsafe(u) : new e.Array(u) : e.Buffer ? e._Buffer_from(u) : typeof Uint8Array > "u" ? u : new Uint8Array(u);
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(u) {
474
- return u ? e.LongBits.from(u).toHash() : e.LongBits.zeroHash;
475
- }, e.longFromHash = function(u, t) {
476
- var s = e.LongBits.fromHash(u);
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(f, u, t) {
480
- for (var s = Object.keys(u), o = 0; o < s.length; ++o)
481
- (f[s[o]] === void 0 || !t) && (f[s[o]] = u[s[o]]);
482
- return f;
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(u) {
485
- return u.charAt(0).toLowerCase() + u.substring(1);
484
+ e.merge = n, e.lcFirst = function(a) {
485
+ return a.charAt(0).toLowerCase() + a.substring(1);
486
486
  };
487
- function a(f) {
488
- function u(t, s) {
489
- if (!(this instanceof u))
490
- return new u(t, s);
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, u) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), s && n(this, s);
493
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, a) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), s && n(this, s);
494
494
  }
495
- return u.prototype = Object.create(Error.prototype, {
495
+ return a.prototype = Object.create(Error.prototype, {
496
496
  constructor: {
497
- value: u,
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 f;
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
- }), u;
522
+ }), a;
523
523
  }
524
- e.newError = a, e.ProtocolError = a("ProtocolError"), e.oneOfGetter = function(u) {
525
- for (var t = {}, s = 0; s < u.length; ++s)
526
- t[u[s]] = 1;
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(u) {
532
+ }, e.oneOfSetter = function(a) {
533
533
  return function(t) {
534
- for (var s = 0; s < u.length; ++s)
535
- u[s] !== t && delete this[u[s]];
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 f = e.Buffer;
544
- if (!f) {
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 = f.from !== Uint8Array.from && f.from || /* istanbul ignore next */
548
+ e._Buffer_from = u.from !== Uint8Array.from && u.from || /* istanbul ignore next */
549
549
  function(t, s) {
550
- return new f(t, s);
551
- }, e._Buffer_allocUnsafe = f.allocUnsafe || /* istanbul ignore next */
550
+ return new u(t, s);
551
+ }, e._Buffer_allocUnsafe = u.allocUnsafe || /* istanbul ignore next */
552
552
  function(t) {
553
- return new f(t);
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, a) {
585
- return this.tail = this.tail.next = new Op(e, n, a), this.len += n, this;
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, a) {
650
- n.set(e, a);
651
- } : function i(e, n, a) {
652
- for (var f = 0; f < e.length; ++f)
653
- n[a + f] = e[f];
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 a = Writer$1.alloc(n = base64.length(e));
661
- base64.decode(e, a, 0), e = a;
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, a = this.len;
677
- return this.reset().uint32(a), a && (this.tail.next = e.next, this.tail = n, this.len += a), this;
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), a = 0; e; )
681
- e.fn(e.val, n, a), a += e.len, e = e.next;
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, a) {
695
- n.set(e, a);
696
- } : function(e, n, a) {
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, a, 0, e.length);
699
- else for (var f = 0; f < e.length; )
700
- n[a++] = e[f++];
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(f) {
734
- return util$4.Buffer.isBuffer(f) ? new BufferReader$1(f) : create_array(f);
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, a = this.pos + e;
823
- if (a > this.len)
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, a);
827
- if (n === a) {
828
- var f = util$4.Buffer;
829
- return f ? f.alloc(0) : new this.buf.constructor(0);
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, a);
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, a, f, u) {
918
- if (!f)
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 (!u)
922
- return util$2.asPromise(i, t, e, n, a, f);
921
+ if (!a)
922
+ return util$2.asPromise(i, t, e, n, f, u);
923
923
  if (!t.rpcImpl) {
924
924
  setTimeout(function() {
925
- u(Error("already ended"));
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"](f).finish(),
932
+ n[t.requestDelimited ? "encodeDelimited" : "encode"](u).finish(),
933
933
  function(o, r) {
934
934
  if (o)
935
- return t.emit("error", o, e), u(o);
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 a))
943
+ if (!(r instanceof f))
944
944
  try {
945
- r = a[t.responseDelimited ? "decodeDelimited" : "decode"](r);
945
+ r = f[t.responseDelimited ? "decodeDelimited" : "decode"](r);
946
946
  } catch (l) {
947
- return t.emit("error", l, e), u(l);
947
+ return t.emit("error", l, e), a(l);
948
948
  }
949
- return t.emit("data", r, e), u(null, r);
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
- u(s);
954
+ a(s);
955
955
  }, 0);
956
956
  return;
957
957
  }
@@ -976,20 +976,20 @@ 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(u) {
980
- if (typeof u != "string") {
981
- var t = f();
982
- if (codegen.verbose && console.log("codegen: " + t), t = "return " + t, u) {
983
- for (var s = Object.keys(u), o = new Array(s.length + 1), r = new Array(s.length), l = 0; l < s.length; )
984
- o[l] = s[l], r[l] = u[s[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), c = 0; c < d.length; )
990
- d[c] = arguments[++c];
991
- if (c = 0, u = u.replace(/%([%dfijs])/g, function(p, m) {
992
- var _ = d[c++];
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, m) {
992
+ var _ = d[h++];
993
993
  switch (m) {
994
994
  case "d":
995
995
  case "f":
@@ -1002,43 +1002,43 @@ function codegen(i, e) {
1002
1002
  return String(_);
1003
1003
  }
1004
1004
  return "%";
1005
- }), c !== d.length)
1005
+ }), h !== d.length)
1006
1006
  throw Error("parameter count mismatch");
1007
- return n.push(u), a;
1007
+ return n.push(a), f;
1008
1008
  }
1009
- function f(u) {
1010
- return "function " + (u || e || "") + "(" + (i && i.join(",") || "") + `){
1009
+ function u(a) {
1010
+ return "function " + (a || e || "") + "(" + (i && i.join(",") || "") + `){
1011
1011
  ` + n.join(`
1012
1012
  `) + `
1013
1013
  }`;
1014
1014
  }
1015
- return a.toString = f, a;
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(f, u) {
1021
- return f && typeof XMLHttpRequest < "u" ? fetch.xhr(i, e, n) : f ? n(f) : n(null, e.binary ? u : u.toString("utf8"));
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, a) {
1025
- var f = new XMLHttpRequest();
1026
- f.onreadystatechange = function() {
1027
- if (f.readyState === 4) {
1028
- if (f.status !== 0 && f.status !== 200)
1029
- return a(Error("status " + f.status));
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 = f.response;
1031
+ var t = u.response;
1032
1032
  if (!t) {
1033
1033
  t = [];
1034
- for (var s = 0; s < f.responseText.length; ++s)
1035
- t.push(f.responseText.charCodeAt(s) & 255);
1034
+ for (var s = 0; s < u.responseText.length; ++s)
1035
+ t.push(u.responseText.charCodeAt(s) & 255);
1036
1036
  }
1037
- return a(null, typeof Uint8Array < "u" ? new Uint8Array(t) : t);
1037
+ return f(null, typeof Uint8Array < "u" ? new Uint8Array(t) : t);
1038
1038
  }
1039
- return a(null, f.responseText);
1039
+ return f(null, u.responseText);
1040
1040
  }
1041
- }, n.binary && ("overrideMimeType" in f && f.overrideMimeType("text/plain; charset=x-user-defined"), f.responseType = "arraybuffer"), f.open("GET", e), f.send();
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(u) {
1052
- return /^(?:\/|\w+:)/.test(u);
1051
+ e.isAbsolute = function(a) {
1052
+ return /^(?:\/|\w+:)/.test(a);
1053
1053
  }
1054
- ), a = (
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(u) {
1061
- u = u.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
1062
- var t = u.split("/"), s = n(u), o = "";
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(u, t, s) {
1070
- return s || (t = a(t)), n(t) ? t : (s || (u = a(u)), (u = u.replace(/(?:\/|^)[^/]+$/, "")).length ? a(u + "/" + t) : 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(), a = [
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 f(u, t) {
1108
+ function u(a, t) {
1109
1109
  var s = 0, o = {};
1110
- for (t |= 0; s < u.length; ) o[a[s + t]] = u[s++];
1110
+ for (t |= 0; s < a.length; ) o[f[s + t]] = a[s++];
1111
1111
  return o;
1112
1112
  }
1113
- e.basic = f([
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 = f([
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 = f([
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 = f([
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 = f([
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(), a = requireUtil(), f, u = /^required|optional|repeated$/;
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, c, h) {
1254
- if (a.isObject(l) ? (h = d, c = l, l = d = void 0) : a.isObject(d) && (h = c, c = d, d = void 0), i.call(this, s, c), !a.isInteger(o) || o < 0)
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 (!a.isString(r))
1256
+ if (!f.isString(r))
1257
1257
  throw TypeError("type must be a string");
1258
- if (l !== void 0 && !u.test(l = l.toString().toLowerCase()))
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 && !a.isString(d))
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 = a.Long ? n.long[r] !== void 0 : (
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 = h;
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 a.toObject([
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 f ? 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 = a.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(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
- a.base64.test(this.typeDefault) ? a.base64.decode(this.typeDefault, o = a.newBuffer(a.base64.length(this.typeDefault)), 0) : a.utf8.write(this.typeDefault, o = a.newBuffer(a.utf8.length(this.typeDefault)), 0), this.typeDefault = o;
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 = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof f && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
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 = a.decorateType(r).name : r && typeof r == "object" && (r = a.decorateEnum(r).name), function(h, p) {
1301
- a.decorateType(h.constructor).add(new t(p, o, r, l, { default: d }));
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
- f = o;
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 = a;
1310
+ hasRequiredOneof = 1, oneof = f;
1311
1311
  var i = requireObject();
1312
- ((a.prototype = Object.create(i.prototype)).constructor = a).className = "OneOf";
1312
+ ((f.prototype = Object.create(i.prototype)).constructor = f).className = "OneOf";
1313
1313
  var e = requireField(), n = requireUtil();
1314
- function a(u, t, s, o) {
1315
- if (Array.isArray(t) || (s = t, t = void 0), i.call(this, u, s), !(t === void 0 || Array.isArray(t)))
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
- a.fromJSON = function(t, s) {
1320
- return new a(t, s.oneof, s.options, s.comment);
1321
- }, a.prototype.toJSON = function(t) {
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 f(u) {
1333
- if (u.parent)
1334
- for (var t = 0; t < u.fieldsArray.length; ++t)
1335
- u.fieldsArray[t].parent || u.parent.add(u.fieldsArray[t]);
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 a.prototype.add = function(t) {
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, f(this), this;
1341
- }, a.prototype.remove = function(t) {
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
- }, a.prototype.onAdd = function(t) {
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
- f(this);
1355
- }, a.prototype.onRemove = function(t) {
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
- }, a.d = function() {
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 a(l, t)), Object.defineProperty(r, l, {
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(), a = requireOneof(), f, u, t;
1377
- o.fromJSON = function(d, c) {
1378
- return new o(d, c.options).addJSON(c.nested);
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 c = {}, h = 0; h < l.length; ++h)
1383
- c[l[h].name] = l[h].toJSON(d);
1384
- return c;
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, c) {
1387
+ o.arrayToJSON = s, o.isReservedId = function(d, h) {
1388
1388
  if (d) {
1389
- for (var h = 0; h < d.length; ++h)
1390
- if (typeof d[h] != "string" && d[h][0] <= c && d[h][1] > c)
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, c) {
1394
+ }, o.isReservedName = function(d, h) {
1395
1395
  if (d) {
1396
- for (var h = 0; h < d.length; ++h)
1397
- if (d[h] === c)
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 c = this;
1420
+ var h = this;
1421
1421
  if (d)
1422
- for (var h = Object.keys(d), p = 0, m; p < h.length; ++p)
1423
- m = d[h[p]], c.add(
1422
+ for (var c = Object.keys(d), p = 0, m; p < c.length; ++p)
1423
+ m = d[c[p]], h.add(
1424
1424
  // most to least likely
1425
- (m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? u.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(h[p], m)
1425
+ (m.fields !== void 0 ? u.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? a.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(c[p], m)
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 f || d instanceof a || d instanceof t || d instanceof u || d instanceof o))
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 c = this.get(d.name);
1441
- if (c)
1442
- if (c instanceof o && d instanceof o && !(c instanceof f || c instanceof u)) {
1443
- for (var h = c.nestedArray, p = 0; p < h.length; ++p)
1444
- d.add(h[p]);
1445
- this.remove(c), this.nested || (this.nested = {}), d.setOptions(c.options, !0);
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, c) {
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 h = this; d.length > 0; ) {
1463
+ for (var c = this; d.length > 0; ) {
1464
1464
  var p = d.shift();
1465
- if (h.nested && h.nested[p]) {
1466
- if (h = h.nested[p], !(h instanceof o))
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
- h.add(h = new o(p));
1469
+ c.add(c = new o(p));
1470
1470
  }
1471
- return c && h.addJSON(c), h;
1471
+ return h && c.addJSON(h), c;
1472
1472
  }, o.prototype.resolveAll = function() {
1473
- for (var d = this.nestedArray, c = 0; c < d.length; )
1474
- d[c] instanceof o ? d[c++].resolveAll() : d[c++].resolve();
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, c, h) {
1477
- if (typeof c == "boolean" ? (h = c, c = void 0) : c && !Array.isArray(c) && (c = [c]), n.isString(d) && d.length) {
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), c);
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 (!c || c.indexOf(p.constructor) > -1)
1488
+ if (!h || h.indexOf(p.constructor) > -1)
1489
1489
  return p;
1490
- } else if (p instanceof o && (p = p.lookup(d.slice(1), c, !0)))
1490
+ } else if (p instanceof o && (p = p.lookup(d.slice(1), h, !0)))
1491
1491
  return p;
1492
1492
  } else
1493
1493
  for (var m = 0; m < this.nestedArray.length; ++m)
1494
- if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d, c, !0)))
1494
+ if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d, h, !0)))
1495
1495
  return p;
1496
- return this.parent === null || h ? null : this.parent.lookup(d, c);
1496
+ return this.parent === null || c ? null : this.parent.lookup(d, h);
1497
1497
  }, o.prototype.lookupType = function(d) {
1498
- var c = this.lookup(d, [f]);
1499
- if (!c)
1498
+ var h = this.lookup(d, [u]);
1499
+ if (!h)
1500
1500
  throw Error("no such type: " + d);
1501
- return c;
1501
+ return h;
1502
1502
  }, o.prototype.lookupEnum = function(d) {
1503
- var c = this.lookup(d, [t]);
1504
- if (!c)
1503
+ var h = this.lookup(d, [t]);
1504
+ if (!h)
1505
1505
  throw Error("no such Enum '" + d + "' in " + this);
1506
- return c;
1506
+ return h;
1507
1507
  }, o.prototype.lookupTypeOrEnum = function(d) {
1508
- var c = this.lookup(d, [f, t]);
1509
- if (!c)
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 c;
1511
+ return h;
1512
1512
  }, o.prototype.lookupService = function(d) {
1513
- var c = this.lookup(d, [u]);
1514
- if (!c)
1513
+ var h = this.lookup(d, [a]);
1514
+ if (!h)
1515
1515
  throw Error("no such Service '" + d + "' in " + this);
1516
- return c;
1517
- }, o._configure = function(l, d, c) {
1518
- f = l, u = d, t = c;
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 = a;
1524
+ hasRequiredMapfield = 1, mapfield = f;
1525
1525
  var i = requireField();
1526
- ((a.prototype = Object.create(i.prototype)).constructor = a).className = "MapField";
1526
+ ((f.prototype = Object.create(i.prototype)).constructor = f).className = "MapField";
1527
1527
  var e = requireTypes(), n = requireUtil();
1528
- function a(f, u, t, s, o, r) {
1529
- if (i.call(this, f, u, s, void 0, void 0, o, r), !n.isString(t))
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 a.fromJSON = function(u, t) {
1534
- return new a(u, t.id, t.keyType, t.type, t.options, t.comment);
1535
- }, a.prototype.toJSON = function(u) {
1536
- var t = u ? !!u.keepComments : !1;
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
- }, a.prototype.resolve = function() {
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
- }, a.d = function(u, t, s) {
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 a(l, u, t, s));
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(a, f, u, 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), !(f === void 0 || e.isString(f)))
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(u))
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, a, r), this.type = f || "rpc", this.requestType = u, 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;
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(f, u) {
1580
- return new n(f, u.type, u.requestType, u.responseType, u.requestStream, u.responseStream, u.options, u.comment, u.parsedOptions);
1581
- }, n.prototype.toJSON = function(f) {
1582
- var u = f ? !!f.keepComments : !1;
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
- u ? this.comment : void 0,
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 = f;
1609
+ hasRequiredService = 1, service = u;
1610
1610
  var i = requireNamespace();
1611
- ((f.prototype = Object.create(i.prototype)).constructor = f).className = "Service";
1612
- var e = requireMethod(), n = requireUtil(), a = rpc;
1613
- function f(t, s) {
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
- f.fromJSON = function(s, o) {
1617
- var r = new f(s, o.options);
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
- }, f.prototype.toJSON = function(s) {
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(f.prototype, "methodsArray", {
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 u(t) {
1640
+ function a(t) {
1641
1641
  return t._methodsArray = null, t;
1642
1642
  }
1643
- return f.prototype.get = function(s) {
1643
+ return u.prototype.get = function(s) {
1644
1644
  return this.methods[s] || i.prototype.get.call(this, s);
1645
- }, f.prototype.resolveAll = function() {
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
- }, f.prototype.add = function(s) {
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, u(this)) : i.prototype.add.call(this, s);
1653
- }, f.prototype.remove = function(s) {
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, u(this);
1657
+ return delete this.methods[s.name], s.parent = null, a(this);
1658
1658
  }
1659
1659
  return i.prototype.remove.call(this, s);
1660
- }, f.prototype.create = function(s, o, r) {
1661
- for (var l = new a.Service(s, o, r), d = 0, c; d < /* initializes */
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 h = n.lcFirst((c = this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g, "");
1664
- l[h] = n.codegen(["r", "c"], n.isReserved(h) ? h + "_" : h)("return this.rpcCall(m,q,s,r,c)")({
1665
- m: c,
1666
- q: c.resolvedRequestType.ctor,
1667
- s: c.resolvedResponseType.ctor
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 = f;
1709
+ hasRequiredDecoder = 1, decoder_1 = u;
1710
1710
  var i = require_enum(), e = requireTypes(), n = requireUtil();
1711
- function a(u) {
1712
- return "missing required '" + u.name + "'";
1711
+ function f(a) {
1712
+ return "missing required '" + a.name + "'";
1713
1713
  }
1714
- function f(u) {
1715
- var t = n.codegen(["r", "l"], u.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (u.fieldsArray.filter(function(c) {
1716
- return c.map;
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
- u.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
1718
+ a.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
1719
1719
  for (var s = 0; s < /* initializes */
1720
- u.fieldsArray.length; ++s) {
1721
- var o = u._fieldsArray[s].resolve(), r = o.resolvedType instanceof i ? "int32" : o.type, l = "m" + n.safeProp(o.name);
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 < u._fieldsArray.length; ++s) {
1725
- var d = u._fieldsArray[s];
1726
- d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})", a(d));
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 = u;
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 a(t, s, o, r) {
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 f(t, s, o) {
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 u(t) {
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(), c = "m" + e.safeProp(d.name);
1808
- if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", c, d.name), d.map)
1809
- s("if(!util.isObject(%s))", c)("return%j", n(d, "object"))("var k=Object.keys(%s)", c)("for(var i=0;i<k.length;++i){"), f(s, d, "k[i]"), a(s, d, l, c + "[k[i]]")("}");
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))", c)("return%j", n(d, "array"))("for(var i=0;i<%s.length;++i){", c), a(s, d, l, c + "[i]")("}");
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 h = e.safeProp(d.partOf.name);
1815
- r[d.partOf.name] === 1 && s("if(p%s===1)", h)("return%j", d.partOf.name + ": multiple values"), r[d.partOf.name] = 1, s("p%s=1", h);
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
- a(s, d, l, c);
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(), a = requireUtil();
1829
- function f(t, s, o, r) {
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, c = Object.keys(d), h = 0; h < c.length; ++h)
1835
- d[c[h]] === 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:", c[h])("case %i:", d[c[h]])("m%s=%j", r, d[c[h]])("break");
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 = a.codegen(["d"], s.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
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(), c = a.safeProp(d.name);
1881
- d.map ? (r("if(d%s){", c)('if(typeof d%s!=="object")', c)("throw TypeError(%j)", d.fullName + ": object expected")("m%s={}", c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", c), f(
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
- c + "[ks[i]]"
1887
- )("}")("}")) : d.repeated ? (r("if(d%s){", c)("if(!Array.isArray(d%s))", c)("throw TypeError(%j)", d.fullName + ": array expected")("m%s=[]", c)("for(var i=0;i<d%s.length;++i){", c), f(
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
- c + "[i]"
1893
- )("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){", c), f(
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
- c
1898
+ h
1899
1899
  ), d.resolvedType instanceof n || r("}"));
1900
1900
  }
1901
1901
  return r("return m");
1902
1902
  };
1903
- function u(t, s, o, r) {
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,22 +1929,22 @@ function requireConverter() {
1929
1929
  return t;
1930
1930
  }
1931
1931
  e.toObject = function(s) {
1932
- var o = s.fieldsArray.slice().sort(a.compareFieldsById);
1932
+ var o = s.fieldsArray.slice().sort(f.compareFieldsById);
1933
1933
  if (!o.length)
1934
- return a.codegen()("return {}");
1935
- for (var r = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [], c = [], h = 0; h < o.length; ++h)
1936
- o[h].partOf || (o[h].resolve().repeated ? l : o[h].map ? d : c).push(o[h]);
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){"), h = 0; h < l.length; ++h) r("d%s=[]", a.safeProp(l[h].name));
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){"), h = 0; h < d.length; ++h) r("d%s={}", a.safeProp(d[h].name));
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 (c.length) {
1946
- for (r("if(o.defaults){"), h = 0; h < c.length; ++h) {
1947
- var p = c[h], m = a.safeProp(p.name);
1945
+ if (h.length) {
1946
+ for (r("if(o.defaults){"), c = 0; c < h.length; ++c) {
1947
+ var p = h[c], m = f.safeProp(p.name);
1948
1948
  if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
1949
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", m)("}else")("d%s=o.longs===String?%j:%i", m, p.typeDefault.toString(), p.typeDefault.toNumber());
1950
1950
  else if (p.bytes) {
@@ -1955,27 +1955,27 @@ function requireConverter() {
1955
1955
  r("}");
1956
1956
  }
1957
1957
  var v = !1;
1958
- for (h = 0; h < o.length; ++h) {
1959
- var p = o[h], y = s._fieldsArray.indexOf(p), m = a.safeProp(p.name);
1960
- p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), u(
1958
+ for (c = 0; c < o.length; ++c) {
1959
+ var p = o[c], y = s._fieldsArray.indexOf(p), m = f.safeProp(p.name);
1960
+ p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), a(
1961
1961
  r,
1962
1962
  p,
1963
1963
  /* sorted */
1964
1964
  y,
1965
1965
  m + "[ks2[j]]"
1966
- )("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), u(
1966
+ )("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), a(
1967
1967
  r,
1968
1968
  p,
1969
1969
  /* sorted */
1970
1970
  y,
1971
1971
  m + "[j]"
1972
- )("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), u(
1972
+ )("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), a(
1973
1973
  r,
1974
1974
  p,
1975
1975
  /* sorted */
1976
1976
  y,
1977
1977
  m
1978
- ), p.partOf && r("if(o.oneofs)")("d%s=%j", a.safeProp(p.partOf.name), p.name)), r("}");
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,31 +1985,31 @@ var wrappers = {};
1985
1985
  (function(i) {
1986
1986
  var e = i, n = message;
1987
1987
  e[".google.protobuf.Any"] = {
1988
- fromObject: function(a) {
1989
- if (a && a["@type"]) {
1990
- var f = a["@type"].substring(a["@type"].lastIndexOf("/") + 1), u = this.lookup(f);
1991
- if (u) {
1992
- var t = a["@type"].charAt(0) === "." ? a["@type"].slice(1) : a["@type"];
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: u.encode(u.fromObject(a)).finish()
1995
+ value: a.encode(a.fromObject(f)).finish()
1996
1996
  });
1997
1997
  }
1998
1998
  }
1999
- return this.fromObject(a);
1999
+ return this.fromObject(f);
2000
2000
  },
2001
- toObject: function(a, f) {
2002
- var u = "type.googleapis.com/", t = "", s = "";
2003
- if (f && f.json && a.type_url && a.value) {
2004
- s = a.type_url.substring(a.type_url.lastIndexOf("/") + 1), t = a.type_url.substring(0, a.type_url.lastIndexOf("/") + 1);
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 && (a = o.decode(a.value));
2006
+ o && (f = o.decode(f.value));
2007
2007
  }
2008
- if (!(a instanceof this.ctor) && a instanceof n) {
2009
- var r = a.$type.toObject(a, f), l = a.$type.fullName[0] === "." ? a.$type.fullName.slice(1) : a.$type.fullName;
2010
- return t === "" && (t = u), s = t + l, r["@type"] = s, r;
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(a, f);
2012
+ return this.toObject(f, u);
2013
2013
  }
2014
2014
  };
2015
2015
  })(wrappers);
@@ -2019,7 +2019,7 @@ function requireType() {
2019
2019
  hasRequiredType = 1, type = m;
2020
2020
  var i = requireNamespace();
2021
2021
  ((m.prototype = Object.create(i.prototype)).constructor = m).className = "Type";
2022
- var e = require_enum(), n = requireOneof(), a = requireField(), f = requireMapfield(), u = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), c = requireVerifier(), h = requireConverter(), p = wrappers;
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
2023
  function m(v, y) {
2024
2024
  i.call(this, v, y), 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
  }
@@ -2105,7 +2105,7 @@ function requireType() {
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" ? f.fromJSON : a.fromJSON)(R[O], g.fields[R[O]])
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,7 +2115,7 @@ 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 ? a.fromJSON : T.fields !== void 0 ? m.fromJSON : T.values !== void 0 ? e.fromJSON : T.methods !== void 0 ? u.fromJSON : i.fromJSON)(R[O], T)
2118
+ (T.id !== void 0 ? f.fromJSON : T.fields !== void 0 ? m.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;
@@ -2153,7 +2153,7 @@ function requireType() {
2153
2153
  }, m.prototype.add = function(y) {
2154
2154
  if (this.get(y.name))
2155
2155
  throw Error("duplicate name '" + y.name + "' in " + this);
2156
- if (y instanceof a && y.extend === void 0) {
2156
+ if (y instanceof f && y.extend === void 0) {
2157
2157
  if (this._fieldsById ? (
2158
2158
  /* istanbul ignore next */
2159
2159
  this._fieldsById[y.id]
@@ -2167,7 +2167,7 @@ function requireType() {
2167
2167
  }
2168
2168
  return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), _(this)) : i.prototype.add.call(this, y);
2169
2169
  }, m.prototype.remove = function(y) {
2170
- if (y instanceof a && y.extend === void 0) {
2170
+ if (y instanceof f && y.extend === void 0) {
2171
2171
  if (!this.fields || this.fields[y.name] !== y)
2172
2172
  throw Error(y + " is not a member of " + this);
2173
2173
  return delete this.fields[y.name], y.parent = null, y.onRemove(this), _(this);
@@ -2196,13 +2196,13 @@ function requireType() {
2196
2196
  Reader: s,
2197
2197
  types: g,
2198
2198
  util: r
2199
- }), this.verify = c(this)({
2199
+ }), this.verify = h(this)({
2200
2200
  types: g,
2201
2201
  util: r
2202
- }), this.fromObject = h.fromObject(this)({
2202
+ }), this.fromObject = c.fromObject(this)({
2203
2203
  types: g,
2204
2204
  util: r
2205
- }), this.toObject = h.toObject(this)({
2205
+ }), this.toObject = c.toObject(this)({
2206
2206
  types: g,
2207
2207
  util: r
2208
2208
  });
@@ -2238,20 +2238,20 @@ 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(), a = requireOneof(), f = requireUtil(), u, t, s;
2242
- function o(c) {
2243
- i.call(this, "", c), this.deferred = [], this.files = [];
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(h, p) {
2246
- return p || (p = new o()), h.options && p.setOptions(h.options), p.addJSON(h.nested);
2247
- }, o.prototype.resolvePath = f.path.resolve, o.prototype.fetch = f.fetch;
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(h, p, m) {
2250
+ o.prototype.load = function h(c, p, m) {
2251
2251
  typeof p == "function" && (m = p, p = void 0);
2252
2252
  var _ = this;
2253
2253
  if (!m)
2254
- return f.asPromise(c, _, h, p);
2254
+ return u.asPromise(h, _, c, p);
2255
2255
  var v = m === r;
2256
2256
  function y(q, k) {
2257
2257
  if (m) {
@@ -2271,7 +2271,7 @@ function requireRoot() {
2271
2271
  }
2272
2272
  function b(q, k) {
2273
2273
  try {
2274
- if (f.isString(k) && k.charAt(0) === "{" && (k = JSON.parse(k)), !f.isString(k))
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;
@@ -2299,7 +2299,7 @@ function requireRoot() {
2299
2299
  if (v) {
2300
2300
  var A;
2301
2301
  try {
2302
- A = f.fs.readFileSync(q).toString("utf8");
2302
+ A = u.fs.readFileSync(q).toString("utf8");
2303
2303
  } catch (B) {
2304
2304
  k || y(B);
2305
2305
  return;
@@ -2318,99 +2318,99 @@ function requireRoot() {
2318
2318
  }
2319
2319
  }
2320
2320
  var O = 0;
2321
- f.isString(h) && (h = [h]);
2322
- for (var T = 0, J; T < h.length; ++T)
2323
- (J = _.resolvePath("", h[T])) && R(J);
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
2326
  O || y(null, _);
2327
- }, o.prototype.loadSync = function(h, p) {
2328
- if (!f.isNode)
2327
+ }, o.prototype.loadSync = function(c, p) {
2328
+ if (!u.isNode)
2329
2329
  throw Error("not supported");
2330
- return this.load(h, p, r);
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(h) {
2334
- return "'extend " + h.extend + "' in " + h.parent.fullName;
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(c, h) {
2340
- var p = h.parent.lookup(h.extend);
2339
+ function d(h, c) {
2340
+ var p = c.parent.lookup(c.extend);
2341
2341
  if (p) {
2342
- var m = new e(h.fullName, h.id, h.type, h.rule, void 0, h.options);
2343
- return p.get(m.name) || (m.declaringField = h, h.extensionField = m, p.add(m)), !0;
2342
+ var m = new e(c.fullName, c.id, c.type, c.rule, void 0, c.options);
2343
+ return p.get(m.name) || (m.declaringField = c, c.extensionField = m, p.add(m)), !0;
2344
2344
  }
2345
2345
  return !1;
2346
2346
  }
2347
- return o.prototype._handleAdd = function(h) {
2348
- if (h instanceof e)
2347
+ return o.prototype._handleAdd = function(c) {
2348
+ if (c instanceof e)
2349
2349
  /* an extension field (implies not part of a oneof) */
2350
- h.extend !== void 0 && /* not already handled */
2351
- !h.extensionField && (d(this, h) || this.deferred.push(h));
2352
- else if (h instanceof n)
2353
- l.test(h.name) && (h.parent[h.name] = h.values);
2354
- else if (!(h instanceof a)) {
2355
- if (h instanceof u)
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
2358
  for (var m = 0; m < /* initializes */
2359
- h.nestedArray.length; ++m)
2360
- this._handleAdd(h._nestedArray[m]);
2361
- l.test(h.name) && (h.parent[h.name] = h);
2359
+ c.nestedArray.length; ++m)
2360
+ this._handleAdd(c._nestedArray[m]);
2361
+ l.test(c.name) && (c.parent[c.name] = c);
2362
2362
  }
2363
- }, o.prototype._handleRemove = function(h) {
2364
- if (h instanceof e) {
2363
+ }, o.prototype._handleRemove = function(c) {
2364
+ if (c instanceof e) {
2365
2365
  if (
2366
2366
  /* an extension field */
2367
- h.extend !== void 0
2367
+ c.extend !== void 0
2368
2368
  )
2369
2369
  if (
2370
2370
  /* already handled */
2371
- h.extensionField
2371
+ c.extensionField
2372
2372
  )
2373
- h.extensionField.parent.remove(h.extensionField), h.extensionField = null;
2373
+ c.extensionField.parent.remove(c.extensionField), c.extensionField = null;
2374
2374
  else {
2375
- var p = this.deferred.indexOf(h);
2375
+ var p = this.deferred.indexOf(c);
2376
2376
  p > -1 && this.deferred.splice(p, 1);
2377
2377
  }
2378
- } else if (h instanceof n)
2379
- l.test(h.name) && delete h.parent[h.name];
2380
- else if (h instanceof i) {
2378
+ } else if (c instanceof n)
2379
+ l.test(c.name) && delete c.parent[c.name];
2380
+ else if (c instanceof i) {
2381
2381
  for (var m = 0; m < /* initializes */
2382
- h.nestedArray.length; ++m)
2383
- this._handleRemove(h._nestedArray[m]);
2384
- l.test(h.name) && delete h.parent[h.name];
2382
+ c.nestedArray.length; ++m)
2383
+ this._handleRemove(c._nestedArray[m]);
2384
+ l.test(c.name) && delete c.parent[c.name];
2385
2385
  }
2386
- }, o._configure = function(c, h, p) {
2387
- u = c, t = h, s = p;
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, a;
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), c = 0; c < l.length; )
2398
- d[c] = r[l[c++]];
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 c = r[d++], h = r[d++];
2405
- h !== void 0 && (l[c] = h);
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 f = /\\/g, u = /"/g;
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(f, "\\\\").replace(u, '\\"') + '"]' : "." + r;
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
- a || (a = require_enum());
2436
- var l = new a("Enum" + s++, r);
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(h, p, m) {
2439
+ function h(c, p, m) {
2440
2440
  var _ = p.shift();
2441
2441
  if (_ === "__proto__" || _ === "prototype")
2442
- return h;
2442
+ return c;
2443
2443
  if (p.length > 0)
2444
- h[_] = c(h[_] || {}, p, m);
2444
+ c[_] = h(c[_] || {}, p, m);
2445
2445
  else {
2446
- var v = h[_];
2447
- v && (m = [].concat(v).concat(m)), h[_] = m;
2446
+ var v = c[_];
2447
+ v && (m = [].concat(v).concat(m)), c[_] = m;
2448
2448
  }
2449
- return h;
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("."), c(r, l, d);
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(a, f) {
2468
- if (!i.isString(a))
2467
+ function n(f, u) {
2468
+ if (!i.isString(f))
2469
2469
  throw TypeError("name must be a string");
2470
- if (f && !i.isObject(f))
2470
+ if (u && !i.isObject(u))
2471
2471
  throw TypeError("options must be an object");
2472
- this.options = f, this.parsedOptions = null, this.name = a, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
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 a = this; a.parent !== null; )
2484
- a = a.parent;
2485
- return a;
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 a = [this.name], f = this.parent; f; )
2497
- a.unshift(f.name), f = f.parent;
2498
- return a.join(".");
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(f) {
2505
- this.parent && this.parent !== f && this.parent.remove(this), this.parent = f, this.resolved = !1;
2506
- var u = f.root;
2507
- u instanceof e && u._handleAdd(this);
2508
- }, n.prototype.onRemove = function(f) {
2509
- var u = f.root;
2510
- u instanceof e && u._handleRemove(this), this.parent = null, this.resolved = !1;
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(f) {
2513
+ }, n.prototype.getOption = function(u) {
2514
2514
  if (this.options)
2515
- return this.options[f];
2516
- }, n.prototype.setOption = function(f, u, t) {
2517
- return (!t || !this.options || this.options[f] === void 0) && ((this.options || (this.options = {}))[f] = u), this;
2518
- }, n.prototype.setParsedOption = function(f, u, t) {
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, f);
2523
+ return Object.prototype.hasOwnProperty.call(d, u);
2524
2524
  });
2525
2525
  if (o) {
2526
- var r = o[f];
2527
- i.setProperty(r, t, u);
2526
+ var r = o[u];
2527
+ i.setProperty(r, t, a);
2528
2528
  } else
2529
- o = {}, o[f] = i.setProperty({}, t, u), s.push(o);
2529
+ o = {}, o[u] = i.setProperty({}, t, a), s.push(o);
2530
2530
  } else {
2531
2531
  var l = {};
2532
- l[f] = u, s.push(l);
2532
+ l[u] = a, s.push(l);
2533
2533
  }
2534
2534
  return this;
2535
- }, n.prototype.setOptions = function(f, u) {
2536
- if (f)
2537
- for (var t = Object.keys(f), s = 0; s < t.length; ++s)
2538
- this.setOption(t[s], f[t[s]], u);
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 f = this.constructor.className, u = this.fullName;
2542
- return u.length ? f + " " + u : f;
2543
- }, n._configure = function(a) {
2544
- e = a;
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 = a;
2550
+ hasRequired_enum = 1, _enum = f;
2551
2551
  var i = requireObject();
2552
- ((a.prototype = Object.create(i.prototype)).constructor = a).className = "Enum";
2552
+ ((f.prototype = Object.create(i.prototype)).constructor = f).className = "Enum";
2553
2553
  var e = requireNamespace(), n = requireUtil();
2554
- function a(f, u, t, s, o, r) {
2555
- if (i.call(this, f, t), u && typeof u != "object")
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, u)
2558
- for (var l = Object.keys(u), d = 0; d < l.length; ++d)
2559
- typeof u[l[d]] == "number" && (this.valuesById[this.values[l[d]] = u[l[d]]] = l[d]);
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 a.fromJSON = function(u, t) {
2562
- var s = new a(u, t.values, t.options, t.comment, t.comments);
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
- }, a.prototype.toJSON = function(u) {
2565
- var t = u ? !!u.keepComments : !1;
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
- }, a.prototype.add = function(u, t, s, o) {
2581
- if (!n.isString(u))
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[u] !== void 0)
2586
- throw Error("duplicate name '" + u + "' in " + this);
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(u))
2590
- throw Error("name '" + u + "' is reserved in " + this);
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[u] = t;
2594
+ this.values[a] = t;
2595
2595
  } else
2596
- this.valuesById[this.values[u] = t] = u;
2597
- return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[u] = o || null), this.comments[u] = s || null, this;
2598
- }, a.prototype.remove = function(u) {
2599
- if (!n.isString(u))
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[u];
2601
+ var t = this.values[a];
2602
2602
  if (t == null)
2603
- throw Error("name '" + u + "' does not exist in " + this);
2604
- return delete this.valuesById[t], delete this.values[u], delete this.comments[u], this.valuesOptions && delete this.valuesOptions[u], this;
2605
- }, a.prototype.isReservedId = function(u) {
2606
- return e.isReservedId(this.reserved, u);
2607
- }, a.prototype.isReservedName = function(u) {
2608
- return e.isReservedName(this.reserved, u);
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 = f;
2614
+ hasRequiredEncoder = 1, encoder_1 = u;
2615
2615
  var i = require_enum(), e = requireTypes(), n = requireUtil();
2616
- function a(u, t, s, o) {
2617
- return t.resolvedType.group ? u("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", s, o, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : u("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", s, o, (t.id << 3 | 2) >>> 0);
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 f(u) {
2620
- for (var t = n.codegen(["m", "w"], u.name + "$encode")("if(!w)")("w=Writer.create()"), s, o, r = (
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
- u.fieldsArray.slice().sort(n.compareFieldsById)
2622
+ a.fieldsArray.slice().sort(n.compareFieldsById)
2623
2623
  ), s = 0; s < r.length; ++s) {
2624
- var l = r[s].resolve(), d = u._fieldsArray.indexOf(l), c = l.resolvedType instanceof i ? "int32" : l.type, h = e.basic[c];
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), h === 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 | h, c, o), t("}")("}")) : l.repeated ? (t("if(%s!=null&&%s.length){", o, o), l.packed && e.packed[c] !== 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])", c, o)("w.ldelim()") : (t("for(var i=0;i<%s.length;++i)", o), h === void 0 ? a(t, l, d, o + "[i]") : t("w.uint32(%i).%s(%s[i])", (l.id << 3 | h) >>> 0, c, o)), t("}")) : (l.optional && t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", o, l.name), h === void 0 ? a(t, l, d, o) : t("w.uint32(%i).%s(%s)", (l.id << 3 | h) >>> 0, c, o));
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 a = new WorkerWrapper();
2668
- a.postMessage({ type: "init", host: i.host, id: i.id, cdn_url: i.cdn_url }), a.addEventListener("message", async (f) => {
2669
- if (f.data.ok) {
2670
- if (f.data.files) {
2671
- const u = concat([
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: f.data.code,
2676
- files: f.data.files
2675
+ content: u.data.code,
2676
+ files: u.data.files
2677
2677
  }).finish()
2678
2678
  ]);
2679
- service_publish({ host: i.host }, u);
2679
+ service_publish({ host: i.host }, a);
2680
2680
  }
2681
2681
  e(await import(
2682
2682
  /* @vite-ignore */
2683
- f.data.code
2683
+ u.data.code
2684
2684
  ));
2685
2685
  } else
2686
- n(f.data.err);
2687
- a.terminate();
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: a
2694
+ service: f
2695
2695
  }) => {
2696
- const f = await service_fetch(
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
- ), u = {
2709
+ ), a = {
2710
2710
  value_boolean: /* @__PURE__ */ new Map(),
2711
2711
  value_double: /* @__PURE__ */ new Map(),
2712
2712
  value_number: /* @__PURE__ */ new Map(),
@@ -2714,30 +2714,30 @@ 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 f) {
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 c = { id: o, [r]: d, value: r }, h = { id: i, tag: e, value: c };
2723
- a.publish(
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(h).finish()
2726
+ nil_xit_proto.ValueUpdate.encode(c).finish()
2727
2727
  ])
2728
2728
  );
2729
- }), u[r].set(o, l);
2729
+ }), a[r].set(o, l);
2730
2730
  }
2731
- return a.on_message((s, o) => {
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 c = nil_xit_proto.ValueUpdate.decode(l);
2736
- if (c.id === i && (c.tag === null || e === c.tag)) {
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 h = c.value.value, p = (d = u[h]) == null ? void 0 : d.get(c.value.id);
2739
- if (h === "value_buffer") {
2740
- const m = c.value[h], _ = get(p);
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 m = h.value[c], _ = get(p);
2741
2741
  let v = !0;
2742
2742
  if (m.length != _.length)
2743
2743
  v = !1;
@@ -2751,18 +2751,18 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
2751
2751
  }
2752
2752
  v || p == null || p.set(m);
2753
2753
  } else
2754
- p == null || p.set(c.value[h]);
2754
+ p == null || p.set(h.value[c]);
2755
2755
  t = !1;
2756
2756
  }
2757
2757
  }
2758
- }), u;
2758
+ }), a;
2759
2759
  }, make_signals = async ({
2760
2760
  id: i,
2761
2761
  tag: e,
2762
2762
  host: n,
2763
- service: a
2763
+ service: f
2764
2764
  }) => {
2765
- const f = await service_fetch(
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
- ), u = {
2778
+ ), a = {
2779
2779
  arg_none: /* @__PURE__ */ new Map(),
2780
2780
  arg_boolean: /* @__PURE__ */ new Map(),
2781
2781
  arg_double: /* @__PURE__ */ new Map(),
@@ -2783,74 +2783,70 @@ 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 f)
2787
- s == null ? u.arg_none.set(t, () => {
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
- a.publish(
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
- }) : u[s].set(t, (o) => {
2795
+ }) : a[s].set(t, (o) => {
2796
2796
  const r = { frame_id: i, signal_id: t, tag: e, [s]: o };
2797
- a.publish(
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 u;
2805
- }, create_context = (i, e, n) => ({
2806
- values: {
2807
- boolean: (a, f) => i.value_boolean.get(a) ?? writable(f),
2808
- double: (a, f) => i.value_double.get(a) ?? writable(f),
2809
- string: (a, f) => i.value_string.get(a) ?? writable(f),
2810
- number: (a, f) => i.value_number.get(a) ?? writable(f),
2811
- buffer: (a, f) => i.value_buffer.get(a) ?? writable(f),
2812
- json: (a, f, u) => {
2813
- const t = i.value_buffer.get(a);
2814
- if (t != null) {
2815
- let s = get(t), o = u.decode(s);
2816
- return {
2817
- set: (r) => {
2818
- o = r, s = u.encode(o), t.set(s);
2819
- },
2820
- subscribe: (r) => t.subscribe((l) => {
2821
- l !== s && (s = l, o = u.decode(s)), r(o);
2822
- }),
2823
- update: (r) => {
2824
- t.update((l) => (o = r(o), s = u.encode(o), s));
2825
- }
2826
- };
2827
- }
2828
- return writable(f);
2829
- }
2830
- },
2831
- signals: {
2832
- none: (a) => e.arg_none.get(a) ?? (() => {
2833
- }),
2834
- boolean: (a) => e.arg_boolean.get(a) ?? noop,
2835
- double: (a) => e.arg_double.get(a) ?? noop,
2836
- number: (a) => e.arg_number.get(a) ?? noop,
2837
- string: (a) => e.arg_string.get(a) ?? noop,
2838
- buffer: (a) => e.arg_buffer.get(a) ?? noop,
2839
- json: (a, f) => {
2840
- const u = e.arg_buffer.get(a);
2841
- return u != null ? (t) => u(f(t)) : noop;
2842
- }
2843
- },
2844
- loader: n
2845
- }), create_app = async (i, e, n, a, f) => {
2846
- const u = { host: i };
2847
- await test_connection(u);
2848
- const t = new Service$1(u), [s, o, { nil_xit_fn: r }] = await Promise.all([
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) => {
2842
+ const a = { host: i };
2843
+ await test_connection(a);
2844
+ const t = new Service$1(a), [s, o, { nil_xit_fn: r }] = await Promise.all([
2849
2845
  make_values({ id: e, tag: n, host: i, service: t }),
2850
2846
  make_signals({ id: e, tag: n, host: i, service: t }),
2851
- bundle({ host: i, cdn_url: a, id: e })
2847
+ bundle({ host: i, cdn_url: f, id: e })
2852
2848
  ]), l = {
2853
- svelte: () => import("./svelte/index.js").then((p) => p.bT),
2849
+ svelte: () => import("./svelte/index.js").then((p) => p.bW),
2854
2850
  "svelte/store": () => import("./svelte/store.js").then((p) => p.i),
2855
2851
  "svelte/animate": () => import("./svelte/animate.js"),
2856
2852
  "svelte/easing": () => import("./svelte/easing.js"),
@@ -2864,7 +2860,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
2864
2860
  }, d = (p) => p in l ? l[p]() : import(
2865
2861
  /* @vite-ignore */
2866
2862
  p
2867
- ), { action: c } = await r(d), h = concat([
2863
+ ), { action: h } = await r(d), c = concat([
2868
2864
  header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
2869
2865
  nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
2870
2866
  ]);
@@ -2874,38 +2870,63 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
2874
2870
  nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
2875
2871
  ]);
2876
2872
  t.publish(p);
2877
- }), service_publish(u, h), (p) => {
2873
+ }), service_publish(a, c), (p) => {
2878
2874
  const m = /* @__PURE__ */ new Map();
2879
- m.set("nil.xit", create_context(s, o, f));
2880
- const { destroy: _ } = c(p, m);
2875
+ m.set("nil.xit", {
2876
+ loader: u,
2877
+ values: create_context_values(s),
2878
+ signals: create_context_signals(o)
2879
+ });
2880
+ const { destroy: _ } = h(p, m);
2881
2881
  return {
2882
2882
  destroy: () => {
2883
2883
  t.stop(), _();
2884
2884
  }
2885
2885
  };
2886
2886
  };
2887
- }, create_action = async ({ server: i, cdn_url: e, frame: n, tag: a }) => {
2888
- const f = async (t) => {
2889
- const s = await Promise.all(
2890
- t.map(
2891
- ({ frame: o, tag: r }) => create_action({
2892
- server: i,
2893
- cdn_url: e,
2894
- frame: o,
2895
- tag: r
2896
- })
2897
- )
2898
- );
2899
- return (o) => {
2900
- const r = s.map((l) => l(o));
2901
- return { destroy: () => r.forEach(({ destroy: l }) => l()) };
2902
- };
2887
+ }, create_frame = async ({
2888
+ server: i,
2889
+ frame: e,
2890
+ tag: n
2891
+ }) => {
2892
+ const f = { host: i };
2893
+ await test_connection(f);
2894
+ const u = new Service$1(f), [a, t] = await Promise.all([
2895
+ make_values({ id: e, tag: n ?? null, host: i, service: u }),
2896
+ make_signals({ id: e, tag: n ?? null, host: i, service: u })
2897
+ ]), s = concat([
2898
+ header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
2899
+ nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
2900
+ ]);
2901
+ return u.start(), u.on_connect(() => {
2902
+ const o = concat([
2903
+ header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
2904
+ nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
2905
+ ]);
2906
+ u.publish(o);
2907
+ }), service_publish(f, s), { values: create_context_values(a), signals: create_context_signals(t) };
2908
+ }, create_frame_ui = async ({
2909
+ server: i,
2910
+ cdn_url: e,
2911
+ frame: n,
2912
+ tag: f
2913
+ }) => {
2914
+ const u = async (a, t) => {
2915
+ const s = await create_frame_ui({
2916
+ server: i,
2917
+ cdn_url: e,
2918
+ frame: a,
2919
+ tag: t
2920
+ });
2921
+ return (o) => s(o);
2903
2922
  };
2904
- return create_app(i, n, a ?? null, e, {
2905
- one: (t, s) => f([{ frame: t, tag: s }]),
2906
- all: (t) => f(t)
2923
+ return create_component$1(i, n, f ?? null, e, {
2924
+ frame_ui: (a, t) => u(a, t),
2925
+ frame: (a, t) => create_frame({ server: i, frame: a, tag: t })
2907
2926
  });
2908
- }, create_component = async (i, e) => (await create_action(e))(i);
2927
+ }, create_component = async (i, e) => (await create_frame_ui(e))(i);
2909
2928
  export {
2910
- create_component
2929
+ create_component,
2930
+ create_frame,
2931
+ create_frame_ui
2911
2932
  };