@flock/wirespec 0.11.9 → 0.12.2

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 (100) hide show
  1. package/arrow-arrow-annotations.mjs +4 -0
  2. package/{kotlinx-io-kotlinx-io-bytestring.js.map → arrow-arrow-annotations.mjs.map} +1 -1
  3. package/arrow-arrow-atomic.mjs +43 -0
  4. package/arrow-arrow-atomic.mjs.map +1 -0
  5. package/arrow-arrow-continuations.mjs +18 -0
  6. package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → arrow-arrow-continuations.mjs.map} +1 -1
  7. package/arrow-arrow-core.mjs +532 -0
  8. package/arrow-arrow-core.mjs.map +1 -0
  9. package/clikt-clikt.mjs +6648 -0
  10. package/clikt-clikt.mjs.map +1 -0
  11. package/colormath-root-colormath.mjs +1696 -0
  12. package/colormath-root-colormath.mjs.map +1 -0
  13. package/kotlin-kotlin-stdlib.mjs +13106 -0
  14. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  15. package/kotlin-openapi-bindings.mjs +13769 -0
  16. package/kotlin-openapi-bindings.mjs.map +1 -0
  17. package/kotlin-rgxgen.mjs +4298 -0
  18. package/kotlin-rgxgen.mjs.map +1 -0
  19. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  20. package/{arrow-arrow-annotations.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
  21. package/kotlinx-io-kotlinx-io-bytestring.mjs +4 -0
  22. package/{kotlin-kotlin-test.js.map → kotlinx-io-kotlinx-io-bytestring.mjs.map} +1 -1
  23. package/kotlinx-io-kotlinx-io-core.mjs +2201 -0
  24. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  25. package/kotlinx-serialization-kotlinx-serialization-core.mjs +5880 -0
  26. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  27. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5109 -0
  28. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  29. package/markdown.mjs +6753 -0
  30. package/markdown.mjs.map +1 -0
  31. package/mordant-mordant.mjs +11839 -0
  32. package/mordant-mordant.mjs.map +1 -0
  33. package/package.json +4 -6
  34. package/wirespec-bin.mjs +18 -0
  35. package/wirespec-src-compiler-core.mjs +8313 -0
  36. package/wirespec-src-compiler-core.mjs.map +1 -0
  37. package/wirespec-src-compiler-lib.mjs +2565 -0
  38. package/wirespec-src-compiler-lib.mjs.map +1 -0
  39. package/wirespec-src-converter-avro.mjs +1933 -0
  40. package/wirespec-src-converter-avro.mjs.map +1 -0
  41. package/wirespec-src-converter-openapi.mjs +5301 -0
  42. package/wirespec-src-converter-openapi.mjs.map +1 -0
  43. package/wirespec-src-plugin-arguments.mjs +587 -0
  44. package/wirespec-src-plugin-arguments.mjs.map +1 -0
  45. package/wirespec-src-plugin-cli.mjs +1487 -0
  46. package/wirespec-src-plugin-cli.mjs.map +1 -0
  47. package/wirespec-src-plugin-npm.d.ts +485 -466
  48. package/wirespec-src-plugin-npm.mjs +622 -0
  49. package/wirespec-src-plugin-npm.mjs.map +1 -0
  50. package/wirespec-src-tools-generator.mjs +284 -0
  51. package/wirespec-src-tools-generator.mjs.map +1 -0
  52. package/arrow-arrow-annotations.js +0 -15
  53. package/arrow-arrow-atomic.js +0 -55
  54. package/arrow-arrow-atomic.js.map +0 -1
  55. package/arrow-arrow-continuations.js +0 -30
  56. package/arrow-arrow-continuations.js.map +0 -1
  57. package/arrow-arrow-core.js +0 -410
  58. package/arrow-arrow-core.js.map +0 -1
  59. package/clikt-clikt.js +0 -6713
  60. package/clikt-clikt.js.map +0 -1
  61. package/colormath-root-colormath.js +0 -1727
  62. package/colormath-root-colormath.js.map +0 -1
  63. package/kotlin-kotlin-stdlib.js +0 -13263
  64. package/kotlin-kotlin-stdlib.js.map +0 -1
  65. package/kotlin-kotlin-test.js +0 -15
  66. package/kotlin-openapi-bindings.js +0 -13787
  67. package/kotlin-openapi-bindings.js.map +0 -1
  68. package/kotlin-rgxgen.js +0 -4315
  69. package/kotlin-rgxgen.js.map +0 -1
  70. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
  71. package/kotlinx-io-kotlinx-io-bytestring.js +0 -15
  72. package/kotlinx-io-kotlinx-io-core.js +0 -2219
  73. package/kotlinx-io-kotlinx-io-core.js.map +0 -1
  74. package/kotlinx-serialization-kotlinx-serialization-core.js +0 -5914
  75. package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
  76. package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5126
  77. package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
  78. package/markdown.js +0 -6768
  79. package/markdown.js.map +0 -1
  80. package/mordant-mordant.js +0 -11981
  81. package/mordant-mordant.js.map +0 -1
  82. package/resources-library.js +0 -15
  83. package/resources-library.js.map +0 -1
  84. package/wirespec-bin.js +0 -3
  85. package/wirespec-src-compiler-core.js +0 -7894
  86. package/wirespec-src-compiler-core.js.map +0 -1
  87. package/wirespec-src-compiler-lib.js +0 -2603
  88. package/wirespec-src-compiler-lib.js.map +0 -1
  89. package/wirespec-src-converter-avro.js +0 -1650
  90. package/wirespec-src-converter-avro.js.map +0 -1
  91. package/wirespec-src-converter-openapi.js +0 -5366
  92. package/wirespec-src-converter-openapi.js.map +0 -1
  93. package/wirespec-src-plugin-arguments.js +0 -640
  94. package/wirespec-src-plugin-arguments.js.map +0 -1
  95. package/wirespec-src-plugin-cli.js +0 -1222
  96. package/wirespec-src-plugin-cli.js.map +0 -1
  97. package/wirespec-src-plugin-npm.js +0 -480
  98. package/wirespec-src-plugin-npm.js.map +0 -1
  99. package/wirespec-src-tools-generator.js +0 -306
  100. package/wirespec-src-tools-generator.js.map +0 -1
@@ -0,0 +1,1933 @@
1
+ import {
2
+ Boolean_instance1kgsipl40p8ra as Boolean_instance,
3
+ Precision_P32_getInstance1kon1dczaq5ez as Precision_P32_getInstance,
4
+ Integeryrcje1s9u7kr as Integer,
5
+ Precision_P64_getInstance3q0l9gwfv6ncf as Precision_P64_getInstance,
6
+ Number3i05nlui0wcz8 as Number_0,
7
+ Bytes_instance34grey8zy2a2u as Bytes_instance,
8
+ String_instance3szcmve6lxm9 as String_instance,
9
+ Custom37hvrfgd6b0uj as Custom,
10
+ Dict3l6tdihpke4rr as Dict,
11
+ Iterablerto606wd057m as Iterable,
12
+ Unit3rie819ih39bz as Unit,
13
+ Primitivexjb7c0cm123a as Primitive,
14
+ DefinitionIdentifier21mzme854zakh as DefinitionIdentifier,
15
+ FieldIdentifier2fnn30qixmpf as FieldIdentifier,
16
+ Field3769gf85dkeaq as Field,
17
+ Shape1dq3mrwqqa6gt as Shape,
18
+ Type11a5scrd50tqk as Type,
19
+ Enum13738b9tl6w6v as Enum,
20
+ Union171cmlm23mwcq as Union,
21
+ Definition175ejj0ddy3gi as Definition,
22
+ Any268baxyo9do19 as Any,
23
+ Refined3fn8nn8ume24i as Refined,
24
+ Bytes2moci2lqqzua3 as Bytes,
25
+ Boolean1v54w5v4qjba1 as Boolean_0,
26
+ String23kqvhe3sk098 as String_0,
27
+ Channel2rnyzzgwpojjq as Channel,
28
+ } from './wirespec-src-compiler-core.mjs';
29
+ import {
30
+ NotImplementedErrorfzlkpv14xxr8 as NotImplementedError,
31
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
32
+ minus1djrl64vbav3y as minus,
33
+ Collection1k04j3hzsbod0 as Collection,
34
+ isInterface3d6p8outrmvmk as isInterface,
35
+ checkCountOverflow1ro2fe1r4xvgf as checkCountOverflow,
36
+ Unit_instance14hm69wy3kr8u as Unit_instance,
37
+ first58ocm7j58k3q as first,
38
+ toString1pkumu07cwy4m as toString,
39
+ IllegalStateException_init_$Create$1nm9y6jd3c9iy as IllegalStateException_init_$Create$,
40
+ emptyList1g2z5xcrvp2zy as emptyList,
41
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
42
+ ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$,
43
+ toSet2orjxp16sotqu as toSet,
44
+ listOfvhqybd2zx248 as listOf,
45
+ ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$_0,
46
+ addAll1k27qatfgp3k5 as addAll,
47
+ plus310ted5e4i90h as plus,
48
+ protoOf180f3jzyo7rfj as protoOf,
49
+ VOID7hggqo3abtya as VOID,
50
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
51
+ toList3jhuyej2anx2q as toList,
52
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
53
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
54
+ objectCreate1ve4bgxiu4x98 as objectCreate,
55
+ copyToArray2j022khrow2yi as copyToArray,
56
+ getStringHashCode26igk1bx568vk as getStringHashCode,
57
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
58
+ AbstractList3ck35puwbp1e9 as AbstractList,
59
+ toList383f556t1dixk as toList_0,
60
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
61
+ hashCodeq5arwsb9dgti as hashCode,
62
+ equals2au1ep9vhcato as equals,
63
+ StringCompanionObject_instance2iflbktk67pca as StringCompanionObject_instance,
64
+ getKClass1s3j9wy1cofik as getKClass,
65
+ arrayOf1akklvh2at202 as arrayOf,
66
+ createKType1lgox3mzhchp5 as createKType,
67
+ plus20p0vtfmu0596 as plus_0,
68
+ } from './kotlin-kotlin-stdlib.mjs';
69
+ import {
70
+ PluginGeneratedSerialDescriptorqdzeg5asqhfg as PluginGeneratedSerialDescriptor,
71
+ StringSerializer_getInstance2kpn94uehvuc4 as StringSerializer_getInstance,
72
+ UnknownFieldException_init_$Create$3p6j2tgfvvykj as UnknownFieldException_init_$Create$,
73
+ get_nullable197rfua9r7fsz as get_nullable,
74
+ typeParametersSerializers2likxjr48tr7y as typeParametersSerializers,
75
+ GeneratedSerializer1f7t7hssdd2ws as GeneratedSerializer,
76
+ throwMissingFieldException2cmke0v3ynf14 as throwMissingFieldException,
77
+ SerializerFactory1qv9hivitncuv as SerializerFactory,
78
+ ArrayListSerializer7k5wnrulb3y6 as ArrayListSerializer,
79
+ IntSerializer_getInstance1qqxumiddm0tw as IntSerializer_getInstance,
80
+ SEALED_getInstance9bx3brtn9dsf as SEALED_getInstance,
81
+ buildSerialDescriptor2873qmkp8r2ib as buildSerialDescriptor,
82
+ ListSerializer1hxuk9dx5n9du as ListSerializer,
83
+ SerializationException_init_$Create$1wswbero8ley0 as SerializationException_init_$Create$,
84
+ KSerializerzf77vz1967fq as KSerializer,
85
+ serializer1x79l67jvwntn as serializer,
86
+ serializer1i4e9ym37oxmo as serializer_0,
87
+ } from './kotlinx-serialization-kotlinx-serialization-core.mjs';
88
+ import {
89
+ JsonDecoder1rijst5ne6qla as JsonDecoder,
90
+ JsonObjectee06ihoeeiqj as JsonObject,
91
+ JsonArray2urf8ey7u44sd as JsonArray,
92
+ JsonPrimitive3ttzjh2ft5dnx as JsonPrimitive,
93
+ Jsonsmkyu9xjl7fv as Json,
94
+ } from './kotlinx-serialization-kotlinx-serialization-json.mjs';
95
+ import { toNonEmptyListOrNull2ovnnazjb3msz as toNonEmptyListOrNull } from './arrow-arrow-core.mjs';
96
+ //region block: imports
97
+ var imul = Math.imul;
98
+ //endregion
99
+ //region block: pre-declaration
100
+ initMetadataForObject(AvroConverter, 'AvroConverter');
101
+ initMetadataForObject(AvroEmitter, 'AvroEmitter');
102
+ initMetadataForCompanion(Companion);
103
+ initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
104
+ initMetadataForCompanion(Companion_0);
105
+ initMetadataForCompanion(Companion_1, VOID, [SerializerFactory]);
106
+ initMetadataForCompanion(Companion_2);
107
+ initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
108
+ initMetadataForCompanion(Companion_3);
109
+ initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
110
+ initMetadataForCompanion(Companion_4);
111
+ initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
112
+ initMetadataForCompanion(Companion_5);
113
+ initMetadataForObject($serializer_3, '$serializer', VOID, VOID, [GeneratedSerializer]);
114
+ initMetadataForCompanion(Companion_6);
115
+ initMetadataForObject($serializer_4, '$serializer', VOID, VOID, [GeneratedSerializer]);
116
+ initMetadataForCompanion(Companion_7);
117
+ initMetadataForObject($serializer_5, '$serializer', VOID, VOID, [GeneratedSerializer]);
118
+ initMetadataForCompanion(Companion_8);
119
+ initMetadataForObject($serializer_6, '$serializer', VOID, VOID, [GeneratedSerializer]);
120
+ initMetadataForClass(Field_0, 'Field', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
121
+ initMetadataForClass(TypeList, 'TypeList', VOID, AbstractList, VOID, VOID, VOID, {0: TypeListSerializer_getInstance});
122
+ initMetadataForInterface(Type_0, 'Type', VOID, VOID, VOID, VOID, VOID, {0: TypeSerializer_getInstance});
123
+ initMetadataForClass(SimpleType, 'SimpleType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_0});
124
+ initMetadataForClass(RecordType, 'RecordType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_1});
125
+ initMetadataForClass(ArrayType, 'ArrayType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_2});
126
+ initMetadataForClass(MapType, 'MapType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_3});
127
+ initMetadataForClass(EnumType, 'EnumType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_4});
128
+ initMetadataForClass(UnionType, 'UnionType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_5});
129
+ initMetadataForClass(LogicalType, 'LogicalType', VOID, VOID, [Type_0], VOID, VOID, {0: $serializer_getInstance_6});
130
+ initMetadataForObject(TypeListSerializer, 'TypeListSerializer', VOID, VOID, [KSerializer]);
131
+ initMetadataForObject(TypeSerializer, 'TypeSerializer', VOID, VOID, [KSerializer]);
132
+ initMetadataForObject(AvroParser, 'AvroParser');
133
+ //endregion
134
+ function isNullable(_this__u8e3s4, $this) {
135
+ return _this__u8e3s4.o1($this.y2d_1);
136
+ }
137
+ function toPrimitive(_this__u8e3s4, $this) {
138
+ var tmp;
139
+ switch (_this__u8e3s4.z2d_1) {
140
+ case 'boolean':
141
+ tmp = Boolean_instance;
142
+ break;
143
+ case 'int':
144
+ tmp = new Integer(Precision_P32_getInstance());
145
+ break;
146
+ case 'long':
147
+ tmp = new Integer(Precision_P64_getInstance());
148
+ break;
149
+ case 'float':
150
+ tmp = new Number_0(Precision_P32_getInstance());
151
+ break;
152
+ case 'double':
153
+ tmp = new Number_0(Precision_P64_getInstance());
154
+ break;
155
+ case 'bytes':
156
+ tmp = Bytes_instance;
157
+ break;
158
+ case 'string':
159
+ tmp = String_instance;
160
+ break;
161
+ default:
162
+ var reason = 'primitive not mapped ' + _this__u8e3s4.z2d_1;
163
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
164
+ }
165
+ return tmp;
166
+ }
167
+ function toReference(_this__u8e3s4, $this, isNullable) {
168
+ var tmp;
169
+ if (_this__u8e3s4 instanceof SimpleType) {
170
+ switch (_this__u8e3s4.z2d_1) {
171
+ case 'null':
172
+ tmp = new Unit(isNullable);
173
+ break;
174
+ case 'boolean':
175
+ case 'int':
176
+ case 'long':
177
+ case 'float':
178
+ case 'double':
179
+ case 'bytes':
180
+ case 'string':
181
+ tmp = new Primitive(toPrimitive(_this__u8e3s4, $this), isNullable);
182
+ break;
183
+ default:
184
+ tmp = new Custom(_this__u8e3s4.z2d_1, isNullable);
185
+ break;
186
+ }
187
+ } else {
188
+ if (_this__u8e3s4 instanceof ArrayType) {
189
+ tmp = new Iterable(toReference(_this__u8e3s4.s2e_1, $this, false), isNullable);
190
+ } else {
191
+ if (_this__u8e3s4 instanceof RecordType) {
192
+ tmp = new Custom(_this__u8e3s4.n2e_1, isNullable);
193
+ } else {
194
+ if (_this__u8e3s4 instanceof EnumType) {
195
+ tmp = new Custom(_this__u8e3s4.j2e_1, isNullable);
196
+ } else {
197
+ if (_this__u8e3s4 instanceof LogicalType) {
198
+ tmp = toReference(new SimpleType(_this__u8e3s4.e2e_1), $this, isNullable);
199
+ } else {
200
+ if (_this__u8e3s4 instanceof MapType) {
201
+ tmp = new Dict(toReference(_this__u8e3s4.d2e_1, $this, false), isNullable);
202
+ } else {
203
+ if (_this__u8e3s4 instanceof UnionType) {
204
+ tmp = new Custom(_this__u8e3s4.a2e_1, isNullable);
205
+ } else {
206
+ noWhenBranchMatchedException();
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ return tmp;
215
+ }
216
+ function toReference_0(_this__u8e3s4, $this) {
217
+ var list = minus(_this__u8e3s4, $this.y2d_1);
218
+ var tmp;
219
+ if (list.j() === 1) {
220
+ tmp = toReference(first(list), $this, isNullable(_this__u8e3s4, $this));
221
+ } else {
222
+ var tmp$ret$0;
223
+ $l$block: {
224
+ // Inline function 'kotlin.collections.count' call
225
+ var tmp_0;
226
+ if (isInterface(list, Collection)) {
227
+ tmp_0 = list.l();
228
+ } else {
229
+ tmp_0 = false;
230
+ }
231
+ if (tmp_0) {
232
+ tmp$ret$0 = 0;
233
+ break $l$block;
234
+ }
235
+ var count = 0;
236
+ var _iterator__ex2g4s = list.g();
237
+ while (_iterator__ex2g4s.h()) {
238
+ var element = _iterator__ex2g4s.i();
239
+ // Inline function 'community.flock.wirespec.converter.avro.AvroConverter.toReference.<anonymous>' call
240
+ if (element instanceof SimpleType) {
241
+ count = count + 1 | 0;
242
+ checkCountOverflow(count);
243
+ }
244
+ }
245
+ tmp$ret$0 = count;
246
+ }
247
+ if (tmp$ret$0 > 1) {
248
+ var message = 'Cannot have multiple SimpleTypes in Union';
249
+ throw IllegalStateException_init_$Create$(toString(message));
250
+ } else {
251
+ tmp = toReference(first(list), $this, isNullable(_this__u8e3s4, $this));
252
+ }
253
+ }
254
+ return tmp;
255
+ }
256
+ function toType(_this__u8e3s4, $this) {
257
+ var tmp0_identifier = new DefinitionIdentifier(_this__u8e3s4.n2e_1);
258
+ var tmp1_extends = emptyList();
259
+ // Inline function 'kotlin.collections.map' call
260
+ var this_0 = _this__u8e3s4.p2e_1;
261
+ // Inline function 'kotlin.collections.mapTo' call
262
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
263
+ var _iterator__ex2g4s = this_0.g();
264
+ while (_iterator__ex2g4s.h()) {
265
+ var item = _iterator__ex2g4s.i();
266
+ // Inline function 'community.flock.wirespec.converter.avro.AvroConverter.toType.<anonymous>' call
267
+ var tmp$ret$0 = new Field(new FieldIdentifier(item.t2e_1), toReference_0(item.u2e_1, AvroConverter_getInstance()));
268
+ destination.e(tmp$ret$0);
269
+ }
270
+ var tmp2_shape = new Shape(destination);
271
+ return new Type(null, tmp0_identifier, tmp2_shape, tmp1_extends);
272
+ }
273
+ function toEnum(_this__u8e3s4, $this) {
274
+ return new Enum(null, new DefinitionIdentifier(_this__u8e3s4.j2e_1), toSet(_this__u8e3s4.l2e_1));
275
+ }
276
+ function toUnion(_this__u8e3s4, $this, name) {
277
+ var tmp = new DefinitionIdentifier(name);
278
+ // Inline function 'kotlin.collections.map' call
279
+ var this_0 = _this__u8e3s4.b2e_1;
280
+ // Inline function 'kotlin.collections.mapTo' call
281
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
282
+ var _iterator__ex2g4s = this_0.g();
283
+ while (_iterator__ex2g4s.h()) {
284
+ var item = _iterator__ex2g4s.i();
285
+ // Inline function 'community.flock.wirespec.converter.avro.AvroConverter.toUnion.<anonymous>' call
286
+ var tmp$ret$0 = toReference(item, AvroConverter_getInstance(), false);
287
+ destination.e(tmp$ret$0);
288
+ }
289
+ return new Union(null, tmp, toSet(destination));
290
+ }
291
+ function AvroConverter() {
292
+ AvroConverter_instance = this;
293
+ this.y2d_1 = new SimpleType('null');
294
+ }
295
+ protoOf(AvroConverter).x2e = function (_this__u8e3s4, name) {
296
+ var tmp;
297
+ if (_this__u8e3s4 instanceof SimpleType) {
298
+ tmp = emptyList();
299
+ } else {
300
+ if (_this__u8e3s4 instanceof RecordType) {
301
+ var tmp_0 = listOf(toType(_this__u8e3s4, this));
302
+ // Inline function 'kotlin.collections.flatMap' call
303
+ var tmp0 = _this__u8e3s4.p2e_1;
304
+ // Inline function 'kotlin.collections.flatMapTo' call
305
+ var destination = ArrayList_init_$Create$_0();
306
+ var _iterator__ex2g4s = tmp0.g();
307
+ while (_iterator__ex2g4s.h()) {
308
+ var element = _iterator__ex2g4s.i();
309
+ // Inline function 'community.flock.wirespec.converter.avro.AvroConverter.flatten.<anonymous>' call
310
+ // Inline function 'kotlin.collections.flatMap' call
311
+ var tmp0_0 = element.u2e_1;
312
+ // Inline function 'kotlin.collections.flatMapTo' call
313
+ var destination_0 = ArrayList_init_$Create$_0();
314
+ var _iterator__ex2g4s_0 = tmp0_0.g();
315
+ while (_iterator__ex2g4s_0.h()) {
316
+ var element_0 = _iterator__ex2g4s_0.i();
317
+ // Inline function 'community.flock.wirespec.converter.avro.AvroConverter.flatten.<anonymous>.<anonymous>' call
318
+ var list = AvroConverter_getInstance().x2e(element_0, name);
319
+ addAll(destination_0, list);
320
+ }
321
+ var list_0 = destination_0;
322
+ addAll(destination, list_0);
323
+ }
324
+ tmp = plus(tmp_0, destination);
325
+ } else {
326
+ if (_this__u8e3s4 instanceof ArrayType) {
327
+ tmp = this.x2e(_this__u8e3s4.s2e_1, name);
328
+ } else {
329
+ if (_this__u8e3s4 instanceof EnumType) {
330
+ tmp = listOf(toEnum(_this__u8e3s4, this));
331
+ } else {
332
+ if (_this__u8e3s4 instanceof LogicalType) {
333
+ tmp = emptyList();
334
+ } else {
335
+ if (_this__u8e3s4 instanceof MapType) {
336
+ tmp = this.x2e(_this__u8e3s4.d2e_1, name);
337
+ } else {
338
+ if (_this__u8e3s4 instanceof UnionType) {
339
+ tmp = listOf(toUnion(_this__u8e3s4, this, name));
340
+ } else {
341
+ noWhenBranchMatchedException();
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+ }
349
+ return tmp;
350
+ };
351
+ protoOf(AvroConverter).y2e = function (_this__u8e3s4, name, $super) {
352
+ name = name === VOID ? '' : name;
353
+ return $super === VOID ? this.x2e(_this__u8e3s4, name) : $super.x2e.call(this, _this__u8e3s4, name);
354
+ };
355
+ var AvroConverter_instance;
356
+ function AvroConverter_getInstance() {
357
+ if (AvroConverter_instance == null)
358
+ new AvroConverter();
359
+ return AvroConverter_instance;
360
+ }
361
+ function findType(_this__u8e3s4, $this, name) {
362
+ // Inline function 'kotlin.collections.filterIsInstance' call
363
+ // Inline function 'kotlin.collections.filterIsInstanceTo' call
364
+ var destination = ArrayList_init_$Create$_0();
365
+ var _iterator__ex2g4s = _this__u8e3s4.g();
366
+ while (_iterator__ex2g4s.h()) {
367
+ var element = _iterator__ex2g4s.i();
368
+ if (!(element == null) ? isInterface(element, Definition) : false) {
369
+ destination.e(element);
370
+ }
371
+ }
372
+ // Inline function 'kotlin.collections.find' call
373
+ var tmp$ret$3;
374
+ $l$block: {
375
+ // Inline function 'kotlin.collections.firstOrNull' call
376
+ var _iterator__ex2g4s_0 = destination.g();
377
+ while (_iterator__ex2g4s_0.h()) {
378
+ var element_0 = _iterator__ex2g4s_0.i();
379
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.findType.<anonymous>' call
380
+ if (element_0.o29().b1() === name) {
381
+ tmp$ret$3 = element_0;
382
+ break $l$block;
383
+ }
384
+ }
385
+ tmp$ret$3 = null;
386
+ }
387
+ return tmp$ret$3;
388
+ }
389
+ function AvroEmitter() {
390
+ }
391
+ protoOf(AvroEmitter).z2e = function (_this__u8e3s4) {
392
+ return new EnumType('enum', _this__u8e3s4.g26_1.b1(), VOID, toList(_this__u8e3s4.h26_1));
393
+ };
394
+ protoOf(AvroEmitter).a2f = function (_this__u8e3s4) {
395
+ var tmp = _this__u8e3s4.w25_1.b1();
396
+ // Inline function 'kotlin.collections.map' call
397
+ var this_0 = _this__u8e3s4.x25_1;
398
+ // Inline function 'kotlin.collections.mapTo' call
399
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
400
+ var _iterator__ex2g4s = this_0.g();
401
+ while (_iterator__ex2g4s.h()) {
402
+ var item = _iterator__ex2g4s.i();
403
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.emit.<anonymous>' call
404
+ var tmp$ret$0 = new SimpleType(item.b1());
405
+ destination.e(tmp$ret$0);
406
+ }
407
+ return new UnionType(tmp, TypeList_init_$Create$(destination));
408
+ };
409
+ protoOf(AvroEmitter).b2f = function (_this__u8e3s4, ast, hasEmitted) {
410
+ var tmp;
411
+ if (_this__u8e3s4 instanceof Dict) {
412
+ tmp = new MapType('map', this.b2f(_this__u8e3s4.w26_1, ast, hasEmitted));
413
+ } else {
414
+ if (_this__u8e3s4 instanceof Iterable) {
415
+ tmp = new ArrayType('array', this.b2f(_this__u8e3s4.t26_1, ast, hasEmitted));
416
+ } else {
417
+ if (_this__u8e3s4 instanceof Primitive) {
418
+ var type = _this__u8e3s4.c24_1;
419
+ var tmp_0;
420
+ if (type instanceof String_0) {
421
+ tmp_0 = new SimpleType('string');
422
+ } else {
423
+ if (type instanceof Integer) {
424
+ var tmp_1;
425
+ switch (type.h24_1.p2_1) {
426
+ case 0:
427
+ tmp_1 = new SimpleType('int');
428
+ break;
429
+ case 1:
430
+ tmp_1 = new SimpleType('long');
431
+ break;
432
+ default:
433
+ noWhenBranchMatchedException();
434
+ break;
435
+ }
436
+ tmp_0 = tmp_1;
437
+ } else {
438
+ if (type instanceof Number_0) {
439
+ var tmp_2;
440
+ switch (type.f24_1.p2_1) {
441
+ case 0:
442
+ tmp_2 = new SimpleType('float');
443
+ break;
444
+ case 1:
445
+ tmp_2 = new SimpleType('double');
446
+ break;
447
+ default:
448
+ noWhenBranchMatchedException();
449
+ break;
450
+ }
451
+ tmp_0 = tmp_2;
452
+ } else {
453
+ if (type instanceof Boolean_0) {
454
+ tmp_0 = new SimpleType('boolean');
455
+ } else {
456
+ if (type instanceof Bytes) {
457
+ tmp_0 = new SimpleType('bytes');
458
+ } else {
459
+ noWhenBranchMatchedException();
460
+ }
461
+ }
462
+ }
463
+ }
464
+ }
465
+ tmp = tmp_0;
466
+ } else {
467
+ if (_this__u8e3s4 instanceof Custom) {
468
+ var def = findType(ast, this, _this__u8e3s4.v23_1);
469
+ var tmp_3;
470
+ if (def instanceof Type) {
471
+ var tmp_4;
472
+ if (hasEmitted.o1(def.z25_1.b1())) {
473
+ // Inline function 'kotlin.let' call
474
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.emit.stub_for_inlining' call
475
+ var p0 = def.z25_1.b1();
476
+ tmp_4 = new SimpleType(p0);
477
+ } else {
478
+ // Inline function 'kotlin.also' call
479
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.emit.<anonymous>' call
480
+ hasEmitted.e(def.z25_1.b1());
481
+ tmp_4 = this.c2f(def, ast, hasEmitted);
482
+ }
483
+ tmp_3 = tmp_4;
484
+ } else {
485
+ if (def instanceof Enum) {
486
+ tmp_3 = new SimpleType(def.g26_1.b1());
487
+ } else {
488
+ if (def instanceof Refined) {
489
+ tmp_3 = new SimpleType('string');
490
+ } else {
491
+ tmp_3 = new SimpleType(_this__u8e3s4.v23_1);
492
+ }
493
+ }
494
+ }
495
+ tmp = tmp_3;
496
+ } else {
497
+ if (_this__u8e3s4 instanceof Any) {
498
+ throw new NotImplementedError();
499
+ } else {
500
+ if (_this__u8e3s4 instanceof Unit) {
501
+ throw new NotImplementedError();
502
+ } else {
503
+ noWhenBranchMatchedException();
504
+ }
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
510
+ return tmp;
511
+ };
512
+ protoOf(AvroEmitter).d2f = function (_this__u8e3s4, ast, hasEmitted) {
513
+ var ref = _this__u8e3s4.f25_1;
514
+ var tmp;
515
+ if (ref instanceof Iterable) {
516
+ tmp = new ArrayType('array', this.b2f(ref.t26_1, ast, hasEmitted));
517
+ } else {
518
+ tmp = this.b2f(ref, ast, hasEmitted);
519
+ }
520
+ return tmp;
521
+ };
522
+ protoOf(AvroEmitter).c2f = function (_this__u8e3s4, ast, hasEmitted) {
523
+ var tmp0_name = _this__u8e3s4.z25_1.b1();
524
+ // Inline function 'kotlin.collections.map' call
525
+ var this_0 = _this__u8e3s4.a26_1.s26_1;
526
+ // Inline function 'kotlin.collections.mapTo' call
527
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
528
+ var _iterator__ex2g4s = this_0.g();
529
+ while (_iterator__ex2g4s.h()) {
530
+ var item = _iterator__ex2g4s.i();
531
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.emit.<anonymous>' call
532
+ var tmp = item.e25_1.b1();
533
+ var tmp_0;
534
+ if (item.f25_1.sm()) {
535
+ tmp_0 = new TypeList([new SimpleType('null'), AvroEmitter_instance.d2f(item, ast, hasEmitted)]);
536
+ } else {
537
+ tmp_0 = new TypeList([AvroEmitter_instance.d2f(item, ast, hasEmitted)]);
538
+ }
539
+ var tmp$ret$0 = new Field_0(tmp, tmp_0);
540
+ destination.e(tmp$ret$0);
541
+ }
542
+ return new RecordType('record', tmp0_name, VOID, destination);
543
+ };
544
+ protoOf(AvroEmitter).e2f = function (ast) {
545
+ // Inline function 'kotlin.collections.mutableListOf' call
546
+ var hasEmitted = ArrayList_init_$Create$_0();
547
+ // Inline function 'kotlin.collections.filterIsInstance' call
548
+ // Inline function 'kotlin.collections.filterIsInstanceTo' call
549
+ var destination = ArrayList_init_$Create$_0();
550
+ var _iterator__ex2g4s = ast.g();
551
+ while (_iterator__ex2g4s.h()) {
552
+ var element = _iterator__ex2g4s.i();
553
+ if (!(element == null) ? isInterface(element, Definition) : false) {
554
+ destination.e(element);
555
+ }
556
+ }
557
+ // Inline function 'kotlin.collections.mapNotNull' call
558
+ // Inline function 'kotlin.collections.mapNotNullTo' call
559
+ var destination_0 = ArrayList_init_$Create$_0();
560
+ // Inline function 'kotlin.collections.forEach' call
561
+ var _iterator__ex2g4s_0 = destination.g();
562
+ while (_iterator__ex2g4s_0.h()) {
563
+ var element_0 = _iterator__ex2g4s_0.i();
564
+ // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
565
+ // Inline function 'community.flock.wirespec.converter.avro.AvroEmitter.emit.<anonymous>' call
566
+ var tmp;
567
+ if (element_0 instanceof Type) {
568
+ tmp = AvroEmitter_instance.c2f(element_0, ast, hasEmitted);
569
+ } else {
570
+ if (element_0 instanceof Enum) {
571
+ tmp = AvroEmitter_instance.z2e(element_0);
572
+ } else {
573
+ if (element_0 instanceof Union) {
574
+ tmp = AvroEmitter_instance.a2f(element_0);
575
+ } else {
576
+ tmp = null;
577
+ }
578
+ }
579
+ }
580
+ var tmp0_safe_receiver = tmp;
581
+ if (tmp0_safe_receiver == null)
582
+ null;
583
+ else {
584
+ // Inline function 'kotlin.let' call
585
+ // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>.<anonymous>' call
586
+ destination_0.e(tmp0_safe_receiver);
587
+ }
588
+ }
589
+ return destination_0;
590
+ };
591
+ var AvroEmitter_instance;
592
+ function AvroEmitter_getInstance() {
593
+ return AvroEmitter_instance;
594
+ }
595
+ function Companion() {
596
+ }
597
+ var Companion_instance;
598
+ function Companion_getInstance() {
599
+ return Companion_instance;
600
+ }
601
+ function $serializer() {
602
+ $serializer_instance = this;
603
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.Field', this, 4);
604
+ tmp0_serialDesc.dw('name', false);
605
+ tmp0_serialDesc.dw('type', false);
606
+ tmp0_serialDesc.dw('doc', true);
607
+ tmp0_serialDesc.dw('default', true);
608
+ this.f2f_1 = tmp0_serialDesc;
609
+ }
610
+ protoOf($serializer).g2f = function (encoder, value) {
611
+ var tmp0_desc = this.f2f_1;
612
+ var tmp1_output = encoder.to(tmp0_desc);
613
+ tmp1_output.iq(tmp0_desc, 0, value.t2e_1);
614
+ tmp1_output.kq(tmp0_desc, 1, TypeListSerializer_getInstance(), value.u2e_1);
615
+ if (tmp1_output.qq(tmp0_desc, 2) ? true : !(value.v2e_1 == null)) {
616
+ tmp1_output.mq(tmp0_desc, 2, StringSerializer_getInstance(), value.v2e_1);
617
+ }
618
+ if (tmp1_output.qq(tmp0_desc, 3) ? true : !(value.w2e_1 == null)) {
619
+ tmp1_output.mq(tmp0_desc, 3, StringSerializer_getInstance(), value.w2e_1);
620
+ }
621
+ tmp1_output.uo(tmp0_desc);
622
+ };
623
+ protoOf($serializer).tl = function (encoder, value) {
624
+ return this.g2f(encoder, value instanceof Field_0 ? value : THROW_CCE());
625
+ };
626
+ protoOf($serializer).ul = function (decoder) {
627
+ var tmp0_desc = this.f2f_1;
628
+ var tmp1_flag = true;
629
+ var tmp2_index = 0;
630
+ var tmp3_bitMask0 = 0;
631
+ var tmp4_local0 = null;
632
+ var tmp5_local1 = null;
633
+ var tmp6_local2 = null;
634
+ var tmp7_local3 = null;
635
+ var tmp8_input = decoder.to(tmp0_desc);
636
+ if (tmp8_input.jp()) {
637
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
638
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
639
+ tmp5_local1 = tmp8_input.fp(tmp0_desc, 1, TypeListSerializer_getInstance(), tmp5_local1);
640
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
641
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
642
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
643
+ tmp7_local3 = tmp8_input.hp(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
644
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
645
+ } else
646
+ while (tmp1_flag) {
647
+ tmp2_index = tmp8_input.kp(tmp0_desc);
648
+ switch (tmp2_index) {
649
+ case -1:
650
+ tmp1_flag = false;
651
+ break;
652
+ case 0:
653
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
654
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
655
+ break;
656
+ case 1:
657
+ tmp5_local1 = tmp8_input.fp(tmp0_desc, 1, TypeListSerializer_getInstance(), tmp5_local1);
658
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
659
+ break;
660
+ case 2:
661
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
662
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
663
+ break;
664
+ case 3:
665
+ tmp7_local3 = tmp8_input.hp(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
666
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
667
+ break;
668
+ default:
669
+ throw UnknownFieldException_init_$Create$(tmp2_index);
670
+ }
671
+ }
672
+ tmp8_input.uo(tmp0_desc);
673
+ return Field_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
674
+ };
675
+ protoOf($serializer).sl = function () {
676
+ return this.f2f_1;
677
+ };
678
+ protoOf($serializer).ww = function () {
679
+ // Inline function 'kotlin.arrayOf' call
680
+ // Inline function 'kotlin.js.unsafeCast' call
681
+ // Inline function 'kotlin.js.asDynamic' call
682
+ return [StringSerializer_getInstance(), TypeListSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
683
+ };
684
+ var $serializer_instance;
685
+ function $serializer_getInstance() {
686
+ if ($serializer_instance == null)
687
+ new $serializer();
688
+ return $serializer_instance;
689
+ }
690
+ function Field_init_$Init$(seen0, name, type, doc, default_0, serializationConstructorMarker, $this) {
691
+ if (!(3 === (3 & seen0))) {
692
+ throwMissingFieldException(seen0, 3, $serializer_getInstance().f2f_1);
693
+ }
694
+ $this.t2e_1 = name;
695
+ $this.u2e_1 = type;
696
+ if (0 === (seen0 & 4))
697
+ $this.v2e_1 = null;
698
+ else
699
+ $this.v2e_1 = doc;
700
+ if (0 === (seen0 & 8))
701
+ $this.w2e_1 = null;
702
+ else
703
+ $this.w2e_1 = default_0;
704
+ return $this;
705
+ }
706
+ function Field_init_$Create$(seen0, name, type, doc, default_0, serializationConstructorMarker) {
707
+ return Field_init_$Init$(seen0, name, type, doc, default_0, serializationConstructorMarker, objectCreate(protoOf(Field_0)));
708
+ }
709
+ function TypeList_init_$Init$(type, $this) {
710
+ // Inline function 'kotlin.collections.toTypedArray' call
711
+ var tmp$ret$0 = copyToArray(type);
712
+ TypeList.call($this, tmp$ret$0.slice());
713
+ return $this;
714
+ }
715
+ function TypeList_init_$Create$(type) {
716
+ return TypeList_init_$Init$(type, objectCreate(protoOf(TypeList)));
717
+ }
718
+ function Companion_0() {
719
+ }
720
+ var Companion_instance_0;
721
+ function Companion_getInstance_0() {
722
+ return Companion_instance_0;
723
+ }
724
+ function Companion_1() {
725
+ }
726
+ protoOf(Companion_1).g18 = function () {
727
+ return TypeSerializer_getInstance();
728
+ };
729
+ protoOf(Companion_1).hx = function (typeParamsSerializers) {
730
+ return this.g18();
731
+ };
732
+ var Companion_instance_1;
733
+ function Companion_getInstance_1() {
734
+ return Companion_instance_1;
735
+ }
736
+ function Companion_2() {
737
+ }
738
+ var Companion_instance_2;
739
+ function Companion_getInstance_2() {
740
+ return Companion_instance_2;
741
+ }
742
+ function $serializer_0() {
743
+ $serializer_instance_0 = this;
744
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.SimpleType', this, 1);
745
+ tmp0_serialDesc.dw('value', false);
746
+ this.h2f_1 = tmp0_serialDesc;
747
+ }
748
+ protoOf($serializer_0).i2f = function (encoder, value) {
749
+ var tmp0_desc = this.h2f_1;
750
+ var tmp1_output = encoder.to(tmp0_desc);
751
+ tmp1_output.iq(tmp0_desc, 0, value.z2d_1);
752
+ tmp1_output.uo(tmp0_desc);
753
+ };
754
+ protoOf($serializer_0).tl = function (encoder, value) {
755
+ return this.i2f(encoder, value instanceof SimpleType ? value : THROW_CCE());
756
+ };
757
+ protoOf($serializer_0).ul = function (decoder) {
758
+ var tmp0_desc = this.h2f_1;
759
+ var tmp1_flag = true;
760
+ var tmp2_index = 0;
761
+ var tmp3_bitMask0 = 0;
762
+ var tmp4_local0 = null;
763
+ var tmp5_input = decoder.to(tmp0_desc);
764
+ if (tmp5_input.jp()) {
765
+ tmp4_local0 = tmp5_input.dp(tmp0_desc, 0);
766
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
767
+ } else
768
+ while (tmp1_flag) {
769
+ tmp2_index = tmp5_input.kp(tmp0_desc);
770
+ switch (tmp2_index) {
771
+ case -1:
772
+ tmp1_flag = false;
773
+ break;
774
+ case 0:
775
+ tmp4_local0 = tmp5_input.dp(tmp0_desc, 0);
776
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
777
+ break;
778
+ default:
779
+ throw UnknownFieldException_init_$Create$(tmp2_index);
780
+ }
781
+ }
782
+ tmp5_input.uo(tmp0_desc);
783
+ return SimpleType_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
784
+ };
785
+ protoOf($serializer_0).sl = function () {
786
+ return this.h2f_1;
787
+ };
788
+ protoOf($serializer_0).ww = function () {
789
+ // Inline function 'kotlin.arrayOf' call
790
+ // Inline function 'kotlin.js.unsafeCast' call
791
+ // Inline function 'kotlin.js.asDynamic' call
792
+ return [StringSerializer_getInstance()];
793
+ };
794
+ var $serializer_instance_0;
795
+ function $serializer_getInstance_0() {
796
+ if ($serializer_instance_0 == null)
797
+ new $serializer_0();
798
+ return $serializer_instance_0;
799
+ }
800
+ function SimpleType_init_$Init$(seen0, value, serializationConstructorMarker, $this) {
801
+ if (!(1 === (1 & seen0))) {
802
+ throwMissingFieldException(seen0, 1, $serializer_getInstance_0().h2f_1);
803
+ }
804
+ $this.z2d_1 = value;
805
+ return $this;
806
+ }
807
+ function SimpleType_init_$Create$(seen0, value, serializationConstructorMarker) {
808
+ return SimpleType_init_$Init$(seen0, value, serializationConstructorMarker, objectCreate(protoOf(SimpleType)));
809
+ }
810
+ function Companion_3() {
811
+ Companion_instance_3 = this;
812
+ var tmp = this;
813
+ // Inline function 'kotlin.arrayOf' call
814
+ // Inline function 'kotlin.js.unsafeCast' call
815
+ // Inline function 'kotlin.js.asDynamic' call
816
+ tmp.j2f_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance()), null];
817
+ }
818
+ protoOf(Companion_3).g18 = function () {
819
+ return $serializer_getInstance_1();
820
+ };
821
+ var Companion_instance_3;
822
+ function Companion_getInstance_3() {
823
+ if (Companion_instance_3 == null)
824
+ new Companion_3();
825
+ return Companion_instance_3;
826
+ }
827
+ function $serializer_1() {
828
+ $serializer_instance_1 = this;
829
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.RecordType', this, 5);
830
+ tmp0_serialDesc.dw('type', false);
831
+ tmp0_serialDesc.dw('name', false);
832
+ tmp0_serialDesc.dw('namespace', true);
833
+ tmp0_serialDesc.dw('fields', false);
834
+ tmp0_serialDesc.dw('doc', true);
835
+ this.k2f_1 = tmp0_serialDesc;
836
+ }
837
+ protoOf($serializer_1).l2f = function (encoder, value) {
838
+ var tmp0_desc = this.k2f_1;
839
+ var tmp1_output = encoder.to(tmp0_desc);
840
+ var tmp2_cached = Companion_getInstance_3().j2f_1;
841
+ tmp1_output.iq(tmp0_desc, 0, value.m2e_1);
842
+ tmp1_output.iq(tmp0_desc, 1, value.n2e_1);
843
+ if (tmp1_output.qq(tmp0_desc, 2) ? true : !(value.o2e_1 == null)) {
844
+ tmp1_output.mq(tmp0_desc, 2, StringSerializer_getInstance(), value.o2e_1);
845
+ }
846
+ tmp1_output.kq(tmp0_desc, 3, tmp2_cached[3], value.p2e_1);
847
+ if (tmp1_output.qq(tmp0_desc, 4) ? true : !(value.q2e_1 == null)) {
848
+ tmp1_output.mq(tmp0_desc, 4, StringSerializer_getInstance(), value.q2e_1);
849
+ }
850
+ tmp1_output.uo(tmp0_desc);
851
+ };
852
+ protoOf($serializer_1).tl = function (encoder, value) {
853
+ return this.l2f(encoder, value instanceof RecordType ? value : THROW_CCE());
854
+ };
855
+ protoOf($serializer_1).ul = function (decoder) {
856
+ var tmp0_desc = this.k2f_1;
857
+ var tmp1_flag = true;
858
+ var tmp2_index = 0;
859
+ var tmp3_bitMask0 = 0;
860
+ var tmp4_local0 = null;
861
+ var tmp5_local1 = null;
862
+ var tmp6_local2 = null;
863
+ var tmp7_local3 = null;
864
+ var tmp8_local4 = null;
865
+ var tmp9_input = decoder.to(tmp0_desc);
866
+ var tmp10_cached = Companion_getInstance_3().j2f_1;
867
+ if (tmp9_input.jp()) {
868
+ tmp4_local0 = tmp9_input.dp(tmp0_desc, 0);
869
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
870
+ tmp5_local1 = tmp9_input.dp(tmp0_desc, 1);
871
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
872
+ tmp6_local2 = tmp9_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
873
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
874
+ tmp7_local3 = tmp9_input.fp(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
875
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
876
+ tmp8_local4 = tmp9_input.hp(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
877
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
878
+ } else
879
+ while (tmp1_flag) {
880
+ tmp2_index = tmp9_input.kp(tmp0_desc);
881
+ switch (tmp2_index) {
882
+ case -1:
883
+ tmp1_flag = false;
884
+ break;
885
+ case 0:
886
+ tmp4_local0 = tmp9_input.dp(tmp0_desc, 0);
887
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
888
+ break;
889
+ case 1:
890
+ tmp5_local1 = tmp9_input.dp(tmp0_desc, 1);
891
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
892
+ break;
893
+ case 2:
894
+ tmp6_local2 = tmp9_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
895
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
896
+ break;
897
+ case 3:
898
+ tmp7_local3 = tmp9_input.fp(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
899
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
900
+ break;
901
+ case 4:
902
+ tmp8_local4 = tmp9_input.hp(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
903
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
904
+ break;
905
+ default:
906
+ throw UnknownFieldException_init_$Create$(tmp2_index);
907
+ }
908
+ }
909
+ tmp9_input.uo(tmp0_desc);
910
+ return RecordType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
911
+ };
912
+ protoOf($serializer_1).sl = function () {
913
+ return this.k2f_1;
914
+ };
915
+ protoOf($serializer_1).ww = function () {
916
+ var tmp0_cached = Companion_getInstance_3().j2f_1;
917
+ // Inline function 'kotlin.arrayOf' call
918
+ // Inline function 'kotlin.js.unsafeCast' call
919
+ // Inline function 'kotlin.js.asDynamic' call
920
+ return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];
921
+ };
922
+ var $serializer_instance_1;
923
+ function $serializer_getInstance_1() {
924
+ if ($serializer_instance_1 == null)
925
+ new $serializer_1();
926
+ return $serializer_instance_1;
927
+ }
928
+ function RecordType_init_$Init$(seen0, type, name, namespace, fields, doc, serializationConstructorMarker, $this) {
929
+ if (!(11 === (11 & seen0))) {
930
+ throwMissingFieldException(seen0, 11, $serializer_getInstance_1().k2f_1);
931
+ }
932
+ $this.m2e_1 = type;
933
+ $this.n2e_1 = name;
934
+ if (0 === (seen0 & 4))
935
+ $this.o2e_1 = null;
936
+ else
937
+ $this.o2e_1 = namespace;
938
+ $this.p2e_1 = fields;
939
+ if (0 === (seen0 & 16))
940
+ $this.q2e_1 = null;
941
+ else
942
+ $this.q2e_1 = doc;
943
+ return $this;
944
+ }
945
+ function RecordType_init_$Create$(seen0, type, name, namespace, fields, doc, serializationConstructorMarker) {
946
+ return RecordType_init_$Init$(seen0, type, name, namespace, fields, doc, serializationConstructorMarker, objectCreate(protoOf(RecordType)));
947
+ }
948
+ function Companion_4() {
949
+ }
950
+ protoOf(Companion_4).g18 = function () {
951
+ return $serializer_getInstance_2();
952
+ };
953
+ var Companion_instance_4;
954
+ function Companion_getInstance_4() {
955
+ return Companion_instance_4;
956
+ }
957
+ function $serializer_2() {
958
+ $serializer_instance_2 = this;
959
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.ArrayType', this, 2);
960
+ tmp0_serialDesc.dw('type', false);
961
+ tmp0_serialDesc.dw('items', false);
962
+ this.m2f_1 = tmp0_serialDesc;
963
+ }
964
+ protoOf($serializer_2).n2f = function (encoder, value) {
965
+ var tmp0_desc = this.m2f_1;
966
+ var tmp1_output = encoder.to(tmp0_desc);
967
+ tmp1_output.iq(tmp0_desc, 0, value.r2e_1);
968
+ tmp1_output.kq(tmp0_desc, 1, TypeSerializer_getInstance(), value.s2e_1);
969
+ tmp1_output.uo(tmp0_desc);
970
+ };
971
+ protoOf($serializer_2).tl = function (encoder, value) {
972
+ return this.n2f(encoder, value instanceof ArrayType ? value : THROW_CCE());
973
+ };
974
+ protoOf($serializer_2).ul = function (decoder) {
975
+ var tmp0_desc = this.m2f_1;
976
+ var tmp1_flag = true;
977
+ var tmp2_index = 0;
978
+ var tmp3_bitMask0 = 0;
979
+ var tmp4_local0 = null;
980
+ var tmp5_local1 = null;
981
+ var tmp6_input = decoder.to(tmp0_desc);
982
+ if (tmp6_input.jp()) {
983
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
984
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
985
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeSerializer_getInstance(), tmp5_local1);
986
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
987
+ } else
988
+ while (tmp1_flag) {
989
+ tmp2_index = tmp6_input.kp(tmp0_desc);
990
+ switch (tmp2_index) {
991
+ case -1:
992
+ tmp1_flag = false;
993
+ break;
994
+ case 0:
995
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
996
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
997
+ break;
998
+ case 1:
999
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeSerializer_getInstance(), tmp5_local1);
1000
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1001
+ break;
1002
+ default:
1003
+ throw UnknownFieldException_init_$Create$(tmp2_index);
1004
+ }
1005
+ }
1006
+ tmp6_input.uo(tmp0_desc);
1007
+ return ArrayType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
1008
+ };
1009
+ protoOf($serializer_2).sl = function () {
1010
+ return this.m2f_1;
1011
+ };
1012
+ protoOf($serializer_2).ww = function () {
1013
+ // Inline function 'kotlin.arrayOf' call
1014
+ // Inline function 'kotlin.js.unsafeCast' call
1015
+ // Inline function 'kotlin.js.asDynamic' call
1016
+ return [StringSerializer_getInstance(), TypeSerializer_getInstance()];
1017
+ };
1018
+ var $serializer_instance_2;
1019
+ function $serializer_getInstance_2() {
1020
+ if ($serializer_instance_2 == null)
1021
+ new $serializer_2();
1022
+ return $serializer_instance_2;
1023
+ }
1024
+ function ArrayType_init_$Init$(seen0, type, items, serializationConstructorMarker, $this) {
1025
+ if (!(3 === (3 & seen0))) {
1026
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_2().m2f_1);
1027
+ }
1028
+ $this.r2e_1 = type;
1029
+ $this.s2e_1 = items;
1030
+ return $this;
1031
+ }
1032
+ function ArrayType_init_$Create$(seen0, type, items, serializationConstructorMarker) {
1033
+ return ArrayType_init_$Init$(seen0, type, items, serializationConstructorMarker, objectCreate(protoOf(ArrayType)));
1034
+ }
1035
+ function Companion_5() {
1036
+ }
1037
+ protoOf(Companion_5).g18 = function () {
1038
+ return $serializer_getInstance_3();
1039
+ };
1040
+ var Companion_instance_5;
1041
+ function Companion_getInstance_5() {
1042
+ return Companion_instance_5;
1043
+ }
1044
+ function $serializer_3() {
1045
+ $serializer_instance_3 = this;
1046
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.MapType', this, 2);
1047
+ tmp0_serialDesc.dw('type', false);
1048
+ tmp0_serialDesc.dw('values', false);
1049
+ this.o2f_1 = tmp0_serialDesc;
1050
+ }
1051
+ protoOf($serializer_3).p2f = function (encoder, value) {
1052
+ var tmp0_desc = this.o2f_1;
1053
+ var tmp1_output = encoder.to(tmp0_desc);
1054
+ tmp1_output.iq(tmp0_desc, 0, value.c2e_1);
1055
+ tmp1_output.kq(tmp0_desc, 1, TypeSerializer_getInstance(), value.d2e_1);
1056
+ tmp1_output.uo(tmp0_desc);
1057
+ };
1058
+ protoOf($serializer_3).tl = function (encoder, value) {
1059
+ return this.p2f(encoder, value instanceof MapType ? value : THROW_CCE());
1060
+ };
1061
+ protoOf($serializer_3).ul = function (decoder) {
1062
+ var tmp0_desc = this.o2f_1;
1063
+ var tmp1_flag = true;
1064
+ var tmp2_index = 0;
1065
+ var tmp3_bitMask0 = 0;
1066
+ var tmp4_local0 = null;
1067
+ var tmp5_local1 = null;
1068
+ var tmp6_input = decoder.to(tmp0_desc);
1069
+ if (tmp6_input.jp()) {
1070
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
1071
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1072
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeSerializer_getInstance(), tmp5_local1);
1073
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1074
+ } else
1075
+ while (tmp1_flag) {
1076
+ tmp2_index = tmp6_input.kp(tmp0_desc);
1077
+ switch (tmp2_index) {
1078
+ case -1:
1079
+ tmp1_flag = false;
1080
+ break;
1081
+ case 0:
1082
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
1083
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1084
+ break;
1085
+ case 1:
1086
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeSerializer_getInstance(), tmp5_local1);
1087
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1088
+ break;
1089
+ default:
1090
+ throw UnknownFieldException_init_$Create$(tmp2_index);
1091
+ }
1092
+ }
1093
+ tmp6_input.uo(tmp0_desc);
1094
+ return MapType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
1095
+ };
1096
+ protoOf($serializer_3).sl = function () {
1097
+ return this.o2f_1;
1098
+ };
1099
+ protoOf($serializer_3).ww = function () {
1100
+ // Inline function 'kotlin.arrayOf' call
1101
+ // Inline function 'kotlin.js.unsafeCast' call
1102
+ // Inline function 'kotlin.js.asDynamic' call
1103
+ return [StringSerializer_getInstance(), TypeSerializer_getInstance()];
1104
+ };
1105
+ var $serializer_instance_3;
1106
+ function $serializer_getInstance_3() {
1107
+ if ($serializer_instance_3 == null)
1108
+ new $serializer_3();
1109
+ return $serializer_instance_3;
1110
+ }
1111
+ function MapType_init_$Init$(seen0, type, values, serializationConstructorMarker, $this) {
1112
+ if (!(3 === (3 & seen0))) {
1113
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_3().o2f_1);
1114
+ }
1115
+ $this.c2e_1 = type;
1116
+ $this.d2e_1 = values;
1117
+ return $this;
1118
+ }
1119
+ function MapType_init_$Create$(seen0, type, values, serializationConstructorMarker) {
1120
+ return MapType_init_$Init$(seen0, type, values, serializationConstructorMarker, objectCreate(protoOf(MapType)));
1121
+ }
1122
+ function Companion_6() {
1123
+ Companion_instance_6 = this;
1124
+ var tmp = this;
1125
+ // Inline function 'kotlin.arrayOf' call
1126
+ // Inline function 'kotlin.js.unsafeCast' call
1127
+ // Inline function 'kotlin.js.asDynamic' call
1128
+ tmp.q2f_1 = [null, null, null, new ArrayListSerializer(StringSerializer_getInstance())];
1129
+ }
1130
+ protoOf(Companion_6).g18 = function () {
1131
+ return $serializer_getInstance_4();
1132
+ };
1133
+ var Companion_instance_6;
1134
+ function Companion_getInstance_6() {
1135
+ if (Companion_instance_6 == null)
1136
+ new Companion_6();
1137
+ return Companion_instance_6;
1138
+ }
1139
+ function $serializer_4() {
1140
+ $serializer_instance_4 = this;
1141
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.EnumType', this, 4);
1142
+ tmp0_serialDesc.dw('type', false);
1143
+ tmp0_serialDesc.dw('name', false);
1144
+ tmp0_serialDesc.dw('doc', true);
1145
+ tmp0_serialDesc.dw('symbols', false);
1146
+ this.r2f_1 = tmp0_serialDesc;
1147
+ }
1148
+ protoOf($serializer_4).s2f = function (encoder, value) {
1149
+ var tmp0_desc = this.r2f_1;
1150
+ var tmp1_output = encoder.to(tmp0_desc);
1151
+ var tmp2_cached = Companion_getInstance_6().q2f_1;
1152
+ tmp1_output.iq(tmp0_desc, 0, value.i2e_1);
1153
+ tmp1_output.iq(tmp0_desc, 1, value.j2e_1);
1154
+ if (tmp1_output.qq(tmp0_desc, 2) ? true : !(value.k2e_1 == null)) {
1155
+ tmp1_output.mq(tmp0_desc, 2, StringSerializer_getInstance(), value.k2e_1);
1156
+ }
1157
+ tmp1_output.kq(tmp0_desc, 3, tmp2_cached[3], value.l2e_1);
1158
+ tmp1_output.uo(tmp0_desc);
1159
+ };
1160
+ protoOf($serializer_4).tl = function (encoder, value) {
1161
+ return this.s2f(encoder, value instanceof EnumType ? value : THROW_CCE());
1162
+ };
1163
+ protoOf($serializer_4).ul = function (decoder) {
1164
+ var tmp0_desc = this.r2f_1;
1165
+ var tmp1_flag = true;
1166
+ var tmp2_index = 0;
1167
+ var tmp3_bitMask0 = 0;
1168
+ var tmp4_local0 = null;
1169
+ var tmp5_local1 = null;
1170
+ var tmp6_local2 = null;
1171
+ var tmp7_local3 = null;
1172
+ var tmp8_input = decoder.to(tmp0_desc);
1173
+ var tmp9_cached = Companion_getInstance_6().q2f_1;
1174
+ if (tmp8_input.jp()) {
1175
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
1176
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1177
+ tmp5_local1 = tmp8_input.dp(tmp0_desc, 1);
1178
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1179
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
1180
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
1181
+ tmp7_local3 = tmp8_input.fp(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
1182
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
1183
+ } else
1184
+ while (tmp1_flag) {
1185
+ tmp2_index = tmp8_input.kp(tmp0_desc);
1186
+ switch (tmp2_index) {
1187
+ case -1:
1188
+ tmp1_flag = false;
1189
+ break;
1190
+ case 0:
1191
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
1192
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1193
+ break;
1194
+ case 1:
1195
+ tmp5_local1 = tmp8_input.dp(tmp0_desc, 1);
1196
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1197
+ break;
1198
+ case 2:
1199
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
1200
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
1201
+ break;
1202
+ case 3:
1203
+ tmp7_local3 = tmp8_input.fp(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
1204
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
1205
+ break;
1206
+ default:
1207
+ throw UnknownFieldException_init_$Create$(tmp2_index);
1208
+ }
1209
+ }
1210
+ tmp8_input.uo(tmp0_desc);
1211
+ return EnumType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
1212
+ };
1213
+ protoOf($serializer_4).sl = function () {
1214
+ return this.r2f_1;
1215
+ };
1216
+ protoOf($serializer_4).ww = function () {
1217
+ var tmp0_cached = Companion_getInstance_6().q2f_1;
1218
+ // Inline function 'kotlin.arrayOf' call
1219
+ // Inline function 'kotlin.js.unsafeCast' call
1220
+ // Inline function 'kotlin.js.asDynamic' call
1221
+ return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), tmp0_cached[3]];
1222
+ };
1223
+ var $serializer_instance_4;
1224
+ function $serializer_getInstance_4() {
1225
+ if ($serializer_instance_4 == null)
1226
+ new $serializer_4();
1227
+ return $serializer_instance_4;
1228
+ }
1229
+ function EnumType_init_$Init$(seen0, type, name, doc, symbols, serializationConstructorMarker, $this) {
1230
+ if (!(11 === (11 & seen0))) {
1231
+ throwMissingFieldException(seen0, 11, $serializer_getInstance_4().r2f_1);
1232
+ }
1233
+ $this.i2e_1 = type;
1234
+ $this.j2e_1 = name;
1235
+ if (0 === (seen0 & 4))
1236
+ $this.k2e_1 = null;
1237
+ else
1238
+ $this.k2e_1 = doc;
1239
+ $this.l2e_1 = symbols;
1240
+ return $this;
1241
+ }
1242
+ function EnumType_init_$Create$(seen0, type, name, doc, symbols, serializationConstructorMarker) {
1243
+ return EnumType_init_$Init$(seen0, type, name, doc, symbols, serializationConstructorMarker, objectCreate(protoOf(EnumType)));
1244
+ }
1245
+ function Companion_7() {
1246
+ }
1247
+ protoOf(Companion_7).g18 = function () {
1248
+ return $serializer_getInstance_5();
1249
+ };
1250
+ var Companion_instance_7;
1251
+ function Companion_getInstance_7() {
1252
+ return Companion_instance_7;
1253
+ }
1254
+ function $serializer_5() {
1255
+ $serializer_instance_5 = this;
1256
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.UnionType', this, 2);
1257
+ tmp0_serialDesc.dw('name', false);
1258
+ tmp0_serialDesc.dw('type', false);
1259
+ this.t2f_1 = tmp0_serialDesc;
1260
+ }
1261
+ protoOf($serializer_5).u2f = function (encoder, value) {
1262
+ var tmp0_desc = this.t2f_1;
1263
+ var tmp1_output = encoder.to(tmp0_desc);
1264
+ tmp1_output.iq(tmp0_desc, 0, value.a2e_1);
1265
+ tmp1_output.kq(tmp0_desc, 1, TypeListSerializer_getInstance(), value.b2e_1);
1266
+ tmp1_output.uo(tmp0_desc);
1267
+ };
1268
+ protoOf($serializer_5).tl = function (encoder, value) {
1269
+ return this.u2f(encoder, value instanceof UnionType ? value : THROW_CCE());
1270
+ };
1271
+ protoOf($serializer_5).ul = function (decoder) {
1272
+ var tmp0_desc = this.t2f_1;
1273
+ var tmp1_flag = true;
1274
+ var tmp2_index = 0;
1275
+ var tmp3_bitMask0 = 0;
1276
+ var tmp4_local0 = null;
1277
+ var tmp5_local1 = null;
1278
+ var tmp6_input = decoder.to(tmp0_desc);
1279
+ if (tmp6_input.jp()) {
1280
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
1281
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1282
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeListSerializer_getInstance(), tmp5_local1);
1283
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1284
+ } else
1285
+ while (tmp1_flag) {
1286
+ tmp2_index = tmp6_input.kp(tmp0_desc);
1287
+ switch (tmp2_index) {
1288
+ case -1:
1289
+ tmp1_flag = false;
1290
+ break;
1291
+ case 0:
1292
+ tmp4_local0 = tmp6_input.dp(tmp0_desc, 0);
1293
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1294
+ break;
1295
+ case 1:
1296
+ tmp5_local1 = tmp6_input.fp(tmp0_desc, 1, TypeListSerializer_getInstance(), tmp5_local1);
1297
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1298
+ break;
1299
+ default:
1300
+ throw UnknownFieldException_init_$Create$(tmp2_index);
1301
+ }
1302
+ }
1303
+ tmp6_input.uo(tmp0_desc);
1304
+ return UnionType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
1305
+ };
1306
+ protoOf($serializer_5).sl = function () {
1307
+ return this.t2f_1;
1308
+ };
1309
+ protoOf($serializer_5).ww = function () {
1310
+ // Inline function 'kotlin.arrayOf' call
1311
+ // Inline function 'kotlin.js.unsafeCast' call
1312
+ // Inline function 'kotlin.js.asDynamic' call
1313
+ return [StringSerializer_getInstance(), TypeListSerializer_getInstance()];
1314
+ };
1315
+ var $serializer_instance_5;
1316
+ function $serializer_getInstance_5() {
1317
+ if ($serializer_instance_5 == null)
1318
+ new $serializer_5();
1319
+ return $serializer_instance_5;
1320
+ }
1321
+ function UnionType_init_$Init$(seen0, name, type, serializationConstructorMarker, $this) {
1322
+ if (!(3 === (3 & seen0))) {
1323
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_5().t2f_1);
1324
+ }
1325
+ $this.a2e_1 = name;
1326
+ $this.b2e_1 = type;
1327
+ return $this;
1328
+ }
1329
+ function UnionType_init_$Create$(seen0, name, type, serializationConstructorMarker) {
1330
+ return UnionType_init_$Init$(seen0, name, type, serializationConstructorMarker, objectCreate(protoOf(UnionType)));
1331
+ }
1332
+ function Companion_8() {
1333
+ }
1334
+ protoOf(Companion_8).g18 = function () {
1335
+ return $serializer_getInstance_6();
1336
+ };
1337
+ var Companion_instance_8;
1338
+ function Companion_getInstance_8() {
1339
+ return Companion_instance_8;
1340
+ }
1341
+ function $serializer_6() {
1342
+ $serializer_instance_6 = this;
1343
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('community.flock.wirespec.converter.avro.AvroModel.LogicalType', this, 4);
1344
+ tmp0_serialDesc.dw('type', false);
1345
+ tmp0_serialDesc.dw('logicalType', false);
1346
+ tmp0_serialDesc.dw('precision', true);
1347
+ tmp0_serialDesc.dw('scale', true);
1348
+ this.v2f_1 = tmp0_serialDesc;
1349
+ }
1350
+ protoOf($serializer_6).w2f = function (encoder, value) {
1351
+ var tmp0_desc = this.v2f_1;
1352
+ var tmp1_output = encoder.to(tmp0_desc);
1353
+ tmp1_output.iq(tmp0_desc, 0, value.e2e_1);
1354
+ tmp1_output.iq(tmp0_desc, 1, value.f2e_1);
1355
+ if (tmp1_output.qq(tmp0_desc, 2) ? true : !(value.g2e_1 == null)) {
1356
+ tmp1_output.mq(tmp0_desc, 2, IntSerializer_getInstance(), value.g2e_1);
1357
+ }
1358
+ if (tmp1_output.qq(tmp0_desc, 3) ? true : !(value.h2e_1 == null)) {
1359
+ tmp1_output.mq(tmp0_desc, 3, IntSerializer_getInstance(), value.h2e_1);
1360
+ }
1361
+ tmp1_output.uo(tmp0_desc);
1362
+ };
1363
+ protoOf($serializer_6).tl = function (encoder, value) {
1364
+ return this.w2f(encoder, value instanceof LogicalType ? value : THROW_CCE());
1365
+ };
1366
+ protoOf($serializer_6).ul = function (decoder) {
1367
+ var tmp0_desc = this.v2f_1;
1368
+ var tmp1_flag = true;
1369
+ var tmp2_index = 0;
1370
+ var tmp3_bitMask0 = 0;
1371
+ var tmp4_local0 = null;
1372
+ var tmp5_local1 = null;
1373
+ var tmp6_local2 = null;
1374
+ var tmp7_local3 = null;
1375
+ var tmp8_input = decoder.to(tmp0_desc);
1376
+ if (tmp8_input.jp()) {
1377
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
1378
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1379
+ tmp5_local1 = tmp8_input.dp(tmp0_desc, 1);
1380
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1381
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);
1382
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
1383
+ tmp7_local3 = tmp8_input.hp(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
1384
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
1385
+ } else
1386
+ while (tmp1_flag) {
1387
+ tmp2_index = tmp8_input.kp(tmp0_desc);
1388
+ switch (tmp2_index) {
1389
+ case -1:
1390
+ tmp1_flag = false;
1391
+ break;
1392
+ case 0:
1393
+ tmp4_local0 = tmp8_input.dp(tmp0_desc, 0);
1394
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
1395
+ break;
1396
+ case 1:
1397
+ tmp5_local1 = tmp8_input.dp(tmp0_desc, 1);
1398
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
1399
+ break;
1400
+ case 2:
1401
+ tmp6_local2 = tmp8_input.hp(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);
1402
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
1403
+ break;
1404
+ case 3:
1405
+ tmp7_local3 = tmp8_input.hp(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
1406
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
1407
+ break;
1408
+ default:
1409
+ throw UnknownFieldException_init_$Create$(tmp2_index);
1410
+ }
1411
+ }
1412
+ tmp8_input.uo(tmp0_desc);
1413
+ return LogicalType_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
1414
+ };
1415
+ protoOf($serializer_6).sl = function () {
1416
+ return this.v2f_1;
1417
+ };
1418
+ protoOf($serializer_6).ww = function () {
1419
+ // Inline function 'kotlin.arrayOf' call
1420
+ // Inline function 'kotlin.js.unsafeCast' call
1421
+ // Inline function 'kotlin.js.asDynamic' call
1422
+ return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance())];
1423
+ };
1424
+ var $serializer_instance_6;
1425
+ function $serializer_getInstance_6() {
1426
+ if ($serializer_instance_6 == null)
1427
+ new $serializer_6();
1428
+ return $serializer_instance_6;
1429
+ }
1430
+ function LogicalType_init_$Init$(seen0, type, logicalType, precision, scale, serializationConstructorMarker, $this) {
1431
+ if (!(3 === (3 & seen0))) {
1432
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_6().v2f_1);
1433
+ }
1434
+ $this.e2e_1 = type;
1435
+ $this.f2e_1 = logicalType;
1436
+ if (0 === (seen0 & 4))
1437
+ $this.g2e_1 = null;
1438
+ else
1439
+ $this.g2e_1 = precision;
1440
+ if (0 === (seen0 & 8))
1441
+ $this.h2e_1 = null;
1442
+ else
1443
+ $this.h2e_1 = scale;
1444
+ return $this;
1445
+ }
1446
+ function LogicalType_init_$Create$(seen0, type, logicalType, precision, scale, serializationConstructorMarker) {
1447
+ return LogicalType_init_$Init$(seen0, type, logicalType, precision, scale, serializationConstructorMarker, objectCreate(protoOf(LogicalType)));
1448
+ }
1449
+ function Field_0(name, type, doc, default_0) {
1450
+ doc = doc === VOID ? null : doc;
1451
+ default_0 = default_0 === VOID ? null : default_0;
1452
+ this.t2e_1 = name;
1453
+ this.u2e_1 = type;
1454
+ this.v2e_1 = doc;
1455
+ this.w2e_1 = default_0;
1456
+ }
1457
+ protoOf(Field_0).toString = function () {
1458
+ return 'Field(name=' + this.t2e_1 + ', type=' + this.u2e_1.toString() + ', doc=' + this.v2e_1 + ', default=' + this.w2e_1 + ')';
1459
+ };
1460
+ protoOf(Field_0).hashCode = function () {
1461
+ var result = getStringHashCode(this.t2e_1);
1462
+ result = imul(result, 31) + this.u2e_1.hashCode() | 0;
1463
+ result = imul(result, 31) + (this.v2e_1 == null ? 0 : getStringHashCode(this.v2e_1)) | 0;
1464
+ result = imul(result, 31) + (this.w2e_1 == null ? 0 : getStringHashCode(this.w2e_1)) | 0;
1465
+ return result;
1466
+ };
1467
+ protoOf(Field_0).equals = function (other) {
1468
+ if (this === other)
1469
+ return true;
1470
+ if (!(other instanceof Field_0))
1471
+ return false;
1472
+ var tmp0_other_with_cast = other instanceof Field_0 ? other : THROW_CCE();
1473
+ if (!(this.t2e_1 === tmp0_other_with_cast.t2e_1))
1474
+ return false;
1475
+ if (!this.u2e_1.equals(tmp0_other_with_cast.u2e_1))
1476
+ return false;
1477
+ if (!(this.v2e_1 == tmp0_other_with_cast.v2e_1))
1478
+ return false;
1479
+ if (!(this.w2e_1 == tmp0_other_with_cast.w2e_1))
1480
+ return false;
1481
+ return true;
1482
+ };
1483
+ function TypeList(type) {
1484
+ AbstractList.call(this);
1485
+ this.x2f_1 = toList_0(type);
1486
+ this.y2f_1 = this.x2f_1.j();
1487
+ }
1488
+ protoOf(TypeList).j = function () {
1489
+ return this.y2f_1;
1490
+ };
1491
+ protoOf(TypeList).k = function (index) {
1492
+ return this.x2f_1.k(index);
1493
+ };
1494
+ function Type_0() {
1495
+ }
1496
+ function SimpleType(value) {
1497
+ this.z2d_1 = value;
1498
+ }
1499
+ protoOf(SimpleType).toString = function () {
1500
+ return 'SimpleType(value=' + this.z2d_1 + ')';
1501
+ };
1502
+ protoOf(SimpleType).hashCode = function () {
1503
+ return getStringHashCode(this.z2d_1);
1504
+ };
1505
+ protoOf(SimpleType).equals = function (other) {
1506
+ if (this === other)
1507
+ return true;
1508
+ if (!(other instanceof SimpleType))
1509
+ return false;
1510
+ var tmp0_other_with_cast = other instanceof SimpleType ? other : THROW_CCE();
1511
+ if (!(this.z2d_1 === tmp0_other_with_cast.z2d_1))
1512
+ return false;
1513
+ return true;
1514
+ };
1515
+ function RecordType(type, name, namespace, fields, doc) {
1516
+ Companion_getInstance_3();
1517
+ namespace = namespace === VOID ? null : namespace;
1518
+ doc = doc === VOID ? null : doc;
1519
+ this.m2e_1 = type;
1520
+ this.n2e_1 = name;
1521
+ this.o2e_1 = namespace;
1522
+ this.p2e_1 = fields;
1523
+ this.q2e_1 = doc;
1524
+ }
1525
+ protoOf(RecordType).toString = function () {
1526
+ return 'RecordType(type=' + this.m2e_1 + ', name=' + this.n2e_1 + ', namespace=' + this.o2e_1 + ', fields=' + toString(this.p2e_1) + ', doc=' + this.q2e_1 + ')';
1527
+ };
1528
+ protoOf(RecordType).hashCode = function () {
1529
+ var result = getStringHashCode(this.m2e_1);
1530
+ result = imul(result, 31) + getStringHashCode(this.n2e_1) | 0;
1531
+ result = imul(result, 31) + (this.o2e_1 == null ? 0 : getStringHashCode(this.o2e_1)) | 0;
1532
+ result = imul(result, 31) + hashCode(this.p2e_1) | 0;
1533
+ result = imul(result, 31) + (this.q2e_1 == null ? 0 : getStringHashCode(this.q2e_1)) | 0;
1534
+ return result;
1535
+ };
1536
+ protoOf(RecordType).equals = function (other) {
1537
+ if (this === other)
1538
+ return true;
1539
+ if (!(other instanceof RecordType))
1540
+ return false;
1541
+ var tmp0_other_with_cast = other instanceof RecordType ? other : THROW_CCE();
1542
+ if (!(this.m2e_1 === tmp0_other_with_cast.m2e_1))
1543
+ return false;
1544
+ if (!(this.n2e_1 === tmp0_other_with_cast.n2e_1))
1545
+ return false;
1546
+ if (!(this.o2e_1 == tmp0_other_with_cast.o2e_1))
1547
+ return false;
1548
+ if (!equals(this.p2e_1, tmp0_other_with_cast.p2e_1))
1549
+ return false;
1550
+ if (!(this.q2e_1 == tmp0_other_with_cast.q2e_1))
1551
+ return false;
1552
+ return true;
1553
+ };
1554
+ function ArrayType(type, items) {
1555
+ this.r2e_1 = type;
1556
+ this.s2e_1 = items;
1557
+ }
1558
+ protoOf(ArrayType).toString = function () {
1559
+ return 'ArrayType(type=' + this.r2e_1 + ', items=' + toString(this.s2e_1) + ')';
1560
+ };
1561
+ protoOf(ArrayType).hashCode = function () {
1562
+ var result = getStringHashCode(this.r2e_1);
1563
+ result = imul(result, 31) + hashCode(this.s2e_1) | 0;
1564
+ return result;
1565
+ };
1566
+ protoOf(ArrayType).equals = function (other) {
1567
+ if (this === other)
1568
+ return true;
1569
+ if (!(other instanceof ArrayType))
1570
+ return false;
1571
+ var tmp0_other_with_cast = other instanceof ArrayType ? other : THROW_CCE();
1572
+ if (!(this.r2e_1 === tmp0_other_with_cast.r2e_1))
1573
+ return false;
1574
+ if (!equals(this.s2e_1, tmp0_other_with_cast.s2e_1))
1575
+ return false;
1576
+ return true;
1577
+ };
1578
+ function MapType(type, values) {
1579
+ this.c2e_1 = type;
1580
+ this.d2e_1 = values;
1581
+ }
1582
+ protoOf(MapType).toString = function () {
1583
+ return 'MapType(type=' + this.c2e_1 + ', values=' + toString(this.d2e_1) + ')';
1584
+ };
1585
+ protoOf(MapType).hashCode = function () {
1586
+ var result = getStringHashCode(this.c2e_1);
1587
+ result = imul(result, 31) + hashCode(this.d2e_1) | 0;
1588
+ return result;
1589
+ };
1590
+ protoOf(MapType).equals = function (other) {
1591
+ if (this === other)
1592
+ return true;
1593
+ if (!(other instanceof MapType))
1594
+ return false;
1595
+ var tmp0_other_with_cast = other instanceof MapType ? other : THROW_CCE();
1596
+ if (!(this.c2e_1 === tmp0_other_with_cast.c2e_1))
1597
+ return false;
1598
+ if (!equals(this.d2e_1, tmp0_other_with_cast.d2e_1))
1599
+ return false;
1600
+ return true;
1601
+ };
1602
+ function EnumType(type, name, doc, symbols) {
1603
+ Companion_getInstance_6();
1604
+ doc = doc === VOID ? null : doc;
1605
+ this.i2e_1 = type;
1606
+ this.j2e_1 = name;
1607
+ this.k2e_1 = doc;
1608
+ this.l2e_1 = symbols;
1609
+ }
1610
+ protoOf(EnumType).toString = function () {
1611
+ return 'EnumType(type=' + this.i2e_1 + ', name=' + this.j2e_1 + ', doc=' + this.k2e_1 + ', symbols=' + toString(this.l2e_1) + ')';
1612
+ };
1613
+ protoOf(EnumType).hashCode = function () {
1614
+ var result = getStringHashCode(this.i2e_1);
1615
+ result = imul(result, 31) + getStringHashCode(this.j2e_1) | 0;
1616
+ result = imul(result, 31) + (this.k2e_1 == null ? 0 : getStringHashCode(this.k2e_1)) | 0;
1617
+ result = imul(result, 31) + hashCode(this.l2e_1) | 0;
1618
+ return result;
1619
+ };
1620
+ protoOf(EnumType).equals = function (other) {
1621
+ if (this === other)
1622
+ return true;
1623
+ if (!(other instanceof EnumType))
1624
+ return false;
1625
+ var tmp0_other_with_cast = other instanceof EnumType ? other : THROW_CCE();
1626
+ if (!(this.i2e_1 === tmp0_other_with_cast.i2e_1))
1627
+ return false;
1628
+ if (!(this.j2e_1 === tmp0_other_with_cast.j2e_1))
1629
+ return false;
1630
+ if (!(this.k2e_1 == tmp0_other_with_cast.k2e_1))
1631
+ return false;
1632
+ if (!equals(this.l2e_1, tmp0_other_with_cast.l2e_1))
1633
+ return false;
1634
+ return true;
1635
+ };
1636
+ function UnionType(name, type) {
1637
+ this.a2e_1 = name;
1638
+ this.b2e_1 = type;
1639
+ }
1640
+ protoOf(UnionType).toString = function () {
1641
+ return 'UnionType(name=' + this.a2e_1 + ', type=' + this.b2e_1.toString() + ')';
1642
+ };
1643
+ protoOf(UnionType).hashCode = function () {
1644
+ var result = getStringHashCode(this.a2e_1);
1645
+ result = imul(result, 31) + this.b2e_1.hashCode() | 0;
1646
+ return result;
1647
+ };
1648
+ protoOf(UnionType).equals = function (other) {
1649
+ if (this === other)
1650
+ return true;
1651
+ if (!(other instanceof UnionType))
1652
+ return false;
1653
+ var tmp0_other_with_cast = other instanceof UnionType ? other : THROW_CCE();
1654
+ if (!(this.a2e_1 === tmp0_other_with_cast.a2e_1))
1655
+ return false;
1656
+ if (!this.b2e_1.equals(tmp0_other_with_cast.b2e_1))
1657
+ return false;
1658
+ return true;
1659
+ };
1660
+ function LogicalType() {
1661
+ }
1662
+ protoOf(LogicalType).toString = function () {
1663
+ return 'LogicalType(type=' + this.e2e_1 + ', logicalType=' + this.f2e_1 + ', precision=' + this.g2e_1 + ', scale=' + this.h2e_1 + ')';
1664
+ };
1665
+ protoOf(LogicalType).hashCode = function () {
1666
+ var result = getStringHashCode(this.e2e_1);
1667
+ result = imul(result, 31) + getStringHashCode(this.f2e_1) | 0;
1668
+ result = imul(result, 31) + (this.g2e_1 == null ? 0 : this.g2e_1) | 0;
1669
+ result = imul(result, 31) + (this.h2e_1 == null ? 0 : this.h2e_1) | 0;
1670
+ return result;
1671
+ };
1672
+ protoOf(LogicalType).equals = function (other) {
1673
+ if (this === other)
1674
+ return true;
1675
+ if (!(other instanceof LogicalType))
1676
+ return false;
1677
+ var tmp0_other_with_cast = other instanceof LogicalType ? other : THROW_CCE();
1678
+ if (!(this.e2e_1 === tmp0_other_with_cast.e2e_1))
1679
+ return false;
1680
+ if (!(this.f2e_1 === tmp0_other_with_cast.f2e_1))
1681
+ return false;
1682
+ if (!(this.g2e_1 == tmp0_other_with_cast.g2e_1))
1683
+ return false;
1684
+ if (!(this.h2e_1 == tmp0_other_with_cast.h2e_1))
1685
+ return false;
1686
+ return true;
1687
+ };
1688
+ function TypeListSerializer() {
1689
+ TypeListSerializer_instance = this;
1690
+ this.z2f_1 = buildSerialDescriptor('TypeListSerializer', SEALED_getInstance(), []);
1691
+ }
1692
+ protoOf(TypeListSerializer).sl = function () {
1693
+ return this.z2f_1;
1694
+ };
1695
+ protoOf(TypeListSerializer).a2g = function (encoder, value) {
1696
+ if (value.y2f_1 > 1) {
1697
+ encoder.lq(ListSerializer(Companion_instance_1.g18()), value);
1698
+ } else {
1699
+ encoder.lq(Companion_instance_1.g18(), first(value));
1700
+ }
1701
+ };
1702
+ protoOf(TypeListSerializer).tl = function (encoder, value) {
1703
+ return this.a2g(encoder, value instanceof TypeList ? value : THROW_CCE());
1704
+ };
1705
+ protoOf(TypeListSerializer).ul = function (decoder) {
1706
+ var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
1707
+ var tmp;
1708
+ if (tmp0_elvis_lhs == null) {
1709
+ throw SerializationException_init_$Create$('This class can be loaded only by Json');
1710
+ } else {
1711
+ tmp = tmp0_elvis_lhs;
1712
+ }
1713
+ var input = tmp;
1714
+ var element = input.y17();
1715
+ var tmp_0;
1716
+ if (element instanceof JsonPrimitive) {
1717
+ tmp_0 = new TypeList([input.x17().x15(Companion_instance_1.g18(), element)]);
1718
+ } else {
1719
+ if (element instanceof JsonArray) {
1720
+ // Inline function 'kotlin.collections.map' call
1721
+ // Inline function 'kotlin.collections.mapTo' call
1722
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(element, 10));
1723
+ var _iterator__ex2g4s = element.g();
1724
+ while (_iterator__ex2g4s.h()) {
1725
+ var item = _iterator__ex2g4s.i();
1726
+ // Inline function 'community.flock.wirespec.converter.avro.TypeListSerializer.deserialize.<anonymous>' call
1727
+ var tmp$ret$0 = input.x17().x15(Companion_instance_1.g18(), item);
1728
+ destination.e(tmp$ret$0);
1729
+ }
1730
+ // Inline function 'kotlin.collections.toTypedArray' call
1731
+ var tmp$ret$3 = copyToArray(destination);
1732
+ tmp_0 = new TypeList(tmp$ret$3.slice());
1733
+ } else {
1734
+ if (element instanceof JsonObject) {
1735
+ tmp_0 = new TypeList([input.x17().x15(Companion_instance_1.g18(), element)]);
1736
+ } else {
1737
+ noWhenBranchMatchedException();
1738
+ }
1739
+ }
1740
+ }
1741
+ return tmp_0;
1742
+ };
1743
+ var TypeListSerializer_instance;
1744
+ function TypeListSerializer_getInstance() {
1745
+ if (TypeListSerializer_instance == null)
1746
+ new TypeListSerializer();
1747
+ return TypeListSerializer_instance;
1748
+ }
1749
+ function TypeSerializer() {
1750
+ TypeSerializer_instance = this;
1751
+ this.b2g_1 = buildSerialDescriptor('TypeSerializer', SEALED_getInstance(), []);
1752
+ }
1753
+ protoOf(TypeSerializer).sl = function () {
1754
+ return this.b2g_1;
1755
+ };
1756
+ protoOf(TypeSerializer).c2g = function (encoder, value) {
1757
+ if (value instanceof SimpleType) {
1758
+ encoder.lq(serializer(StringCompanionObject_instance), value.z2d_1);
1759
+ } else {
1760
+ if (value instanceof RecordType) {
1761
+ encoder.lq(Companion_getInstance_3().g18(), value);
1762
+ } else {
1763
+ if (value instanceof ArrayType) {
1764
+ encoder.lq(Companion_instance_4.g18(), value);
1765
+ } else {
1766
+ if (value instanceof MapType) {
1767
+ encoder.lq(Companion_instance_5.g18(), value);
1768
+ } else {
1769
+ if (value instanceof EnumType) {
1770
+ encoder.lq(Companion_getInstance_6().g18(), value);
1771
+ } else {
1772
+ if (value instanceof UnionType) {
1773
+ encoder.lq(Companion_instance_7.g18(), value);
1774
+ } else {
1775
+ if (value instanceof LogicalType) {
1776
+ // Inline function 'kotlin.TODO' call
1777
+ throw new NotImplementedError();
1778
+ } else {
1779
+ noWhenBranchMatchedException();
1780
+ }
1781
+ }
1782
+ }
1783
+ }
1784
+ }
1785
+ }
1786
+ }
1787
+ };
1788
+ protoOf(TypeSerializer).tl = function (encoder, value) {
1789
+ return this.c2g(encoder, (!(value == null) ? isInterface(value, Type_0) : false) ? value : THROW_CCE());
1790
+ };
1791
+ protoOf(TypeSerializer).ul = function (decoder) {
1792
+ var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
1793
+ var tmp;
1794
+ if (tmp0_elvis_lhs == null) {
1795
+ throw SerializationException_init_$Create$('This class can be loaded only by Json');
1796
+ } else {
1797
+ tmp = tmp0_elvis_lhs;
1798
+ }
1799
+ var input = tmp;
1800
+ var element = input.y17();
1801
+ var tmp_0;
1802
+ if (element instanceof JsonObject) {
1803
+ var tmp_1;
1804
+ if (element.b18('items')) {
1805
+ tmp_1 = input.x17().x15(Companion_instance_4.g18(), element);
1806
+ } else if (element.b18('fields')) {
1807
+ tmp_1 = input.x17().x15(Companion_getInstance_3().g18(), element);
1808
+ } else if (element.b18('symbols')) {
1809
+ tmp_1 = input.x17().x15(Companion_getInstance_6().g18(), element);
1810
+ } else if (element.b18('logicalType')) {
1811
+ tmp_1 = input.x17().x15(Companion_instance_8.g18(), element);
1812
+ } else {
1813
+ var reason = 'Unknown object type: ' + element.toString();
1814
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
1815
+ }
1816
+ tmp_0 = tmp_1;
1817
+ } else {
1818
+ if (element instanceof JsonPrimitive) {
1819
+ tmp_0 = new SimpleType(element.z17());
1820
+ } else {
1821
+ if (element instanceof JsonArray) {
1822
+ var reason_0 = 'Type can never be an array';
1823
+ throw new NotImplementedError('An operation is not implemented: ' + reason_0);
1824
+ } else {
1825
+ noWhenBranchMatchedException();
1826
+ }
1827
+ }
1828
+ }
1829
+ return tmp_0;
1830
+ };
1831
+ var TypeSerializer_instance;
1832
+ function TypeSerializer_getInstance() {
1833
+ if (TypeSerializer_instance == null)
1834
+ new TypeSerializer();
1835
+ return TypeSerializer_instance;
1836
+ }
1837
+ function AvroParser$parse$lambda($this$Json) {
1838
+ $this$Json.p16_1 = true;
1839
+ $this$Json.q16_1 = true;
1840
+ return Unit_instance;
1841
+ }
1842
+ function AvroParser() {
1843
+ }
1844
+ protoOf(AvroParser).o2b = function (schemaContent, strict) {
1845
+ var json = Json(VOID, AvroParser$parse$lambda);
1846
+ // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
1847
+ // Inline function 'kotlinx.serialization.serializer' call
1848
+ var this_0 = json.ip();
1849
+ // Inline function 'kotlinx.serialization.internal.cast' call
1850
+ var this_1 = serializer_0(this_0, createKType(getKClass(Type_0), arrayOf([]), false));
1851
+ var tmp$ret$1 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
1852
+ var avro = json.w15(tmp$ret$1, schemaContent);
1853
+ var tmp = AvroConverter_getInstance().y2e(avro);
1854
+ var tmp_0;
1855
+ if (avro instanceof RecordType) {
1856
+ tmp_0 = new Channel(null, new DefinitionIdentifier(avro.n2e_1), new Custom(avro.n2e_1, false));
1857
+ } else {
1858
+ if (avro instanceof ArrayType) {
1859
+ throw new NotImplementedError();
1860
+ } else {
1861
+ if (avro instanceof EnumType) {
1862
+ throw new NotImplementedError();
1863
+ } else {
1864
+ if (avro instanceof SimpleType) {
1865
+ throw new NotImplementedError();
1866
+ } else {
1867
+ if (avro instanceof LogicalType) {
1868
+ throw new NotImplementedError();
1869
+ } else {
1870
+ if (avro instanceof MapType) {
1871
+ throw new NotImplementedError();
1872
+ } else {
1873
+ if (avro instanceof UnionType) {
1874
+ throw new NotImplementedError();
1875
+ } else {
1876
+ noWhenBranchMatchedException();
1877
+ }
1878
+ }
1879
+ }
1880
+ }
1881
+ }
1882
+ }
1883
+ }
1884
+ var result = plus_0(tmp, tmp_0);
1885
+ var tmp1_elvis_lhs = toNonEmptyListOrNull(result);
1886
+ var tmp_1;
1887
+ if (tmp1_elvis_lhs == null) {
1888
+ var message = 'Cannot yield non empty AST';
1889
+ throw IllegalStateException_init_$Create$(toString(message));
1890
+ } else {
1891
+ tmp_1 = tmp1_elvis_lhs;
1892
+ }
1893
+ return tmp_1;
1894
+ };
1895
+ protoOf(AvroParser).d2g = function (schemaContent, strict, $super) {
1896
+ strict = strict === VOID ? true : strict;
1897
+ return $super === VOID ? this.o2b(schemaContent, strict) : $super.o2b.call(this, schemaContent, strict);
1898
+ };
1899
+ var AvroParser_instance;
1900
+ function AvroParser_getInstance() {
1901
+ return AvroParser_instance;
1902
+ }
1903
+ //region block: post-declaration
1904
+ protoOf($serializer).xw = typeParametersSerializers;
1905
+ protoOf($serializer_0).xw = typeParametersSerializers;
1906
+ protoOf($serializer_1).xw = typeParametersSerializers;
1907
+ protoOf($serializer_2).xw = typeParametersSerializers;
1908
+ protoOf($serializer_3).xw = typeParametersSerializers;
1909
+ protoOf($serializer_4).xw = typeParametersSerializers;
1910
+ protoOf($serializer_5).xw = typeParametersSerializers;
1911
+ protoOf($serializer_6).xw = typeParametersSerializers;
1912
+ //endregion
1913
+ //region block: init
1914
+ AvroEmitter_instance = new AvroEmitter();
1915
+ Companion_instance = new Companion();
1916
+ Companion_instance_0 = new Companion_0();
1917
+ Companion_instance_1 = new Companion_1();
1918
+ Companion_instance_2 = new Companion_2();
1919
+ Companion_instance_4 = new Companion_4();
1920
+ Companion_instance_5 = new Companion_5();
1921
+ Companion_instance_7 = new Companion_7();
1922
+ Companion_instance_8 = new Companion_8();
1923
+ AvroParser_instance = new AvroParser();
1924
+ //endregion
1925
+ //region block: exports
1926
+ export {
1927
+ Type_0 as Typel89stdvlxo83,
1928
+ AvroEmitter_instance as AvroEmitter_instance8wqbtzdfh4t3,
1929
+ AvroParser_instance as AvroParser_instance25ibqzb3yimhc,
1930
+ };
1931
+ //endregion
1932
+
1933
+ //# sourceMappingURL=wirespec-src-converter-avro.mjs.map