@flock/wirespec 0.20.0-RC.9 → 0.21.0

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 (51) hide show
  1. package/arrow-arrow-atomic.mjs +12 -12
  2. package/arrow-arrow-core.mjs +163 -163
  3. package/clikt-clikt-mordant.mjs +80 -80
  4. package/clikt-clikt-mordant.mjs.map +1 -1
  5. package/clikt-clikt.mjs +1571 -1571
  6. package/clikt-clikt.mjs.map +1 -1
  7. package/colormath-root-colormath.mjs +444 -444
  8. package/kotlin-kotlin-stdlib.mjs +2001 -1948
  9. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  10. package/kotlin-openapi-bindings.mjs +10257 -10257
  11. package/kotlin-rgxgen.mjs +1819 -1819
  12. package/kotlinx-io-kotlinx-io-core.mjs +440 -440
  13. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1890 -1890
  14. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1576 -1576
  15. package/mordant-mordant.mjs +1362 -1362
  16. package/package.json +2 -2
  17. package/wirespec-src-compiler-core.mjs +2462 -2388
  18. package/wirespec-src-compiler-core.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-java.mjs +482 -1337
  20. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-kotlin.mjs +376 -1060
  22. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  23. package/wirespec-src-compiler-emitters-python.mjs +424 -1417
  24. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  25. package/wirespec-src-compiler-emitters-rust.mjs +479 -417
  26. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  27. package/wirespec-src-compiler-emitters-scala.mjs +224 -184
  28. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  29. package/wirespec-src-compiler-emitters-typescript.mjs +568 -1404
  30. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  31. package/wirespec-src-compiler-emitters-wirespec.mjs +113 -86
  32. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  33. package/wirespec-src-compiler-ir.mjs +4311 -4417
  34. package/wirespec-src-compiler-ir.mjs.map +1 -1
  35. package/wirespec-src-compiler-lib.mjs +352 -1141
  36. package/wirespec-src-compiler-lib.mjs.map +1 -1
  37. package/wirespec-src-converter-avro.mjs +512 -512
  38. package/wirespec-src-converter-avro.mjs.map +1 -1
  39. package/wirespec-src-converter-openapi.mjs +772 -760
  40. package/wirespec-src-converter-openapi.mjs.map +1 -1
  41. package/wirespec-src-ide-lsp.mjs +1411 -1396
  42. package/wirespec-src-ide-lsp.mjs.map +1 -1
  43. package/wirespec-src-plugin-arguments.mjs +185 -245
  44. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  45. package/wirespec-src-plugin-cli.mjs +102 -128
  46. package/wirespec-src-plugin-cli.mjs.map +1 -1
  47. package/wirespec-src-plugin-npm.d.mts +15 -104
  48. package/wirespec-src-plugin-npm.mjs +40 -40
  49. package/wirespec-src-plugin-npm.mjs.map +1 -1
  50. package/wirespec-src-tools-generator.mjs +40 -35
  51. package/wirespec-src-tools-generator.mjs.map +1 -1
@@ -1,125 +1,63 @@
1
1
  import {
2
- importReferencesy4xv7r53sjjs as importReferences,
3
- LanguageEmitterxhzgykhux3qm as LanguageEmitter,
4
- Companion_instance1a2xqc448tlhh as Companion_instance,
5
- Companion_instance2ryk3262e300f as Companion_instance_0,
6
- FileExtension_Kotlin_getInstanceiz8k5f00lst9 as FileExtension_Kotlin_getInstance,
7
- Emitted12h24rpo4uifw as Emitted,
8
- plus3lrm73de10b42 as plus,
9
- Companion_instancebcq57hoyp8c2 as Companion_instance_1,
10
- get_pathParamsf41cxx5qebxt as get_pathParams,
11
- orNull2zq556ke3x99j as orNull,
12
- Spacer_instance1p6915grp4mfk as Spacer_instance,
13
- get_indexedPathParams2pzt0qs62068 as get_indexedPathParams,
14
- removeQuestionMark174e2l0zlwrek as removeQuestionMark,
15
- emit2koty5c8abmj3 as emit,
16
- concatGenerics2esceo9p1a45k as concatGenerics,
17
- Paramvfwnys2w6aj1 as Param,
18
- Literal331hu9r04vptz as Literal,
19
- distinctByStatus134zrt4nyr6p2 as distinctByStatus,
20
- fixStatus2l9jrn3538wpy as fixStatus,
21
- spacer28p2fwyb64afn as spacer,
22
- FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
23
- DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
24
- addBackticks1di5q03fw4yhx as addBackticks,
25
- Unionccsavx6nrdr2 as Union,
26
- Refined1lkzc0dg6wey7 as Refined,
27
- Enum3l2iuc342kle6 as Enum,
28
- Type12n1gx16iqtcu as Type,
29
- plus14o24vdaiongg as plus_0,
30
- Bytes_instance1o9u095wd3kx6 as Bytes_instance,
31
- Boolean_instance237vwt01w3hs8 as Boolean_instance,
32
- RegExpiyof7szm5zfu as RegExp_0,
33
- String1czvr8pxnm6on as String_0,
34
- Number1mui0heypwdhp as Number_0,
35
- Integer39lqx4uc63u28 as Integer,
36
- Bytes3eoc50vgt1uem as Bytes,
37
- Boolean1fpfi8m5jt3fg as Boolean_0,
38
- Primitive1i8my14jkp3nk as Primitive,
39
- Custom1lu6o8txpimqz as Custom,
40
- Anyv7qdq63z63rc as Any,
41
- Unit2z95clvxm08vr as Unit,
42
- Iterable29qbzfup67wqp as Iterable,
43
- Dict3g7w5wia7rncj as Dict,
44
- Bound2mp7s0560derz as Bound,
45
- TypeDefinitionEmitter18est4d94fpw8 as TypeDefinitionEmitter,
46
- } from './wirespec-src-compiler-core.mjs';
47
- import {
2
+ KProperty1ca4yb4wlo496 as KProperty1,
3
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
4
+ Unit_instance28fytmsmm6r23 as Unit_instance,
5
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
6
+ isInterface3d6p8outrmvmk as isInterface,
7
+ split2bvyvnrlcifjv as split,
48
8
  collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
49
9
  ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
50
- Unit_instance28fytmsmm6r23 as Unit_instance,
51
- VOID3gxj6tk5isa35 as VOID,
10
+ checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
52
11
  joinToString1cxrrlmo0chqs as joinToString,
53
- THROW_CCE2g6jy02ryeudk as THROW_CCE,
54
- isCharSequence1ju9jr1w86plq as isCharSequence,
55
- trimStart5ewg8zf6cs5u as trimStart,
56
- toString1pkumu07cwy4m as toString,
57
- trimMarginhyd3fsmh8iev as trimMargin,
58
- protoOf180f3jzyo7rfj as protoOf,
59
- initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
60
- initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
61
- charCodeAt1yspne1d8erbm as charCodeAt,
62
- Char19o2r8palgjof as Char,
63
- distinct10qe1scfdvu5k as distinct,
64
- listOfNotNull2woi2boe01ub4 as listOfNotNull,
65
- isBlank1dvkhjjvox3p0 as isBlank,
12
+ StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
66
13
  charSequenceLength3278n89t01tmv as charSequenceLength,
67
- toString3dhdjl9yf50de as toString_0,
68
- noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
69
- first58ocm7j58k3q as first,
70
- ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
71
- substring3saq8ornu0luv as substring,
72
- startsWith26w8qjqapeeq6 as startsWith,
73
- split2bvyvnrlcifjv as split,
74
- setOf45ia9pnfhe90 as setOf,
75
- initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
14
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
76
15
  isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
77
16
  _Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
78
- listOfvhqybd2zx248 as listOf,
79
- checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
80
- asSequence3lsvgkvyzox0q as asSequence,
81
- filter184huxd00uyfg as filter,
82
- joinToStringooja5rkatz3u as joinToString_0,
83
17
  firstOrNulltrxqttxfxqju as firstOrNull,
84
18
  isDigit3mimrri4wkzop as isDigit,
85
- KProperty1ca4yb4wlo496 as KProperty1,
86
- getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
87
- StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
88
- charSequenceGet1vxk1y5n17t1z as charSequenceGet,
89
- first3kg261hmihapu as first_0,
19
+ Char19o2r8palgjof as Char,
20
+ first3kg261hmihapu as first,
90
21
  isLettere1qnx5bysxbd as isLetter,
22
+ protoOf180f3jzyo7rfj as protoOf,
23
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
24
+ listOfvhqybd2zx248 as listOf,
91
25
  to2cs3ny02qtbcb as to,
92
26
  toMap1vec9topfei08 as toMap,
93
27
  emptyList1g2z5xcrvp2zy as emptyList,
28
+ VOID3gxj6tk5isa35 as VOID,
29
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
94
30
  Paire9pteg33gng7 as Pair,
95
- plus20p0vtfmu0596 as plus_1,
96
- plus310ted5e4i90h as plus_2,
31
+ plus20p0vtfmu0596 as plus,
32
+ plus310ted5e4i90h as plus_0,
33
+ startsWith26w8qjqapeeq6 as startsWith,
97
34
  substringBefore3n7kj60w69hju as substringBefore,
98
35
  listOf1jh22dvmctj1r as listOf_0,
99
36
  lazy2hsh8ze7j6ikd as lazy,
100
- isInterface3d6p8outrmvmk as isInterface,
101
- asSequence2phdjljfh9jhx as asSequence_0,
37
+ asSequence2phdjljfh9jhx as asSequence,
102
38
  filterNot56uwv8hfomaa as filterNot,
103
39
  mapsbvh18eqox7a as map,
104
- distinct17vua5ffe1cfv as distinct_0,
40
+ distinct17vua5ffe1cfv as distinct,
105
41
  toListx6x8nvfmvvht as toList,
106
42
  firstOrNull1982767dljvdy as firstOrNull_0,
107
- listOfNotNull1v4ggfackvuny as listOfNotNull_0,
43
+ listOfNotNull1v4ggfackvuny as listOfNotNull,
108
44
  ensureNotNull1e947j3ixpazm as ensureNotNull,
109
45
  addAll1k27qatfgp3k5 as addAll,
110
46
  HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
111
- equals2au1ep9vhcato as equals,
112
- initMetadataForObject1cxne3s9w65el as initMetadataForObject,
113
- dropLastlqc2oyv04br0 as dropLast,
47
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
48
+ trimMarginhyd3fsmh8iev as trimMargin,
49
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
114
50
  } from './kotlin-kotlin-stdlib.mjs';
115
51
  import {
116
- NonEmptyList3ak25ihy2gcvs as NonEmptyList,
117
- NonEmptyList__plus_impl_xqmb92tle8a7jcf2wm as NonEmptyList__plus_impl_xqmb9,
118
- } from './arrow-arrow-core.mjs';
119
- import {
52
+ TransformScopeyrd3lf4zrk76 as TransformScope,
53
+ TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
54
+ transform3eti8i2bqvifx as transform,
55
+ Elementitq62jg6fid3 as Element,
56
+ KotlinGenerator_getInstancefvxn1omjreod as KotlinGenerator_getInstance,
120
57
  Nameoqr8dt2fim9d as Name,
121
58
  FunctionCall30872kpnbr7op as FunctionCall,
122
59
  transformChildren2mszeagj5nq4c as transformChildren,
60
+ VariableReference2vlynnhaw1i64 as VariableReference,
123
61
  sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
124
62
  ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
125
63
  SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
@@ -128,16 +66,17 @@ import {
128
66
  File3dimy4iqmuock as File,
129
67
  transformChildrend9p91tpcqdkx as transformChildren_0,
130
68
  Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
131
- withElements2toq84v08e72 as withElements,
69
+ Mainb4yvz4x0nrxd as Main,
70
+ Enumlszg09mwd24f as Enum,
71
+ Interface3pn84xq686t2r as Interface,
132
72
  Namespace345pal554qu3j as Namespace,
133
- KotlinGenerator_instance3iknxuxfla2k5 as KotlinGenerator_instance,
134
- convertClientServer1w4pgeabrnbb9 as convertClientServer,
73
+ Struct39wf79cwtn4ty as Struct,
74
+ Visibility_PUBLIC_getInstancezzqdnyfgtpc3 as Visibility_PUBLIC_getInstance,
75
+ Function21cuq8qizkin7 as Function,
76
+ Union38f3pecvfcpxh as Union,
77
+ convertClientServer1346neky3bhls as convertClientServer,
135
78
  convertnty9x0e63d0u as convert,
136
- TransformScopeyrd3lf4zrk76 as TransformScope,
137
- TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
138
- transform3eti8i2bqvifx as transform,
139
- Elementitq62jg6fid3 as Element,
140
- emitn3eihixilqyh as emit_0,
79
+ emitn3eihixilqyh as emit,
141
80
  prependImports32gcj3yb8voha as prependImports,
142
81
  placeInPackage1ffljbk9me4ug as placeInPackage,
143
82
  convertToGenerator2wzjrmaavxhph as convertToGenerator,
@@ -153,793 +92,74 @@ import {
153
92
  injectEnumLabelFieldyfohidz6c88i as injectEnumLabelField,
154
93
  convert37aabdzvtv9vg as convert_1,
155
94
  convert17zcptkz4mhr4 as convert_2,
156
- Struct39wf79cwtn4ty as Struct,
157
95
  markMembersAsOverride3r1zpft8nbmxg as markMembersAsOverride,
158
96
  convert32tuiui3czihh as convert_3,
159
97
  convert1cn4bolzoed8c as convert_4,
98
+ convert3ewo9inue7gua as convert_5,
160
99
  emitEndpointClient1meajc90wf3el as emitEndpointClient,
161
100
  emitClient32kfwzg2hm5vj as emitClient,
162
101
  get_extensions31c4or738wbxz as get_extensions,
163
- emit1oxjujel6f3jb as emit_1,
164
- emit3bzdcd0f6nwtj as emit_2,
102
+ emit1oxjujel6f3jb as emit_0,
103
+ emit3bzdcd0f6nwtj as emit_1,
165
104
  beforeGenerate3o8idb3hey1b0 as beforeGenerate,
166
105
  IrEmitterh2m93ojzvkep as IrEmitter,
167
106
  rawttvqxl50flj9 as raw,
168
- Interface3pn84xq686t2r as Interface,
169
107
  } from './wirespec-src-compiler-ir.mjs';
108
+ import {
109
+ Companion_instancebcq57hoyp8c2 as Companion_instance,
110
+ FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
111
+ addBackticks1di5q03fw4yhx as addBackticks,
112
+ Companion_instance1a2xqc448tlhh as Companion_instance_0,
113
+ Companion_instance2ryk3262e300f as Companion_instance_1,
114
+ FileExtension_Kotlin_getInstanceiz8k5f00lst9 as FileExtension_Kotlin_getInstance,
115
+ Unionccsavx6nrdr2 as Union_0,
116
+ Refined1lkzc0dg6wey7 as Refined,
117
+ Enum3l2iuc342kle6 as Enum_0,
118
+ Type12n1gx16iqtcu as Type,
119
+ plus14o24vdaiongg as plus_1,
120
+ importReferencesy4xv7r53sjjs as importReferences,
121
+ Paramvfwnys2w6aj1 as Param,
122
+ Literal331hu9r04vptz as Literal,
123
+ } from './wirespec-src-compiler-core.mjs';
170
124
  //region block: imports
171
125
  //endregion
172
126
  //region block: pre-declaration
173
- function emit_3(identifier) {
174
- var tmp;
175
- if (identifier instanceof DefinitionIdentifier) {
176
- tmp = this.v1y(identifier);
177
- } else {
178
- if (identifier instanceof FieldIdentifier) {
179
- tmp = this.l1y(this.v1y(identifier));
180
- } else {
181
- noWhenBranchMatchedException();
182
- }
183
- }
184
- return tmp;
185
- }
186
- function sanitize(_this__u8e3s4) {
187
- // Inline function 'kotlin.collections.mapIndexed' call
188
- var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
189
- // Inline function 'kotlin.collections.mapIndexedTo' call
190
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
191
- var index = 0;
192
- var _iterator__ex2g4s = this_0.t();
193
- while (_iterator__ex2g4s.u()) {
194
- var item = _iterator__ex2g4s.v();
195
- var _unary__edvuaz = index;
196
- index = _unary__edvuaz + 1 | 0;
197
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
198
- destination.x(tmp$ret$0);
199
- }
200
- var tmp = asSequence(joinToString(destination, ''));
201
- return this.k1y(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
202
- }
203
- function sanitizeFirstIsDigit(_this__u8e3s4) {
204
- var tmp;
205
- var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
206
- var tmp_0;
207
- var tmp_1 = tmp0_safe_receiver;
208
- if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
209
- tmp_0 = null;
210
- } else {
211
- tmp_0 = isDigit(tmp0_safe_receiver);
212
- }
213
- if (tmp_0 === true) {
214
- tmp = '_' + _this__u8e3s4;
215
- } else {
216
- tmp = _this__u8e3s4;
217
- }
218
- return tmp;
219
- }
220
- function sanitizeKeywords(_this__u8e3s4) {
221
- return Companion_getInstance_0().i1z_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
222
- }
223
- initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
224
- function emit_4(type, module_0) {
225
- var tmp;
226
- if (type.np_1.jp_1.r()) {
227
- tmp = 'data object ' + this.or(type.mp_1);
228
- } else {
229
- var tmp_0 = this.or(type.mp_1);
230
- var tmp_1 = this.mq(type.np_1);
231
- // Inline function 'kotlin.run' call
232
- var $this$run = type.op_1;
233
- var tmp_2;
234
- if ($this$run.r()) {
235
- tmp_2 = '';
236
- } else {
237
- tmp_2 = ' : ' + joinToString($this$run, ', ', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda(this));
238
- }
239
- var tmp$ret$1 = tmp_2;
240
- tmp = trimMargin('\n |data class ' + tmp_0 + '(\n |' + tmp_1 + '\n |)' + tmp$ret$1 + '\n |\n ');
241
- }
242
- return tmp;
243
- }
244
- function emit_5(_this__u8e3s4) {
245
- return dropLast(joinToString(_this__u8e3s4.jp_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
246
- }
247
- function emit_6(_this__u8e3s4) {
248
- return this.or(_this__u8e3s4.rp_1) + ': ' + this.oq(_this__u8e3s4.sp_1);
249
- }
250
- function emit_7(_this__u8e3s4) {
251
- var tmp;
252
- if (_this__u8e3s4 instanceof Dict) {
253
- tmp = 'Map<String, ' + this.oq(_this__u8e3s4.so_1) + '>';
254
- } else {
255
- if (_this__u8e3s4 instanceof Iterable) {
256
- tmp = 'List<' + this.oq(_this__u8e3s4.po_1) + '>';
257
- } else {
258
- if (_this__u8e3s4 instanceof Unit) {
259
- tmp = 'Unit';
260
- } else {
261
- if (_this__u8e3s4 instanceof Any) {
262
- tmp = 'Any';
263
- } else {
264
- if (_this__u8e3s4 instanceof Custom) {
265
- tmp = _this__u8e3s4.cv_1;
266
- } else {
267
- if (_this__u8e3s4 instanceof Primitive) {
268
- var t = _this__u8e3s4.gv_1;
269
- var tmp_0;
270
- if (t instanceof String_0) {
271
- tmp_0 = 'String';
272
- } else {
273
- if (t instanceof Integer) {
274
- var tmp_1;
275
- switch (t.ku_1.b3_1) {
276
- case 0:
277
- tmp_1 = 'Int';
278
- break;
279
- case 1:
280
- tmp_1 = 'Long';
281
- break;
282
- default:
283
- noWhenBranchMatchedException();
284
- break;
285
- }
286
- tmp_0 = tmp_1;
287
- } else {
288
- if (t instanceof Number_0) {
289
- var tmp_2;
290
- switch (t.nu_1.b3_1) {
291
- case 0:
292
- tmp_2 = 'Float';
293
- break;
294
- case 1:
295
- tmp_2 = 'Double';
296
- break;
297
- default:
298
- noWhenBranchMatchedException();
299
- break;
300
- }
301
- tmp_0 = tmp_2;
302
- } else {
303
- if (t instanceof Boolean_0) {
304
- tmp_0 = 'Boolean';
305
- } else {
306
- if (t instanceof Bytes) {
307
- tmp_0 = 'ByteArray';
308
- } else {
309
- noWhenBranchMatchedException();
310
- }
311
- }
312
- }
313
- }
314
- }
315
- tmp = tmp_0;
316
- } else {
317
- noWhenBranchMatchedException();
318
- }
319
- }
320
- }
321
- }
322
- }
323
- }
324
- // Inline function 'kotlin.let' call
325
- var it = tmp;
326
- return _this__u8e3s4.uu() ? it + '?' : it;
327
- }
328
- function emit_8(_this__u8e3s4) {
329
- var tmp;
330
- if (_this__u8e3s4 instanceof RegExp_0) {
331
- tmp = 'Regex("""' + this.qq(_this__u8e3s4.qt_1) + '""").matches(value)';
332
- } else {
333
- if (_this__u8e3s4 instanceof Bound) {
334
- var tmp1_safe_receiver = _this__u8e3s4.gu_1;
335
- var tmp_0;
336
- if (tmp1_safe_receiver == null) {
337
- tmp_0 = null;
338
- } else {
339
- // Inline function 'kotlin.let' call
340
- tmp_0 = tmp1_safe_receiver + ' < value';
341
- }
342
- var minCheck = tmp_0;
343
- var tmp2_safe_receiver = _this__u8e3s4.hu_1;
344
- var tmp_1;
345
- if (tmp2_safe_receiver == null) {
346
- tmp_1 = null;
347
- } else {
348
- // Inline function 'kotlin.let' call
349
- tmp_1 = 'value < ' + tmp2_safe_receiver;
350
- }
351
- var maxCheck = tmp_1;
352
- // Inline function 'kotlin.let' call
353
- // Inline function 'kotlin.text.ifEmpty' call
354
- var this_0 = joinToString(listOfNotNull([minCheck, maxCheck]), ' && ');
355
- var tmp_2;
356
- // Inline function 'kotlin.text.isEmpty' call
357
- if (charSequenceLength(this_0) === 0) {
358
- tmp_2 = 'true';
359
- } else {
360
- tmp_2 = this_0;
361
- }
362
- tmp = tmp_2;
363
- } else {
364
- noWhenBranchMatchedException();
365
- }
366
- }
367
- return tmp;
368
- }
369
- initMetadataForInterface(KotlinTypeDefinitionEmitter, 'KotlinTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, KotlinIdentifierEmitter]);
370
- function emit_9(channel) {
371
- return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.or(channel.dp_1) + ' {\n | operator fun invoke(message: ' + this.oq(channel.ep_1) + ')\n |}\n |\n ');
372
- }
373
- initMetadataForInterface(KotlinChannelDefinitionEmitter, 'KotlinChannelDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
374
- function emit_10(union) {
375
- return trimMargin('\n |sealed interface ' + this.or(union.hp_1) + '\n |\n ');
376
- }
377
- initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
378
- function emit_11(refined) {
379
- return trimMargin('\n |data class ' + this.v1y(refined.tr_1) + '(override val value: ' + this.oq(refined.ur_1) + '): Wirespec.Refined<' + this.oq(refined.ur_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.cs(refined) + '\n |}\n |\n ');
380
- }
381
- function emitValidator(_this__u8e3s4) {
382
- var defaultReturn = 'true';
383
- var type = _this__u8e3s4.ur_1.gv_1;
384
- var tmp;
385
- if (type instanceof Integer) {
386
- var tmp0_safe_receiver = type.lu_1;
387
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.pq(tmp0_safe_receiver);
388
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
389
- } else {
390
- if (type instanceof Number_0) {
391
- var tmp2_safe_receiver = type.ou_1;
392
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.pq(tmp2_safe_receiver);
393
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
394
- } else {
395
- if (type instanceof String_0) {
396
- var tmp4_safe_receiver = type.iu_1;
397
- var tmp_0;
398
- var tmp_1 = tmp4_safe_receiver;
399
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
400
- tmp_0 = null;
401
- } else {
402
- tmp_0 = this.pq(new RegExp_0(tmp4_safe_receiver));
403
- }
404
- var tmp5_elvis_lhs = tmp_0;
405
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
406
- } else {
407
- if (equals(type, Boolean_instance)) {
408
- tmp = defaultReturn;
409
- } else {
410
- if (equals(type, Bytes_instance)) {
411
- tmp = defaultReturn;
412
- } else {
413
- noWhenBranchMatchedException();
414
- }
415
- }
416
- }
417
- }
418
- }
419
- return tmp;
420
- }
421
- initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
422
- function emit_12(endpoint) {
423
- // Inline function 'kotlin.collections.map' call
424
- var this_0 = importReferences(endpoint);
425
- // Inline function 'kotlin.collections.mapTo' call
426
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
427
- var _iterator__ex2g4s = this_0.t();
428
- while (_iterator__ex2g4s.u()) {
429
- var item = _iterator__ex2g4s.v();
430
- var tmp$ret$0 = 'import ' + this.v1x().es_1 + '.model.' + item.cv_1;
431
- destination.x(tmp$ret$0);
432
- }
433
- var tmp = destination;
434
- var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda);
435
- var tmp_1 = this.or(endpoint.vp_1);
436
- var tmp_2 = get_pathParams(endpoint);
437
- var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
438
- var tmp_4 = emitObject$default(this, endpoint.yp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
439
- var tmp_5 = emitObject$default(this, endpoint.zp_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
440
- var tmp_6 = this.i1y(first(endpoint.aq_1), endpoint);
441
- var tmp_7 = Spacer_instance.toString();
442
- var tmp_8 = emitStatusInterfaces(this, endpoint);
443
- var tmp_9 = emitResponseInterfaces(this, endpoint);
444
- var tmp_10 = distinctByStatus(endpoint.bq_1);
445
- var tmp_11 = joinToString(tmp_10, '\n\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_3(this));
446
- var tmp_12 = Spacer_instance.toString();
447
- var tmp_13 = Spacer_instance.is(2);
448
- var tmp_14 = distinctByStatus(endpoint.bq_1);
449
- var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_4(this));
450
- var tmp_16 = Spacer_instance.is(2);
451
- var tmp_17 = Spacer_instance.toString();
452
- var tmp_18 = Spacer_instance.is(2);
453
- // Inline function 'kotlin.collections.filter' call
454
- var tmp0 = distinctByStatus(endpoint.bq_1);
455
- // Inline function 'kotlin.collections.filterTo' call
456
- var destination_0 = ArrayList_init_$Create$_0();
457
- var _iterator__ex2g4s_0 = tmp0.t();
458
- while (_iterator__ex2g4s_0.u()) {
459
- var element = _iterator__ex2g4s_0.v();
460
- if (Companion_instance_1.jr(element.hq_1)) {
461
- destination_0.x(element);
462
- }
463
- }
464
- var tmp_19 = destination_0;
465
- var tmp_20 = joinToString(tmp_19, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_5(this));
466
- var tmp_21 = Spacer_instance.is(3);
467
- var tmp_22 = Spacer_instance.is(2);
468
- var tmp_23 = Spacer_instance.toString();
469
- var tmp_24 = Spacer_instance.is(2);
470
- var tmp_25 = this.m1y(endpoint);
471
- var tmp_26 = Spacer_instance.is(2);
472
- var tmp_27 = Spacer_instance.is(3);
473
- return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.is(3) + 'override val method = "' + endpoint.wp_1.toString() + '"\n |' + Spacer_instance.is(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.is(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.is(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.is(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.is(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
474
- }
475
- function emitHandleFunction(endpoint) {
476
- return 'suspend fun ' + Companion_instance_1.gr(this.or(endpoint.vp_1)) + '(request: Request): Response<*>';
477
- }
478
- function emit_13(_this__u8e3s4, endpoint) {
479
- var tmp = Spacer_instance.toString();
480
- var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
481
- var tmp_1 = Spacer_instance.is(2);
482
- var tmp_2 = get_pathParams(endpoint);
483
- var tmp_3 = brace(this, joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this)));
484
- var tmp_4 = Spacer_instance.is(2);
485
- var tmp_5 = Spacer_instance.is(2);
486
- var tmp_6 = brace(this, joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
487
- var tmp_7 = Spacer_instance.is(2);
488
- var tmp_8 = brace(this, joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
489
- var tmp_9 = _this__u8e3s4.eq_1 == null ? Spacer_instance.is(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
490
- var tmp_10 = Spacer_instance.toString();
491
- var tmp_11 = Spacer_instance.is(2);
492
- var tmp_12 = Spacer_instance.is(3);
493
- return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.wp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.is(3) + 'method = request.method.name,\n |' + Spacer_instance.is(3) + 'queries = ' + this.f1z(endpoint) + ',\n |' + Spacer_instance.is(3) + 'headers = ' + this.e1z(endpoint) + ',\n |' + Spacer_instance.is(3) + 'body = ' + (!(_this__u8e3s4.eq_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.eq_1) + '>())' : 'null') + ',\n |' + Spacer_instance.is(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.is(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
494
- }
495
- function emitRequestHeaders(_this__u8e3s4) {
496
- var tmp;
497
- if (_this__u8e3s4.zp_1.r()) {
498
- tmp = 'emptyMap()';
499
- } else {
500
- var tmp_0 = Spacer_instance.is(5);
501
- var tmp_1 = ',\n' + Spacer_instance.is(5);
502
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.zp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
503
- }
504
- return tmp;
505
- }
506
- function emitQueries(endpoint) {
507
- var tmp;
508
- // Inline function 'kotlin.collections.isNotEmpty' call
509
- if (!endpoint.yp_1.r()) {
510
- var tmp_0 = Spacer_instance.is(5);
511
- var tmp_1 = ',\n' + Spacer_instance.is(5);
512
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.yp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
513
- } else {
514
- tmp = 'emptyMap()';
515
- }
516
- return tmp;
517
- }
518
- function emit_14(_this__u8e3s4) {
519
- // Inline function 'kotlin.let' call
520
- var it = joinToString(_this__u8e3s4.iq_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
521
- var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
522
- var tmp = Spacer_instance.toString();
523
- var tmp_0 = emit_16(this, _this__u8e3s4.jq_1);
524
- var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.hq_1, 0));
525
- var tmp_2 = emit_16(this, _this__u8e3s4.jq_1);
526
- var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.jq_1));
527
- var tmp_4 = Spacer_instance.is(2);
528
- var tmp_5 = fixStatus(_this__u8e3s4.hq_1);
529
- var tmp_6 = Spacer_instance.is(2);
530
- var tmp_7 = brace(this, joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
531
- return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.hq_1 + '(override val body: ' + tmp_0 + responseHeaderFields + ') : Response' + tmp_1 + 'XX<' + tmp_2 + '>, Response' + tmp_3 + ' {\n |' + tmp_4 + 'override val status = ' + tmp_5 + '\n |' + tmp_6 + 'override val headers = ResponseHeaders' + tmp_7 + '\n |' + emitObject(this, _this__u8e3s4.iq_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
532
- }
533
- function emitBody(_this__u8e3s4, content) {
534
- return 'serialization.serializeBody(response.body, typeOf<' + emit_16(_this__u8e3s4, content) + '>())';
535
- }
536
- function emitHeaders(_this__u8e3s4) {
537
- var tmp;
538
- if (_this__u8e3s4.iq_1.r()) {
539
- tmp = 'emptyMap()';
540
- } else {
541
- var tmp_0 = Spacer_instance.is(5);
542
- var tmp_1 = ',\n' + Spacer_instance.is(5);
543
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.iq_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
544
- }
545
- return tmp;
546
- }
547
- initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
548
- function emit_15(enum_0, module_0) {
549
- var tmp = this.v1y(enum_0.yr_1);
550
- return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.zr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.is(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
551
- }
552
- initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
553
- initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinUnionDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinChannelDefinitionEmitter, KotlinEndpointDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
554
127
  initMetadataForCompanion(Companion);
555
- initMetadataForCompanion(Companion_0);
556
128
  initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
557
- initMetadataForObject(KotlinShared, 'KotlinShared');
558
129
  //endregion
559
- function emitImports($this, _this__u8e3s4) {
560
- // Inline function 'kotlin.collections.map' call
561
- var this_0 = importReferences(_this__u8e3s4);
562
- // Inline function 'kotlin.collections.mapTo' call
563
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
564
- var _iterator__ex2g4s = this_0.t();
565
- while (_iterator__ex2g4s.u()) {
566
- var item = _iterator__ex2g4s.v();
567
- var tmp$ret$0 = 'import ' + $this.v1x().es_1 + '.model.' + item.cv_1 + ';';
568
- destination.x(tmp$ret$0);
569
- }
570
- var tmp = destination;
571
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinChannelDefinitionEmitter$emitImports$lambda);
572
- }
573
- function KotlinChannelDefinitionEmitter$emitImports$lambda(it) {
574
- // Inline function 'kotlin.text.trimStart' call
575
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
576
- }
577
- function KotlinChannelDefinitionEmitter() {
578
- }
579
- function KotlinEmitter(packageName, emitShared) {
580
- packageName = packageName === VOID ? Companion_instance.ds('community.flock.wirespec.generated') : packageName;
581
- emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
582
- LanguageEmitter.call(this);
583
- this.w1y_1 = packageName;
584
- this.x1y_1 = emitShared;
585
- this.y1y_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
586
- this.z1y_1 = FileExtension_Kotlin_getInstance();
587
- this.a1z_1 = KotlinShared_getInstance();
588
- this.b1z_1 = '//';
589
- }
590
- protoOf(KotlinEmitter).v1x = function () {
591
- return this.w1y_1;
592
- };
593
- protoOf(KotlinEmitter).vq = function () {
594
- return this.z1y_1;
595
- };
596
- protoOf(KotlinEmitter).e1y = function () {
597
- return this.a1z_1;
598
- };
599
- protoOf(KotlinEmitter).wq = function () {
600
- return this.b1z_1;
601
- };
602
- protoOf(KotlinEmitter).lr = function (module_0, logger) {
603
- // Inline function 'kotlin.let' call
604
- var it = protoOf(LanguageEmitter).lr.call(this, module_0, logger);
605
- return this.x1y_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.ds('community.flock.wirespec.kotlin').gs() + 'Wirespec', this.e1y().d1z_1)) : it;
606
- };
607
- protoOf(KotlinEmitter).mr = function (definition, module_0, logger) {
608
- // Inline function 'kotlin.let' call
609
- var it = protoOf(LanguageEmitter).mr.call(this, definition, module_0, logger);
610
- var subPackageName = plus(this.v1x(), definition);
611
- var tmp = subPackageName.gs() + it.yo_1;
612
- // Inline function 'kotlin.text.trimStart' call
613
- var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.hr(module_0) ? this.y1y_1 : '') + '\n |' + it.zo_1 + '\n ');
614
- var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
615
- return new Emitted(tmp, tmp$ret$0);
616
- };
617
- function emitStatusInterfaces($this, _this__u8e3s4) {
618
- // Inline function 'kotlin.collections.map' call
619
- var this_0 = _this__u8e3s4.bq_1;
620
- // Inline function 'kotlin.collections.mapTo' call
621
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
622
- var _iterator__ex2g4s = this_0.t();
623
- while (_iterator__ex2g4s.u()) {
624
- var item = _iterator__ex2g4s.v();
625
- var tmp$ret$0 = new Char(charCodeAt(item.hq_1, 0));
626
- destination.x(tmp$ret$0);
627
- }
628
- var tmp = distinct(destination);
629
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda);
630
- }
631
- function emitResponseInterfaces($this, _this__u8e3s4) {
632
- // Inline function 'kotlin.collections.map' call
633
- var this_0 = _this__u8e3s4.bq_1;
634
- // Inline function 'kotlin.collections.mapTo' call
635
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
636
- var _iterator__ex2g4s = this_0.t();
637
- while (_iterator__ex2g4s.u()) {
638
- var item = _iterator__ex2g4s.v();
639
- var tmp$ret$0 = emit_16($this, item.jq_1);
640
- destination.x(tmp$ret$0);
641
- }
642
- var tmp = distinct(destination);
643
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda);
644
- }
645
- function emitConstructor($this, _this__u8e3s4, endpoint) {
646
- var tmp = get_pathParams(endpoint);
647
- var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda($this)));
648
- var tmp_1 = orNull(joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
649
- var tmp_2 = orNull(joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
650
- var tmp0_safe_receiver = _this__u8e3s4.eq_1;
651
- var tmp_3;
652
- if (tmp0_safe_receiver == null) {
653
- tmp_3 = null;
654
- } else {
655
- // Inline function 'kotlin.let' call
656
- tmp_3 = Spacer_instance.is(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
657
- }
658
- // Inline function 'kotlin.let' call
659
- var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
660
- return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.eq_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.eq_1) + '> {';
661
- }
662
- function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
663
- var tmp = get_indexedPathParams(endpoint);
664
- var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
665
- var tmp_1 = orNull(joinToString(endpoint.yp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
666
- var tmp_2 = orNull(joinToString(endpoint.zp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
667
- var tmp0_safe_receiver = _this__u8e3s4.eq_1;
668
- var tmp_3;
669
- if (tmp0_safe_receiver == null) {
670
- tmp_3 = null;
671
- } else {
672
- // Inline function 'kotlin.let' call
673
- tmp_3 = Spacer_instance.is(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
674
- }
675
- // Inline function 'kotlin.let' call
676
- var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
677
- return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.is(2) + ')';
678
- }
679
- function emitSerialized($this, _this__u8e3s4) {
680
- return trimMargin('\n |' + Spacer_instance.is(3) + 'is Response' + _this__u8e3s4.hq_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.is(4) + 'statusCode = response.status,\n |' + Spacer_instance.is(4) + 'headers = ' + $this.h1z(_this__u8e3s4) + ',\n |' + Spacer_instance.is(4) + 'body = ' + (!(_this__u8e3s4.jq_1 == null) ? $this.g1z($this, _this__u8e3s4.jq_1) : 'null') + ',\n |' + Spacer_instance.is(3) + ')\n ');
681
- }
682
- function emitDeserialized($this, _this__u8e3s4) {
683
- var tmp = Spacer_instance.is(3) + _this__u8e3s4.hq_1 + ' -> Response' + _this__u8e3s4.hq_1 + '(';
684
- var tmp_0;
685
- if (!(_this__u8e3s4.jq_1 == null)) {
686
- tmp_0 = Spacer_instance.is(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.jq_1) + '>()),';
687
- } else {
688
- tmp_0 = Spacer_instance.is(4) + 'body = Unit,';
689
- }
690
- var tmp_1 = tmp_0;
691
- return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.iq_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.is(3) + ')']), '\n');
692
- }
693
- function emitSerializedMapEntry($this, _this__u8e3s4, type, fields) {
694
- return '"' + _this__u8e3s4.rp_1.l1() + '" to ' + type + '.' + fields + '.' + $this.or(_this__u8e3s4.rp_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.oq(_this__u8e3s4.sp_1) + '>()) }.orEmpty()';
695
- }
696
- function emitDeserialized_0($this, _this__u8e3s4) {
697
- return Spacer_instance.is(3) + $this.or(_this__u8e3s4.ue_1.cq_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.te_1 + '], typeOf<' + $this.oq(_this__u8e3s4.ue_1.dq_1) + '>())';
698
- }
699
- function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
700
- var trimMargin_0 = trimMargin('\n |' + Spacer_instance.is(spaces) + $this.or(_this__u8e3s4.rp_1) + ' =\n |' + Spacer_instance.is(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.is(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.is(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.rp_1.l1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.is(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.oq(_this__u8e3s4.sp_1) + '>()) }\n ');
701
- var tmp;
702
- if (_this__u8e3s4.sp_1.uu()) {
703
- tmp = trimMargin_0;
704
- } else {
705
- tmp = trimMargin_0 + '\n' + Spacer_instance.is(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.or(_this__u8e3s4.rp_1) + ' is null")';
706
- }
707
- return tmp;
708
- }
709
- function emitDeserializedParams$default($this, _this__u8e3s4, type, fields, spaces, caseSensitive, $super) {
710
- spaces = spaces === VOID ? 3 : spaces;
711
- caseSensitive = caseSensitive === VOID ? true : caseSensitive;
712
- return emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive);
713
- }
714
- function emitIdentifier($this, _this__u8e3s4) {
715
- return 'request.path.' + $this.or(_this__u8e3s4.cq_1) + '.let{serialization.serializePath(it, typeOf<' + $this.oq(_this__u8e3s4.dq_1) + '>())}';
716
- }
717
- function emit_16($this, _this__u8e3s4) {
718
- var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.gq_1;
719
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.oq(tmp1_safe_receiver);
720
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : removeQuestionMark(tmp2_safe_receiver);
721
- return tmp3_elvis_lhs == null ? 'Unit' : tmp3_elvis_lhs;
722
- }
723
- function emit_17($this, _this__u8e3s4) {
724
- return $this.or(_this__u8e3s4.cq_1) + ': ' + $this.oq(_this__u8e3s4.dq_1);
725
- }
726
- function brace($this, _this__u8e3s4) {
727
- return wrap($this, _this__u8e3s4, '(', ')');
728
- }
729
- function wrap($this, _this__u8e3s4, prefix, postfix) {
730
- var tmp;
731
- // Inline function 'kotlin.text.isEmpty' call
732
- if (charSequenceLength(_this__u8e3s4) === 0) {
733
- tmp = '';
734
- } else {
735
- tmp = prefix + _this__u8e3s4 + postfix;
736
- }
737
- return tmp;
738
- }
739
- function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
740
- var tmp;
741
- if (_this__u8e3s4.r()) {
742
- tmp = Spacer_instance.is(spaces) + 'data object ' + name + ' : ' + extends_0;
743
- } else {
744
- var tmp_0 = Spacer_instance.is(spaces);
745
- tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.is(spaces) + ') : ' + extends_0 + '\n ');
746
- }
747
- return tmp;
748
- }
749
- function emitObject$default($this, _this__u8e3s4, name, extends_0, spaces, block, $super) {
750
- spaces = spaces === VOID ? 1 : spaces;
751
- return emitObject($this, _this__u8e3s4, name, extends_0, spaces, block);
752
- }
753
- function KotlinEndpointDefinitionEmitter$emit$lambda(it) {
754
- // Inline function 'kotlin.text.trimStart' call
755
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
756
- }
757
- function KotlinEndpointDefinitionEmitter$emit$lambda_0(this$0) {
758
- return function (it) {
759
- return emit_17(this$0, it);
760
- };
761
- }
762
- function KotlinEndpointDefinitionEmitter$emit$lambda_1(this$0) {
763
- return function (it) {
764
- return this$0.nq(it);
765
- };
766
- }
767
- function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
768
- return function (it) {
769
- return this$0.nq(it);
770
- };
771
- }
772
- function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
773
- return function (it) {
774
- return this$0.j1y(it);
775
- };
776
- }
777
- function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
778
- return function (it) {
779
- return emitSerialized(this$0, it);
780
- };
781
- }
782
- function KotlinEndpointDefinitionEmitter$emit$lambda_5(this$0) {
783
- return function (it) {
784
- return emitDeserialized(this$0, it);
785
- };
786
- }
787
- function KotlinEndpointDefinitionEmitter$emit$lambda_6(it) {
788
- return emit(it);
789
- }
790
- function KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda(it) {
791
- return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.h1_1) + 'XX<T: Any> : Response<T>';
792
- }
793
- function KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
794
- return Spacer_instance.toString() + 'sealed interface Response' + concatGenerics(it) + ' : Response<' + it + '>';
795
- }
796
- function KotlinEndpointDefinitionEmitter$emit$lambda_7(this$0) {
797
- return function (it) {
798
- return this$0.or(it.cq_1);
799
- };
800
- }
801
- function KotlinEndpointDefinitionEmitter$emit$lambda_8(this$0) {
802
- return function (it) {
803
- return this$0.or(it.rp_1);
804
- };
805
- }
806
- function KotlinEndpointDefinitionEmitter$emit$lambda_9(this$0) {
807
- return function (it) {
808
- return this$0.or(it.rp_1);
809
- };
810
- }
811
- function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
812
- return function (it) {
813
- var tmp;
814
- if (it instanceof Literal) {
815
- tmp = '"' + it.yq_1 + '"';
816
- } else {
817
- if (it instanceof Param) {
818
- tmp = emitIdentifier(this$0, it);
819
- } else {
820
- noWhenBranchMatchedException();
821
- }
822
- }
823
- return tmp;
824
- };
825
- }
826
- function KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this$0) {
827
- return function (it) {
828
- return emitSerializedMapEntry(this$0, it, 'request', 'headers');
829
- };
830
- }
831
- function KotlinEndpointDefinitionEmitter$emitQueries$lambda(this$0) {
832
- return function (it) {
833
- return emitSerializedMapEntry(this$0, it, 'request', 'queries');
834
- };
835
- }
836
- function KotlinEndpointDefinitionEmitter$emit$lambda_11(this$0) {
837
- return function (it) {
838
- return 'val ' + this$0.nq(it);
839
- };
840
- }
841
- function KotlinEndpointDefinitionEmitter$emit$lambda_12(this$0) {
842
- return function (it) {
843
- return this$0.or(it.rp_1);
844
- };
845
- }
846
- function KotlinEndpointDefinitionEmitter$emit$lambda_13(this$0) {
847
- return function (it) {
848
- return this$0.nq(it);
849
- };
850
- }
851
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
852
- return function (it) {
853
- return Spacer_instance.is(2) + emit_17(this$0, it);
854
- };
855
- }
856
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
857
- return function (it) {
858
- return Spacer_instance.is(2) + this$0.nq(it);
859
- };
860
- }
861
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
862
- return function (it) {
863
- return Spacer_instance.is(2) + this$0.nq(it);
864
- };
865
- }
866
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
867
- return function (it) {
868
- return emitDeserialized_0(this$0, it);
869
- };
870
- }
871
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0(this$0) {
872
- return function (it) {
873
- return emitDeserializedParams$default(this$0, it, 'request', 'queries');
874
- };
875
- }
876
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1(this$0) {
877
- return function (it) {
878
- return emitDeserializedParams$default(this$0, it, 'request', 'headers', VOID, false);
879
- };
880
- }
881
- function KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this$0) {
882
- return function (it) {
883
- return emitSerializedMapEntry(this$0, it, 'response', 'headers');
884
- };
885
- }
886
- function KotlinEndpointDefinitionEmitter$emitDeserialized$lambda(this$0) {
887
- return function (it) {
888
- return emitDeserializedParams_0(this$0, it, 'response', 'headers', 4, false);
889
- };
890
- }
891
- function KotlinEndpointDefinitionEmitter$emitObject$lambda($spaces, $block) {
892
- return function (it) {
893
- return Spacer_instance.is($spaces + 1 | 0) + 'val ' + $block(it);
894
- };
895
- }
896
- function KotlinEndpointDefinitionEmitter() {
897
- }
898
- function sanitizeNegative($this, _this__u8e3s4) {
899
- return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
900
- }
901
- function sanitizeEnum($this, _this__u8e3s4) {
902
- return $this.k1y(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
903
- }
904
- function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
905
- return function (it) {
906
- return this$0.l1y(sanitizeEnum(this$0, it)) + '("' + it + '")';
907
- };
908
- }
909
- function KotlinEnumDefinitionEmitter() {
910
- }
911
- function Companion() {
912
- Companion_instance_2 = this;
913
- this.i1z_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
914
- }
915
- var Companion_instance_2;
916
- function Companion_getInstance_0() {
917
- if (Companion_instance_2 == null)
918
- new Companion();
919
- return Companion_instance_2;
920
- }
921
- function KotlinIdentifierEmitter$sanitize$lambda(it) {
922
- return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
923
- }
924
- function KotlinIdentifierEmitter() {
925
- }
926
130
  function _get_sanitizationConfig__sns434($this) {
927
- var tmp0 = $this.o1z_1;
131
+ var tmp0 = $this.i1y_1;
928
132
  var tmp = KProperty1;
929
133
  // Inline function 'kotlin.getValue' call
930
134
  getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
931
- return tmp0.l1();
135
+ return tmp0.m1();
932
136
  }
933
137
  function _get_modelSanitizationConfig__vgg831($this) {
934
- var tmp0 = $this.p1z_1;
138
+ var tmp0 = $this.j1y_1;
935
139
  var tmp = KProperty1;
936
140
  // Inline function 'kotlin.getValue' call
937
141
  getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s(), null);
938
- return tmp0.l1();
142
+ return tmp0.m1();
939
143
  }
940
- function sanitize_0($this, _this__u8e3s4) {
144
+ function withExplicitVisibility($this, _this__u8e3s4) {
145
+ // Inline function 'community.flock.wirespec.ir.core.transform' call
146
+ var scope = new TransformScope(_this__u8e3s4);
147
+ // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
148
+ var tmp = scope;
149
+ // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
150
+ var this_0 = scope.a1w_1;
151
+ // Inline function 'community.flock.wirespec.ir.core.transformer' call
152
+ // Inline function 'kotlin.apply' call
153
+ var this_1 = new TransformerBuilder();
154
+ this_1.u1i(KotlinIrEmitter$withExplicitVisibility$lambda);
155
+ var tmp$ret$2 = this_1.v1i();
156
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
157
+ var tmp_0 = scope.a1w_1;
158
+ return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
159
+ }
160
+ function sanitize($this, _this__u8e3s4) {
941
161
  // Inline function 'kotlin.collections.mapIndexed' call
942
- var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
162
+ var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
943
163
  // Inline function 'kotlin.collections.mapIndexedTo' call
944
164
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
945
165
  var index = 0;
@@ -948,7 +168,7 @@ function sanitize_0($this, _this__u8e3s4) {
948
168
  var item = _iterator__ex2g4s.v();
949
169
  var _unary__edvuaz = index;
950
170
  index = _unary__edvuaz + 1 | 0;
951
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
171
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.dr(item) : item;
952
172
  destination.x(tmp$ret$0);
953
173
  }
954
174
  // Inline function 'kotlin.text.filter' call
@@ -969,16 +189,16 @@ function sanitize_0($this, _this__u8e3s4) {
969
189
  while (inductionVariable < last);
970
190
  var tmp$ret$5 = destination_0.toString();
971
191
  // Inline function 'kotlin.let' call
972
- var it = sanitizeFirstIsDigit_0($this, tmp$ret$5);
192
+ var it = sanitizeFirstIsDigit($this, tmp$ret$5);
973
193
  var tmp;
974
194
  if (_this__u8e3s4 instanceof FieldIdentifier) {
975
- tmp = sanitizeKeywords_0($this, it);
195
+ tmp = sanitizeKeywords($this, it);
976
196
  } else {
977
197
  tmp = it;
978
198
  }
979
199
  return tmp;
980
200
  }
981
- function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
201
+ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
982
202
  var tmp;
983
203
  var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
984
204
  var tmp_0;
@@ -995,8 +215,8 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
995
215
  }
996
216
  return tmp;
997
217
  }
998
- function sanitizeKeywords_0($this, _this__u8e3s4) {
999
- return Companion_getInstance_1().q1z_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
218
+ function sanitizeKeywords($this, _this__u8e3s4) {
219
+ return Companion_getInstance_0().v1x().v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
1000
220
  }
1001
221
  function sanitizeSymbol($this, _this__u8e3s4) {
1002
222
  // Inline function 'kotlin.collections.mapIndexed' call
@@ -1009,7 +229,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1009
229
  var item = _iterator__ex2g4s.v();
1010
230
  var _unary__edvuaz = index;
1011
231
  index = _unary__edvuaz + 1 | 0;
1012
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
232
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.dr(item) : item;
1013
233
  destination.x(tmp$ret$0);
1014
234
  }
1015
235
  // Inline function 'kotlin.text.filter' call
@@ -1029,7 +249,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1029
249
  }
1030
250
  while (inductionVariable < last);
1031
251
  var tmp$ret$5 = destination_0.toString();
1032
- return sanitizeFirstIsDigit_0($this, tmp$ret$5);
252
+ return sanitizeFirstIsDigit($this, tmp$ret$5);
1033
253
  }
1034
254
  function sanitizeFieldSymbol($this, _this__u8e3s4) {
1035
255
  return isBareIdentifier($this, _this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
@@ -1039,7 +259,7 @@ function isBareIdentifier($this, _this__u8e3s4) {
1039
259
  var tmp_0;
1040
260
  // Inline function 'kotlin.text.isNotEmpty' call
1041
261
  if (charSequenceLength(_this__u8e3s4) > 0) {
1042
- tmp_0 = isLetter(first_0(_this__u8e3s4)) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
262
+ tmp_0 = isLetter(first(_this__u8e3s4)) || first(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
1043
263
  } else {
1044
264
  tmp_0 = false;
1045
265
  }
@@ -1064,31 +284,35 @@ function isBareIdentifier($this, _this__u8e3s4) {
1064
284
  }
1065
285
  return tmp;
1066
286
  }
1067
- function sanitizeEnum_0($this, _this__u8e3s4) {
1068
- return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
287
+ function sanitizeEnum($this, _this__u8e3s4) {
288
+ return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
1069
289
  }
1070
- function Companion_0() {
1071
- Companion_instance_3 = this;
1072
- this.q1z_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
290
+ function Companion() {
291
+ Companion_instance_2 = this;
292
+ this.k1y_1 = KotlinGenerator_getInstance();
1073
293
  }
1074
- var Companion_instance_3;
1075
- function Companion_getInstance_1() {
1076
- if (Companion_instance_3 == null)
1077
- new Companion_0();
1078
- return Companion_instance_3;
294
+ protoOf(Companion).v1x = function () {
295
+ return this.k1y_1.z1w_1;
296
+ };
297
+ var Companion_instance_2;
298
+ function Companion_getInstance_0() {
299
+ if (Companion_instance_2 == null)
300
+ new Companion();
301
+ return Companion_instance_2;
1079
302
  }
1080
303
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1081
304
  return addBackticks(it);
1082
305
  }
1083
306
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
1084
307
  return function (name) {
1085
- var sanitized = name.q1h_1.a1() > 1 ? name.e1n() : sanitizeSymbol(this$0, name.r1j());
308
+ var sanitized = name.f1h_1.b1() > 1 ? name.t1m() : sanitizeSymbol(this$0, name.g1j());
1086
309
  return new Name(listOf(sanitized));
1087
310
  };
1088
311
  }
1089
312
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
1090
313
  return function (name) {
1091
- return new Name(listOf(sanitizeSymbol(this$0, name.e1n())));
314
+ var sanitized = name.f1h_1.b1() > 1 ? name.t1m() : sanitizeSymbol(this$0, name.g1j());
315
+ return new Name(listOf(sanitized));
1092
316
  };
1093
317
  }
1094
318
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
@@ -1101,33 +325,40 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1101
325
  var tmp;
1102
326
  var tmp_0;
1103
327
  if (stmt instanceof FunctionCall) {
1104
- tmp_0 = stmt.o1n_1.r1j() === 'validate';
328
+ tmp_0 = stmt.d1n_1.g1j() === 'validate';
1105
329
  } else {
1106
330
  tmp_0 = false;
1107
331
  }
1108
332
  if (tmp_0) {
1109
- tmp = transformChildren(stmt.s1n(VOID, emptyList()), tr);
333
+ tmp = transformChildren(stmt.h1n(VOID, emptyList()), tr);
1110
334
  } else {
1111
335
  if (stmt instanceof ConstructorStatement) {
1112
- var tmp_1 = tr.z1v(stmt.j1o_1);
336
+ var tmp_1 = tr.s1v(stmt.y1n_1);
1113
337
  // Inline function 'kotlin.collections.map' call
1114
- var this_0 = stmt.k1o_1;
338
+ var this_0 = stmt.z1n_1;
1115
339
  // Inline function 'kotlin.collections.mapTo' call
1116
- var destination = ArrayList_init_$Create$(this_0.a1());
340
+ var destination = ArrayList_init_$Create$(this_0.b1());
1117
341
  // Inline function 'kotlin.collections.iterator' call
1118
- var _iterator__ex2g4s = this_0.j1().t();
342
+ var _iterator__ex2g4s = this_0.k1().t();
1119
343
  while (_iterator__ex2g4s.u()) {
1120
344
  var item = _iterator__ex2g4s.v();
1121
345
  // Inline function 'kotlin.collections.component1' call
1122
- var name = item.k1();
346
+ var name = item.l1();
1123
347
  // Inline function 'kotlin.collections.component2' call
1124
- var expr = item.l1();
1125
- var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.c1w(expr));
348
+ var expr = item.m1();
349
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.v1v(expr));
1126
350
  destination.x(tmp$ret$3);
1127
351
  }
1128
352
  tmp = new ConstructorStatement(tmp_1, toMap(destination));
1129
353
  } else {
1130
- tmp = transformChildren(stmt, tr);
354
+ if (stmt instanceof VariableReference) {
355
+ var cased = _get_sanitizationConfig__sns434(this$0).o1x_1(stmt.b1o_1);
356
+ var sanitized = _get_sanitizationConfig__sns434(this$0).p1x_1(cased.g1j());
357
+ var escaped = Companion_getInstance_0().v1x().v1(sanitized) ? addBackticks(sanitized) : sanitized;
358
+ tmp = new VariableReference(new Name(listOf(escaped)));
359
+ } else {
360
+ tmp = transformChildren(stmt, tr);
361
+ }
1131
362
  }
1132
363
  }
1133
364
  return tmp;
@@ -1135,7 +366,7 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1135
366
  }
1136
367
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1137
368
  return function () {
1138
- var tmp = Companion_getInstance_1().q1z_1;
369
+ var tmp = Companion_getInstance_0().v1x();
1139
370
  var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1140
371
  var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1141
372
  var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1149,7 +380,7 @@ function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
1149
380
  };
1150
381
  }
1151
382
  function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1152
- return new Name(listOf(name.r1j()));
383
+ return new Name(listOf(name.g1j()));
1153
384
  }
1154
385
  function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
1155
386
  return function (it) {
@@ -1160,7 +391,7 @@ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1160
391
  return function () {
1161
392
  var tmp = _get_sanitizationConfig__sns434(this$0);
1162
393
  var tmp_0 = KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1163
- return tmp.u1x(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
394
+ return tmp.t1x(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
1164
395
  };
1165
396
  }
1166
397
  function KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s() {
@@ -1172,7 +403,7 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1172
403
  var tmp;
1173
404
  if (element instanceof File) {
1174
405
  // Inline function 'kotlin.collections.partition' call
1175
- var this_0 = element.n1o_1;
406
+ var this_0 = element.d1o_1;
1176
407
  var first = ArrayList_init_$Create$_0();
1177
408
  var second = ArrayList_init_$Create$_0();
1178
409
  var _iterator__ex2g4s = this_0.t();
@@ -1185,9 +416,9 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1185
416
  }
1186
417
  }
1187
418
  var _destruct__k2r9zo = new Pair(first, second);
1188
- var packageElements = _destruct__k2r9zo.ve();
1189
- var rest = _destruct__k2r9zo.we();
1190
- tmp = element.q1o(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
419
+ var packageElements = _destruct__k2r9zo.we();
420
+ var rest = _destruct__k2r9zo.xe();
421
+ tmp = element.g1o(VOID, plus_0(plus(packageElements, import_0('kotlin.reflect', 'KType')), rest));
1191
422
  } else {
1192
423
  tmp = element;
1193
424
  }
@@ -1198,11 +429,40 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
1198
429
  return function (element, transformer) {
1199
430
  var tmp;
1200
431
  if (element instanceof Namespace) {
1201
- var injected = element.s1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? $clientServer : emptyList();
432
+ var injected = element.i1o_1.equals(Companion_getInstance().h1h('Wirespec')) ? $clientServer : emptyList();
1202
433
  var tmp_0;
1203
434
  // Inline function 'kotlin.collections.isNotEmpty' call
1204
435
  if (!injected.r()) {
1205
- tmp_0 = withElements(element, plus_2(element.o1o(), injected));
436
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
437
+ var elements = plus_0(element.e1o(), injected);
438
+ var tmp_1;
439
+ if (element instanceof File) {
440
+ tmp_1 = element.g1o(VOID, elements);
441
+ } else {
442
+ if (element instanceof Struct) {
443
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
444
+ } else {
445
+ if (element instanceof Namespace) {
446
+ tmp_1 = element.n1o(VOID, elements);
447
+ } else {
448
+ if (element instanceof Interface) {
449
+ tmp_1 = element.w1o(VOID, elements);
450
+ } else {
451
+ if (element instanceof Enum) {
452
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
453
+ } else {
454
+ if (element instanceof Main) {
455
+ tmp_1 = element;
456
+ } else {
457
+ tmp_1 = element;
458
+ }
459
+ }
460
+ }
461
+ }
462
+ }
463
+ }
464
+ var tmp_2 = tmp_1;
465
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1206
466
  } else {
1207
467
  tmp_0 = element;
1208
468
  }
@@ -1214,6 +474,53 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
1214
474
  return transformChildren_0(transformed, transformer);
1215
475
  };
1216
476
  }
477
+ function KotlinIrEmitter$withExplicitVisibility$lambda(element, transformer) {
478
+ var tmp;
479
+ if (isInterface(element, Element)) {
480
+ var tmp_0;
481
+ if (element instanceof Namespace) {
482
+ tmp_0 = element.n1o(VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
483
+ } else {
484
+ if (element instanceof Interface) {
485
+ var tmp2_visibility = Visibility_PUBLIC_getInstance();
486
+ // Inline function 'kotlin.collections.map' call
487
+ var this_0 = element.t1o_1;
488
+ // Inline function 'kotlin.collections.mapTo' call
489
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
490
+ var _iterator__ex2g4s = this_0.t();
491
+ while (_iterator__ex2g4s.u()) {
492
+ var item = _iterator__ex2g4s.v();
493
+ var tmp$ret$0 = item.h1p(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
494
+ destination.x(tmp$ret$0);
495
+ }
496
+ tmp_0 = element.w1o(VOID, VOID, VOID, VOID, VOID, destination, tmp2_visibility);
497
+ } else {
498
+ if (element instanceof Union) {
499
+ tmp_0 = element.o1p(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
500
+ } else {
501
+ if (element instanceof Enum) {
502
+ tmp_0 = element.b1q(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
503
+ } else {
504
+ if (element instanceof Struct) {
505
+ tmp_0 = element.n1q(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
506
+ } else {
507
+ if (element instanceof Function) {
508
+ tmp_0 = element.p1l(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
509
+ } else {
510
+ tmp_0 = element;
511
+ }
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+ tmp = tmp_0;
518
+ } else {
519
+ tmp = element;
520
+ }
521
+ var transformed = tmp;
522
+ return transformChildren_0(transformed, transformer);
523
+ }
1217
524
  function KotlinIrEmitter$emitGenerator$lambda(it) {
1218
525
  return startsWith(it, 'Wirespec.') || it === 'Wirespec';
1219
526
  }
@@ -1227,99 +534,99 @@ function KotlinIrEmitter$emitGenerator$lambda_1(it) {
1227
534
  }
1228
535
  function KotlinIrEmitter$emitGenerator$lambda_2(this$0) {
1229
536
  return function (it) {
1230
- return import_0(this$0.v1x().es_1 + '.model', it);
537
+ return import_0(this$0.c1y().js_1 + '.model', it);
1231
538
  };
1232
539
  }
1233
540
  function KotlinIrEmitter$emit$lambda(this$0) {
1234
541
  return function (it) {
1235
- return sanitizeEnum_0(this$0, it);
542
+ return sanitizeEnum(this$0, it);
1236
543
  };
1237
544
  }
1238
545
  function KotlinIrEmitter(packageName, emitShared) {
1239
- Companion_getInstance_1();
1240
- packageName = packageName === VOID ? Companion_instance.ds('community.flock.wirespec.generated') : packageName;
1241
- emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
1242
- this.j1z_1 = packageName;
1243
- this.k1z_1 = emitShared;
1244
- this.l1z_1 = KotlinGenerator_instance;
1245
- this.m1z_1 = FileExtension_Kotlin_getInstance();
1246
- this.n1z_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
546
+ Companion_getInstance_0();
547
+ packageName = packageName === VOID ? Companion_instance_0.is('community.flock.wirespec.generated') : packageName;
548
+ emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
549
+ this.d1y_1 = packageName;
550
+ this.e1y_1 = emitShared;
551
+ this.f1y_1 = KotlinGenerator_getInstance();
552
+ this.g1y_1 = FileExtension_Kotlin_getInstance();
553
+ this.h1y_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1247
554
  var tmp = this;
1248
- tmp.o1z_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
555
+ tmp.i1y_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1249
556
  var tmp_0 = this;
1250
- tmp_0.p1z_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
557
+ tmp_0.j1y_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1251
558
  }
1252
- protoOf(KotlinIrEmitter).v1x = function () {
1253
- return this.j1z_1;
559
+ protoOf(KotlinIrEmitter).c1y = function () {
560
+ return this.d1y_1;
1254
561
  };
1255
- protoOf(KotlinIrEmitter).u1w = function () {
1256
- return this.l1z_1;
562
+ protoOf(KotlinIrEmitter).n1w = function () {
563
+ return this.f1y_1;
1257
564
  };
1258
- protoOf(KotlinIrEmitter).vq = function () {
1259
- return this.m1z_1;
565
+ protoOf(KotlinIrEmitter).kr = function () {
566
+ return this.g1y_1;
1260
567
  };
1261
- protoOf(KotlinIrEmitter).y1w = function () {
1262
- var packageName = Companion_instance.ds('community.flock.wirespec.kotlin');
1263
- var clientServer = convertClientServer(packageName);
568
+ protoOf(KotlinIrEmitter).r1w = function () {
569
+ var packageName = Companion_instance_0.is('community.flock.wirespec.kotlin');
570
+ var clientServer = convertClientServer();
1264
571
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1265
572
  var this_0 = convert(packageName);
1266
573
  var scope = new TransformScope(this_0);
1267
574
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1268
575
  var tmp = scope;
1269
576
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1270
- var this_1 = scope.h1w_1;
577
+ var this_1 = scope.a1w_1;
1271
578
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1272
579
  // Inline function 'kotlin.apply' call
1273
580
  var this_2 = new TransformerBuilder();
1274
- this_2.f1j(KotlinIrEmitter$emitShared$lambda);
1275
- var tmp$ret$2 = this_2.g1j();
1276
- tmp.h1w_1 = transform(this_1, tmp$ret$2);
581
+ this_2.u1i(KotlinIrEmitter$emitShared$lambda);
582
+ var tmp$ret$2 = this_2.v1i();
583
+ tmp.a1w_1 = transform(this_1, tmp$ret$2);
1277
584
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1278
585
  var tmp_0 = scope;
1279
586
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1280
587
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1281
- var this_3 = scope.h1w_1;
588
+ var this_3 = scope.a1w_1;
1282
589
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1283
590
  // Inline function 'kotlin.apply' call
1284
591
  var this_4 = new TransformerBuilder();
1285
- this_4.f1j(KotlinIrEmitter$emitShared$lambda_0(clientServer));
1286
- var tmp$ret$7 = this_4.g1j();
1287
- tmp_0.h1w_1 = transform(this_3, tmp$ret$7);
1288
- var tmp_1 = scope.h1w_1;
592
+ this_4.u1i(KotlinIrEmitter$emitShared$lambda_0(clientServer));
593
+ var tmp$ret$7 = this_4.v1i();
594
+ tmp_0.a1w_1 = transform(this_3, tmp$ret$7);
595
+ var tmp_1 = scope.a1w_1;
1289
596
  var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1290
597
  var tmp_2;
1291
- if (this.k1z_1.xo_1) {
1292
- tmp_2 = wirespecShared;
598
+ if (this.e1y_1.gp_1) {
599
+ tmp_2 = withExplicitVisibility(this, wirespecShared);
1293
600
  } else {
1294
601
  tmp_2 = null;
1295
602
  }
1296
603
  return tmp_2;
1297
604
  };
1298
- protoOf(KotlinIrEmitter).mr = function (definition, module_0, logger) {
1299
- var file = emit_0.call(this, definition, module_0, logger);
605
+ protoOf(KotlinIrEmitter).lr = function (definition, module_0, logger) {
606
+ var file = emit.call(this, definition, module_0, logger);
1300
607
  // Inline function 'kotlin.takeIf' call
1301
- var this_0 = this.n1z_1;
608
+ var this_0 = this.h1y_1;
1302
609
  var tmp;
1303
- if (Companion_instance_1.ir(module_0)) {
610
+ if (Companion_instance.er(module_0)) {
1304
611
  tmp = this_0;
1305
612
  } else {
1306
613
  tmp = null;
1307
614
  }
1308
615
  var tmp$ret$1 = tmp;
1309
- return placeInPackage(prependImports(file, tmp$ret$1), this.v1x(), definition);
616
+ return placeInPackage(prependImports(file, tmp$ret$1), this.c1y(), definition);
1310
617
  };
1311
- protoOf(KotlinIrEmitter).d1x = function (definition, module_0) {
618
+ protoOf(KotlinIrEmitter).w1w = function (definition, module_0) {
1312
619
  var tmp;
1313
620
  if (definition instanceof Type) {
1314
621
  tmp = convertToGenerator_2(definition, module_0);
1315
622
  } else {
1316
- if (definition instanceof Enum) {
623
+ if (definition instanceof Enum_0) {
1317
624
  tmp = convertToGenerator_1(definition);
1318
625
  } else {
1319
626
  if (definition instanceof Refined) {
1320
627
  tmp = convertToGenerator_0(definition);
1321
628
  } else {
1322
- if (definition instanceof Union) {
629
+ if (definition instanceof Union_0) {
1323
630
  tmp = convertToGenerator(definition);
1324
631
  } else {
1325
632
  return null;
@@ -1329,15 +636,15 @@ protoOf(KotlinIrEmitter).d1x = function (definition, module_0) {
1329
636
  }
1330
637
  var generatorFile = tmp;
1331
638
  var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
1332
- var generatorOwnName = definition.nr().l1() + 'Generator';
1333
- var tmp_0 = asSequence_0(collectCustomTypeNames(sanitized));
639
+ var generatorOwnName = definition.mr().m1() + 'Generator';
640
+ var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
1334
641
  var tmp_1 = filterNot(tmp_0, KotlinIrEmitter$emitGenerator$lambda);
1335
642
  var tmp_2 = filterNot(tmp_1, KotlinIrEmitter$emitGenerator$lambda_0(generatorOwnName));
1336
- var tmp_3 = distinct_0(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
643
+ var tmp_3 = distinct(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
1337
644
  var modelImports = toList(map(tmp_3, KotlinIrEmitter$emitGenerator$lambda_2(this)));
1338
- return placeInPackage_0(prependImports(sanitized, plus_2(this.n1z_1, modelImports)), this.v1x(), 'generator');
645
+ return placeInPackage_0(prependImports(sanitized, plus_0(this.h1y_1, modelImports)), this.c1y(), 'generator');
1339
646
  };
1340
- protoOf(KotlinIrEmitter).lq = function (type, module_0) {
647
+ protoOf(KotlinIrEmitter).cs = function (type, module_0) {
1341
648
  return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)));
1342
649
  };
1343
650
  protoOf(KotlinIrEmitter).as = function (enum_0, module_0) {
@@ -1351,7 +658,7 @@ protoOf(KotlinIrEmitter).vr = function (refined) {
1351
658
  var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
1352
659
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1353
660
  // Inline function 'kotlin.collections.filterIsInstance' call
1354
- var tmp0 = file.o1o();
661
+ var tmp0 = file.e1o();
1355
662
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1356
663
  var destination = ArrayList_init_$Create$_0();
1357
664
  var _iterator__ex2g4s = tmp0.t();
@@ -1363,13 +670,13 @@ protoOf(KotlinIrEmitter).vr = function (refined) {
1363
670
  }
1364
671
  var tmp0_safe_receiver = firstOrNull_0(destination);
1365
672
  var updatedStruct = tmp0_safe_receiver == null ? null : markMembersAsOverride(tmp0_safe_receiver);
1366
- return new File(Companion_getInstance().s1h(sanitize_0(this, refined.tr_1)), listOfNotNull_0(updatedStruct));
673
+ return new File(Companion_getInstance().h1h(sanitize(this, refined.tr_1)), listOfNotNull(updatedStruct));
1367
674
  };
1368
675
  protoOf(KotlinIrEmitter).bs = function (endpoint) {
1369
- var imports = buildModelImports(endpoint, this.v1x());
676
+ var imports = buildModelImports(endpoint, this.c1y());
1370
677
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1371
678
  // Inline function 'kotlin.collections.filterIsInstance' call
1372
- var tmp0 = convert_3(endpoint).o1o();
679
+ var tmp0 = convert_3(endpoint).e1o();
1373
680
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1374
681
  var destination = ArrayList_init_$Create$_0();
1375
682
  var _iterator__ex2g4s = tmp0.t();
@@ -1382,7 +689,7 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
1382
689
  var tmp$ret$2 = firstOrNull_0(destination);
1383
690
  var endpointNamespace = ensureNotNull(tmp$ret$2);
1384
691
  var body = injectApiAlias(injectCompanionObject(endpointNamespace, endpoint));
1385
- var tmp = sanitizeNames(new File(Companion_getInstance().s1h(sanitize_0(this, endpoint.vp_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
692
+ var tmp = sanitizeNames(new File(Companion_getInstance().h1h(sanitize(this, endpoint.kq_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
1386
693
  // Inline function 'kotlin.takeIf' call
1387
694
  var tmp_0;
1388
695
  // Inline function 'kotlin.collections.isNotEmpty' call
@@ -1397,7 +704,7 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
1397
704
  protoOf(KotlinIrEmitter).pr = function (channel) {
1398
705
  var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1399
706
  // Inline function 'kotlin.takeIf' call
1400
- var this_0 = buildModelImports(channel, this.v1x());
707
+ var this_0 = buildModelImports(channel, this.c1y());
1401
708
  var tmp_0;
1402
709
  // Inline function 'kotlin.collections.isNotEmpty' call
1403
710
  if (!this_0.r()) {
@@ -1408,25 +715,39 @@ protoOf(KotlinIrEmitter).pr = function (channel) {
1408
715
  var tmp$ret$2 = tmp_0;
1409
716
  return prependImports(tmp, tmp$ret$2);
1410
717
  };
1411
- protoOf(KotlinIrEmitter).c1x = function (endpoint) {
1412
- var imports = buildModelImports(endpoint, this.v1x());
1413
- var endpointImport = import_0(this.v1x().es_1 + '.endpoint', endpoint.vp_1.l1());
718
+ protoOf(KotlinIrEmitter).or = function (rpc) {
719
+ var tmp = sanitizeNames(convert_5(rpc), _get_sanitizationConfig__sns434(this));
720
+ // Inline function 'kotlin.takeIf' call
721
+ var this_0 = buildModelImports(rpc, this.c1y());
722
+ var tmp_0;
723
+ // Inline function 'kotlin.collections.isNotEmpty' call
724
+ if (!this_0.r()) {
725
+ tmp_0 = this_0;
726
+ } else {
727
+ tmp_0 = null;
728
+ }
729
+ var tmp$ret$2 = tmp_0;
730
+ return prependImports(tmp, tmp$ret$2);
731
+ };
732
+ protoOf(KotlinIrEmitter).v1w = function (endpoint) {
733
+ var imports = buildModelImports(endpoint, this.c1y());
734
+ var endpointImport = import_0(this.c1y().js_1 + '.endpoint', endpoint.kq_1.m1());
1414
735
  var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
1415
- var subPackageName = plus_0(this.v1x(), 'client');
1416
- var tmp = Companion_getInstance().s1h(subPackageName.gs() + file.m1o_1.t1h());
736
+ var subPackageName = plus_1(this.c1y(), 'client');
737
+ var tmp = Companion_getInstance().h1h(subPackageName.ls() + file.c1o_1.i1h());
1417
738
  // Inline function 'kotlin.collections.buildList' call
1418
739
  // Inline function 'kotlin.collections.buildListInternal' call
1419
740
  // Inline function 'kotlin.apply' call
1420
741
  var this_0 = ArrayList_init_$Create$_0();
1421
- this_0.x(new Package(subPackageName.es_1));
1422
- this_0.f1(this.n1z_1);
1423
- this_0.f1(imports);
742
+ this_0.x(new Package(subPackageName.js_1));
743
+ this_0.g1(this.h1y_1);
744
+ this_0.g1(imports);
1424
745
  this_0.x(endpointImport);
1425
- this_0.f1(file.n1o_1);
1426
- var tmp$ret$3 = this_0.o5();
746
+ this_0.g1(file.d1o_1);
747
+ var tmp$ret$3 = this_0.p5();
1427
748
  return new File(tmp, tmp$ret$3);
1428
749
  };
1429
- protoOf(KotlinIrEmitter).z1w = function (endpoints, logger) {
750
+ protoOf(KotlinIrEmitter).s1w = function (endpoints, logger) {
1430
751
  // Inline function 'kotlin.collections.flatMap' call
1431
752
  // Inline function 'kotlin.collections.flatMapTo' call
1432
753
  var destination = ArrayList_init_$Create$_0();
@@ -1442,7 +763,7 @@ protoOf(KotlinIrEmitter).z1w = function (endpoints, logger) {
1442
763
  var _iterator__ex2g4s_0 = destination.t();
1443
764
  while (_iterator__ex2g4s_0.u()) {
1444
765
  var e = _iterator__ex2g4s_0.v();
1445
- var key = e.cv_1;
766
+ var key = e.lv_1;
1446
767
  if (set.x(key)) {
1447
768
  list_0.x(e);
1448
769
  }
@@ -1453,7 +774,7 @@ protoOf(KotlinIrEmitter).z1w = function (endpoints, logger) {
1453
774
  var _iterator__ex2g4s_1 = list_0.t();
1454
775
  while (_iterator__ex2g4s_1.u()) {
1455
776
  var item = _iterator__ex2g4s_1.v();
1456
- var tmp$ret$5 = import_0(this.v1x().es_1 + '.model', item.cv_1);
777
+ var tmp$ret$5 = import_0(this.c1y().js_1 + '.model', item.lv_1);
1457
778
  destination_0.x(tmp$ret$5);
1458
779
  }
1459
780
  var imports = destination_0;
@@ -1463,7 +784,7 @@ protoOf(KotlinIrEmitter).z1w = function (endpoints, logger) {
1463
784
  var _iterator__ex2g4s_2 = endpoints.t();
1464
785
  while (_iterator__ex2g4s_2.u()) {
1465
786
  var item_0 = _iterator__ex2g4s_2.v();
1466
- var tmp$ret$8 = import_0(this.v1x().es_1 + '.endpoint', item_0.vp_1.l1());
787
+ var tmp$ret$8 = import_0(this.c1y().js_1 + '.endpoint', item_0.kq_1.m1());
1467
788
  destination_1.x(tmp$ret$8);
1468
789
  }
1469
790
  var endpointImports = destination_1;
@@ -1473,22 +794,22 @@ protoOf(KotlinIrEmitter).z1w = function (endpoints, logger) {
1473
794
  var _iterator__ex2g4s_3 = endpoints.t();
1474
795
  while (_iterator__ex2g4s_3.u()) {
1475
796
  var item_1 = _iterator__ex2g4s_3.v();
1476
- var tmp$ret$11 = import_0(this.v1x().es_1 + '.client', item_1.vp_1.l1() + 'Client');
797
+ var tmp$ret$11 = import_0(this.c1y().js_1 + '.client', item_1.kq_1.m1() + 'Client');
1477
798
  destination_2.x(tmp$ret$11);
1478
799
  }
1479
800
  var clientImports = destination_2;
1480
- var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
801
+ var allImports = plus_0(plus_0(imports, endpointImports), clientImports);
1481
802
  var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
1482
- var tmp = Companion_getInstance().s1h(this.v1x().gs() + file.m1o_1.t1h());
803
+ var tmp = Companion_getInstance().h1h(this.c1y().ls() + file.c1o_1.i1h());
1483
804
  // Inline function 'kotlin.collections.buildList' call
1484
805
  // Inline function 'kotlin.collections.buildListInternal' call
1485
806
  // Inline function 'kotlin.apply' call
1486
807
  var this_0 = ArrayList_init_$Create$_0();
1487
- this_0.x(new Package(this.v1x().es_1));
1488
- this_0.f1(this.n1z_1);
1489
- this_0.f1(allImports);
1490
- this_0.f1(file.n1o_1);
1491
- var tmp$ret$17 = this_0.o5();
808
+ this_0.x(new Package(this.c1y().js_1));
809
+ this_0.g1(this.h1y_1);
810
+ this_0.g1(allImports);
811
+ this_0.g1(file.d1o_1);
812
+ var tmp$ret$17 = this_0.p5();
1492
813
  return new File(tmp, tmp$ret$17);
1493
814
  };
1494
815
  function buildModelImports(_this__u8e3s4, packageName) {
@@ -1499,7 +820,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
1499
820
  var _iterator__ex2g4s = this_0.t();
1500
821
  while (_iterator__ex2g4s.u()) {
1501
822
  var e = _iterator__ex2g4s.v();
1502
- var key = e.cv_1;
823
+ var key = e.lv_1;
1503
824
  if (set.x(key)) {
1504
825
  list.x(e);
1505
826
  }
@@ -1510,7 +831,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
1510
831
  var _iterator__ex2g4s_0 = list.t();
1511
832
  while (_iterator__ex2g4s_0.u()) {
1512
833
  var item = _iterator__ex2g4s_0.v();
1513
- var tmp$ret$2 = import_0(packageName.es_1 + '.model', Companion_getInstance().s1h(item.cv_1).t1h());
834
+ var tmp$ret$2 = import_0(packageName.js_1 + '.model', Companion_getInstance().h1h(item.lv_1).i1h());
1514
835
  destination.x(tmp$ret$2);
1515
836
  }
1516
837
  return destination;
@@ -1522,14 +843,14 @@ function injectApiAlias(_this__u8e3s4) {
1522
843
  var tmp = scope;
1523
844
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1524
845
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1525
- var this_0 = scope.h1w_1;
846
+ var this_0 = scope.a1w_1;
1526
847
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1527
848
  // Inline function 'kotlin.apply' call
1528
849
  var this_1 = new TransformerBuilder();
1529
- this_1.f1j(injectApiAlias$lambda);
1530
- var tmp$ret$2 = this_1.g1j();
1531
- tmp.h1w_1 = transform(this_0, tmp$ret$2);
1532
- var tmp_0 = scope.h1w_1;
850
+ this_1.u1i(injectApiAlias$lambda);
851
+ var tmp$ret$2 = this_1.v1i();
852
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
853
+ var tmp_0 = scope.a1w_1;
1533
854
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1534
855
  }
1535
856
  function injectCompanionObject(_this__u8e3s4, endpoint) {
@@ -1539,20 +860,20 @@ function injectCompanionObject(_this__u8e3s4, endpoint) {
1539
860
  var tmp = scope;
1540
861
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1541
862
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1542
- var this_0 = scope.h1w_1;
863
+ var this_0 = scope.a1w_1;
1543
864
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1544
865
  // Inline function 'kotlin.apply' call
1545
866
  var this_1 = new TransformerBuilder();
1546
- this_1.f1j(injectCompanionObject$lambda(endpoint));
1547
- var tmp$ret$2 = this_1.g1j();
1548
- tmp.h1w_1 = transform(this_0, tmp$ret$2);
1549
- var tmp_0 = scope.h1w_1;
867
+ this_1.u1i(injectCompanionObject$lambda(endpoint));
868
+ var tmp$ret$2 = this_1.v1i();
869
+ tmp.a1w_1 = transform(this_0, tmp$ret$2);
870
+ var tmp_0 = scope.a1w_1;
1550
871
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1551
872
  }
1552
873
  function buildCompanionObject(endpoint) {
1553
- var pathTemplate = '/' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
874
+ var pathTemplate = '/' + joinToString(endpoint.mq_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
1554
875
  // Inline function 'kotlin.let' call
1555
- var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.wp_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
876
+ var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.lq_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
1556
877
  return raw(p0);
1557
878
  }
1558
879
  function injectApiAlias$lambda(element, transformer) {
@@ -1562,7 +883,36 @@ function injectApiAlias$lambda(element, transformer) {
1562
883
  var tmp_0;
1563
884
  // Inline function 'kotlin.collections.isNotEmpty' call
1564
885
  if (!injected.r()) {
1565
- tmp_0 = withElements(element, plus_2(element.o1o(), injected));
886
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
887
+ var elements = plus_0(element.e1o(), injected);
888
+ var tmp_1;
889
+ if (element instanceof File) {
890
+ tmp_1 = element.g1o(VOID, elements);
891
+ } else {
892
+ if (element instanceof Struct) {
893
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
894
+ } else {
895
+ if (element instanceof Namespace) {
896
+ tmp_1 = element.n1o(VOID, elements);
897
+ } else {
898
+ if (element instanceof Interface) {
899
+ tmp_1 = element.w1o(VOID, elements);
900
+ } else {
901
+ if (element instanceof Enum) {
902
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
903
+ } else {
904
+ if (element instanceof Main) {
905
+ tmp_1 = element;
906
+ } else {
907
+ tmp_1 = element;
908
+ }
909
+ }
910
+ }
911
+ }
912
+ }
913
+ }
914
+ var tmp_2 = tmp_1;
915
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1566
916
  } else {
1567
917
  tmp_0 = element;
1568
918
  }
@@ -1577,11 +927,40 @@ function injectCompanionObject$lambda($endpoint) {
1577
927
  return function (element, transformer) {
1578
928
  var tmp;
1579
929
  if (element instanceof Interface) {
1580
- var injected = element.k1p_1.equals(Companion_getInstance().s1h('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
930
+ var injected = element.o1o_1.equals(Companion_getInstance().h1h('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
1581
931
  var tmp_0;
1582
932
  // Inline function 'kotlin.collections.isNotEmpty' call
1583
933
  if (!injected.r()) {
1584
- tmp_0 = withElements(element, plus_2(element.o1o(), injected));
934
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
935
+ var elements = plus_0(element.e1o(), injected);
936
+ var tmp_1;
937
+ if (element instanceof File) {
938
+ tmp_1 = element.g1o(VOID, elements);
939
+ } else {
940
+ if (element instanceof Struct) {
941
+ tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
942
+ } else {
943
+ if (element instanceof Namespace) {
944
+ tmp_1 = element.n1o(VOID, elements);
945
+ } else {
946
+ if (element instanceof Interface) {
947
+ tmp_1 = element.w1o(VOID, elements);
948
+ } else {
949
+ if (element instanceof Enum) {
950
+ tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
951
+ } else {
952
+ if (element instanceof Main) {
953
+ tmp_1 = element;
954
+ } else {
955
+ tmp_1 = element;
956
+ }
957
+ }
958
+ }
959
+ }
960
+ }
961
+ }
962
+ var tmp_2 = tmp_1;
963
+ tmp_0 = tmp_2 instanceof Interface ? tmp_2 : THROW_CCE();
1585
964
  } else {
1586
965
  tmp_0 = element;
1587
966
  }
@@ -1596,87 +975,24 @@ function injectCompanionObject$lambda($endpoint) {
1596
975
  function buildCompanionObject$lambda(it) {
1597
976
  var tmp;
1598
977
  if (it instanceof Literal) {
1599
- tmp = it.yq_1;
978
+ tmp = it.bu_1;
1600
979
  } else {
1601
980
  if (it instanceof Param) {
1602
- tmp = '{' + it.cq_1.l1() + '}';
981
+ tmp = '{' + it.rq_1.m1() + '}';
1603
982
  } else {
1604
983
  noWhenBranchMatchedException();
1605
984
  }
1606
985
  }
1607
986
  return tmp;
1608
987
  }
1609
- function KotlinRefinedTypeDefinitionEmitter() {
1610
- }
1611
- function KotlinShared() {
1612
- KotlinShared_instance = this;
1613
- this.c1z_1 = 'community.flock.wirespec.kotlin';
1614
- this.d1z_1 = trimMargin('\n |package ' + this.c1z_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> {\n |' + Spacer_instance.is(2) + 'val value: T\n |' + Spacer_instance.is(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.is(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.is(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.is(2) + 'val pathTemplate: String\n |' + Spacer_instance.is(2) + 'val method: String\n |' + Spacer_instance.is(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.is(2) + 'val pathTemplate: String\n |' + Spacer_instance.is(2) + 'val method: String\n |' + Spacer_instance.is(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1615
- }
1616
- protoOf(KotlinShared).toString = function () {
1617
- return 'KotlinShared';
1618
- };
1619
- protoOf(KotlinShared).hashCode = function () {
1620
- return -563306154;
1621
- };
1622
- protoOf(KotlinShared).equals = function (other) {
1623
- if (this === other)
1624
- return true;
1625
- if (!(other instanceof KotlinShared))
1626
- return false;
1627
- return true;
1628
- };
1629
- var KotlinShared_instance;
1630
- function KotlinShared_getInstance() {
1631
- if (KotlinShared_instance == null)
1632
- new KotlinShared();
1633
- return KotlinShared_instance;
1634
- }
1635
- function KotlinTypeDefinitionEmitter$emit$lambda(this$0) {
1636
- return function (it) {
1637
- return this$0.oq(it);
1638
- };
1639
- }
1640
- function KotlinTypeDefinitionEmitter$emit$lambda_0(this$0) {
1641
- return function (it) {
1642
- return Spacer_instance.toString() + 'val ' + this$0.nq(it) + ',';
1643
- };
1644
- }
1645
- function KotlinTypeDefinitionEmitter() {
1646
- }
1647
- function KotlinUnionDefinitionEmitter() {
1648
- }
1649
988
  //region block: post-declaration
1650
- protoOf(KotlinEmitter).lq = emit_4;
1651
- protoOf(KotlinEmitter).mq = emit_5;
1652
- protoOf(KotlinEmitter).nq = emit_6;
1653
- protoOf(KotlinEmitter).oq = emit_7;
1654
- protoOf(KotlinEmitter).pq = emit_8;
1655
- protoOf(KotlinEmitter).as = emit_15;
1656
- protoOf(KotlinEmitter).vr = emit_11;
1657
- protoOf(KotlinEmitter).bs = emit_12;
1658
- protoOf(KotlinEmitter).qr = emit_10;
1659
- protoOf(KotlinEmitter).or = emit_3;
1660
- protoOf(KotlinEmitter).pr = emit_9;
1661
- protoOf(KotlinEmitter).i1y = emit_13;
1662
- protoOf(KotlinEmitter).j1y = emit_14;
1663
- protoOf(KotlinEmitter).cs = emitValidator;
1664
- protoOf(KotlinEmitter).v1y = sanitize;
1665
- protoOf(KotlinEmitter).k1y = sanitizeFirstIsDigit;
1666
- protoOf(KotlinEmitter).l1y = sanitizeKeywords;
1667
- protoOf(KotlinEmitter).m1y = emitHandleFunction;
1668
- protoOf(KotlinEmitter).e1z = emitRequestHeaders;
1669
- protoOf(KotlinEmitter).f1z = emitQueries;
1670
- protoOf(KotlinEmitter).g1z = emitBody;
1671
- protoOf(KotlinEmitter).h1z = emitHeaders;
1672
- protoOf(KotlinIrEmitter).w1w = get_extensions;
1673
- protoOf(KotlinIrEmitter).eo = emit_1;
1674
- protoOf(KotlinIrEmitter).x1w = emit_2;
1675
- protoOf(KotlinIrEmitter).b1x = beforeGenerate;
989
+ protoOf(KotlinIrEmitter).p1w = get_extensions;
990
+ protoOf(KotlinIrEmitter).no = emit_0;
991
+ protoOf(KotlinIrEmitter).q1w = emit_1;
992
+ protoOf(KotlinIrEmitter).u1w = beforeGenerate;
1676
993
  //endregion
1677
994
  //region block: exports
1678
995
  export {
1679
- KotlinEmitter as KotlinEmitterddb8247fx90i,
1680
996
  KotlinIrEmitter as KotlinIrEmitterbehcpsqpuupy,
1681
997
  };
1682
998
  //endregion