@vocdoni/proto 1.15.2 → 1.15.4

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.
Files changed (50) hide show
  1. package/build/js/client-store/index.d.ts +3 -0
  2. package/build/js/client-store/index.js +2904 -0
  3. package/build/js/client-store/index.mjs +2891 -0
  4. package/build/js/entity-e8dfcd83.d.ts +1804 -0
  5. package/build/js/index-05df597a.d.ts +1972 -0
  6. package/build/js/index-5d7943a4.d.ts +10656 -0
  7. package/build/js/index-d457aeb5.d.ts +1924 -0
  8. package/build/js/index.d.ts +5 -0
  9. package/build/js/index.js +406 -588
  10. package/build/js/index.mjs +10682 -0
  11. package/build/js/metadata/index.d.ts +3 -0
  12. package/build/js/metadata/index.js +4314 -0
  13. package/build/js/metadata/index.mjs +4271 -0
  14. package/build/js/vochain/index.d.ts +2 -0
  15. package/build/js/vochain/index.js +6489 -0
  16. package/build/js/vochain/index.mjs +6414 -0
  17. package/package.json +7 -3
  18. package/.github/workflows/on-release.yml +0 -19
  19. package/.github/workflows/post-merge.yml +0 -30
  20. package/AUTHORS +0 -7
  21. package/DEVELOPING.md +0 -86
  22. package/Makefile +0 -140
  23. package/bin/protoc +0 -0
  24. package/code-of-conduct.md +0 -77
  25. package/go.mod +0 -8
  26. package/go.sum +0 -69
  27. package/include/google/protobuf/any.proto +0 -158
  28. package/include/google/protobuf/api.proto +0 -208
  29. package/include/google/protobuf/compiler/plugin.proto +0 -183
  30. package/include/google/protobuf/descriptor.proto +0 -909
  31. package/include/google/protobuf/duration.proto +0 -116
  32. package/include/google/protobuf/empty.proto +0 -52
  33. package/include/google/protobuf/field_mask.proto +0 -245
  34. package/include/google/protobuf/source_context.proto +0 -48
  35. package/include/google/protobuf/struct.proto +0 -95
  36. package/include/google/protobuf/timestamp.proto +0 -147
  37. package/include/google/protobuf/type.proto +0 -187
  38. package/include/google/protobuf/wrappers.proto +0 -123
  39. package/src/client-store/account.proto +0 -54
  40. package/src/client-store/backup.proto +0 -65
  41. package/src/client-store/gateway.proto +0 -35
  42. package/src/client-store/wallet.proto +0 -19
  43. package/src/ipfsSync/ipfssync.proto +0 -26
  44. package/src/metadata/entity.proto +0 -75
  45. package/src/metadata/feed.proto +0 -51
  46. package/src/metadata/process.proto +0 -38
  47. package/src/vocdoni-node/statedb.proto +0 -35
  48. package/src/vochain/vochain.proto +0 -493
  49. package/tsconfig.json +0 -15
  50. package/tsup.config.ts +0 -15
@@ -0,0 +1,4314 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod2) => function __require() {
9
+ return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target,
29
+ mod2
30
+ ));
31
+ var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
32
+
33
+ // node_modules/@protobufjs/aspromise/index.js
34
+ var require_aspromise = __commonJS({
35
+ "node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
36
+ "use strict";
37
+ module2.exports = asPromise;
38
+ function asPromise(fn, ctx) {
39
+ var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
40
+ while (index < arguments.length)
41
+ params[offset++] = arguments[index++];
42
+ return new Promise(function executor(resolve, reject) {
43
+ params[offset] = function callback(err) {
44
+ if (pending) {
45
+ pending = false;
46
+ if (err)
47
+ reject(err);
48
+ else {
49
+ var params2 = new Array(arguments.length - 1), offset2 = 0;
50
+ while (offset2 < params2.length)
51
+ params2[offset2++] = arguments[offset2];
52
+ resolve.apply(null, params2);
53
+ }
54
+ }
55
+ };
56
+ try {
57
+ fn.apply(ctx || null, params);
58
+ } catch (err) {
59
+ if (pending) {
60
+ pending = false;
61
+ reject(err);
62
+ }
63
+ }
64
+ });
65
+ }
66
+ }
67
+ });
68
+
69
+ // node_modules/@protobufjs/base64/index.js
70
+ var require_base64 = __commonJS({
71
+ "node_modules/@protobufjs/base64/index.js"(exports2) {
72
+ "use strict";
73
+ var base64 = exports2;
74
+ base64.length = function length(string) {
75
+ var p = string.length;
76
+ if (!p)
77
+ return 0;
78
+ var n = 0;
79
+ while (--p % 4 > 1 && string.charAt(p) === "=")
80
+ ++n;
81
+ return Math.ceil(string.length * 3) / 4 - n;
82
+ };
83
+ var b64 = new Array(64);
84
+ var s64 = new Array(123);
85
+ for (i = 0; i < 64; )
86
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
87
+ var i;
88
+ base64.encode = function encode(buffer, start, end) {
89
+ var parts = null, chunk = [];
90
+ var i2 = 0, j = 0, t;
91
+ while (start < end) {
92
+ var b = buffer[start++];
93
+ switch (j) {
94
+ case 0:
95
+ chunk[i2++] = b64[b >> 2];
96
+ t = (b & 3) << 4;
97
+ j = 1;
98
+ break;
99
+ case 1:
100
+ chunk[i2++] = b64[t | b >> 4];
101
+ t = (b & 15) << 2;
102
+ j = 2;
103
+ break;
104
+ case 2:
105
+ chunk[i2++] = b64[t | b >> 6];
106
+ chunk[i2++] = b64[b & 63];
107
+ j = 0;
108
+ break;
109
+ }
110
+ if (i2 > 8191) {
111
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
112
+ i2 = 0;
113
+ }
114
+ }
115
+ if (j) {
116
+ chunk[i2++] = b64[t];
117
+ chunk[i2++] = 61;
118
+ if (j === 1)
119
+ chunk[i2++] = 61;
120
+ }
121
+ if (parts) {
122
+ if (i2)
123
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
124
+ return parts.join("");
125
+ }
126
+ return String.fromCharCode.apply(String, chunk.slice(0, i2));
127
+ };
128
+ var invalidEncoding = "invalid encoding";
129
+ base64.decode = function decode(string, buffer, offset) {
130
+ var start = offset;
131
+ var j = 0, t;
132
+ for (var i2 = 0; i2 < string.length; ) {
133
+ var c = string.charCodeAt(i2++);
134
+ if (c === 61 && j > 1)
135
+ break;
136
+ if ((c = s64[c]) === void 0)
137
+ throw Error(invalidEncoding);
138
+ switch (j) {
139
+ case 0:
140
+ t = c;
141
+ j = 1;
142
+ break;
143
+ case 1:
144
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
145
+ t = c;
146
+ j = 2;
147
+ break;
148
+ case 2:
149
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
150
+ t = c;
151
+ j = 3;
152
+ break;
153
+ case 3:
154
+ buffer[offset++] = (t & 3) << 6 | c;
155
+ j = 0;
156
+ break;
157
+ }
158
+ }
159
+ if (j === 1)
160
+ throw Error(invalidEncoding);
161
+ return offset - start;
162
+ };
163
+ base64.test = function test(string) {
164
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
165
+ };
166
+ }
167
+ });
168
+
169
+ // node_modules/@protobufjs/eventemitter/index.js
170
+ var require_eventemitter = __commonJS({
171
+ "node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
172
+ "use strict";
173
+ module2.exports = EventEmitter;
174
+ function EventEmitter() {
175
+ this._listeners = {};
176
+ }
177
+ EventEmitter.prototype.on = function on(evt, fn, ctx) {
178
+ (this._listeners[evt] || (this._listeners[evt] = [])).push({
179
+ fn,
180
+ ctx: ctx || this
181
+ });
182
+ return this;
183
+ };
184
+ EventEmitter.prototype.off = function off(evt, fn) {
185
+ if (evt === void 0)
186
+ this._listeners = {};
187
+ else {
188
+ if (fn === void 0)
189
+ this._listeners[evt] = [];
190
+ else {
191
+ var listeners = this._listeners[evt];
192
+ for (var i = 0; i < listeners.length; )
193
+ if (listeners[i].fn === fn)
194
+ listeners.splice(i, 1);
195
+ else
196
+ ++i;
197
+ }
198
+ }
199
+ return this;
200
+ };
201
+ EventEmitter.prototype.emit = function emit(evt) {
202
+ var listeners = this._listeners[evt];
203
+ if (listeners) {
204
+ var args = [], i = 1;
205
+ for (; i < arguments.length; )
206
+ args.push(arguments[i++]);
207
+ for (i = 0; i < listeners.length; )
208
+ listeners[i].fn.apply(listeners[i++].ctx, args);
209
+ }
210
+ return this;
211
+ };
212
+ }
213
+ });
214
+
215
+ // node_modules/@protobufjs/float/index.js
216
+ var require_float = __commonJS({
217
+ "node_modules/@protobufjs/float/index.js"(exports2, module2) {
218
+ "use strict";
219
+ module2.exports = factory(factory);
220
+ function factory(exports3) {
221
+ if (typeof Float32Array !== "undefined")
222
+ (function() {
223
+ var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
224
+ function writeFloat_f32_cpy(val, buf, pos) {
225
+ f32[0] = val;
226
+ buf[pos] = f8b[0];
227
+ buf[pos + 1] = f8b[1];
228
+ buf[pos + 2] = f8b[2];
229
+ buf[pos + 3] = f8b[3];
230
+ }
231
+ function writeFloat_f32_rev(val, buf, pos) {
232
+ f32[0] = val;
233
+ buf[pos] = f8b[3];
234
+ buf[pos + 1] = f8b[2];
235
+ buf[pos + 2] = f8b[1];
236
+ buf[pos + 3] = f8b[0];
237
+ }
238
+ exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
239
+ exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
240
+ function readFloat_f32_cpy(buf, pos) {
241
+ f8b[0] = buf[pos];
242
+ f8b[1] = buf[pos + 1];
243
+ f8b[2] = buf[pos + 2];
244
+ f8b[3] = buf[pos + 3];
245
+ return f32[0];
246
+ }
247
+ function readFloat_f32_rev(buf, pos) {
248
+ f8b[3] = buf[pos];
249
+ f8b[2] = buf[pos + 1];
250
+ f8b[1] = buf[pos + 2];
251
+ f8b[0] = buf[pos + 3];
252
+ return f32[0];
253
+ }
254
+ exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
255
+ exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
256
+ })();
257
+ else
258
+ (function() {
259
+ function writeFloat_ieee754(writeUint, val, buf, pos) {
260
+ var sign = val < 0 ? 1 : 0;
261
+ if (sign)
262
+ val = -val;
263
+ if (val === 0)
264
+ writeUint(1 / val > 0 ? (
265
+ /* positive */
266
+ 0
267
+ ) : (
268
+ /* negative 0 */
269
+ 2147483648
270
+ ), buf, pos);
271
+ else if (isNaN(val))
272
+ writeUint(2143289344, buf, pos);
273
+ else if (val > 34028234663852886e22)
274
+ writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
275
+ else if (val < 11754943508222875e-54)
276
+ writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
277
+ else {
278
+ var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
279
+ writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
280
+ }
281
+ }
282
+ exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
283
+ exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
284
+ function readFloat_ieee754(readUint, buf, pos) {
285
+ var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
286
+ return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
287
+ }
288
+ exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
289
+ exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
290
+ })();
291
+ if (typeof Float64Array !== "undefined")
292
+ (function() {
293
+ var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
294
+ function writeDouble_f64_cpy(val, buf, pos) {
295
+ f64[0] = val;
296
+ buf[pos] = f8b[0];
297
+ buf[pos + 1] = f8b[1];
298
+ buf[pos + 2] = f8b[2];
299
+ buf[pos + 3] = f8b[3];
300
+ buf[pos + 4] = f8b[4];
301
+ buf[pos + 5] = f8b[5];
302
+ buf[pos + 6] = f8b[6];
303
+ buf[pos + 7] = f8b[7];
304
+ }
305
+ function writeDouble_f64_rev(val, buf, pos) {
306
+ f64[0] = val;
307
+ buf[pos] = f8b[7];
308
+ buf[pos + 1] = f8b[6];
309
+ buf[pos + 2] = f8b[5];
310
+ buf[pos + 3] = f8b[4];
311
+ buf[pos + 4] = f8b[3];
312
+ buf[pos + 5] = f8b[2];
313
+ buf[pos + 6] = f8b[1];
314
+ buf[pos + 7] = f8b[0];
315
+ }
316
+ exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
317
+ exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
318
+ function readDouble_f64_cpy(buf, pos) {
319
+ f8b[0] = buf[pos];
320
+ f8b[1] = buf[pos + 1];
321
+ f8b[2] = buf[pos + 2];
322
+ f8b[3] = buf[pos + 3];
323
+ f8b[4] = buf[pos + 4];
324
+ f8b[5] = buf[pos + 5];
325
+ f8b[6] = buf[pos + 6];
326
+ f8b[7] = buf[pos + 7];
327
+ return f64[0];
328
+ }
329
+ function readDouble_f64_rev(buf, pos) {
330
+ f8b[7] = buf[pos];
331
+ f8b[6] = buf[pos + 1];
332
+ f8b[5] = buf[pos + 2];
333
+ f8b[4] = buf[pos + 3];
334
+ f8b[3] = buf[pos + 4];
335
+ f8b[2] = buf[pos + 5];
336
+ f8b[1] = buf[pos + 6];
337
+ f8b[0] = buf[pos + 7];
338
+ return f64[0];
339
+ }
340
+ exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
341
+ exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
342
+ })();
343
+ else
344
+ (function() {
345
+ function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
346
+ var sign = val < 0 ? 1 : 0;
347
+ if (sign)
348
+ val = -val;
349
+ if (val === 0) {
350
+ writeUint(0, buf, pos + off0);
351
+ writeUint(1 / val > 0 ? (
352
+ /* positive */
353
+ 0
354
+ ) : (
355
+ /* negative 0 */
356
+ 2147483648
357
+ ), buf, pos + off1);
358
+ } else if (isNaN(val)) {
359
+ writeUint(0, buf, pos + off0);
360
+ writeUint(2146959360, buf, pos + off1);
361
+ } else if (val > 17976931348623157e292) {
362
+ writeUint(0, buf, pos + off0);
363
+ writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
364
+ } else {
365
+ var mantissa;
366
+ if (val < 22250738585072014e-324) {
367
+ mantissa = val / 5e-324;
368
+ writeUint(mantissa >>> 0, buf, pos + off0);
369
+ writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
370
+ } else {
371
+ var exponent = Math.floor(Math.log(val) / Math.LN2);
372
+ if (exponent === 1024)
373
+ exponent = 1023;
374
+ mantissa = val * Math.pow(2, -exponent);
375
+ writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
376
+ writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
377
+ }
378
+ }
379
+ }
380
+ exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
381
+ exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
382
+ function readDouble_ieee754(readUint, off0, off1, buf, pos) {
383
+ var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
384
+ var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
385
+ return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
386
+ }
387
+ exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
388
+ exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
389
+ })();
390
+ return exports3;
391
+ }
392
+ function writeUintLE(val, buf, pos) {
393
+ buf[pos] = val & 255;
394
+ buf[pos + 1] = val >>> 8 & 255;
395
+ buf[pos + 2] = val >>> 16 & 255;
396
+ buf[pos + 3] = val >>> 24;
397
+ }
398
+ function writeUintBE(val, buf, pos) {
399
+ buf[pos] = val >>> 24;
400
+ buf[pos + 1] = val >>> 16 & 255;
401
+ buf[pos + 2] = val >>> 8 & 255;
402
+ buf[pos + 3] = val & 255;
403
+ }
404
+ function readUintLE(buf, pos) {
405
+ return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
406
+ }
407
+ function readUintBE(buf, pos) {
408
+ return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
409
+ }
410
+ }
411
+ });
412
+
413
+ // node_modules/@protobufjs/inquire/index.js
414
+ var require_inquire = __commonJS({
415
+ "node_modules/@protobufjs/inquire/index.js"(exports, module) {
416
+ "use strict";
417
+ module.exports = inquire;
418
+ function inquire(moduleName) {
419
+ try {
420
+ var mod = eval("quire".replace(/^/, "re"))(moduleName);
421
+ if (mod && (mod.length || Object.keys(mod).length))
422
+ return mod;
423
+ } catch (e) {
424
+ }
425
+ return null;
426
+ }
427
+ }
428
+ });
429
+
430
+ // node_modules/@protobufjs/utf8/index.js
431
+ var require_utf8 = __commonJS({
432
+ "node_modules/@protobufjs/utf8/index.js"(exports2) {
433
+ "use strict";
434
+ var utf8 = exports2;
435
+ utf8.length = function utf8_length(string) {
436
+ var len = 0, c = 0;
437
+ for (var i = 0; i < string.length; ++i) {
438
+ c = string.charCodeAt(i);
439
+ if (c < 128)
440
+ len += 1;
441
+ else if (c < 2048)
442
+ len += 2;
443
+ else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
444
+ ++i;
445
+ len += 4;
446
+ } else
447
+ len += 3;
448
+ }
449
+ return len;
450
+ };
451
+ utf8.read = function utf8_read(buffer, start, end) {
452
+ var len = end - start;
453
+ if (len < 1)
454
+ return "";
455
+ var parts = null, chunk = [], i = 0, t;
456
+ while (start < end) {
457
+ t = buffer[start++];
458
+ if (t < 128)
459
+ chunk[i++] = t;
460
+ else if (t > 191 && t < 224)
461
+ chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
462
+ else if (t > 239 && t < 365) {
463
+ t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
464
+ chunk[i++] = 55296 + (t >> 10);
465
+ chunk[i++] = 56320 + (t & 1023);
466
+ } else
467
+ chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
468
+ if (i > 8191) {
469
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
470
+ i = 0;
471
+ }
472
+ }
473
+ if (parts) {
474
+ if (i)
475
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
476
+ return parts.join("");
477
+ }
478
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
479
+ };
480
+ utf8.write = function utf8_write(string, buffer, offset) {
481
+ var start = offset, c1, c2;
482
+ for (var i = 0; i < string.length; ++i) {
483
+ c1 = string.charCodeAt(i);
484
+ if (c1 < 128) {
485
+ buffer[offset++] = c1;
486
+ } else if (c1 < 2048) {
487
+ buffer[offset++] = c1 >> 6 | 192;
488
+ buffer[offset++] = c1 & 63 | 128;
489
+ } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
490
+ c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
491
+ ++i;
492
+ buffer[offset++] = c1 >> 18 | 240;
493
+ buffer[offset++] = c1 >> 12 & 63 | 128;
494
+ buffer[offset++] = c1 >> 6 & 63 | 128;
495
+ buffer[offset++] = c1 & 63 | 128;
496
+ } else {
497
+ buffer[offset++] = c1 >> 12 | 224;
498
+ buffer[offset++] = c1 >> 6 & 63 | 128;
499
+ buffer[offset++] = c1 & 63 | 128;
500
+ }
501
+ }
502
+ return offset - start;
503
+ };
504
+ }
505
+ });
506
+
507
+ // node_modules/@protobufjs/pool/index.js
508
+ var require_pool = __commonJS({
509
+ "node_modules/@protobufjs/pool/index.js"(exports2, module2) {
510
+ "use strict";
511
+ module2.exports = pool;
512
+ function pool(alloc, slice, size) {
513
+ var SIZE = size || 8192;
514
+ var MAX = SIZE >>> 1;
515
+ var slab = null;
516
+ var offset = SIZE;
517
+ return function pool_alloc(size2) {
518
+ if (size2 < 1 || size2 > MAX)
519
+ return alloc(size2);
520
+ if (offset + size2 > SIZE) {
521
+ slab = alloc(SIZE);
522
+ offset = 0;
523
+ }
524
+ var buf = slice.call(slab, offset, offset += size2);
525
+ if (offset & 7)
526
+ offset = (offset | 7) + 1;
527
+ return buf;
528
+ };
529
+ }
530
+ }
531
+ });
532
+
533
+ // node_modules/protobufjs/src/util/longbits.js
534
+ var require_longbits = __commonJS({
535
+ "node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
536
+ "use strict";
537
+ module2.exports = LongBits;
538
+ var util = require_minimal();
539
+ function LongBits(lo, hi) {
540
+ this.lo = lo >>> 0;
541
+ this.hi = hi >>> 0;
542
+ }
543
+ var zero = LongBits.zero = new LongBits(0, 0);
544
+ zero.toNumber = function() {
545
+ return 0;
546
+ };
547
+ zero.zzEncode = zero.zzDecode = function() {
548
+ return this;
549
+ };
550
+ zero.length = function() {
551
+ return 1;
552
+ };
553
+ var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
554
+ LongBits.fromNumber = function fromNumber(value) {
555
+ if (value === 0)
556
+ return zero;
557
+ var sign = value < 0;
558
+ if (sign)
559
+ value = -value;
560
+ var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
561
+ if (sign) {
562
+ hi = ~hi >>> 0;
563
+ lo = ~lo >>> 0;
564
+ if (++lo > 4294967295) {
565
+ lo = 0;
566
+ if (++hi > 4294967295)
567
+ hi = 0;
568
+ }
569
+ }
570
+ return new LongBits(lo, hi);
571
+ };
572
+ LongBits.from = function from(value) {
573
+ if (typeof value === "number")
574
+ return LongBits.fromNumber(value);
575
+ if (util.isString(value)) {
576
+ if (util.Long)
577
+ value = util.Long.fromString(value);
578
+ else
579
+ return LongBits.fromNumber(parseInt(value, 10));
580
+ }
581
+ return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
582
+ };
583
+ LongBits.prototype.toNumber = function toNumber(unsigned) {
584
+ if (!unsigned && this.hi >>> 31) {
585
+ var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
586
+ if (!lo)
587
+ hi = hi + 1 >>> 0;
588
+ return -(lo + hi * 4294967296);
589
+ }
590
+ return this.lo + this.hi * 4294967296;
591
+ };
592
+ LongBits.prototype.toLong = function toLong(unsigned) {
593
+ return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
594
+ };
595
+ var charCodeAt = String.prototype.charCodeAt;
596
+ LongBits.fromHash = function fromHash(hash) {
597
+ if (hash === zeroHash)
598
+ return zero;
599
+ return new LongBits(
600
+ (charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
601
+ (charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
602
+ );
603
+ };
604
+ LongBits.prototype.toHash = function toHash() {
605
+ return String.fromCharCode(
606
+ this.lo & 255,
607
+ this.lo >>> 8 & 255,
608
+ this.lo >>> 16 & 255,
609
+ this.lo >>> 24,
610
+ this.hi & 255,
611
+ this.hi >>> 8 & 255,
612
+ this.hi >>> 16 & 255,
613
+ this.hi >>> 24
614
+ );
615
+ };
616
+ LongBits.prototype.zzEncode = function zzEncode() {
617
+ var mask = this.hi >> 31;
618
+ this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
619
+ this.lo = (this.lo << 1 ^ mask) >>> 0;
620
+ return this;
621
+ };
622
+ LongBits.prototype.zzDecode = function zzDecode() {
623
+ var mask = -(this.lo & 1);
624
+ this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
625
+ this.hi = (this.hi >>> 1 ^ mask) >>> 0;
626
+ return this;
627
+ };
628
+ LongBits.prototype.length = function length() {
629
+ var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
630
+ return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
631
+ };
632
+ }
633
+ });
634
+
635
+ // node_modules/protobufjs/src/util/minimal.js
636
+ var require_minimal = __commonJS({
637
+ "node_modules/protobufjs/src/util/minimal.js"(exports2) {
638
+ "use strict";
639
+ var util = exports2;
640
+ util.asPromise = require_aspromise();
641
+ util.base64 = require_base64();
642
+ util.EventEmitter = require_eventemitter();
643
+ util.float = require_float();
644
+ util.inquire = require_inquire();
645
+ util.utf8 = require_utf8();
646
+ util.pool = require_pool();
647
+ util.LongBits = require_longbits();
648
+ util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
649
+ util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
650
+ util.emptyArray = Object.freeze ? Object.freeze([]) : (
651
+ /* istanbul ignore next */
652
+ []
653
+ );
654
+ util.emptyObject = Object.freeze ? Object.freeze({}) : (
655
+ /* istanbul ignore next */
656
+ {}
657
+ );
658
+ util.isInteger = Number.isInteger || /* istanbul ignore next */
659
+ function isInteger(value) {
660
+ return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
661
+ };
662
+ util.isString = function isString(value) {
663
+ return typeof value === "string" || value instanceof String;
664
+ };
665
+ util.isObject = function isObject4(value) {
666
+ return value && typeof value === "object";
667
+ };
668
+ util.isset = /**
669
+ * Checks if a property on a message is considered to be present.
670
+ * @param {Object} obj Plain object or message instance
671
+ * @param {string} prop Property name
672
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
673
+ */
674
+ util.isSet = function isSet4(obj, prop) {
675
+ var value = obj[prop];
676
+ if (value != null && obj.hasOwnProperty(prop))
677
+ return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
678
+ return false;
679
+ };
680
+ util.Buffer = function() {
681
+ try {
682
+ var Buffer2 = util.inquire("buffer").Buffer;
683
+ return Buffer2.prototype.utf8Write ? Buffer2 : (
684
+ /* istanbul ignore next */
685
+ null
686
+ );
687
+ } catch (e) {
688
+ return null;
689
+ }
690
+ }();
691
+ util._Buffer_from = null;
692
+ util._Buffer_allocUnsafe = null;
693
+ util.newBuffer = function newBuffer(sizeOrArray) {
694
+ return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
695
+ };
696
+ util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
697
+ util.Long = /* istanbul ignore next */
698
+ util.global.dcodeIO && /* istanbul ignore next */
699
+ util.global.dcodeIO.Long || /* istanbul ignore next */
700
+ util.global.Long || util.inquire("long");
701
+ util.key2Re = /^true|false|0|1$/;
702
+ util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
703
+ util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
704
+ util.longToHash = function longToHash(value) {
705
+ return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
706
+ };
707
+ util.longFromHash = function longFromHash(hash, unsigned) {
708
+ var bits = util.LongBits.fromHash(hash);
709
+ if (util.Long)
710
+ return util.Long.fromBits(bits.lo, bits.hi, unsigned);
711
+ return bits.toNumber(Boolean(unsigned));
712
+ };
713
+ function merge(dst, src, ifNotSet) {
714
+ for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
715
+ if (dst[keys[i]] === void 0 || !ifNotSet)
716
+ dst[keys[i]] = src[keys[i]];
717
+ return dst;
718
+ }
719
+ util.merge = merge;
720
+ util.lcFirst = function lcFirst(str) {
721
+ return str.charAt(0).toLowerCase() + str.substring(1);
722
+ };
723
+ function newError(name) {
724
+ function CustomError(message, properties) {
725
+ if (!(this instanceof CustomError))
726
+ return new CustomError(message, properties);
727
+ Object.defineProperty(this, "message", { get: function() {
728
+ return message;
729
+ } });
730
+ if (Error.captureStackTrace)
731
+ Error.captureStackTrace(this, CustomError);
732
+ else
733
+ Object.defineProperty(this, "stack", { value: new Error().stack || "" });
734
+ if (properties)
735
+ merge(this, properties);
736
+ }
737
+ CustomError.prototype = Object.create(Error.prototype, {
738
+ constructor: {
739
+ value: CustomError,
740
+ writable: true,
741
+ enumerable: false,
742
+ configurable: true
743
+ },
744
+ name: {
745
+ get: function get() {
746
+ return name;
747
+ },
748
+ set: void 0,
749
+ enumerable: false,
750
+ // configurable: false would accurately preserve the behavior of
751
+ // the original, but I'm guessing that was not intentional.
752
+ // For an actual error subclass, this property would
753
+ // be configurable.
754
+ configurable: true
755
+ },
756
+ toString: {
757
+ value: function value() {
758
+ return this.name + ": " + this.message;
759
+ },
760
+ writable: true,
761
+ enumerable: false,
762
+ configurable: true
763
+ }
764
+ });
765
+ return CustomError;
766
+ }
767
+ util.newError = newError;
768
+ util.ProtocolError = newError("ProtocolError");
769
+ util.oneOfGetter = function getOneOf(fieldNames) {
770
+ var fieldMap = {};
771
+ for (var i = 0; i < fieldNames.length; ++i)
772
+ fieldMap[fieldNames[i]] = 1;
773
+ return function() {
774
+ for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
775
+ if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
776
+ return keys[i2];
777
+ };
778
+ };
779
+ util.oneOfSetter = function setOneOf(fieldNames) {
780
+ return function(name) {
781
+ for (var i = 0; i < fieldNames.length; ++i)
782
+ if (fieldNames[i] !== name)
783
+ delete this[fieldNames[i]];
784
+ };
785
+ };
786
+ util.toJSONOptions = {
787
+ longs: String,
788
+ enums: String,
789
+ bytes: String,
790
+ json: true
791
+ };
792
+ util._configure = function() {
793
+ var Buffer2 = util.Buffer;
794
+ if (!Buffer2) {
795
+ util._Buffer_from = util._Buffer_allocUnsafe = null;
796
+ return;
797
+ }
798
+ util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
799
+ function Buffer_from(value, encoding) {
800
+ return new Buffer2(value, encoding);
801
+ };
802
+ util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
803
+ function Buffer_allocUnsafe(size) {
804
+ return new Buffer2(size);
805
+ };
806
+ };
807
+ }
808
+ });
809
+
810
+ // node_modules/protobufjs/src/writer.js
811
+ var require_writer = __commonJS({
812
+ "node_modules/protobufjs/src/writer.js"(exports2, module2) {
813
+ "use strict";
814
+ module2.exports = Writer;
815
+ var util = require_minimal();
816
+ var BufferWriter;
817
+ var LongBits = util.LongBits;
818
+ var base64 = util.base64;
819
+ var utf8 = util.utf8;
820
+ function Op(fn, len, val) {
821
+ this.fn = fn;
822
+ this.len = len;
823
+ this.next = void 0;
824
+ this.val = val;
825
+ }
826
+ function noop() {
827
+ }
828
+ function State(writer) {
829
+ this.head = writer.head;
830
+ this.tail = writer.tail;
831
+ this.len = writer.len;
832
+ this.next = writer.states;
833
+ }
834
+ function Writer() {
835
+ this.len = 0;
836
+ this.head = new Op(noop, 0, 0);
837
+ this.tail = this.head;
838
+ this.states = null;
839
+ }
840
+ var create = function create2() {
841
+ return util.Buffer ? function create_buffer_setup() {
842
+ return (Writer.create = function create_buffer() {
843
+ return new BufferWriter();
844
+ })();
845
+ } : function create_array() {
846
+ return new Writer();
847
+ };
848
+ };
849
+ Writer.create = create();
850
+ Writer.alloc = function alloc(size) {
851
+ return new util.Array(size);
852
+ };
853
+ if (util.Array !== Array)
854
+ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
855
+ Writer.prototype._push = function push(fn, len, val) {
856
+ this.tail = this.tail.next = new Op(fn, len, val);
857
+ this.len += len;
858
+ return this;
859
+ };
860
+ function writeByte(val, buf, pos) {
861
+ buf[pos] = val & 255;
862
+ }
863
+ function writeVarint32(val, buf, pos) {
864
+ while (val > 127) {
865
+ buf[pos++] = val & 127 | 128;
866
+ val >>>= 7;
867
+ }
868
+ buf[pos] = val;
869
+ }
870
+ function VarintOp(len, val) {
871
+ this.len = len;
872
+ this.next = void 0;
873
+ this.val = val;
874
+ }
875
+ VarintOp.prototype = Object.create(Op.prototype);
876
+ VarintOp.prototype.fn = writeVarint32;
877
+ Writer.prototype.uint32 = function write_uint32(value) {
878
+ this.len += (this.tail = this.tail.next = new VarintOp(
879
+ (value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
880
+ value
881
+ )).len;
882
+ return this;
883
+ };
884
+ Writer.prototype.int32 = function write_int32(value) {
885
+ return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
886
+ };
887
+ Writer.prototype.sint32 = function write_sint32(value) {
888
+ return this.uint32((value << 1 ^ value >> 31) >>> 0);
889
+ };
890
+ function writeVarint64(val, buf, pos) {
891
+ while (val.hi) {
892
+ buf[pos++] = val.lo & 127 | 128;
893
+ val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
894
+ val.hi >>>= 7;
895
+ }
896
+ while (val.lo > 127) {
897
+ buf[pos++] = val.lo & 127 | 128;
898
+ val.lo = val.lo >>> 7;
899
+ }
900
+ buf[pos++] = val.lo;
901
+ }
902
+ Writer.prototype.uint64 = function write_uint64(value) {
903
+ var bits = LongBits.from(value);
904
+ return this._push(writeVarint64, bits.length(), bits);
905
+ };
906
+ Writer.prototype.int64 = Writer.prototype.uint64;
907
+ Writer.prototype.sint64 = function write_sint64(value) {
908
+ var bits = LongBits.from(value).zzEncode();
909
+ return this._push(writeVarint64, bits.length(), bits);
910
+ };
911
+ Writer.prototype.bool = function write_bool(value) {
912
+ return this._push(writeByte, 1, value ? 1 : 0);
913
+ };
914
+ function writeFixed32(val, buf, pos) {
915
+ buf[pos] = val & 255;
916
+ buf[pos + 1] = val >>> 8 & 255;
917
+ buf[pos + 2] = val >>> 16 & 255;
918
+ buf[pos + 3] = val >>> 24;
919
+ }
920
+ Writer.prototype.fixed32 = function write_fixed32(value) {
921
+ return this._push(writeFixed32, 4, value >>> 0);
922
+ };
923
+ Writer.prototype.sfixed32 = Writer.prototype.fixed32;
924
+ Writer.prototype.fixed64 = function write_fixed64(value) {
925
+ var bits = LongBits.from(value);
926
+ return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
927
+ };
928
+ Writer.prototype.sfixed64 = Writer.prototype.fixed64;
929
+ Writer.prototype.float = function write_float(value) {
930
+ return this._push(util.float.writeFloatLE, 4, value);
931
+ };
932
+ Writer.prototype.double = function write_double(value) {
933
+ return this._push(util.float.writeDoubleLE, 8, value);
934
+ };
935
+ var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
936
+ buf.set(val, pos);
937
+ } : function writeBytes_for(val, buf, pos) {
938
+ for (var i = 0; i < val.length; ++i)
939
+ buf[pos + i] = val[i];
940
+ };
941
+ Writer.prototype.bytes = function write_bytes(value) {
942
+ var len = value.length >>> 0;
943
+ if (!len)
944
+ return this._push(writeByte, 1, 0);
945
+ if (util.isString(value)) {
946
+ var buf = Writer.alloc(len = base64.length(value));
947
+ base64.decode(value, buf, 0);
948
+ value = buf;
949
+ }
950
+ return this.uint32(len)._push(writeBytes, len, value);
951
+ };
952
+ Writer.prototype.string = function write_string(value) {
953
+ var len = utf8.length(value);
954
+ return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
955
+ };
956
+ Writer.prototype.fork = function fork() {
957
+ this.states = new State(this);
958
+ this.head = this.tail = new Op(noop, 0, 0);
959
+ this.len = 0;
960
+ return this;
961
+ };
962
+ Writer.prototype.reset = function reset() {
963
+ if (this.states) {
964
+ this.head = this.states.head;
965
+ this.tail = this.states.tail;
966
+ this.len = this.states.len;
967
+ this.states = this.states.next;
968
+ } else {
969
+ this.head = this.tail = new Op(noop, 0, 0);
970
+ this.len = 0;
971
+ }
972
+ return this;
973
+ };
974
+ Writer.prototype.ldelim = function ldelim() {
975
+ var head = this.head, tail = this.tail, len = this.len;
976
+ this.reset().uint32(len);
977
+ if (len) {
978
+ this.tail.next = head.next;
979
+ this.tail = tail;
980
+ this.len += len;
981
+ }
982
+ return this;
983
+ };
984
+ Writer.prototype.finish = function finish() {
985
+ var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
986
+ while (head) {
987
+ head.fn(head.val, buf, pos);
988
+ pos += head.len;
989
+ head = head.next;
990
+ }
991
+ return buf;
992
+ };
993
+ Writer._configure = function(BufferWriter_) {
994
+ BufferWriter = BufferWriter_;
995
+ Writer.create = create();
996
+ BufferWriter._configure();
997
+ };
998
+ }
999
+ });
1000
+
1001
+ // node_modules/protobufjs/src/writer_buffer.js
1002
+ var require_writer_buffer = __commonJS({
1003
+ "node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
1004
+ "use strict";
1005
+ module2.exports = BufferWriter;
1006
+ var Writer = require_writer();
1007
+ (BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
1008
+ var util = require_minimal();
1009
+ function BufferWriter() {
1010
+ Writer.call(this);
1011
+ }
1012
+ BufferWriter._configure = function() {
1013
+ BufferWriter.alloc = util._Buffer_allocUnsafe;
1014
+ BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
1015
+ buf.set(val, pos);
1016
+ } : function writeBytesBuffer_copy(val, buf, pos) {
1017
+ if (val.copy)
1018
+ val.copy(buf, pos, 0, val.length);
1019
+ else
1020
+ for (var i = 0; i < val.length; )
1021
+ buf[pos++] = val[i++];
1022
+ };
1023
+ };
1024
+ BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
1025
+ if (util.isString(value))
1026
+ value = util._Buffer_from(value, "base64");
1027
+ var len = value.length >>> 0;
1028
+ this.uint32(len);
1029
+ if (len)
1030
+ this._push(BufferWriter.writeBytesBuffer, len, value);
1031
+ return this;
1032
+ };
1033
+ function writeStringBuffer(val, buf, pos) {
1034
+ if (val.length < 40)
1035
+ util.utf8.write(val, buf, pos);
1036
+ else if (buf.utf8Write)
1037
+ buf.utf8Write(val, pos);
1038
+ else
1039
+ buf.write(val, pos);
1040
+ }
1041
+ BufferWriter.prototype.string = function write_string_buffer(value) {
1042
+ var len = util.Buffer.byteLength(value);
1043
+ this.uint32(len);
1044
+ if (len)
1045
+ this._push(writeStringBuffer, len, value);
1046
+ return this;
1047
+ };
1048
+ BufferWriter._configure();
1049
+ }
1050
+ });
1051
+
1052
+ // node_modules/protobufjs/src/reader.js
1053
+ var require_reader = __commonJS({
1054
+ "node_modules/protobufjs/src/reader.js"(exports2, module2) {
1055
+ "use strict";
1056
+ module2.exports = Reader;
1057
+ var util = require_minimal();
1058
+ var BufferReader;
1059
+ var LongBits = util.LongBits;
1060
+ var utf8 = util.utf8;
1061
+ function indexOutOfRange(reader, writeLength) {
1062
+ return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
1063
+ }
1064
+ function Reader(buffer) {
1065
+ this.buf = buffer;
1066
+ this.pos = 0;
1067
+ this.len = buffer.length;
1068
+ }
1069
+ var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
1070
+ if (buffer instanceof Uint8Array || Array.isArray(buffer))
1071
+ return new Reader(buffer);
1072
+ throw Error("illegal buffer");
1073
+ } : function create_array2(buffer) {
1074
+ if (Array.isArray(buffer))
1075
+ return new Reader(buffer);
1076
+ throw Error("illegal buffer");
1077
+ };
1078
+ var create = function create2() {
1079
+ return util.Buffer ? function create_buffer_setup(buffer) {
1080
+ return (Reader.create = function create_buffer(buffer2) {
1081
+ return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
1082
+ })(buffer);
1083
+ } : create_array;
1084
+ };
1085
+ Reader.create = create();
1086
+ Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
1087
+ util.Array.prototype.slice;
1088
+ Reader.prototype.uint32 = function read_uint32_setup() {
1089
+ var value = 4294967295;
1090
+ return function read_uint32() {
1091
+ value = (this.buf[this.pos] & 127) >>> 0;
1092
+ if (this.buf[this.pos++] < 128)
1093
+ return value;
1094
+ value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
1095
+ if (this.buf[this.pos++] < 128)
1096
+ return value;
1097
+ value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
1098
+ if (this.buf[this.pos++] < 128)
1099
+ return value;
1100
+ value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
1101
+ if (this.buf[this.pos++] < 128)
1102
+ return value;
1103
+ value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
1104
+ if (this.buf[this.pos++] < 128)
1105
+ return value;
1106
+ if ((this.pos += 5) > this.len) {
1107
+ this.pos = this.len;
1108
+ throw indexOutOfRange(this, 10);
1109
+ }
1110
+ return value;
1111
+ };
1112
+ }();
1113
+ Reader.prototype.int32 = function read_int32() {
1114
+ return this.uint32() | 0;
1115
+ };
1116
+ Reader.prototype.sint32 = function read_sint32() {
1117
+ var value = this.uint32();
1118
+ return value >>> 1 ^ -(value & 1) | 0;
1119
+ };
1120
+ function readLongVarint() {
1121
+ var bits = new LongBits(0, 0);
1122
+ var i = 0;
1123
+ if (this.len - this.pos > 4) {
1124
+ for (; i < 4; ++i) {
1125
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1126
+ if (this.buf[this.pos++] < 128)
1127
+ return bits;
1128
+ }
1129
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
1130
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
1131
+ if (this.buf[this.pos++] < 128)
1132
+ return bits;
1133
+ i = 0;
1134
+ } else {
1135
+ for (; i < 3; ++i) {
1136
+ if (this.pos >= this.len)
1137
+ throw indexOutOfRange(this);
1138
+ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
1139
+ if (this.buf[this.pos++] < 128)
1140
+ return bits;
1141
+ }
1142
+ bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
1143
+ return bits;
1144
+ }
1145
+ if (this.len - this.pos > 4) {
1146
+ for (; i < 5; ++i) {
1147
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1148
+ if (this.buf[this.pos++] < 128)
1149
+ return bits;
1150
+ }
1151
+ } else {
1152
+ for (; i < 5; ++i) {
1153
+ if (this.pos >= this.len)
1154
+ throw indexOutOfRange(this);
1155
+ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
1156
+ if (this.buf[this.pos++] < 128)
1157
+ return bits;
1158
+ }
1159
+ }
1160
+ throw Error("invalid varint encoding");
1161
+ }
1162
+ Reader.prototype.bool = function read_bool() {
1163
+ return this.uint32() !== 0;
1164
+ };
1165
+ function readFixed32_end(buf, end) {
1166
+ return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
1167
+ }
1168
+ Reader.prototype.fixed32 = function read_fixed32() {
1169
+ if (this.pos + 4 > this.len)
1170
+ throw indexOutOfRange(this, 4);
1171
+ return readFixed32_end(this.buf, this.pos += 4);
1172
+ };
1173
+ Reader.prototype.sfixed32 = function read_sfixed32() {
1174
+ if (this.pos + 4 > this.len)
1175
+ throw indexOutOfRange(this, 4);
1176
+ return readFixed32_end(this.buf, this.pos += 4) | 0;
1177
+ };
1178
+ function readFixed64() {
1179
+ if (this.pos + 8 > this.len)
1180
+ throw indexOutOfRange(this, 8);
1181
+ return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
1182
+ }
1183
+ Reader.prototype.float = function read_float() {
1184
+ if (this.pos + 4 > this.len)
1185
+ throw indexOutOfRange(this, 4);
1186
+ var value = util.float.readFloatLE(this.buf, this.pos);
1187
+ this.pos += 4;
1188
+ return value;
1189
+ };
1190
+ Reader.prototype.double = function read_double() {
1191
+ if (this.pos + 8 > this.len)
1192
+ throw indexOutOfRange(this, 4);
1193
+ var value = util.float.readDoubleLE(this.buf, this.pos);
1194
+ this.pos += 8;
1195
+ return value;
1196
+ };
1197
+ Reader.prototype.bytes = function read_bytes() {
1198
+ var length = this.uint32(), start = this.pos, end = this.pos + length;
1199
+ if (end > this.len)
1200
+ throw indexOutOfRange(this, length);
1201
+ this.pos += length;
1202
+ if (Array.isArray(this.buf))
1203
+ return this.buf.slice(start, end);
1204
+ if (start === end) {
1205
+ var nativeBuffer = util.Buffer;
1206
+ return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
1207
+ }
1208
+ return this._slice.call(this.buf, start, end);
1209
+ };
1210
+ Reader.prototype.string = function read_string() {
1211
+ var bytes = this.bytes();
1212
+ return utf8.read(bytes, 0, bytes.length);
1213
+ };
1214
+ Reader.prototype.skip = function skip(length) {
1215
+ if (typeof length === "number") {
1216
+ if (this.pos + length > this.len)
1217
+ throw indexOutOfRange(this, length);
1218
+ this.pos += length;
1219
+ } else {
1220
+ do {
1221
+ if (this.pos >= this.len)
1222
+ throw indexOutOfRange(this);
1223
+ } while (this.buf[this.pos++] & 128);
1224
+ }
1225
+ return this;
1226
+ };
1227
+ Reader.prototype.skipType = function(wireType) {
1228
+ switch (wireType) {
1229
+ case 0:
1230
+ this.skip();
1231
+ break;
1232
+ case 1:
1233
+ this.skip(8);
1234
+ break;
1235
+ case 2:
1236
+ this.skip(this.uint32());
1237
+ break;
1238
+ case 3:
1239
+ while ((wireType = this.uint32() & 7) !== 4) {
1240
+ this.skipType(wireType);
1241
+ }
1242
+ break;
1243
+ case 5:
1244
+ this.skip(4);
1245
+ break;
1246
+ default:
1247
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
1248
+ }
1249
+ return this;
1250
+ };
1251
+ Reader._configure = function(BufferReader_) {
1252
+ BufferReader = BufferReader_;
1253
+ Reader.create = create();
1254
+ BufferReader._configure();
1255
+ var fn = util.Long ? "toLong" : (
1256
+ /* istanbul ignore next */
1257
+ "toNumber"
1258
+ );
1259
+ util.merge(Reader.prototype, {
1260
+ int64: function read_int64() {
1261
+ return readLongVarint.call(this)[fn](false);
1262
+ },
1263
+ uint64: function read_uint64() {
1264
+ return readLongVarint.call(this)[fn](true);
1265
+ },
1266
+ sint64: function read_sint64() {
1267
+ return readLongVarint.call(this).zzDecode()[fn](false);
1268
+ },
1269
+ fixed64: function read_fixed64() {
1270
+ return readFixed64.call(this)[fn](true);
1271
+ },
1272
+ sfixed64: function read_sfixed64() {
1273
+ return readFixed64.call(this)[fn](false);
1274
+ }
1275
+ });
1276
+ };
1277
+ }
1278
+ });
1279
+
1280
+ // node_modules/protobufjs/src/reader_buffer.js
1281
+ var require_reader_buffer = __commonJS({
1282
+ "node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
1283
+ "use strict";
1284
+ module2.exports = BufferReader;
1285
+ var Reader = require_reader();
1286
+ (BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
1287
+ var util = require_minimal();
1288
+ function BufferReader(buffer) {
1289
+ Reader.call(this, buffer);
1290
+ }
1291
+ BufferReader._configure = function() {
1292
+ if (util.Buffer)
1293
+ BufferReader.prototype._slice = util.Buffer.prototype.slice;
1294
+ };
1295
+ BufferReader.prototype.string = function read_string_buffer() {
1296
+ var len = this.uint32();
1297
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
1298
+ };
1299
+ BufferReader._configure();
1300
+ }
1301
+ });
1302
+
1303
+ // node_modules/protobufjs/src/rpc/service.js
1304
+ var require_service = __commonJS({
1305
+ "node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
1306
+ "use strict";
1307
+ module2.exports = Service;
1308
+ var util = require_minimal();
1309
+ (Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
1310
+ function Service(rpcImpl, requestDelimited, responseDelimited) {
1311
+ if (typeof rpcImpl !== "function")
1312
+ throw TypeError("rpcImpl must be a function");
1313
+ util.EventEmitter.call(this);
1314
+ this.rpcImpl = rpcImpl;
1315
+ this.requestDelimited = Boolean(requestDelimited);
1316
+ this.responseDelimited = Boolean(responseDelimited);
1317
+ }
1318
+ Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
1319
+ if (!request)
1320
+ throw TypeError("request must be specified");
1321
+ var self2 = this;
1322
+ if (!callback)
1323
+ return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
1324
+ if (!self2.rpcImpl) {
1325
+ setTimeout(function() {
1326
+ callback(Error("already ended"));
1327
+ }, 0);
1328
+ return void 0;
1329
+ }
1330
+ try {
1331
+ return self2.rpcImpl(
1332
+ method,
1333
+ requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
1334
+ function rpcCallback(err, response) {
1335
+ if (err) {
1336
+ self2.emit("error", err, method);
1337
+ return callback(err);
1338
+ }
1339
+ if (response === null) {
1340
+ self2.end(
1341
+ /* endedByRPC */
1342
+ true
1343
+ );
1344
+ return void 0;
1345
+ }
1346
+ if (!(response instanceof responseCtor)) {
1347
+ try {
1348
+ response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
1349
+ } catch (err2) {
1350
+ self2.emit("error", err2, method);
1351
+ return callback(err2);
1352
+ }
1353
+ }
1354
+ self2.emit("data", response, method);
1355
+ return callback(null, response);
1356
+ }
1357
+ );
1358
+ } catch (err) {
1359
+ self2.emit("error", err, method);
1360
+ setTimeout(function() {
1361
+ callback(err);
1362
+ }, 0);
1363
+ return void 0;
1364
+ }
1365
+ };
1366
+ Service.prototype.end = function end(endedByRPC) {
1367
+ if (this.rpcImpl) {
1368
+ if (!endedByRPC)
1369
+ this.rpcImpl(null, null, null);
1370
+ this.rpcImpl = null;
1371
+ this.emit("end").off();
1372
+ }
1373
+ return this;
1374
+ };
1375
+ }
1376
+ });
1377
+
1378
+ // node_modules/protobufjs/src/rpc.js
1379
+ var require_rpc = __commonJS({
1380
+ "node_modules/protobufjs/src/rpc.js"(exports2) {
1381
+ "use strict";
1382
+ var rpc = exports2;
1383
+ rpc.Service = require_service();
1384
+ }
1385
+ });
1386
+
1387
+ // node_modules/protobufjs/src/roots.js
1388
+ var require_roots = __commonJS({
1389
+ "node_modules/protobufjs/src/roots.js"(exports2, module2) {
1390
+ "use strict";
1391
+ module2.exports = {};
1392
+ }
1393
+ });
1394
+
1395
+ // node_modules/protobufjs/src/index-minimal.js
1396
+ var require_index_minimal = __commonJS({
1397
+ "node_modules/protobufjs/src/index-minimal.js"(exports2) {
1398
+ "use strict";
1399
+ var protobuf = exports2;
1400
+ protobuf.build = "minimal";
1401
+ protobuf.Writer = require_writer();
1402
+ protobuf.BufferWriter = require_writer_buffer();
1403
+ protobuf.Reader = require_reader();
1404
+ protobuf.BufferReader = require_reader_buffer();
1405
+ protobuf.util = require_minimal();
1406
+ protobuf.rpc = require_rpc();
1407
+ protobuf.roots = require_roots();
1408
+ protobuf.configure = configure;
1409
+ function configure() {
1410
+ protobuf.util._configure();
1411
+ protobuf.Writer._configure(protobuf.BufferWriter);
1412
+ protobuf.Reader._configure(protobuf.BufferReader);
1413
+ }
1414
+ configure();
1415
+ }
1416
+ });
1417
+
1418
+ // node_modules/protobufjs/minimal.js
1419
+ var require_minimal2 = __commonJS({
1420
+ "node_modules/protobufjs/minimal.js"(exports2, module2) {
1421
+ "use strict";
1422
+ module2.exports = require_index_minimal();
1423
+ }
1424
+ });
1425
+
1426
+ // build/ts/metadata/index.ts
1427
+ var metadata_exports = {};
1428
+ __export(metadata_exports, {
1429
+ EntityMetadata: () => EntityMetadata,
1430
+ EntityMetadataStore: () => EntityMetadataStore,
1431
+ EntityMetadata_Action: () => EntityMetadata_Action,
1432
+ EntityMetadata_Action_ImageSource: () => EntityMetadata_Action_ImageSource,
1433
+ EntityMetadata_Action_ImageSource_CaptionEntry: () => EntityMetadata_Action_ImageSource_CaptionEntry,
1434
+ EntityMetadata_Action_NameEntry: () => EntityMetadata_Action_NameEntry,
1435
+ EntityMetadata_DescriptionEntry: () => EntityMetadata_DescriptionEntry,
1436
+ EntityMetadata_Media: () => EntityMetadata_Media,
1437
+ EntityMetadata_MetaEntry: () => EntityMetadata_MetaEntry,
1438
+ EntityMetadata_NameEntry: () => EntityMetadata_NameEntry,
1439
+ EntityMetadata_NewsFeedEntry: () => EntityMetadata_NewsFeedEntry,
1440
+ EntityMetadata_VotingProcesses: () => EntityMetadata_VotingProcesses,
1441
+ EntityReference: () => EntityReference,
1442
+ Feed: () => Feed,
1443
+ FeedPost: () => FeedPost,
1444
+ FeedPost_Author: () => FeedPost_Author,
1445
+ FeedStore: () => FeedStore,
1446
+ Feed_MetaEntry: () => Feed_MetaEntry,
1447
+ ProcessMetadata: () => ProcessMetadata,
1448
+ ProcessMetadataStore: () => ProcessMetadataStore,
1449
+ ProcessMetadata_DescriptionEntry: () => ProcessMetadata_DescriptionEntry,
1450
+ ProcessMetadata_MediaEntry: () => ProcessMetadata_MediaEntry,
1451
+ ProcessMetadata_MetaEntry: () => ProcessMetadata_MetaEntry,
1452
+ ProcessMetadata_Question: () => ProcessMetadata_Question,
1453
+ ProcessMetadata_Question_DescriptionEntry: () => ProcessMetadata_Question_DescriptionEntry,
1454
+ ProcessMetadata_Question_TitleEntry: () => ProcessMetadata_Question_TitleEntry,
1455
+ ProcessMetadata_Question_VoteOption: () => ProcessMetadata_Question_VoteOption,
1456
+ ProcessMetadata_Question_VoteOption_TitleEntry: () => ProcessMetadata_Question_VoteOption_TitleEntry,
1457
+ ProcessMetadata_Results: () => ProcessMetadata_Results,
1458
+ ProcessMetadata_TitleEntry: () => ProcessMetadata_TitleEntry
1459
+ });
1460
+ module.exports = __toCommonJS(metadata_exports);
1461
+
1462
+ // build/ts/metadata/entity.ts
1463
+ var import_minimal = __toESM(require_minimal2());
1464
+ function createBaseEntityMetadataStore() {
1465
+ return { items: [] };
1466
+ }
1467
+ var EntityMetadataStore = {
1468
+ encode(message, writer = import_minimal.default.Writer.create()) {
1469
+ for (const v of message.items) {
1470
+ EntityMetadata.encode(v, writer.uint32(10).fork()).ldelim();
1471
+ }
1472
+ return writer;
1473
+ },
1474
+ decode(input, length) {
1475
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
1476
+ let end = length === void 0 ? reader.len : reader.pos + length;
1477
+ const message = createBaseEntityMetadataStore();
1478
+ while (reader.pos < end) {
1479
+ const tag = reader.uint32();
1480
+ switch (tag >>> 3) {
1481
+ case 1:
1482
+ if (tag !== 10) {
1483
+ break;
1484
+ }
1485
+ message.items.push(EntityMetadata.decode(reader, reader.uint32()));
1486
+ continue;
1487
+ }
1488
+ if ((tag & 7) === 4 || tag === 0) {
1489
+ break;
1490
+ }
1491
+ reader.skipType(tag & 7);
1492
+ }
1493
+ return message;
1494
+ },
1495
+ fromJSON(object) {
1496
+ return {
1497
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => EntityMetadata.fromJSON(e)) : []
1498
+ };
1499
+ },
1500
+ toJSON(message) {
1501
+ const obj = {};
1502
+ if (message.items?.length) {
1503
+ obj.items = message.items.map((e) => EntityMetadata.toJSON(e));
1504
+ }
1505
+ return obj;
1506
+ },
1507
+ create(base) {
1508
+ return EntityMetadataStore.fromPartial(base ?? {});
1509
+ },
1510
+ fromPartial(object) {
1511
+ const message = createBaseEntityMetadataStore();
1512
+ message.items = object.items?.map((e) => EntityMetadata.fromPartial(e)) || [];
1513
+ return message;
1514
+ }
1515
+ };
1516
+ function createBaseEntityMetadata() {
1517
+ return {
1518
+ version: "",
1519
+ languages: [],
1520
+ name: {},
1521
+ description: {},
1522
+ votingProcesses: void 0,
1523
+ newsFeed: {},
1524
+ media: void 0,
1525
+ actions: [],
1526
+ bootEntities: [],
1527
+ fallbackBootNodeEntities: [],
1528
+ trustedEntities: [],
1529
+ censusServiceManagedEntities: [],
1530
+ meta: {}
1531
+ };
1532
+ }
1533
+ var EntityMetadata = {
1534
+ encode(message, writer = import_minimal.default.Writer.create()) {
1535
+ if (message.version !== "") {
1536
+ writer.uint32(10).string(message.version);
1537
+ }
1538
+ for (const v of message.languages) {
1539
+ writer.uint32(18).string(v);
1540
+ }
1541
+ Object.entries(message.name).forEach(([key, value]) => {
1542
+ EntityMetadata_NameEntry.encode({ key, value }, writer.uint32(26).fork()).ldelim();
1543
+ });
1544
+ Object.entries(message.description).forEach(([key, value]) => {
1545
+ EntityMetadata_DescriptionEntry.encode({ key, value }, writer.uint32(34).fork()).ldelim();
1546
+ });
1547
+ if (message.votingProcesses !== void 0) {
1548
+ EntityMetadata_VotingProcesses.encode(message.votingProcesses, writer.uint32(42).fork()).ldelim();
1549
+ }
1550
+ Object.entries(message.newsFeed).forEach(([key, value]) => {
1551
+ EntityMetadata_NewsFeedEntry.encode({ key, value }, writer.uint32(50).fork()).ldelim();
1552
+ });
1553
+ if (message.media !== void 0) {
1554
+ EntityMetadata_Media.encode(message.media, writer.uint32(58).fork()).ldelim();
1555
+ }
1556
+ for (const v of message.actions) {
1557
+ EntityMetadata_Action.encode(v, writer.uint32(66).fork()).ldelim();
1558
+ }
1559
+ for (const v of message.bootEntities) {
1560
+ EntityReference.encode(v, writer.uint32(74).fork()).ldelim();
1561
+ }
1562
+ for (const v of message.fallbackBootNodeEntities) {
1563
+ EntityReference.encode(v, writer.uint32(82).fork()).ldelim();
1564
+ }
1565
+ for (const v of message.trustedEntities) {
1566
+ EntityReference.encode(v, writer.uint32(90).fork()).ldelim();
1567
+ }
1568
+ for (const v of message.censusServiceManagedEntities) {
1569
+ EntityReference.encode(v, writer.uint32(98).fork()).ldelim();
1570
+ }
1571
+ Object.entries(message.meta).forEach(([key, value]) => {
1572
+ EntityMetadata_MetaEntry.encode({ key, value }, writer.uint32(802).fork()).ldelim();
1573
+ });
1574
+ return writer;
1575
+ },
1576
+ decode(input, length) {
1577
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
1578
+ let end = length === void 0 ? reader.len : reader.pos + length;
1579
+ const message = createBaseEntityMetadata();
1580
+ while (reader.pos < end) {
1581
+ const tag = reader.uint32();
1582
+ switch (tag >>> 3) {
1583
+ case 1:
1584
+ if (tag !== 10) {
1585
+ break;
1586
+ }
1587
+ message.version = reader.string();
1588
+ continue;
1589
+ case 2:
1590
+ if (tag !== 18) {
1591
+ break;
1592
+ }
1593
+ message.languages.push(reader.string());
1594
+ continue;
1595
+ case 3:
1596
+ if (tag !== 26) {
1597
+ break;
1598
+ }
1599
+ const entry3 = EntityMetadata_NameEntry.decode(reader, reader.uint32());
1600
+ if (entry3.value !== void 0) {
1601
+ message.name[entry3.key] = entry3.value;
1602
+ }
1603
+ continue;
1604
+ case 4:
1605
+ if (tag !== 34) {
1606
+ break;
1607
+ }
1608
+ const entry4 = EntityMetadata_DescriptionEntry.decode(reader, reader.uint32());
1609
+ if (entry4.value !== void 0) {
1610
+ message.description[entry4.key] = entry4.value;
1611
+ }
1612
+ continue;
1613
+ case 5:
1614
+ if (tag !== 42) {
1615
+ break;
1616
+ }
1617
+ message.votingProcesses = EntityMetadata_VotingProcesses.decode(reader, reader.uint32());
1618
+ continue;
1619
+ case 6:
1620
+ if (tag !== 50) {
1621
+ break;
1622
+ }
1623
+ const entry6 = EntityMetadata_NewsFeedEntry.decode(reader, reader.uint32());
1624
+ if (entry6.value !== void 0) {
1625
+ message.newsFeed[entry6.key] = entry6.value;
1626
+ }
1627
+ continue;
1628
+ case 7:
1629
+ if (tag !== 58) {
1630
+ break;
1631
+ }
1632
+ message.media = EntityMetadata_Media.decode(reader, reader.uint32());
1633
+ continue;
1634
+ case 8:
1635
+ if (tag !== 66) {
1636
+ break;
1637
+ }
1638
+ message.actions.push(EntityMetadata_Action.decode(reader, reader.uint32()));
1639
+ continue;
1640
+ case 9:
1641
+ if (tag !== 74) {
1642
+ break;
1643
+ }
1644
+ message.bootEntities.push(EntityReference.decode(reader, reader.uint32()));
1645
+ continue;
1646
+ case 10:
1647
+ if (tag !== 82) {
1648
+ break;
1649
+ }
1650
+ message.fallbackBootNodeEntities.push(EntityReference.decode(reader, reader.uint32()));
1651
+ continue;
1652
+ case 11:
1653
+ if (tag !== 90) {
1654
+ break;
1655
+ }
1656
+ message.trustedEntities.push(EntityReference.decode(reader, reader.uint32()));
1657
+ continue;
1658
+ case 12:
1659
+ if (tag !== 98) {
1660
+ break;
1661
+ }
1662
+ message.censusServiceManagedEntities.push(EntityReference.decode(reader, reader.uint32()));
1663
+ continue;
1664
+ case 100:
1665
+ if (tag !== 802) {
1666
+ break;
1667
+ }
1668
+ const entry100 = EntityMetadata_MetaEntry.decode(reader, reader.uint32());
1669
+ if (entry100.value !== void 0) {
1670
+ message.meta[entry100.key] = entry100.value;
1671
+ }
1672
+ continue;
1673
+ }
1674
+ if ((tag & 7) === 4 || tag === 0) {
1675
+ break;
1676
+ }
1677
+ reader.skipType(tag & 7);
1678
+ }
1679
+ return message;
1680
+ },
1681
+ fromJSON(object) {
1682
+ return {
1683
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
1684
+ languages: globalThis.Array.isArray(object?.languages) ? object.languages.map((e) => globalThis.String(e)) : [],
1685
+ name: isObject(object.name) ? Object.entries(object.name).reduce((acc, [key, value]) => {
1686
+ acc[key] = String(value);
1687
+ return acc;
1688
+ }, {}) : {},
1689
+ description: isObject(object.description) ? Object.entries(object.description).reduce((acc, [key, value]) => {
1690
+ acc[key] = String(value);
1691
+ return acc;
1692
+ }, {}) : {},
1693
+ votingProcesses: isSet(object.votingProcesses) ? EntityMetadata_VotingProcesses.fromJSON(object.votingProcesses) : void 0,
1694
+ newsFeed: isObject(object.newsFeed) ? Object.entries(object.newsFeed).reduce((acc, [key, value]) => {
1695
+ acc[key] = String(value);
1696
+ return acc;
1697
+ }, {}) : {},
1698
+ media: isSet(object.media) ? EntityMetadata_Media.fromJSON(object.media) : void 0,
1699
+ actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e) => EntityMetadata_Action.fromJSON(e)) : [],
1700
+ bootEntities: globalThis.Array.isArray(object?.bootEntities) ? object.bootEntities.map((e) => EntityReference.fromJSON(e)) : [],
1701
+ fallbackBootNodeEntities: globalThis.Array.isArray(object?.fallbackBootNodeEntities) ? object.fallbackBootNodeEntities.map((e) => EntityReference.fromJSON(e)) : [],
1702
+ trustedEntities: globalThis.Array.isArray(object?.trustedEntities) ? object.trustedEntities.map((e) => EntityReference.fromJSON(e)) : [],
1703
+ censusServiceManagedEntities: globalThis.Array.isArray(object?.censusServiceManagedEntities) ? object.censusServiceManagedEntities.map((e) => EntityReference.fromJSON(e)) : [],
1704
+ meta: isObject(object.meta) ? Object.entries(object.meta).reduce((acc, [key, value]) => {
1705
+ acc[key] = String(value);
1706
+ return acc;
1707
+ }, {}) : {}
1708
+ };
1709
+ },
1710
+ toJSON(message) {
1711
+ const obj = {};
1712
+ if (message.version !== "") {
1713
+ obj.version = message.version;
1714
+ }
1715
+ if (message.languages?.length) {
1716
+ obj.languages = message.languages;
1717
+ }
1718
+ if (message.name) {
1719
+ const entries = Object.entries(message.name);
1720
+ if (entries.length > 0) {
1721
+ obj.name = {};
1722
+ entries.forEach(([k, v]) => {
1723
+ obj.name[k] = v;
1724
+ });
1725
+ }
1726
+ }
1727
+ if (message.description) {
1728
+ const entries = Object.entries(message.description);
1729
+ if (entries.length > 0) {
1730
+ obj.description = {};
1731
+ entries.forEach(([k, v]) => {
1732
+ obj.description[k] = v;
1733
+ });
1734
+ }
1735
+ }
1736
+ if (message.votingProcesses !== void 0) {
1737
+ obj.votingProcesses = EntityMetadata_VotingProcesses.toJSON(message.votingProcesses);
1738
+ }
1739
+ if (message.newsFeed) {
1740
+ const entries = Object.entries(message.newsFeed);
1741
+ if (entries.length > 0) {
1742
+ obj.newsFeed = {};
1743
+ entries.forEach(([k, v]) => {
1744
+ obj.newsFeed[k] = v;
1745
+ });
1746
+ }
1747
+ }
1748
+ if (message.media !== void 0) {
1749
+ obj.media = EntityMetadata_Media.toJSON(message.media);
1750
+ }
1751
+ if (message.actions?.length) {
1752
+ obj.actions = message.actions.map((e) => EntityMetadata_Action.toJSON(e));
1753
+ }
1754
+ if (message.bootEntities?.length) {
1755
+ obj.bootEntities = message.bootEntities.map((e) => EntityReference.toJSON(e));
1756
+ }
1757
+ if (message.fallbackBootNodeEntities?.length) {
1758
+ obj.fallbackBootNodeEntities = message.fallbackBootNodeEntities.map((e) => EntityReference.toJSON(e));
1759
+ }
1760
+ if (message.trustedEntities?.length) {
1761
+ obj.trustedEntities = message.trustedEntities.map((e) => EntityReference.toJSON(e));
1762
+ }
1763
+ if (message.censusServiceManagedEntities?.length) {
1764
+ obj.censusServiceManagedEntities = message.censusServiceManagedEntities.map((e) => EntityReference.toJSON(e));
1765
+ }
1766
+ if (message.meta) {
1767
+ const entries = Object.entries(message.meta);
1768
+ if (entries.length > 0) {
1769
+ obj.meta = {};
1770
+ entries.forEach(([k, v]) => {
1771
+ obj.meta[k] = v;
1772
+ });
1773
+ }
1774
+ }
1775
+ return obj;
1776
+ },
1777
+ create(base) {
1778
+ return EntityMetadata.fromPartial(base ?? {});
1779
+ },
1780
+ fromPartial(object) {
1781
+ const message = createBaseEntityMetadata();
1782
+ message.version = object.version ?? "";
1783
+ message.languages = object.languages?.map((e) => e) || [];
1784
+ message.name = Object.entries(object.name ?? {}).reduce((acc, [key, value]) => {
1785
+ if (value !== void 0) {
1786
+ acc[key] = globalThis.String(value);
1787
+ }
1788
+ return acc;
1789
+ }, {});
1790
+ message.description = Object.entries(object.description ?? {}).reduce(
1791
+ (acc, [key, value]) => {
1792
+ if (value !== void 0) {
1793
+ acc[key] = globalThis.String(value);
1794
+ }
1795
+ return acc;
1796
+ },
1797
+ {}
1798
+ );
1799
+ message.votingProcesses = object.votingProcesses !== void 0 && object.votingProcesses !== null ? EntityMetadata_VotingProcesses.fromPartial(object.votingProcesses) : void 0;
1800
+ message.newsFeed = Object.entries(object.newsFeed ?? {}).reduce((acc, [key, value]) => {
1801
+ if (value !== void 0) {
1802
+ acc[key] = globalThis.String(value);
1803
+ }
1804
+ return acc;
1805
+ }, {});
1806
+ message.media = object.media !== void 0 && object.media !== null ? EntityMetadata_Media.fromPartial(object.media) : void 0;
1807
+ message.actions = object.actions?.map((e) => EntityMetadata_Action.fromPartial(e)) || [];
1808
+ message.bootEntities = object.bootEntities?.map((e) => EntityReference.fromPartial(e)) || [];
1809
+ message.fallbackBootNodeEntities = object.fallbackBootNodeEntities?.map((e) => EntityReference.fromPartial(e)) || [];
1810
+ message.trustedEntities = object.trustedEntities?.map((e) => EntityReference.fromPartial(e)) || [];
1811
+ message.censusServiceManagedEntities = object.censusServiceManagedEntities?.map((e) => EntityReference.fromPartial(e)) || [];
1812
+ message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
1813
+ if (value !== void 0) {
1814
+ acc[key] = globalThis.String(value);
1815
+ }
1816
+ return acc;
1817
+ }, {});
1818
+ return message;
1819
+ }
1820
+ };
1821
+ function createBaseEntityMetadata_NameEntry() {
1822
+ return { key: "", value: "" };
1823
+ }
1824
+ var EntityMetadata_NameEntry = {
1825
+ encode(message, writer = import_minimal.default.Writer.create()) {
1826
+ if (message.key !== "") {
1827
+ writer.uint32(10).string(message.key);
1828
+ }
1829
+ if (message.value !== "") {
1830
+ writer.uint32(18).string(message.value);
1831
+ }
1832
+ return writer;
1833
+ },
1834
+ decode(input, length) {
1835
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
1836
+ let end = length === void 0 ? reader.len : reader.pos + length;
1837
+ const message = createBaseEntityMetadata_NameEntry();
1838
+ while (reader.pos < end) {
1839
+ const tag = reader.uint32();
1840
+ switch (tag >>> 3) {
1841
+ case 1:
1842
+ if (tag !== 10) {
1843
+ break;
1844
+ }
1845
+ message.key = reader.string();
1846
+ continue;
1847
+ case 2:
1848
+ if (tag !== 18) {
1849
+ break;
1850
+ }
1851
+ message.value = reader.string();
1852
+ continue;
1853
+ }
1854
+ if ((tag & 7) === 4 || tag === 0) {
1855
+ break;
1856
+ }
1857
+ reader.skipType(tag & 7);
1858
+ }
1859
+ return message;
1860
+ },
1861
+ fromJSON(object) {
1862
+ return {
1863
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
1864
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
1865
+ };
1866
+ },
1867
+ toJSON(message) {
1868
+ const obj = {};
1869
+ if (message.key !== "") {
1870
+ obj.key = message.key;
1871
+ }
1872
+ if (message.value !== "") {
1873
+ obj.value = message.value;
1874
+ }
1875
+ return obj;
1876
+ },
1877
+ create(base) {
1878
+ return EntityMetadata_NameEntry.fromPartial(base ?? {});
1879
+ },
1880
+ fromPartial(object) {
1881
+ const message = createBaseEntityMetadata_NameEntry();
1882
+ message.key = object.key ?? "";
1883
+ message.value = object.value ?? "";
1884
+ return message;
1885
+ }
1886
+ };
1887
+ function createBaseEntityMetadata_DescriptionEntry() {
1888
+ return { key: "", value: "" };
1889
+ }
1890
+ var EntityMetadata_DescriptionEntry = {
1891
+ encode(message, writer = import_minimal.default.Writer.create()) {
1892
+ if (message.key !== "") {
1893
+ writer.uint32(10).string(message.key);
1894
+ }
1895
+ if (message.value !== "") {
1896
+ writer.uint32(18).string(message.value);
1897
+ }
1898
+ return writer;
1899
+ },
1900
+ decode(input, length) {
1901
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
1902
+ let end = length === void 0 ? reader.len : reader.pos + length;
1903
+ const message = createBaseEntityMetadata_DescriptionEntry();
1904
+ while (reader.pos < end) {
1905
+ const tag = reader.uint32();
1906
+ switch (tag >>> 3) {
1907
+ case 1:
1908
+ if (tag !== 10) {
1909
+ break;
1910
+ }
1911
+ message.key = reader.string();
1912
+ continue;
1913
+ case 2:
1914
+ if (tag !== 18) {
1915
+ break;
1916
+ }
1917
+ message.value = reader.string();
1918
+ continue;
1919
+ }
1920
+ if ((tag & 7) === 4 || tag === 0) {
1921
+ break;
1922
+ }
1923
+ reader.skipType(tag & 7);
1924
+ }
1925
+ return message;
1926
+ },
1927
+ fromJSON(object) {
1928
+ return {
1929
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
1930
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
1931
+ };
1932
+ },
1933
+ toJSON(message) {
1934
+ const obj = {};
1935
+ if (message.key !== "") {
1936
+ obj.key = message.key;
1937
+ }
1938
+ if (message.value !== "") {
1939
+ obj.value = message.value;
1940
+ }
1941
+ return obj;
1942
+ },
1943
+ create(base) {
1944
+ return EntityMetadata_DescriptionEntry.fromPartial(base ?? {});
1945
+ },
1946
+ fromPartial(object) {
1947
+ const message = createBaseEntityMetadata_DescriptionEntry();
1948
+ message.key = object.key ?? "";
1949
+ message.value = object.value ?? "";
1950
+ return message;
1951
+ }
1952
+ };
1953
+ function createBaseEntityMetadata_VotingProcesses() {
1954
+ return { active: [], ended: [] };
1955
+ }
1956
+ var EntityMetadata_VotingProcesses = {
1957
+ encode(message, writer = import_minimal.default.Writer.create()) {
1958
+ for (const v of message.active) {
1959
+ writer.uint32(10).string(v);
1960
+ }
1961
+ for (const v of message.ended) {
1962
+ writer.uint32(18).string(v);
1963
+ }
1964
+ return writer;
1965
+ },
1966
+ decode(input, length) {
1967
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
1968
+ let end = length === void 0 ? reader.len : reader.pos + length;
1969
+ const message = createBaseEntityMetadata_VotingProcesses();
1970
+ while (reader.pos < end) {
1971
+ const tag = reader.uint32();
1972
+ switch (tag >>> 3) {
1973
+ case 1:
1974
+ if (tag !== 10) {
1975
+ break;
1976
+ }
1977
+ message.active.push(reader.string());
1978
+ continue;
1979
+ case 2:
1980
+ if (tag !== 18) {
1981
+ break;
1982
+ }
1983
+ message.ended.push(reader.string());
1984
+ continue;
1985
+ }
1986
+ if ((tag & 7) === 4 || tag === 0) {
1987
+ break;
1988
+ }
1989
+ reader.skipType(tag & 7);
1990
+ }
1991
+ return message;
1992
+ },
1993
+ fromJSON(object) {
1994
+ return {
1995
+ active: globalThis.Array.isArray(object?.active) ? object.active.map((e) => globalThis.String(e)) : [],
1996
+ ended: globalThis.Array.isArray(object?.ended) ? object.ended.map((e) => globalThis.String(e)) : []
1997
+ };
1998
+ },
1999
+ toJSON(message) {
2000
+ const obj = {};
2001
+ if (message.active?.length) {
2002
+ obj.active = message.active;
2003
+ }
2004
+ if (message.ended?.length) {
2005
+ obj.ended = message.ended;
2006
+ }
2007
+ return obj;
2008
+ },
2009
+ create(base) {
2010
+ return EntityMetadata_VotingProcesses.fromPartial(base ?? {});
2011
+ },
2012
+ fromPartial(object) {
2013
+ const message = createBaseEntityMetadata_VotingProcesses();
2014
+ message.active = object.active?.map((e) => e) || [];
2015
+ message.ended = object.ended?.map((e) => e) || [];
2016
+ return message;
2017
+ }
2018
+ };
2019
+ function createBaseEntityMetadata_NewsFeedEntry() {
2020
+ return { key: "", value: "" };
2021
+ }
2022
+ var EntityMetadata_NewsFeedEntry = {
2023
+ encode(message, writer = import_minimal.default.Writer.create()) {
2024
+ if (message.key !== "") {
2025
+ writer.uint32(10).string(message.key);
2026
+ }
2027
+ if (message.value !== "") {
2028
+ writer.uint32(18).string(message.value);
2029
+ }
2030
+ return writer;
2031
+ },
2032
+ decode(input, length) {
2033
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2034
+ let end = length === void 0 ? reader.len : reader.pos + length;
2035
+ const message = createBaseEntityMetadata_NewsFeedEntry();
2036
+ while (reader.pos < end) {
2037
+ const tag = reader.uint32();
2038
+ switch (tag >>> 3) {
2039
+ case 1:
2040
+ if (tag !== 10) {
2041
+ break;
2042
+ }
2043
+ message.key = reader.string();
2044
+ continue;
2045
+ case 2:
2046
+ if (tag !== 18) {
2047
+ break;
2048
+ }
2049
+ message.value = reader.string();
2050
+ continue;
2051
+ }
2052
+ if ((tag & 7) === 4 || tag === 0) {
2053
+ break;
2054
+ }
2055
+ reader.skipType(tag & 7);
2056
+ }
2057
+ return message;
2058
+ },
2059
+ fromJSON(object) {
2060
+ return {
2061
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2062
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
2063
+ };
2064
+ },
2065
+ toJSON(message) {
2066
+ const obj = {};
2067
+ if (message.key !== "") {
2068
+ obj.key = message.key;
2069
+ }
2070
+ if (message.value !== "") {
2071
+ obj.value = message.value;
2072
+ }
2073
+ return obj;
2074
+ },
2075
+ create(base) {
2076
+ return EntityMetadata_NewsFeedEntry.fromPartial(base ?? {});
2077
+ },
2078
+ fromPartial(object) {
2079
+ const message = createBaseEntityMetadata_NewsFeedEntry();
2080
+ message.key = object.key ?? "";
2081
+ message.value = object.value ?? "";
2082
+ return message;
2083
+ }
2084
+ };
2085
+ function createBaseEntityMetadata_Media() {
2086
+ return { avatar: "", header: "" };
2087
+ }
2088
+ var EntityMetadata_Media = {
2089
+ encode(message, writer = import_minimal.default.Writer.create()) {
2090
+ if (message.avatar !== "") {
2091
+ writer.uint32(10).string(message.avatar);
2092
+ }
2093
+ if (message.header !== "") {
2094
+ writer.uint32(18).string(message.header);
2095
+ }
2096
+ return writer;
2097
+ },
2098
+ decode(input, length) {
2099
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2100
+ let end = length === void 0 ? reader.len : reader.pos + length;
2101
+ const message = createBaseEntityMetadata_Media();
2102
+ while (reader.pos < end) {
2103
+ const tag = reader.uint32();
2104
+ switch (tag >>> 3) {
2105
+ case 1:
2106
+ if (tag !== 10) {
2107
+ break;
2108
+ }
2109
+ message.avatar = reader.string();
2110
+ continue;
2111
+ case 2:
2112
+ if (tag !== 18) {
2113
+ break;
2114
+ }
2115
+ message.header = reader.string();
2116
+ continue;
2117
+ }
2118
+ if ((tag & 7) === 4 || tag === 0) {
2119
+ break;
2120
+ }
2121
+ reader.skipType(tag & 7);
2122
+ }
2123
+ return message;
2124
+ },
2125
+ fromJSON(object) {
2126
+ return {
2127
+ avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
2128
+ header: isSet(object.header) ? globalThis.String(object.header) : ""
2129
+ };
2130
+ },
2131
+ toJSON(message) {
2132
+ const obj = {};
2133
+ if (message.avatar !== "") {
2134
+ obj.avatar = message.avatar;
2135
+ }
2136
+ if (message.header !== "") {
2137
+ obj.header = message.header;
2138
+ }
2139
+ return obj;
2140
+ },
2141
+ create(base) {
2142
+ return EntityMetadata_Media.fromPartial(base ?? {});
2143
+ },
2144
+ fromPartial(object) {
2145
+ const message = createBaseEntityMetadata_Media();
2146
+ message.avatar = object.avatar ?? "";
2147
+ message.header = object.header ?? "";
2148
+ return message;
2149
+ }
2150
+ };
2151
+ function createBaseEntityMetadata_Action() {
2152
+ return { type: "", actionKey: "", name: {}, visible: "", url: "", imageSources: [] };
2153
+ }
2154
+ var EntityMetadata_Action = {
2155
+ encode(message, writer = import_minimal.default.Writer.create()) {
2156
+ if (message.type !== "") {
2157
+ writer.uint32(10).string(message.type);
2158
+ }
2159
+ if (message.actionKey !== "") {
2160
+ writer.uint32(58).string(message.actionKey);
2161
+ }
2162
+ Object.entries(message.name).forEach(([key, value]) => {
2163
+ EntityMetadata_Action_NameEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();
2164
+ });
2165
+ if (message.visible !== "") {
2166
+ writer.uint32(26).string(message.visible);
2167
+ }
2168
+ if (message.url !== "") {
2169
+ writer.uint32(34).string(message.url);
2170
+ }
2171
+ for (const v of message.imageSources) {
2172
+ EntityMetadata_Action_ImageSource.encode(v, writer.uint32(42).fork()).ldelim();
2173
+ }
2174
+ return writer;
2175
+ },
2176
+ decode(input, length) {
2177
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2178
+ let end = length === void 0 ? reader.len : reader.pos + length;
2179
+ const message = createBaseEntityMetadata_Action();
2180
+ while (reader.pos < end) {
2181
+ const tag = reader.uint32();
2182
+ switch (tag >>> 3) {
2183
+ case 1:
2184
+ if (tag !== 10) {
2185
+ break;
2186
+ }
2187
+ message.type = reader.string();
2188
+ continue;
2189
+ case 7:
2190
+ if (tag !== 58) {
2191
+ break;
2192
+ }
2193
+ message.actionKey = reader.string();
2194
+ continue;
2195
+ case 2:
2196
+ if (tag !== 18) {
2197
+ break;
2198
+ }
2199
+ const entry2 = EntityMetadata_Action_NameEntry.decode(reader, reader.uint32());
2200
+ if (entry2.value !== void 0) {
2201
+ message.name[entry2.key] = entry2.value;
2202
+ }
2203
+ continue;
2204
+ case 3:
2205
+ if (tag !== 26) {
2206
+ break;
2207
+ }
2208
+ message.visible = reader.string();
2209
+ continue;
2210
+ case 4:
2211
+ if (tag !== 34) {
2212
+ break;
2213
+ }
2214
+ message.url = reader.string();
2215
+ continue;
2216
+ case 5:
2217
+ if (tag !== 42) {
2218
+ break;
2219
+ }
2220
+ message.imageSources.push(EntityMetadata_Action_ImageSource.decode(reader, reader.uint32()));
2221
+ continue;
2222
+ }
2223
+ if ((tag & 7) === 4 || tag === 0) {
2224
+ break;
2225
+ }
2226
+ reader.skipType(tag & 7);
2227
+ }
2228
+ return message;
2229
+ },
2230
+ fromJSON(object) {
2231
+ return {
2232
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
2233
+ actionKey: isSet(object.actionKey) ? globalThis.String(object.actionKey) : "",
2234
+ name: isObject(object.name) ? Object.entries(object.name).reduce((acc, [key, value]) => {
2235
+ acc[key] = String(value);
2236
+ return acc;
2237
+ }, {}) : {},
2238
+ visible: isSet(object.visible) ? globalThis.String(object.visible) : "",
2239
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
2240
+ imageSources: globalThis.Array.isArray(object?.imageSources) ? object.imageSources.map((e) => EntityMetadata_Action_ImageSource.fromJSON(e)) : []
2241
+ };
2242
+ },
2243
+ toJSON(message) {
2244
+ const obj = {};
2245
+ if (message.type !== "") {
2246
+ obj.type = message.type;
2247
+ }
2248
+ if (message.actionKey !== "") {
2249
+ obj.actionKey = message.actionKey;
2250
+ }
2251
+ if (message.name) {
2252
+ const entries = Object.entries(message.name);
2253
+ if (entries.length > 0) {
2254
+ obj.name = {};
2255
+ entries.forEach(([k, v]) => {
2256
+ obj.name[k] = v;
2257
+ });
2258
+ }
2259
+ }
2260
+ if (message.visible !== "") {
2261
+ obj.visible = message.visible;
2262
+ }
2263
+ if (message.url !== "") {
2264
+ obj.url = message.url;
2265
+ }
2266
+ if (message.imageSources?.length) {
2267
+ obj.imageSources = message.imageSources.map((e) => EntityMetadata_Action_ImageSource.toJSON(e));
2268
+ }
2269
+ return obj;
2270
+ },
2271
+ create(base) {
2272
+ return EntityMetadata_Action.fromPartial(base ?? {});
2273
+ },
2274
+ fromPartial(object) {
2275
+ const message = createBaseEntityMetadata_Action();
2276
+ message.type = object.type ?? "";
2277
+ message.actionKey = object.actionKey ?? "";
2278
+ message.name = Object.entries(object.name ?? {}).reduce((acc, [key, value]) => {
2279
+ if (value !== void 0) {
2280
+ acc[key] = globalThis.String(value);
2281
+ }
2282
+ return acc;
2283
+ }, {});
2284
+ message.visible = object.visible ?? "";
2285
+ message.url = object.url ?? "";
2286
+ message.imageSources = object.imageSources?.map((e) => EntityMetadata_Action_ImageSource.fromPartial(e)) || [];
2287
+ return message;
2288
+ }
2289
+ };
2290
+ function createBaseEntityMetadata_Action_NameEntry() {
2291
+ return { key: "", value: "" };
2292
+ }
2293
+ var EntityMetadata_Action_NameEntry = {
2294
+ encode(message, writer = import_minimal.default.Writer.create()) {
2295
+ if (message.key !== "") {
2296
+ writer.uint32(10).string(message.key);
2297
+ }
2298
+ if (message.value !== "") {
2299
+ writer.uint32(18).string(message.value);
2300
+ }
2301
+ return writer;
2302
+ },
2303
+ decode(input, length) {
2304
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2305
+ let end = length === void 0 ? reader.len : reader.pos + length;
2306
+ const message = createBaseEntityMetadata_Action_NameEntry();
2307
+ while (reader.pos < end) {
2308
+ const tag = reader.uint32();
2309
+ switch (tag >>> 3) {
2310
+ case 1:
2311
+ if (tag !== 10) {
2312
+ break;
2313
+ }
2314
+ message.key = reader.string();
2315
+ continue;
2316
+ case 2:
2317
+ if (tag !== 18) {
2318
+ break;
2319
+ }
2320
+ message.value = reader.string();
2321
+ continue;
2322
+ }
2323
+ if ((tag & 7) === 4 || tag === 0) {
2324
+ break;
2325
+ }
2326
+ reader.skipType(tag & 7);
2327
+ }
2328
+ return message;
2329
+ },
2330
+ fromJSON(object) {
2331
+ return {
2332
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2333
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
2334
+ };
2335
+ },
2336
+ toJSON(message) {
2337
+ const obj = {};
2338
+ if (message.key !== "") {
2339
+ obj.key = message.key;
2340
+ }
2341
+ if (message.value !== "") {
2342
+ obj.value = message.value;
2343
+ }
2344
+ return obj;
2345
+ },
2346
+ create(base) {
2347
+ return EntityMetadata_Action_NameEntry.fromPartial(base ?? {});
2348
+ },
2349
+ fromPartial(object) {
2350
+ const message = createBaseEntityMetadata_Action_NameEntry();
2351
+ message.key = object.key ?? "";
2352
+ message.value = object.value ?? "";
2353
+ return message;
2354
+ }
2355
+ };
2356
+ function createBaseEntityMetadata_Action_ImageSource() {
2357
+ return { type: "", name: "", orientation: "", overlay: "", caption: {} };
2358
+ }
2359
+ var EntityMetadata_Action_ImageSource = {
2360
+ encode(message, writer = import_minimal.default.Writer.create()) {
2361
+ if (message.type !== "") {
2362
+ writer.uint32(10).string(message.type);
2363
+ }
2364
+ if (message.name !== "") {
2365
+ writer.uint32(18).string(message.name);
2366
+ }
2367
+ if (message.orientation !== "") {
2368
+ writer.uint32(26).string(message.orientation);
2369
+ }
2370
+ if (message.overlay !== "") {
2371
+ writer.uint32(34).string(message.overlay);
2372
+ }
2373
+ Object.entries(message.caption).forEach(([key, value]) => {
2374
+ EntityMetadata_Action_ImageSource_CaptionEntry.encode({ key, value }, writer.uint32(42).fork()).ldelim();
2375
+ });
2376
+ return writer;
2377
+ },
2378
+ decode(input, length) {
2379
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2380
+ let end = length === void 0 ? reader.len : reader.pos + length;
2381
+ const message = createBaseEntityMetadata_Action_ImageSource();
2382
+ while (reader.pos < end) {
2383
+ const tag = reader.uint32();
2384
+ switch (tag >>> 3) {
2385
+ case 1:
2386
+ if (tag !== 10) {
2387
+ break;
2388
+ }
2389
+ message.type = reader.string();
2390
+ continue;
2391
+ case 2:
2392
+ if (tag !== 18) {
2393
+ break;
2394
+ }
2395
+ message.name = reader.string();
2396
+ continue;
2397
+ case 3:
2398
+ if (tag !== 26) {
2399
+ break;
2400
+ }
2401
+ message.orientation = reader.string();
2402
+ continue;
2403
+ case 4:
2404
+ if (tag !== 34) {
2405
+ break;
2406
+ }
2407
+ message.overlay = reader.string();
2408
+ continue;
2409
+ case 5:
2410
+ if (tag !== 42) {
2411
+ break;
2412
+ }
2413
+ const entry5 = EntityMetadata_Action_ImageSource_CaptionEntry.decode(reader, reader.uint32());
2414
+ if (entry5.value !== void 0) {
2415
+ message.caption[entry5.key] = entry5.value;
2416
+ }
2417
+ continue;
2418
+ }
2419
+ if ((tag & 7) === 4 || tag === 0) {
2420
+ break;
2421
+ }
2422
+ reader.skipType(tag & 7);
2423
+ }
2424
+ return message;
2425
+ },
2426
+ fromJSON(object) {
2427
+ return {
2428
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
2429
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
2430
+ orientation: isSet(object.orientation) ? globalThis.String(object.orientation) : "",
2431
+ overlay: isSet(object.overlay) ? globalThis.String(object.overlay) : "",
2432
+ caption: isObject(object.caption) ? Object.entries(object.caption).reduce((acc, [key, value]) => {
2433
+ acc[key] = String(value);
2434
+ return acc;
2435
+ }, {}) : {}
2436
+ };
2437
+ },
2438
+ toJSON(message) {
2439
+ const obj = {};
2440
+ if (message.type !== "") {
2441
+ obj.type = message.type;
2442
+ }
2443
+ if (message.name !== "") {
2444
+ obj.name = message.name;
2445
+ }
2446
+ if (message.orientation !== "") {
2447
+ obj.orientation = message.orientation;
2448
+ }
2449
+ if (message.overlay !== "") {
2450
+ obj.overlay = message.overlay;
2451
+ }
2452
+ if (message.caption) {
2453
+ const entries = Object.entries(message.caption);
2454
+ if (entries.length > 0) {
2455
+ obj.caption = {};
2456
+ entries.forEach(([k, v]) => {
2457
+ obj.caption[k] = v;
2458
+ });
2459
+ }
2460
+ }
2461
+ return obj;
2462
+ },
2463
+ create(base) {
2464
+ return EntityMetadata_Action_ImageSource.fromPartial(base ?? {});
2465
+ },
2466
+ fromPartial(object) {
2467
+ const message = createBaseEntityMetadata_Action_ImageSource();
2468
+ message.type = object.type ?? "";
2469
+ message.name = object.name ?? "";
2470
+ message.orientation = object.orientation ?? "";
2471
+ message.overlay = object.overlay ?? "";
2472
+ message.caption = Object.entries(object.caption ?? {}).reduce((acc, [key, value]) => {
2473
+ if (value !== void 0) {
2474
+ acc[key] = globalThis.String(value);
2475
+ }
2476
+ return acc;
2477
+ }, {});
2478
+ return message;
2479
+ }
2480
+ };
2481
+ function createBaseEntityMetadata_Action_ImageSource_CaptionEntry() {
2482
+ return { key: "", value: "" };
2483
+ }
2484
+ var EntityMetadata_Action_ImageSource_CaptionEntry = {
2485
+ encode(message, writer = import_minimal.default.Writer.create()) {
2486
+ if (message.key !== "") {
2487
+ writer.uint32(10).string(message.key);
2488
+ }
2489
+ if (message.value !== "") {
2490
+ writer.uint32(18).string(message.value);
2491
+ }
2492
+ return writer;
2493
+ },
2494
+ decode(input, length) {
2495
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2496
+ let end = length === void 0 ? reader.len : reader.pos + length;
2497
+ const message = createBaseEntityMetadata_Action_ImageSource_CaptionEntry();
2498
+ while (reader.pos < end) {
2499
+ const tag = reader.uint32();
2500
+ switch (tag >>> 3) {
2501
+ case 1:
2502
+ if (tag !== 10) {
2503
+ break;
2504
+ }
2505
+ message.key = reader.string();
2506
+ continue;
2507
+ case 2:
2508
+ if (tag !== 18) {
2509
+ break;
2510
+ }
2511
+ message.value = reader.string();
2512
+ continue;
2513
+ }
2514
+ if ((tag & 7) === 4 || tag === 0) {
2515
+ break;
2516
+ }
2517
+ reader.skipType(tag & 7);
2518
+ }
2519
+ return message;
2520
+ },
2521
+ fromJSON(object) {
2522
+ return {
2523
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2524
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
2525
+ };
2526
+ },
2527
+ toJSON(message) {
2528
+ const obj = {};
2529
+ if (message.key !== "") {
2530
+ obj.key = message.key;
2531
+ }
2532
+ if (message.value !== "") {
2533
+ obj.value = message.value;
2534
+ }
2535
+ return obj;
2536
+ },
2537
+ create(base) {
2538
+ return EntityMetadata_Action_ImageSource_CaptionEntry.fromPartial(base ?? {});
2539
+ },
2540
+ fromPartial(object) {
2541
+ const message = createBaseEntityMetadata_Action_ImageSource_CaptionEntry();
2542
+ message.key = object.key ?? "";
2543
+ message.value = object.value ?? "";
2544
+ return message;
2545
+ }
2546
+ };
2547
+ function createBaseEntityMetadata_MetaEntry() {
2548
+ return { key: "", value: "" };
2549
+ }
2550
+ var EntityMetadata_MetaEntry = {
2551
+ encode(message, writer = import_minimal.default.Writer.create()) {
2552
+ if (message.key !== "") {
2553
+ writer.uint32(10).string(message.key);
2554
+ }
2555
+ if (message.value !== "") {
2556
+ writer.uint32(18).string(message.value);
2557
+ }
2558
+ return writer;
2559
+ },
2560
+ decode(input, length) {
2561
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2562
+ let end = length === void 0 ? reader.len : reader.pos + length;
2563
+ const message = createBaseEntityMetadata_MetaEntry();
2564
+ while (reader.pos < end) {
2565
+ const tag = reader.uint32();
2566
+ switch (tag >>> 3) {
2567
+ case 1:
2568
+ if (tag !== 10) {
2569
+ break;
2570
+ }
2571
+ message.key = reader.string();
2572
+ continue;
2573
+ case 2:
2574
+ if (tag !== 18) {
2575
+ break;
2576
+ }
2577
+ message.value = reader.string();
2578
+ continue;
2579
+ }
2580
+ if ((tag & 7) === 4 || tag === 0) {
2581
+ break;
2582
+ }
2583
+ reader.skipType(tag & 7);
2584
+ }
2585
+ return message;
2586
+ },
2587
+ fromJSON(object) {
2588
+ return {
2589
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2590
+ value: isSet(object.value) ? globalThis.String(object.value) : ""
2591
+ };
2592
+ },
2593
+ toJSON(message) {
2594
+ const obj = {};
2595
+ if (message.key !== "") {
2596
+ obj.key = message.key;
2597
+ }
2598
+ if (message.value !== "") {
2599
+ obj.value = message.value;
2600
+ }
2601
+ return obj;
2602
+ },
2603
+ create(base) {
2604
+ return EntityMetadata_MetaEntry.fromPartial(base ?? {});
2605
+ },
2606
+ fromPartial(object) {
2607
+ const message = createBaseEntityMetadata_MetaEntry();
2608
+ message.key = object.key ?? "";
2609
+ message.value = object.value ?? "";
2610
+ return message;
2611
+ }
2612
+ };
2613
+ function createBaseEntityReference() {
2614
+ return { entityId: "", entryPoints: [] };
2615
+ }
2616
+ var EntityReference = {
2617
+ encode(message, writer = import_minimal.default.Writer.create()) {
2618
+ if (message.entityId !== "") {
2619
+ writer.uint32(10).string(message.entityId);
2620
+ }
2621
+ for (const v of message.entryPoints) {
2622
+ writer.uint32(18).string(v);
2623
+ }
2624
+ return writer;
2625
+ },
2626
+ decode(input, length) {
2627
+ const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2628
+ let end = length === void 0 ? reader.len : reader.pos + length;
2629
+ const message = createBaseEntityReference();
2630
+ while (reader.pos < end) {
2631
+ const tag = reader.uint32();
2632
+ switch (tag >>> 3) {
2633
+ case 1:
2634
+ if (tag !== 10) {
2635
+ break;
2636
+ }
2637
+ message.entityId = reader.string();
2638
+ continue;
2639
+ case 2:
2640
+ if (tag !== 18) {
2641
+ break;
2642
+ }
2643
+ message.entryPoints.push(reader.string());
2644
+ continue;
2645
+ }
2646
+ if ((tag & 7) === 4 || tag === 0) {
2647
+ break;
2648
+ }
2649
+ reader.skipType(tag & 7);
2650
+ }
2651
+ return message;
2652
+ },
2653
+ fromJSON(object) {
2654
+ return {
2655
+ entityId: isSet(object.entityId) ? globalThis.String(object.entityId) : "",
2656
+ entryPoints: globalThis.Array.isArray(object?.entryPoints) ? object.entryPoints.map((e) => globalThis.String(e)) : []
2657
+ };
2658
+ },
2659
+ toJSON(message) {
2660
+ const obj = {};
2661
+ if (message.entityId !== "") {
2662
+ obj.entityId = message.entityId;
2663
+ }
2664
+ if (message.entryPoints?.length) {
2665
+ obj.entryPoints = message.entryPoints;
2666
+ }
2667
+ return obj;
2668
+ },
2669
+ create(base) {
2670
+ return EntityReference.fromPartial(base ?? {});
2671
+ },
2672
+ fromPartial(object) {
2673
+ const message = createBaseEntityReference();
2674
+ message.entityId = object.entityId ?? "";
2675
+ message.entryPoints = object.entryPoints?.map((e) => e) || [];
2676
+ return message;
2677
+ }
2678
+ };
2679
+ function isObject(value) {
2680
+ return typeof value === "object" && value !== null;
2681
+ }
2682
+ function isSet(value) {
2683
+ return value !== null && value !== void 0;
2684
+ }
2685
+
2686
+ // build/ts/metadata/feed.ts
2687
+ var import_minimal2 = __toESM(require_minimal2());
2688
+ function createBaseFeedStore() {
2689
+ return { items: [] };
2690
+ }
2691
+ var FeedStore = {
2692
+ encode(message, writer = import_minimal2.default.Writer.create()) {
2693
+ for (const v of message.items) {
2694
+ Feed.encode(v, writer.uint32(10).fork()).ldelim();
2695
+ }
2696
+ return writer;
2697
+ },
2698
+ decode(input, length) {
2699
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
2700
+ let end = length === void 0 ? reader.len : reader.pos + length;
2701
+ const message = createBaseFeedStore();
2702
+ while (reader.pos < end) {
2703
+ const tag = reader.uint32();
2704
+ switch (tag >>> 3) {
2705
+ case 1:
2706
+ if (tag !== 10) {
2707
+ break;
2708
+ }
2709
+ message.items.push(Feed.decode(reader, reader.uint32()));
2710
+ continue;
2711
+ }
2712
+ if ((tag & 7) === 4 || tag === 0) {
2713
+ break;
2714
+ }
2715
+ reader.skipType(tag & 7);
2716
+ }
2717
+ return message;
2718
+ },
2719
+ fromJSON(object) {
2720
+ return { items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Feed.fromJSON(e)) : [] };
2721
+ },
2722
+ toJSON(message) {
2723
+ const obj = {};
2724
+ if (message.items?.length) {
2725
+ obj.items = message.items.map((e) => Feed.toJSON(e));
2726
+ }
2727
+ return obj;
2728
+ },
2729
+ create(base) {
2730
+ return FeedStore.fromPartial(base ?? {});
2731
+ },
2732
+ fromPartial(object) {
2733
+ const message = createBaseFeedStore();
2734
+ message.items = object.items?.map((e) => Feed.fromPartial(e)) || [];
2735
+ return message;
2736
+ }
2737
+ };
2738
+ function createBaseFeed() {
2739
+ return {
2740
+ version: "",
2741
+ title: "",
2742
+ homePageUrl: "",
2743
+ description: "",
2744
+ feedUrl: "",
2745
+ icon: "",
2746
+ favicon: "",
2747
+ expired: false,
2748
+ items: [],
2749
+ meta: {}
2750
+ };
2751
+ }
2752
+ var Feed = {
2753
+ encode(message, writer = import_minimal2.default.Writer.create()) {
2754
+ if (message.version !== "") {
2755
+ writer.uint32(10).string(message.version);
2756
+ }
2757
+ if (message.title !== "") {
2758
+ writer.uint32(18).string(message.title);
2759
+ }
2760
+ if (message.homePageUrl !== "") {
2761
+ writer.uint32(26).string(message.homePageUrl);
2762
+ }
2763
+ if (message.description !== "") {
2764
+ writer.uint32(34).string(message.description);
2765
+ }
2766
+ if (message.feedUrl !== "") {
2767
+ writer.uint32(42).string(message.feedUrl);
2768
+ }
2769
+ if (message.icon !== "") {
2770
+ writer.uint32(50).string(message.icon);
2771
+ }
2772
+ if (message.favicon !== "") {
2773
+ writer.uint32(58).string(message.favicon);
2774
+ }
2775
+ if (message.expired === true) {
2776
+ writer.uint32(64).bool(message.expired);
2777
+ }
2778
+ for (const v of message.items) {
2779
+ FeedPost.encode(v, writer.uint32(74).fork()).ldelim();
2780
+ }
2781
+ Object.entries(message.meta).forEach(([key, value]) => {
2782
+ Feed_MetaEntry.encode({ key, value }, writer.uint32(802).fork()).ldelim();
2783
+ });
2784
+ return writer;
2785
+ },
2786
+ decode(input, length) {
2787
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
2788
+ let end = length === void 0 ? reader.len : reader.pos + length;
2789
+ const message = createBaseFeed();
2790
+ while (reader.pos < end) {
2791
+ const tag = reader.uint32();
2792
+ switch (tag >>> 3) {
2793
+ case 1:
2794
+ if (tag !== 10) {
2795
+ break;
2796
+ }
2797
+ message.version = reader.string();
2798
+ continue;
2799
+ case 2:
2800
+ if (tag !== 18) {
2801
+ break;
2802
+ }
2803
+ message.title = reader.string();
2804
+ continue;
2805
+ case 3:
2806
+ if (tag !== 26) {
2807
+ break;
2808
+ }
2809
+ message.homePageUrl = reader.string();
2810
+ continue;
2811
+ case 4:
2812
+ if (tag !== 34) {
2813
+ break;
2814
+ }
2815
+ message.description = reader.string();
2816
+ continue;
2817
+ case 5:
2818
+ if (tag !== 42) {
2819
+ break;
2820
+ }
2821
+ message.feedUrl = reader.string();
2822
+ continue;
2823
+ case 6:
2824
+ if (tag !== 50) {
2825
+ break;
2826
+ }
2827
+ message.icon = reader.string();
2828
+ continue;
2829
+ case 7:
2830
+ if (tag !== 58) {
2831
+ break;
2832
+ }
2833
+ message.favicon = reader.string();
2834
+ continue;
2835
+ case 8:
2836
+ if (tag !== 64) {
2837
+ break;
2838
+ }
2839
+ message.expired = reader.bool();
2840
+ continue;
2841
+ case 9:
2842
+ if (tag !== 74) {
2843
+ break;
2844
+ }
2845
+ message.items.push(FeedPost.decode(reader, reader.uint32()));
2846
+ continue;
2847
+ case 100:
2848
+ if (tag !== 802) {
2849
+ break;
2850
+ }
2851
+ const entry100 = Feed_MetaEntry.decode(reader, reader.uint32());
2852
+ if (entry100.value !== void 0) {
2853
+ message.meta[entry100.key] = entry100.value;
2854
+ }
2855
+ continue;
2856
+ }
2857
+ if ((tag & 7) === 4 || tag === 0) {
2858
+ break;
2859
+ }
2860
+ reader.skipType(tag & 7);
2861
+ }
2862
+ return message;
2863
+ },
2864
+ fromJSON(object) {
2865
+ return {
2866
+ version: isSet2(object.version) ? globalThis.String(object.version) : "",
2867
+ title: isSet2(object.title) ? globalThis.String(object.title) : "",
2868
+ homePageUrl: isSet2(object.homePageUrl) ? globalThis.String(object.homePageUrl) : "",
2869
+ description: isSet2(object.description) ? globalThis.String(object.description) : "",
2870
+ feedUrl: isSet2(object.feedUrl) ? globalThis.String(object.feedUrl) : "",
2871
+ icon: isSet2(object.icon) ? globalThis.String(object.icon) : "",
2872
+ favicon: isSet2(object.favicon) ? globalThis.String(object.favicon) : "",
2873
+ expired: isSet2(object.expired) ? globalThis.Boolean(object.expired) : false,
2874
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => FeedPost.fromJSON(e)) : [],
2875
+ meta: isObject2(object.meta) ? Object.entries(object.meta).reduce((acc, [key, value]) => {
2876
+ acc[key] = String(value);
2877
+ return acc;
2878
+ }, {}) : {}
2879
+ };
2880
+ },
2881
+ toJSON(message) {
2882
+ const obj = {};
2883
+ if (message.version !== "") {
2884
+ obj.version = message.version;
2885
+ }
2886
+ if (message.title !== "") {
2887
+ obj.title = message.title;
2888
+ }
2889
+ if (message.homePageUrl !== "") {
2890
+ obj.homePageUrl = message.homePageUrl;
2891
+ }
2892
+ if (message.description !== "") {
2893
+ obj.description = message.description;
2894
+ }
2895
+ if (message.feedUrl !== "") {
2896
+ obj.feedUrl = message.feedUrl;
2897
+ }
2898
+ if (message.icon !== "") {
2899
+ obj.icon = message.icon;
2900
+ }
2901
+ if (message.favicon !== "") {
2902
+ obj.favicon = message.favicon;
2903
+ }
2904
+ if (message.expired === true) {
2905
+ obj.expired = message.expired;
2906
+ }
2907
+ if (message.items?.length) {
2908
+ obj.items = message.items.map((e) => FeedPost.toJSON(e));
2909
+ }
2910
+ if (message.meta) {
2911
+ const entries = Object.entries(message.meta);
2912
+ if (entries.length > 0) {
2913
+ obj.meta = {};
2914
+ entries.forEach(([k, v]) => {
2915
+ obj.meta[k] = v;
2916
+ });
2917
+ }
2918
+ }
2919
+ return obj;
2920
+ },
2921
+ create(base) {
2922
+ return Feed.fromPartial(base ?? {});
2923
+ },
2924
+ fromPartial(object) {
2925
+ const message = createBaseFeed();
2926
+ message.version = object.version ?? "";
2927
+ message.title = object.title ?? "";
2928
+ message.homePageUrl = object.homePageUrl ?? "";
2929
+ message.description = object.description ?? "";
2930
+ message.feedUrl = object.feedUrl ?? "";
2931
+ message.icon = object.icon ?? "";
2932
+ message.favicon = object.favicon ?? "";
2933
+ message.expired = object.expired ?? false;
2934
+ message.items = object.items?.map((e) => FeedPost.fromPartial(e)) || [];
2935
+ message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
2936
+ if (value !== void 0) {
2937
+ acc[key] = globalThis.String(value);
2938
+ }
2939
+ return acc;
2940
+ }, {});
2941
+ return message;
2942
+ }
2943
+ };
2944
+ function createBaseFeed_MetaEntry() {
2945
+ return { key: "", value: "" };
2946
+ }
2947
+ var Feed_MetaEntry = {
2948
+ encode(message, writer = import_minimal2.default.Writer.create()) {
2949
+ if (message.key !== "") {
2950
+ writer.uint32(10).string(message.key);
2951
+ }
2952
+ if (message.value !== "") {
2953
+ writer.uint32(18).string(message.value);
2954
+ }
2955
+ return writer;
2956
+ },
2957
+ decode(input, length) {
2958
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
2959
+ let end = length === void 0 ? reader.len : reader.pos + length;
2960
+ const message = createBaseFeed_MetaEntry();
2961
+ while (reader.pos < end) {
2962
+ const tag = reader.uint32();
2963
+ switch (tag >>> 3) {
2964
+ case 1:
2965
+ if (tag !== 10) {
2966
+ break;
2967
+ }
2968
+ message.key = reader.string();
2969
+ continue;
2970
+ case 2:
2971
+ if (tag !== 18) {
2972
+ break;
2973
+ }
2974
+ message.value = reader.string();
2975
+ continue;
2976
+ }
2977
+ if ((tag & 7) === 4 || tag === 0) {
2978
+ break;
2979
+ }
2980
+ reader.skipType(tag & 7);
2981
+ }
2982
+ return message;
2983
+ },
2984
+ fromJSON(object) {
2985
+ return {
2986
+ key: isSet2(object.key) ? globalThis.String(object.key) : "",
2987
+ value: isSet2(object.value) ? globalThis.String(object.value) : ""
2988
+ };
2989
+ },
2990
+ toJSON(message) {
2991
+ const obj = {};
2992
+ if (message.key !== "") {
2993
+ obj.key = message.key;
2994
+ }
2995
+ if (message.value !== "") {
2996
+ obj.value = message.value;
2997
+ }
2998
+ return obj;
2999
+ },
3000
+ create(base) {
3001
+ return Feed_MetaEntry.fromPartial(base ?? {});
3002
+ },
3003
+ fromPartial(object) {
3004
+ const message = createBaseFeed_MetaEntry();
3005
+ message.key = object.key ?? "";
3006
+ message.value = object.value ?? "";
3007
+ return message;
3008
+ }
3009
+ };
3010
+ function createBaseFeedPost() {
3011
+ return {
3012
+ id: "",
3013
+ title: "",
3014
+ summary: "",
3015
+ contentText: "",
3016
+ contentHtml: "",
3017
+ url: "",
3018
+ image: "",
3019
+ tags: [],
3020
+ datePublished: "",
3021
+ dateModified: "",
3022
+ author: void 0
3023
+ };
3024
+ }
3025
+ var FeedPost = {
3026
+ encode(message, writer = import_minimal2.default.Writer.create()) {
3027
+ if (message.id !== "") {
3028
+ writer.uint32(10).string(message.id);
3029
+ }
3030
+ if (message.title !== "") {
3031
+ writer.uint32(18).string(message.title);
3032
+ }
3033
+ if (message.summary !== "") {
3034
+ writer.uint32(26).string(message.summary);
3035
+ }
3036
+ if (message.contentText !== "") {
3037
+ writer.uint32(34).string(message.contentText);
3038
+ }
3039
+ if (message.contentHtml !== "") {
3040
+ writer.uint32(42).string(message.contentHtml);
3041
+ }
3042
+ if (message.url !== "") {
3043
+ writer.uint32(50).string(message.url);
3044
+ }
3045
+ if (message.image !== "") {
3046
+ writer.uint32(58).string(message.image);
3047
+ }
3048
+ for (const v of message.tags) {
3049
+ writer.uint32(66).string(v);
3050
+ }
3051
+ if (message.datePublished !== "") {
3052
+ writer.uint32(74).string(message.datePublished);
3053
+ }
3054
+ if (message.dateModified !== "") {
3055
+ writer.uint32(82).string(message.dateModified);
3056
+ }
3057
+ if (message.author !== void 0) {
3058
+ FeedPost_Author.encode(message.author, writer.uint32(90).fork()).ldelim();
3059
+ }
3060
+ return writer;
3061
+ },
3062
+ decode(input, length) {
3063
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
3064
+ let end = length === void 0 ? reader.len : reader.pos + length;
3065
+ const message = createBaseFeedPost();
3066
+ while (reader.pos < end) {
3067
+ const tag = reader.uint32();
3068
+ switch (tag >>> 3) {
3069
+ case 1:
3070
+ if (tag !== 10) {
3071
+ break;
3072
+ }
3073
+ message.id = reader.string();
3074
+ continue;
3075
+ case 2:
3076
+ if (tag !== 18) {
3077
+ break;
3078
+ }
3079
+ message.title = reader.string();
3080
+ continue;
3081
+ case 3:
3082
+ if (tag !== 26) {
3083
+ break;
3084
+ }
3085
+ message.summary = reader.string();
3086
+ continue;
3087
+ case 4:
3088
+ if (tag !== 34) {
3089
+ break;
3090
+ }
3091
+ message.contentText = reader.string();
3092
+ continue;
3093
+ case 5:
3094
+ if (tag !== 42) {
3095
+ break;
3096
+ }
3097
+ message.contentHtml = reader.string();
3098
+ continue;
3099
+ case 6:
3100
+ if (tag !== 50) {
3101
+ break;
3102
+ }
3103
+ message.url = reader.string();
3104
+ continue;
3105
+ case 7:
3106
+ if (tag !== 58) {
3107
+ break;
3108
+ }
3109
+ message.image = reader.string();
3110
+ continue;
3111
+ case 8:
3112
+ if (tag !== 66) {
3113
+ break;
3114
+ }
3115
+ message.tags.push(reader.string());
3116
+ continue;
3117
+ case 9:
3118
+ if (tag !== 74) {
3119
+ break;
3120
+ }
3121
+ message.datePublished = reader.string();
3122
+ continue;
3123
+ case 10:
3124
+ if (tag !== 82) {
3125
+ break;
3126
+ }
3127
+ message.dateModified = reader.string();
3128
+ continue;
3129
+ case 11:
3130
+ if (tag !== 90) {
3131
+ break;
3132
+ }
3133
+ message.author = FeedPost_Author.decode(reader, reader.uint32());
3134
+ continue;
3135
+ }
3136
+ if ((tag & 7) === 4 || tag === 0) {
3137
+ break;
3138
+ }
3139
+ reader.skipType(tag & 7);
3140
+ }
3141
+ return message;
3142
+ },
3143
+ fromJSON(object) {
3144
+ return {
3145
+ id: isSet2(object.id) ? globalThis.String(object.id) : "",
3146
+ title: isSet2(object.title) ? globalThis.String(object.title) : "",
3147
+ summary: isSet2(object.summary) ? globalThis.String(object.summary) : "",
3148
+ contentText: isSet2(object.contentText) ? globalThis.String(object.contentText) : "",
3149
+ contentHtml: isSet2(object.contentHtml) ? globalThis.String(object.contentHtml) : "",
3150
+ url: isSet2(object.url) ? globalThis.String(object.url) : "",
3151
+ image: isSet2(object.image) ? globalThis.String(object.image) : "",
3152
+ tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e) => globalThis.String(e)) : [],
3153
+ datePublished: isSet2(object.datePublished) ? globalThis.String(object.datePublished) : "",
3154
+ dateModified: isSet2(object.dateModified) ? globalThis.String(object.dateModified) : "",
3155
+ author: isSet2(object.author) ? FeedPost_Author.fromJSON(object.author) : void 0
3156
+ };
3157
+ },
3158
+ toJSON(message) {
3159
+ const obj = {};
3160
+ if (message.id !== "") {
3161
+ obj.id = message.id;
3162
+ }
3163
+ if (message.title !== "") {
3164
+ obj.title = message.title;
3165
+ }
3166
+ if (message.summary !== "") {
3167
+ obj.summary = message.summary;
3168
+ }
3169
+ if (message.contentText !== "") {
3170
+ obj.contentText = message.contentText;
3171
+ }
3172
+ if (message.contentHtml !== "") {
3173
+ obj.contentHtml = message.contentHtml;
3174
+ }
3175
+ if (message.url !== "") {
3176
+ obj.url = message.url;
3177
+ }
3178
+ if (message.image !== "") {
3179
+ obj.image = message.image;
3180
+ }
3181
+ if (message.tags?.length) {
3182
+ obj.tags = message.tags;
3183
+ }
3184
+ if (message.datePublished !== "") {
3185
+ obj.datePublished = message.datePublished;
3186
+ }
3187
+ if (message.dateModified !== "") {
3188
+ obj.dateModified = message.dateModified;
3189
+ }
3190
+ if (message.author !== void 0) {
3191
+ obj.author = FeedPost_Author.toJSON(message.author);
3192
+ }
3193
+ return obj;
3194
+ },
3195
+ create(base) {
3196
+ return FeedPost.fromPartial(base ?? {});
3197
+ },
3198
+ fromPartial(object) {
3199
+ const message = createBaseFeedPost();
3200
+ message.id = object.id ?? "";
3201
+ message.title = object.title ?? "";
3202
+ message.summary = object.summary ?? "";
3203
+ message.contentText = object.contentText ?? "";
3204
+ message.contentHtml = object.contentHtml ?? "";
3205
+ message.url = object.url ?? "";
3206
+ message.image = object.image ?? "";
3207
+ message.tags = object.tags?.map((e) => e) || [];
3208
+ message.datePublished = object.datePublished ?? "";
3209
+ message.dateModified = object.dateModified ?? "";
3210
+ message.author = object.author !== void 0 && object.author !== null ? FeedPost_Author.fromPartial(object.author) : void 0;
3211
+ return message;
3212
+ }
3213
+ };
3214
+ function createBaseFeedPost_Author() {
3215
+ return { name: "", url: "" };
3216
+ }
3217
+ var FeedPost_Author = {
3218
+ encode(message, writer = import_minimal2.default.Writer.create()) {
3219
+ if (message.name !== "") {
3220
+ writer.uint32(10).string(message.name);
3221
+ }
3222
+ if (message.url !== "") {
3223
+ writer.uint32(18).string(message.url);
3224
+ }
3225
+ return writer;
3226
+ },
3227
+ decode(input, length) {
3228
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
3229
+ let end = length === void 0 ? reader.len : reader.pos + length;
3230
+ const message = createBaseFeedPost_Author();
3231
+ while (reader.pos < end) {
3232
+ const tag = reader.uint32();
3233
+ switch (tag >>> 3) {
3234
+ case 1:
3235
+ if (tag !== 10) {
3236
+ break;
3237
+ }
3238
+ message.name = reader.string();
3239
+ continue;
3240
+ case 2:
3241
+ if (tag !== 18) {
3242
+ break;
3243
+ }
3244
+ message.url = reader.string();
3245
+ continue;
3246
+ }
3247
+ if ((tag & 7) === 4 || tag === 0) {
3248
+ break;
3249
+ }
3250
+ reader.skipType(tag & 7);
3251
+ }
3252
+ return message;
3253
+ },
3254
+ fromJSON(object) {
3255
+ return {
3256
+ name: isSet2(object.name) ? globalThis.String(object.name) : "",
3257
+ url: isSet2(object.url) ? globalThis.String(object.url) : ""
3258
+ };
3259
+ },
3260
+ toJSON(message) {
3261
+ const obj = {};
3262
+ if (message.name !== "") {
3263
+ obj.name = message.name;
3264
+ }
3265
+ if (message.url !== "") {
3266
+ obj.url = message.url;
3267
+ }
3268
+ return obj;
3269
+ },
3270
+ create(base) {
3271
+ return FeedPost_Author.fromPartial(base ?? {});
3272
+ },
3273
+ fromPartial(object) {
3274
+ const message = createBaseFeedPost_Author();
3275
+ message.name = object.name ?? "";
3276
+ message.url = object.url ?? "";
3277
+ return message;
3278
+ }
3279
+ };
3280
+ function isObject2(value) {
3281
+ return typeof value === "object" && value !== null;
3282
+ }
3283
+ function isSet2(value) {
3284
+ return value !== null && value !== void 0;
3285
+ }
3286
+
3287
+ // build/ts/metadata/process.ts
3288
+ var import_minimal3 = __toESM(require_minimal2());
3289
+ function createBaseProcessMetadataStore() {
3290
+ return { items: [] };
3291
+ }
3292
+ var ProcessMetadataStore = {
3293
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3294
+ for (const v of message.items) {
3295
+ ProcessMetadata.encode(v, writer.uint32(10).fork()).ldelim();
3296
+ }
3297
+ return writer;
3298
+ },
3299
+ decode(input, length) {
3300
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3301
+ let end = length === void 0 ? reader.len : reader.pos + length;
3302
+ const message = createBaseProcessMetadataStore();
3303
+ while (reader.pos < end) {
3304
+ const tag = reader.uint32();
3305
+ switch (tag >>> 3) {
3306
+ case 1:
3307
+ if (tag !== 10) {
3308
+ break;
3309
+ }
3310
+ message.items.push(ProcessMetadata.decode(reader, reader.uint32()));
3311
+ continue;
3312
+ }
3313
+ if ((tag & 7) === 4 || tag === 0) {
3314
+ break;
3315
+ }
3316
+ reader.skipType(tag & 7);
3317
+ }
3318
+ return message;
3319
+ },
3320
+ fromJSON(object) {
3321
+ return {
3322
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => ProcessMetadata.fromJSON(e)) : []
3323
+ };
3324
+ },
3325
+ toJSON(message) {
3326
+ const obj = {};
3327
+ if (message.items?.length) {
3328
+ obj.items = message.items.map((e) => ProcessMetadata.toJSON(e));
3329
+ }
3330
+ return obj;
3331
+ },
3332
+ create(base) {
3333
+ return ProcessMetadataStore.fromPartial(base ?? {});
3334
+ },
3335
+ fromPartial(object) {
3336
+ const message = createBaseProcessMetadataStore();
3337
+ message.items = object.items?.map((e) => ProcessMetadata.fromPartial(e)) || [];
3338
+ return message;
3339
+ }
3340
+ };
3341
+ function createBaseProcessMetadata() {
3342
+ return { version: "", title: {}, description: {}, media: {}, questions: [], results: void 0, meta: {} };
3343
+ }
3344
+ var ProcessMetadata = {
3345
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3346
+ if (message.version !== "") {
3347
+ writer.uint32(10).string(message.version);
3348
+ }
3349
+ Object.entries(message.title).forEach(([key, value]) => {
3350
+ ProcessMetadata_TitleEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();
3351
+ });
3352
+ Object.entries(message.description).forEach(([key, value]) => {
3353
+ ProcessMetadata_DescriptionEntry.encode({ key, value }, writer.uint32(26).fork()).ldelim();
3354
+ });
3355
+ Object.entries(message.media).forEach(([key, value]) => {
3356
+ ProcessMetadata_MediaEntry.encode({ key, value }, writer.uint32(34).fork()).ldelim();
3357
+ });
3358
+ for (const v of message.questions) {
3359
+ ProcessMetadata_Question.encode(v, writer.uint32(42).fork()).ldelim();
3360
+ }
3361
+ if (message.results !== void 0) {
3362
+ ProcessMetadata_Results.encode(message.results, writer.uint32(50).fork()).ldelim();
3363
+ }
3364
+ Object.entries(message.meta).forEach(([key, value]) => {
3365
+ ProcessMetadata_MetaEntry.encode({ key, value }, writer.uint32(802).fork()).ldelim();
3366
+ });
3367
+ return writer;
3368
+ },
3369
+ decode(input, length) {
3370
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3371
+ let end = length === void 0 ? reader.len : reader.pos + length;
3372
+ const message = createBaseProcessMetadata();
3373
+ while (reader.pos < end) {
3374
+ const tag = reader.uint32();
3375
+ switch (tag >>> 3) {
3376
+ case 1:
3377
+ if (tag !== 10) {
3378
+ break;
3379
+ }
3380
+ message.version = reader.string();
3381
+ continue;
3382
+ case 2:
3383
+ if (tag !== 18) {
3384
+ break;
3385
+ }
3386
+ const entry2 = ProcessMetadata_TitleEntry.decode(reader, reader.uint32());
3387
+ if (entry2.value !== void 0) {
3388
+ message.title[entry2.key] = entry2.value;
3389
+ }
3390
+ continue;
3391
+ case 3:
3392
+ if (tag !== 26) {
3393
+ break;
3394
+ }
3395
+ const entry3 = ProcessMetadata_DescriptionEntry.decode(reader, reader.uint32());
3396
+ if (entry3.value !== void 0) {
3397
+ message.description[entry3.key] = entry3.value;
3398
+ }
3399
+ continue;
3400
+ case 4:
3401
+ if (tag !== 34) {
3402
+ break;
3403
+ }
3404
+ const entry4 = ProcessMetadata_MediaEntry.decode(reader, reader.uint32());
3405
+ if (entry4.value !== void 0) {
3406
+ message.media[entry4.key] = entry4.value;
3407
+ }
3408
+ continue;
3409
+ case 5:
3410
+ if (tag !== 42) {
3411
+ break;
3412
+ }
3413
+ message.questions.push(ProcessMetadata_Question.decode(reader, reader.uint32()));
3414
+ continue;
3415
+ case 6:
3416
+ if (tag !== 50) {
3417
+ break;
3418
+ }
3419
+ message.results = ProcessMetadata_Results.decode(reader, reader.uint32());
3420
+ continue;
3421
+ case 100:
3422
+ if (tag !== 802) {
3423
+ break;
3424
+ }
3425
+ const entry100 = ProcessMetadata_MetaEntry.decode(reader, reader.uint32());
3426
+ if (entry100.value !== void 0) {
3427
+ message.meta[entry100.key] = entry100.value;
3428
+ }
3429
+ continue;
3430
+ }
3431
+ if ((tag & 7) === 4 || tag === 0) {
3432
+ break;
3433
+ }
3434
+ reader.skipType(tag & 7);
3435
+ }
3436
+ return message;
3437
+ },
3438
+ fromJSON(object) {
3439
+ return {
3440
+ version: isSet3(object.version) ? globalThis.String(object.version) : "",
3441
+ title: isObject3(object.title) ? Object.entries(object.title).reduce((acc, [key, value]) => {
3442
+ acc[key] = String(value);
3443
+ return acc;
3444
+ }, {}) : {},
3445
+ description: isObject3(object.description) ? Object.entries(object.description).reduce((acc, [key, value]) => {
3446
+ acc[key] = String(value);
3447
+ return acc;
3448
+ }, {}) : {},
3449
+ media: isObject3(object.media) ? Object.entries(object.media).reduce((acc, [key, value]) => {
3450
+ acc[key] = String(value);
3451
+ return acc;
3452
+ }, {}) : {},
3453
+ questions: globalThis.Array.isArray(object?.questions) ? object.questions.map((e) => ProcessMetadata_Question.fromJSON(e)) : [],
3454
+ results: isSet3(object.results) ? ProcessMetadata_Results.fromJSON(object.results) : void 0,
3455
+ meta: isObject3(object.meta) ? Object.entries(object.meta).reduce((acc, [key, value]) => {
3456
+ acc[key] = String(value);
3457
+ return acc;
3458
+ }, {}) : {}
3459
+ };
3460
+ },
3461
+ toJSON(message) {
3462
+ const obj = {};
3463
+ if (message.version !== "") {
3464
+ obj.version = message.version;
3465
+ }
3466
+ if (message.title) {
3467
+ const entries = Object.entries(message.title);
3468
+ if (entries.length > 0) {
3469
+ obj.title = {};
3470
+ entries.forEach(([k, v]) => {
3471
+ obj.title[k] = v;
3472
+ });
3473
+ }
3474
+ }
3475
+ if (message.description) {
3476
+ const entries = Object.entries(message.description);
3477
+ if (entries.length > 0) {
3478
+ obj.description = {};
3479
+ entries.forEach(([k, v]) => {
3480
+ obj.description[k] = v;
3481
+ });
3482
+ }
3483
+ }
3484
+ if (message.media) {
3485
+ const entries = Object.entries(message.media);
3486
+ if (entries.length > 0) {
3487
+ obj.media = {};
3488
+ entries.forEach(([k, v]) => {
3489
+ obj.media[k] = v;
3490
+ });
3491
+ }
3492
+ }
3493
+ if (message.questions?.length) {
3494
+ obj.questions = message.questions.map((e) => ProcessMetadata_Question.toJSON(e));
3495
+ }
3496
+ if (message.results !== void 0) {
3497
+ obj.results = ProcessMetadata_Results.toJSON(message.results);
3498
+ }
3499
+ if (message.meta) {
3500
+ const entries = Object.entries(message.meta);
3501
+ if (entries.length > 0) {
3502
+ obj.meta = {};
3503
+ entries.forEach(([k, v]) => {
3504
+ obj.meta[k] = v;
3505
+ });
3506
+ }
3507
+ }
3508
+ return obj;
3509
+ },
3510
+ create(base) {
3511
+ return ProcessMetadata.fromPartial(base ?? {});
3512
+ },
3513
+ fromPartial(object) {
3514
+ const message = createBaseProcessMetadata();
3515
+ message.version = object.version ?? "";
3516
+ message.title = Object.entries(object.title ?? {}).reduce((acc, [key, value]) => {
3517
+ if (value !== void 0) {
3518
+ acc[key] = globalThis.String(value);
3519
+ }
3520
+ return acc;
3521
+ }, {});
3522
+ message.description = Object.entries(object.description ?? {}).reduce(
3523
+ (acc, [key, value]) => {
3524
+ if (value !== void 0) {
3525
+ acc[key] = globalThis.String(value);
3526
+ }
3527
+ return acc;
3528
+ },
3529
+ {}
3530
+ );
3531
+ message.media = Object.entries(object.media ?? {}).reduce((acc, [key, value]) => {
3532
+ if (value !== void 0) {
3533
+ acc[key] = globalThis.String(value);
3534
+ }
3535
+ return acc;
3536
+ }, {});
3537
+ message.questions = object.questions?.map((e) => ProcessMetadata_Question.fromPartial(e)) || [];
3538
+ message.results = object.results !== void 0 && object.results !== null ? ProcessMetadata_Results.fromPartial(object.results) : void 0;
3539
+ message.meta = Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
3540
+ if (value !== void 0) {
3541
+ acc[key] = globalThis.String(value);
3542
+ }
3543
+ return acc;
3544
+ }, {});
3545
+ return message;
3546
+ }
3547
+ };
3548
+ function createBaseProcessMetadata_TitleEntry() {
3549
+ return { key: "", value: "" };
3550
+ }
3551
+ var ProcessMetadata_TitleEntry = {
3552
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3553
+ if (message.key !== "") {
3554
+ writer.uint32(10).string(message.key);
3555
+ }
3556
+ if (message.value !== "") {
3557
+ writer.uint32(18).string(message.value);
3558
+ }
3559
+ return writer;
3560
+ },
3561
+ decode(input, length) {
3562
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3563
+ let end = length === void 0 ? reader.len : reader.pos + length;
3564
+ const message = createBaseProcessMetadata_TitleEntry();
3565
+ while (reader.pos < end) {
3566
+ const tag = reader.uint32();
3567
+ switch (tag >>> 3) {
3568
+ case 1:
3569
+ if (tag !== 10) {
3570
+ break;
3571
+ }
3572
+ message.key = reader.string();
3573
+ continue;
3574
+ case 2:
3575
+ if (tag !== 18) {
3576
+ break;
3577
+ }
3578
+ message.value = reader.string();
3579
+ continue;
3580
+ }
3581
+ if ((tag & 7) === 4 || tag === 0) {
3582
+ break;
3583
+ }
3584
+ reader.skipType(tag & 7);
3585
+ }
3586
+ return message;
3587
+ },
3588
+ fromJSON(object) {
3589
+ return {
3590
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3591
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3592
+ };
3593
+ },
3594
+ toJSON(message) {
3595
+ const obj = {};
3596
+ if (message.key !== "") {
3597
+ obj.key = message.key;
3598
+ }
3599
+ if (message.value !== "") {
3600
+ obj.value = message.value;
3601
+ }
3602
+ return obj;
3603
+ },
3604
+ create(base) {
3605
+ return ProcessMetadata_TitleEntry.fromPartial(base ?? {});
3606
+ },
3607
+ fromPartial(object) {
3608
+ const message = createBaseProcessMetadata_TitleEntry();
3609
+ message.key = object.key ?? "";
3610
+ message.value = object.value ?? "";
3611
+ return message;
3612
+ }
3613
+ };
3614
+ function createBaseProcessMetadata_DescriptionEntry() {
3615
+ return { key: "", value: "" };
3616
+ }
3617
+ var ProcessMetadata_DescriptionEntry = {
3618
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3619
+ if (message.key !== "") {
3620
+ writer.uint32(10).string(message.key);
3621
+ }
3622
+ if (message.value !== "") {
3623
+ writer.uint32(18).string(message.value);
3624
+ }
3625
+ return writer;
3626
+ },
3627
+ decode(input, length) {
3628
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3629
+ let end = length === void 0 ? reader.len : reader.pos + length;
3630
+ const message = createBaseProcessMetadata_DescriptionEntry();
3631
+ while (reader.pos < end) {
3632
+ const tag = reader.uint32();
3633
+ switch (tag >>> 3) {
3634
+ case 1:
3635
+ if (tag !== 10) {
3636
+ break;
3637
+ }
3638
+ message.key = reader.string();
3639
+ continue;
3640
+ case 2:
3641
+ if (tag !== 18) {
3642
+ break;
3643
+ }
3644
+ message.value = reader.string();
3645
+ continue;
3646
+ }
3647
+ if ((tag & 7) === 4 || tag === 0) {
3648
+ break;
3649
+ }
3650
+ reader.skipType(tag & 7);
3651
+ }
3652
+ return message;
3653
+ },
3654
+ fromJSON(object) {
3655
+ return {
3656
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3657
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3658
+ };
3659
+ },
3660
+ toJSON(message) {
3661
+ const obj = {};
3662
+ if (message.key !== "") {
3663
+ obj.key = message.key;
3664
+ }
3665
+ if (message.value !== "") {
3666
+ obj.value = message.value;
3667
+ }
3668
+ return obj;
3669
+ },
3670
+ create(base) {
3671
+ return ProcessMetadata_DescriptionEntry.fromPartial(base ?? {});
3672
+ },
3673
+ fromPartial(object) {
3674
+ const message = createBaseProcessMetadata_DescriptionEntry();
3675
+ message.key = object.key ?? "";
3676
+ message.value = object.value ?? "";
3677
+ return message;
3678
+ }
3679
+ };
3680
+ function createBaseProcessMetadata_MediaEntry() {
3681
+ return { key: "", value: "" };
3682
+ }
3683
+ var ProcessMetadata_MediaEntry = {
3684
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3685
+ if (message.key !== "") {
3686
+ writer.uint32(10).string(message.key);
3687
+ }
3688
+ if (message.value !== "") {
3689
+ writer.uint32(18).string(message.value);
3690
+ }
3691
+ return writer;
3692
+ },
3693
+ decode(input, length) {
3694
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3695
+ let end = length === void 0 ? reader.len : reader.pos + length;
3696
+ const message = createBaseProcessMetadata_MediaEntry();
3697
+ while (reader.pos < end) {
3698
+ const tag = reader.uint32();
3699
+ switch (tag >>> 3) {
3700
+ case 1:
3701
+ if (tag !== 10) {
3702
+ break;
3703
+ }
3704
+ message.key = reader.string();
3705
+ continue;
3706
+ case 2:
3707
+ if (tag !== 18) {
3708
+ break;
3709
+ }
3710
+ message.value = reader.string();
3711
+ continue;
3712
+ }
3713
+ if ((tag & 7) === 4 || tag === 0) {
3714
+ break;
3715
+ }
3716
+ reader.skipType(tag & 7);
3717
+ }
3718
+ return message;
3719
+ },
3720
+ fromJSON(object) {
3721
+ return {
3722
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3723
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3724
+ };
3725
+ },
3726
+ toJSON(message) {
3727
+ const obj = {};
3728
+ if (message.key !== "") {
3729
+ obj.key = message.key;
3730
+ }
3731
+ if (message.value !== "") {
3732
+ obj.value = message.value;
3733
+ }
3734
+ return obj;
3735
+ },
3736
+ create(base) {
3737
+ return ProcessMetadata_MediaEntry.fromPartial(base ?? {});
3738
+ },
3739
+ fromPartial(object) {
3740
+ const message = createBaseProcessMetadata_MediaEntry();
3741
+ message.key = object.key ?? "";
3742
+ message.value = object.value ?? "";
3743
+ return message;
3744
+ }
3745
+ };
3746
+ function createBaseProcessMetadata_Question() {
3747
+ return { title: {}, description: {}, choices: [] };
3748
+ }
3749
+ var ProcessMetadata_Question = {
3750
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3751
+ Object.entries(message.title).forEach(([key, value]) => {
3752
+ ProcessMetadata_Question_TitleEntry.encode({ key, value }, writer.uint32(10).fork()).ldelim();
3753
+ });
3754
+ Object.entries(message.description).forEach(([key, value]) => {
3755
+ ProcessMetadata_Question_DescriptionEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();
3756
+ });
3757
+ for (const v of message.choices) {
3758
+ ProcessMetadata_Question_VoteOption.encode(v, writer.uint32(26).fork()).ldelim();
3759
+ }
3760
+ return writer;
3761
+ },
3762
+ decode(input, length) {
3763
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3764
+ let end = length === void 0 ? reader.len : reader.pos + length;
3765
+ const message = createBaseProcessMetadata_Question();
3766
+ while (reader.pos < end) {
3767
+ const tag = reader.uint32();
3768
+ switch (tag >>> 3) {
3769
+ case 1:
3770
+ if (tag !== 10) {
3771
+ break;
3772
+ }
3773
+ const entry1 = ProcessMetadata_Question_TitleEntry.decode(reader, reader.uint32());
3774
+ if (entry1.value !== void 0) {
3775
+ message.title[entry1.key] = entry1.value;
3776
+ }
3777
+ continue;
3778
+ case 2:
3779
+ if (tag !== 18) {
3780
+ break;
3781
+ }
3782
+ const entry2 = ProcessMetadata_Question_DescriptionEntry.decode(reader, reader.uint32());
3783
+ if (entry2.value !== void 0) {
3784
+ message.description[entry2.key] = entry2.value;
3785
+ }
3786
+ continue;
3787
+ case 3:
3788
+ if (tag !== 26) {
3789
+ break;
3790
+ }
3791
+ message.choices.push(ProcessMetadata_Question_VoteOption.decode(reader, reader.uint32()));
3792
+ continue;
3793
+ }
3794
+ if ((tag & 7) === 4 || tag === 0) {
3795
+ break;
3796
+ }
3797
+ reader.skipType(tag & 7);
3798
+ }
3799
+ return message;
3800
+ },
3801
+ fromJSON(object) {
3802
+ return {
3803
+ title: isObject3(object.title) ? Object.entries(object.title).reduce((acc, [key, value]) => {
3804
+ acc[key] = String(value);
3805
+ return acc;
3806
+ }, {}) : {},
3807
+ description: isObject3(object.description) ? Object.entries(object.description).reduce((acc, [key, value]) => {
3808
+ acc[key] = String(value);
3809
+ return acc;
3810
+ }, {}) : {},
3811
+ choices: globalThis.Array.isArray(object?.choices) ? object.choices.map((e) => ProcessMetadata_Question_VoteOption.fromJSON(e)) : []
3812
+ };
3813
+ },
3814
+ toJSON(message) {
3815
+ const obj = {};
3816
+ if (message.title) {
3817
+ const entries = Object.entries(message.title);
3818
+ if (entries.length > 0) {
3819
+ obj.title = {};
3820
+ entries.forEach(([k, v]) => {
3821
+ obj.title[k] = v;
3822
+ });
3823
+ }
3824
+ }
3825
+ if (message.description) {
3826
+ const entries = Object.entries(message.description);
3827
+ if (entries.length > 0) {
3828
+ obj.description = {};
3829
+ entries.forEach(([k, v]) => {
3830
+ obj.description[k] = v;
3831
+ });
3832
+ }
3833
+ }
3834
+ if (message.choices?.length) {
3835
+ obj.choices = message.choices.map((e) => ProcessMetadata_Question_VoteOption.toJSON(e));
3836
+ }
3837
+ return obj;
3838
+ },
3839
+ create(base) {
3840
+ return ProcessMetadata_Question.fromPartial(base ?? {});
3841
+ },
3842
+ fromPartial(object) {
3843
+ const message = createBaseProcessMetadata_Question();
3844
+ message.title = Object.entries(object.title ?? {}).reduce((acc, [key, value]) => {
3845
+ if (value !== void 0) {
3846
+ acc[key] = globalThis.String(value);
3847
+ }
3848
+ return acc;
3849
+ }, {});
3850
+ message.description = Object.entries(object.description ?? {}).reduce(
3851
+ (acc, [key, value]) => {
3852
+ if (value !== void 0) {
3853
+ acc[key] = globalThis.String(value);
3854
+ }
3855
+ return acc;
3856
+ },
3857
+ {}
3858
+ );
3859
+ message.choices = object.choices?.map((e) => ProcessMetadata_Question_VoteOption.fromPartial(e)) || [];
3860
+ return message;
3861
+ }
3862
+ };
3863
+ function createBaseProcessMetadata_Question_TitleEntry() {
3864
+ return { key: "", value: "" };
3865
+ }
3866
+ var ProcessMetadata_Question_TitleEntry = {
3867
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3868
+ if (message.key !== "") {
3869
+ writer.uint32(10).string(message.key);
3870
+ }
3871
+ if (message.value !== "") {
3872
+ writer.uint32(18).string(message.value);
3873
+ }
3874
+ return writer;
3875
+ },
3876
+ decode(input, length) {
3877
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3878
+ let end = length === void 0 ? reader.len : reader.pos + length;
3879
+ const message = createBaseProcessMetadata_Question_TitleEntry();
3880
+ while (reader.pos < end) {
3881
+ const tag = reader.uint32();
3882
+ switch (tag >>> 3) {
3883
+ case 1:
3884
+ if (tag !== 10) {
3885
+ break;
3886
+ }
3887
+ message.key = reader.string();
3888
+ continue;
3889
+ case 2:
3890
+ if (tag !== 18) {
3891
+ break;
3892
+ }
3893
+ message.value = reader.string();
3894
+ continue;
3895
+ }
3896
+ if ((tag & 7) === 4 || tag === 0) {
3897
+ break;
3898
+ }
3899
+ reader.skipType(tag & 7);
3900
+ }
3901
+ return message;
3902
+ },
3903
+ fromJSON(object) {
3904
+ return {
3905
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3906
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3907
+ };
3908
+ },
3909
+ toJSON(message) {
3910
+ const obj = {};
3911
+ if (message.key !== "") {
3912
+ obj.key = message.key;
3913
+ }
3914
+ if (message.value !== "") {
3915
+ obj.value = message.value;
3916
+ }
3917
+ return obj;
3918
+ },
3919
+ create(base) {
3920
+ return ProcessMetadata_Question_TitleEntry.fromPartial(base ?? {});
3921
+ },
3922
+ fromPartial(object) {
3923
+ const message = createBaseProcessMetadata_Question_TitleEntry();
3924
+ message.key = object.key ?? "";
3925
+ message.value = object.value ?? "";
3926
+ return message;
3927
+ }
3928
+ };
3929
+ function createBaseProcessMetadata_Question_DescriptionEntry() {
3930
+ return { key: "", value: "" };
3931
+ }
3932
+ var ProcessMetadata_Question_DescriptionEntry = {
3933
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3934
+ if (message.key !== "") {
3935
+ writer.uint32(10).string(message.key);
3936
+ }
3937
+ if (message.value !== "") {
3938
+ writer.uint32(18).string(message.value);
3939
+ }
3940
+ return writer;
3941
+ },
3942
+ decode(input, length) {
3943
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3944
+ let end = length === void 0 ? reader.len : reader.pos + length;
3945
+ const message = createBaseProcessMetadata_Question_DescriptionEntry();
3946
+ while (reader.pos < end) {
3947
+ const tag = reader.uint32();
3948
+ switch (tag >>> 3) {
3949
+ case 1:
3950
+ if (tag !== 10) {
3951
+ break;
3952
+ }
3953
+ message.key = reader.string();
3954
+ continue;
3955
+ case 2:
3956
+ if (tag !== 18) {
3957
+ break;
3958
+ }
3959
+ message.value = reader.string();
3960
+ continue;
3961
+ }
3962
+ if ((tag & 7) === 4 || tag === 0) {
3963
+ break;
3964
+ }
3965
+ reader.skipType(tag & 7);
3966
+ }
3967
+ return message;
3968
+ },
3969
+ fromJSON(object) {
3970
+ return {
3971
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3972
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3973
+ };
3974
+ },
3975
+ toJSON(message) {
3976
+ const obj = {};
3977
+ if (message.key !== "") {
3978
+ obj.key = message.key;
3979
+ }
3980
+ if (message.value !== "") {
3981
+ obj.value = message.value;
3982
+ }
3983
+ return obj;
3984
+ },
3985
+ create(base) {
3986
+ return ProcessMetadata_Question_DescriptionEntry.fromPartial(base ?? {});
3987
+ },
3988
+ fromPartial(object) {
3989
+ const message = createBaseProcessMetadata_Question_DescriptionEntry();
3990
+ message.key = object.key ?? "";
3991
+ message.value = object.value ?? "";
3992
+ return message;
3993
+ }
3994
+ };
3995
+ function createBaseProcessMetadata_Question_VoteOption() {
3996
+ return { title: {}, value: 0 };
3997
+ }
3998
+ var ProcessMetadata_Question_VoteOption = {
3999
+ encode(message, writer = import_minimal3.default.Writer.create()) {
4000
+ Object.entries(message.title).forEach(([key, value]) => {
4001
+ ProcessMetadata_Question_VoteOption_TitleEntry.encode({ key, value }, writer.uint32(10).fork()).ldelim();
4002
+ });
4003
+ if (message.value !== 0) {
4004
+ writer.uint32(16).int32(message.value);
4005
+ }
4006
+ return writer;
4007
+ },
4008
+ decode(input, length) {
4009
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
4010
+ let end = length === void 0 ? reader.len : reader.pos + length;
4011
+ const message = createBaseProcessMetadata_Question_VoteOption();
4012
+ while (reader.pos < end) {
4013
+ const tag = reader.uint32();
4014
+ switch (tag >>> 3) {
4015
+ case 1:
4016
+ if (tag !== 10) {
4017
+ break;
4018
+ }
4019
+ const entry1 = ProcessMetadata_Question_VoteOption_TitleEntry.decode(reader, reader.uint32());
4020
+ if (entry1.value !== void 0) {
4021
+ message.title[entry1.key] = entry1.value;
4022
+ }
4023
+ continue;
4024
+ case 2:
4025
+ if (tag !== 16) {
4026
+ break;
4027
+ }
4028
+ message.value = reader.int32();
4029
+ continue;
4030
+ }
4031
+ if ((tag & 7) === 4 || tag === 0) {
4032
+ break;
4033
+ }
4034
+ reader.skipType(tag & 7);
4035
+ }
4036
+ return message;
4037
+ },
4038
+ fromJSON(object) {
4039
+ return {
4040
+ title: isObject3(object.title) ? Object.entries(object.title).reduce((acc, [key, value]) => {
4041
+ acc[key] = String(value);
4042
+ return acc;
4043
+ }, {}) : {},
4044
+ value: isSet3(object.value) ? globalThis.Number(object.value) : 0
4045
+ };
4046
+ },
4047
+ toJSON(message) {
4048
+ const obj = {};
4049
+ if (message.title) {
4050
+ const entries = Object.entries(message.title);
4051
+ if (entries.length > 0) {
4052
+ obj.title = {};
4053
+ entries.forEach(([k, v]) => {
4054
+ obj.title[k] = v;
4055
+ });
4056
+ }
4057
+ }
4058
+ if (message.value !== 0) {
4059
+ obj.value = Math.round(message.value);
4060
+ }
4061
+ return obj;
4062
+ },
4063
+ create(base) {
4064
+ return ProcessMetadata_Question_VoteOption.fromPartial(base ?? {});
4065
+ },
4066
+ fromPartial(object) {
4067
+ const message = createBaseProcessMetadata_Question_VoteOption();
4068
+ message.title = Object.entries(object.title ?? {}).reduce((acc, [key, value]) => {
4069
+ if (value !== void 0) {
4070
+ acc[key] = globalThis.String(value);
4071
+ }
4072
+ return acc;
4073
+ }, {});
4074
+ message.value = object.value ?? 0;
4075
+ return message;
4076
+ }
4077
+ };
4078
+ function createBaseProcessMetadata_Question_VoteOption_TitleEntry() {
4079
+ return { key: "", value: "" };
4080
+ }
4081
+ var ProcessMetadata_Question_VoteOption_TitleEntry = {
4082
+ encode(message, writer = import_minimal3.default.Writer.create()) {
4083
+ if (message.key !== "") {
4084
+ writer.uint32(10).string(message.key);
4085
+ }
4086
+ if (message.value !== "") {
4087
+ writer.uint32(18).string(message.value);
4088
+ }
4089
+ return writer;
4090
+ },
4091
+ decode(input, length) {
4092
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
4093
+ let end = length === void 0 ? reader.len : reader.pos + length;
4094
+ const message = createBaseProcessMetadata_Question_VoteOption_TitleEntry();
4095
+ while (reader.pos < end) {
4096
+ const tag = reader.uint32();
4097
+ switch (tag >>> 3) {
4098
+ case 1:
4099
+ if (tag !== 10) {
4100
+ break;
4101
+ }
4102
+ message.key = reader.string();
4103
+ continue;
4104
+ case 2:
4105
+ if (tag !== 18) {
4106
+ break;
4107
+ }
4108
+ message.value = reader.string();
4109
+ continue;
4110
+ }
4111
+ if ((tag & 7) === 4 || tag === 0) {
4112
+ break;
4113
+ }
4114
+ reader.skipType(tag & 7);
4115
+ }
4116
+ return message;
4117
+ },
4118
+ fromJSON(object) {
4119
+ return {
4120
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
4121
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
4122
+ };
4123
+ },
4124
+ toJSON(message) {
4125
+ const obj = {};
4126
+ if (message.key !== "") {
4127
+ obj.key = message.key;
4128
+ }
4129
+ if (message.value !== "") {
4130
+ obj.value = message.value;
4131
+ }
4132
+ return obj;
4133
+ },
4134
+ create(base) {
4135
+ return ProcessMetadata_Question_VoteOption_TitleEntry.fromPartial(base ?? {});
4136
+ },
4137
+ fromPartial(object) {
4138
+ const message = createBaseProcessMetadata_Question_VoteOption_TitleEntry();
4139
+ message.key = object.key ?? "";
4140
+ message.value = object.value ?? "";
4141
+ return message;
4142
+ }
4143
+ };
4144
+ function createBaseProcessMetadata_Results() {
4145
+ return { aggregation: "", display: "" };
4146
+ }
4147
+ var ProcessMetadata_Results = {
4148
+ encode(message, writer = import_minimal3.default.Writer.create()) {
4149
+ if (message.aggregation !== "") {
4150
+ writer.uint32(10).string(message.aggregation);
4151
+ }
4152
+ if (message.display !== "") {
4153
+ writer.uint32(18).string(message.display);
4154
+ }
4155
+ return writer;
4156
+ },
4157
+ decode(input, length) {
4158
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
4159
+ let end = length === void 0 ? reader.len : reader.pos + length;
4160
+ const message = createBaseProcessMetadata_Results();
4161
+ while (reader.pos < end) {
4162
+ const tag = reader.uint32();
4163
+ switch (tag >>> 3) {
4164
+ case 1:
4165
+ if (tag !== 10) {
4166
+ break;
4167
+ }
4168
+ message.aggregation = reader.string();
4169
+ continue;
4170
+ case 2:
4171
+ if (tag !== 18) {
4172
+ break;
4173
+ }
4174
+ message.display = reader.string();
4175
+ continue;
4176
+ }
4177
+ if ((tag & 7) === 4 || tag === 0) {
4178
+ break;
4179
+ }
4180
+ reader.skipType(tag & 7);
4181
+ }
4182
+ return message;
4183
+ },
4184
+ fromJSON(object) {
4185
+ return {
4186
+ aggregation: isSet3(object.aggregation) ? globalThis.String(object.aggregation) : "",
4187
+ display: isSet3(object.display) ? globalThis.String(object.display) : ""
4188
+ };
4189
+ },
4190
+ toJSON(message) {
4191
+ const obj = {};
4192
+ if (message.aggregation !== "") {
4193
+ obj.aggregation = message.aggregation;
4194
+ }
4195
+ if (message.display !== "") {
4196
+ obj.display = message.display;
4197
+ }
4198
+ return obj;
4199
+ },
4200
+ create(base) {
4201
+ return ProcessMetadata_Results.fromPartial(base ?? {});
4202
+ },
4203
+ fromPartial(object) {
4204
+ const message = createBaseProcessMetadata_Results();
4205
+ message.aggregation = object.aggregation ?? "";
4206
+ message.display = object.display ?? "";
4207
+ return message;
4208
+ }
4209
+ };
4210
+ function createBaseProcessMetadata_MetaEntry() {
4211
+ return { key: "", value: "" };
4212
+ }
4213
+ var ProcessMetadata_MetaEntry = {
4214
+ encode(message, writer = import_minimal3.default.Writer.create()) {
4215
+ if (message.key !== "") {
4216
+ writer.uint32(10).string(message.key);
4217
+ }
4218
+ if (message.value !== "") {
4219
+ writer.uint32(18).string(message.value);
4220
+ }
4221
+ return writer;
4222
+ },
4223
+ decode(input, length) {
4224
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
4225
+ let end = length === void 0 ? reader.len : reader.pos + length;
4226
+ const message = createBaseProcessMetadata_MetaEntry();
4227
+ while (reader.pos < end) {
4228
+ const tag = reader.uint32();
4229
+ switch (tag >>> 3) {
4230
+ case 1:
4231
+ if (tag !== 10) {
4232
+ break;
4233
+ }
4234
+ message.key = reader.string();
4235
+ continue;
4236
+ case 2:
4237
+ if (tag !== 18) {
4238
+ break;
4239
+ }
4240
+ message.value = reader.string();
4241
+ continue;
4242
+ }
4243
+ if ((tag & 7) === 4 || tag === 0) {
4244
+ break;
4245
+ }
4246
+ reader.skipType(tag & 7);
4247
+ }
4248
+ return message;
4249
+ },
4250
+ fromJSON(object) {
4251
+ return {
4252
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
4253
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
4254
+ };
4255
+ },
4256
+ toJSON(message) {
4257
+ const obj = {};
4258
+ if (message.key !== "") {
4259
+ obj.key = message.key;
4260
+ }
4261
+ if (message.value !== "") {
4262
+ obj.value = message.value;
4263
+ }
4264
+ return obj;
4265
+ },
4266
+ create(base) {
4267
+ return ProcessMetadata_MetaEntry.fromPartial(base ?? {});
4268
+ },
4269
+ fromPartial(object) {
4270
+ const message = createBaseProcessMetadata_MetaEntry();
4271
+ message.key = object.key ?? "";
4272
+ message.value = object.value ?? "";
4273
+ return message;
4274
+ }
4275
+ };
4276
+ function isObject3(value) {
4277
+ return typeof value === "object" && value !== null;
4278
+ }
4279
+ function isSet3(value) {
4280
+ return value !== null && value !== void 0;
4281
+ }
4282
+ // Annotate the CommonJS export names for ESM import in node:
4283
+ 0 && (module.exports = {
4284
+ EntityMetadata,
4285
+ EntityMetadataStore,
4286
+ EntityMetadata_Action,
4287
+ EntityMetadata_Action_ImageSource,
4288
+ EntityMetadata_Action_ImageSource_CaptionEntry,
4289
+ EntityMetadata_Action_NameEntry,
4290
+ EntityMetadata_DescriptionEntry,
4291
+ EntityMetadata_Media,
4292
+ EntityMetadata_MetaEntry,
4293
+ EntityMetadata_NameEntry,
4294
+ EntityMetadata_NewsFeedEntry,
4295
+ EntityMetadata_VotingProcesses,
4296
+ EntityReference,
4297
+ Feed,
4298
+ FeedPost,
4299
+ FeedPost_Author,
4300
+ FeedStore,
4301
+ Feed_MetaEntry,
4302
+ ProcessMetadata,
4303
+ ProcessMetadataStore,
4304
+ ProcessMetadata_DescriptionEntry,
4305
+ ProcessMetadata_MediaEntry,
4306
+ ProcessMetadata_MetaEntry,
4307
+ ProcessMetadata_Question,
4308
+ ProcessMetadata_Question_DescriptionEntry,
4309
+ ProcessMetadata_Question_TitleEntry,
4310
+ ProcessMetadata_Question_VoteOption,
4311
+ ProcessMetadata_Question_VoteOption_TitleEntry,
4312
+ ProcessMetadata_Results,
4313
+ ProcessMetadata_TitleEntry
4314
+ });